summaryrefslogtreecommitdiffstats
path: root/filters/karbon
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitb6edfe41c9395f2e20784cbf0e630af6426950a3 (patch)
tree56ed9b871d4296e6c15949c24e16420be1b28697 /filters/karbon
parentef39e8e4178a8f98cf5f154916ba0f03e4855206 (diff)
downloadkoffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.tar.gz
koffice-b6edfe41c9395f2e20784cbf0e630af6426950a3.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filters/karbon')
-rw-r--r--filters/karbon/ai/aiparserbase.cc16
-rw-r--r--filters/karbon/applixgraphics/applixgraphicimport.cc4
-rw-r--r--filters/karbon/eps/pscommentlexer.cc4
-rw-r--r--filters/karbon/oodraw/oodrawimport.cc8
-rw-r--r--filters/karbon/svg/svgimport.cc42
-rw-r--r--filters/karbon/xaml/xamlimport.cc42
6 files changed, 58 insertions, 58 deletions
diff --git a/filters/karbon/ai/aiparserbase.cc b/filters/karbon/ai/aiparserbase.cc
index 6e9ff040..817c3d7e 100644
--- a/filters/karbon/ai/aiparserbase.cc
+++ b/filters/karbon/ai/aiparserbase.cc
@@ -791,16 +791,16 @@ void AIParserBase::_handleDocumentProcessColors(const char *data) {
signed int index;
- index = tmp.tqfind ("Cyan");
+ index = tmp.find ("Cyan");
if (index > 0) colorSet |= PC_Cyan;
- index = tmp.tqfind ("Magenta");
+ index = tmp.find ("Magenta");
if (index > 0) colorSet |= PC_Magenta;
- index = tmp.tqfind ("Yellow");
+ index = tmp.find ("Yellow");
if (index > 0) colorSet |= PC_Yellow;
- index = tmp.tqfind ("Black");
+ index = tmp.find ("Black");
if (index > 0) colorSet |= PC_Black;
if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet);
@@ -945,7 +945,7 @@ void AIParserBase::gotToken (const char *value) {
TQString string(value);
- if (m_modules.tqfindIndex(string) != -1)
+ if (m_modules.findIndex(string) != -1)
{
AIElement element (string, AIElement::Reference);
handleElement (element);
@@ -1067,7 +1067,7 @@ CommentOperation AIParserBase::getCommentOperation (const char *command) {
for(;;) {
CommentOperationMapping map = commentMappings[i];
if (map.op == NULL) return CO_Other;
- index = data.tqfind (map.op);
+ index = data.find (map.op);
if (index >= 0) return map.action;
i++;
}
@@ -1088,7 +1088,7 @@ void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double p
const char *AIParserBase::getValue (const char *input) {
TQString data(input);
- signed int index = data.tqfind (':');
+ signed int index = data.find (':');
if (index < 0) return "";
index++;
while (data.at(index) == ' ') index++;
@@ -1099,7 +1099,7 @@ bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx
if (input == NULL) return false;
TQString s(input);
- if (s.tqcontains ("(atend)")) return false;
+ if (s.contains ("(atend)")) return false;
TQStringList values = TQStringList::split (" ", input);
if (values.size() < 5) return false;
llx = values[1].toInt();
diff --git a/filters/karbon/applixgraphics/applixgraphicimport.cc b/filters/karbon/applixgraphics/applixgraphicimport.cc
index 8a433ec9..b3df1581 100644
--- a/filters/karbon/applixgraphics/applixgraphicimport.cc
+++ b/filters/karbon/applixgraphics/applixgraphicimport.cc
@@ -231,11 +231,11 @@ KoFilter::ConversiontqStatus APPLIXGRAPHICImport::convert( const TQCString& from
//mystr.remove (0, 7);
- //remove_pos = mystr.tqfind ('(');
+ //remove_pos = mystr.find ('(');
//mystr.remove (0, remove_pos);
//agLine.offX= mystr.toInt();
- //remove_pos = mystr.tqfind (',');
+ //remove_pos = mystr.find (',');
//mystr.remove (0, remove_pos);
//agLine.offY= mystr.toInt();
rueck = sscanf ((const char *) mystr.latin1(), "(%d,%d)",
diff --git a/filters/karbon/eps/pscommentlexer.cc b/filters/karbon/eps/pscommentlexer.cc
index dc0a67a1..04aa9aaa 100644
--- a/filters/karbon/eps/pscommentlexer.cc
+++ b/filters/karbon/eps/pscommentlexer.cc
@@ -298,7 +298,7 @@ BoundingBoxExtractor::~BoundingBoxExtractor() {}
void BoundingBoxExtractor::gotComment (const char *value)
{
TQString data (value);
- if (data.tqfind("%BoundingBox:")==-1) return;
+ if (data.find("%BoundingBox:")==-1) return;
getRectangle (value, m_llx, m_lly, m_urx, m_ury);
}
@@ -308,7 +308,7 @@ bool BoundingBoxExtractor::getRectangle (const char* input, int &llx, int &lly,
if (input == NULL) return false;
TQString s(input);
- if (s.tqcontains ("(atend)")) return false;
+ if (s.contains ("(atend)")) return false;
TQString s2 = s.remove("%BoundingBox:");
TQStringList values = TQStringList::split (" ", s2.latin1());
diff --git a/filters/karbon/oodraw/oodrawimport.cc b/filters/karbon/oodraw/oodrawimport.cc
index d571762b..ef90c93d 100644
--- a/filters/karbon/oodraw/oodrawimport.cc
+++ b/filters/karbon/oodraw/oodrawimport.cc
@@ -659,7 +659,7 @@ OoDrawImport::parseViewBox( const TQDomElement& object )
{
// allow for viewbox def with ',' or whitespace
TQString viewbox( object.attributeNS( ooNS::svg, "viewBox", TQString() ) );
- TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() );
+ TQStringList points = TQStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() );
rect.setX( points[0].toFloat() );
rect.setY( points[1].toFloat() );
@@ -715,19 +715,19 @@ OoDrawImport::parseColor( VColor &color, const TQString &s )
TQString g = colors[1];
TQString b = colors[2].left( ( colors[2].length() - 1 ) );
- if( r.tqcontains( "%" ) )
+ if( r.contains( "%" ) )
{
r = r.left( r.length() - 1 );
r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
}
- if( g.tqcontains( "%" ) )
+ if( g.contains( "%" ) )
{
g = g.left( g.length() - 1 );
g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
}
- if( b.tqcontains( "%" ) )
+ if( b.contains( "%" ) )
{
b = b.left( b.length() - 1 );
b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
diff --git a/filters/karbon/svg/svgimport.cc b/filters/karbon/svg/svgimport.cc
index b8b580f7..5a5e90aa 100644
--- a/filters/karbon/svg/svgimport.cc
+++ b/filters/karbon/svg/svgimport.cc
@@ -63,7 +63,7 @@ KoFilter::ConversiontqStatus SvgImport::convert(const TQCString& from, const TQC
//Find the last extension
TQString strExt;
TQString fileIn ( m_chain->inputFile() );
- const int result=fileIn.tqfindRev('.');
+ const int result=fileIn.findRev('.');
if (result>=0)
strExt=fileIn.mid(result).lower();
@@ -143,7 +143,7 @@ void SvgImport::convert()
{
// allow for viewbox def with ',' or whitespace
TQString viewbox( docElem.attribute( "viewBox" ) );
- TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() );
+ TQStringList points = TQStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() );
gc->matrix.scale( width / points[2].toFloat() , height / points[3].toFloat() );
m_outerRect.setWidth( m_outerRect.width() * ( points[2].toFloat() / width ) );
@@ -310,11 +310,11 @@ VObject* SvgImport::findObject( const TQString &name )
SvgImport::GradientHelper* SvgImport::findGradient( const TQString &id, const TQString &href)
{
// check if gradient was already parsed, and return it
- if( m_gradients.tqcontains( id ) )
+ if( m_gradients.contains( id ) )
return &m_gradients[ id ];
// check if gradient was stored for later parsing
- if( !m_defs.tqcontains( id ) )
+ if( !m_defs.contains( id ) )
return 0L;
TQDomElement e = m_defs[ id ];
@@ -322,7 +322,7 @@ SvgImport::GradientHelper* SvgImport::findGradient( const TQString &id, const TQ
{
TQString mhref = e.attribute("xlink:href").mid(1);
- if(m_defs.tqcontains(mhref))
+ if(m_defs.contains(mhref))
return findGradient(mhref, id);
else
return 0L;
@@ -340,7 +340,7 @@ SvgImport::GradientHelper* SvgImport::findGradient( const TQString &id, const TQ
else
n = href;
- if( m_gradients.tqcontains( n ) )
+ if( m_gradients.contains( n ) )
return &m_gradients[ n ];
else
return 0L;
@@ -456,19 +456,19 @@ void SvgImport::parseColor( VColor &color, const TQString &s )
TQString g = colors[1];
TQString b = colors[2].left( ( colors[2].length() - 1 ) );
- if( r.tqcontains( "%" ) )
+ if( r.contains( "%" ) )
{
r = r.left( r.length() - 1 );
r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
}
- if( g.tqcontains( "%" ) )
+ if( g.contains( "%" ) )
{
g = g.left( g.length() - 1 );
g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
}
- if( b.tqcontains( "%" ) )
+ if( b.contains( "%" ) )
{
b = b.left( b.length() - 1 );
b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
@@ -504,7 +504,7 @@ void SvgImport::parseColorStops( VGradient *gradient, const TQDomElement &e )
{
float offset;
TQString temp = stop.attribute( "offset" );
- if( temp.tqcontains( '%' ) )
+ if( temp.contains( '%' ) )
{
temp = temp.left( temp.length() - 1 );
offset = temp.toFloat() / 100.0;
@@ -582,7 +582,7 @@ void SvgImport::parseGradient( const TQDomElement &e , const TQDomElement &refer
if( !id.isEmpty() )
{
// Copy existing gradient if it exists
- if( m_gradients.tqfind( id ) != m_gradients.end() )
+ if( m_gradients.find( id ) != m_gradients.end() )
gradhelper.gradient = m_gradients[ id ].gradient;
}
@@ -676,8 +676,8 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const TQString &c
gc->fill.setType( VFill::none );
else if( params.startsWith( "url(" ) )
{
- unsigned int start = params.tqfind("#") + 1;
- unsigned int end = params.tqfindRev(")");
+ unsigned int start = params.find("#") + 1;
+ unsigned int end = params.findRev(")");
TQString key = params.mid( start, end - start );
GradientHelper *gradHelper = findGradient( key );
if( gradHelper )
@@ -739,8 +739,8 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const TQString &c
gc->stroke.setType( VStroke::none );
else if( params.startsWith( "url(" ) )
{
- unsigned int start = params.tqfind("#") + 1;
- unsigned int end = params.tqfindRev(")");
+ unsigned int start = params.find("#") + 1;
+ unsigned int end = params.findRev(")");
TQString key = params.mid( start, end - start );
GradientHelper *gradHelper = findGradient( key );
@@ -810,7 +810,7 @@ void SvgImport::parsePA( VObject *obj, SvgGraphicsContext *gc, const TQString &c
else if( command == "font-family" )
{
TQString family = params;
- family.tqreplace( '\'' , ' ' );
+ family.replace( '\'' , ' ' );
gc->font.setFamily( family );
}
else if( command == "font-size" )
@@ -1006,7 +1006,7 @@ void SvgImport::parseUse( VGroup *grp, const TQDomElement &e )
m_gc.current()->matrix.translate(tx,ty);
}
- if(m_defs.tqcontains(key))
+ if(m_defs.contains(key))
{
TQDomElement a = m_defs[key];
if(a.tagName() == "g" || a.tagName() == "a")
@@ -1100,7 +1100,7 @@ void SvgImport::parseDefs( const TQDomElement &e )
TQString definition = b.attribute( "id" );
if( !definition.isEmpty() )
{
- if( !m_defs.tqcontains( definition ) )
+ if( !m_defs.contains( definition ) )
m_defs.insert( definition, b );
}
}
@@ -1152,7 +1152,7 @@ void SvgImport::createText( VGroup *grp, const TQDomElement &b )
continue;
TQString key = e.attribute( "xlink:href" ).mid( 1 );
- if( ! m_defs.tqcontains(key) )
+ if( ! m_defs.contains(key) )
{
// try to find referenced object in document
VObject* obj = findObject( key );
@@ -1214,7 +1214,7 @@ void SvgImport::createText( VGroup *grp, const TQDomElement &b )
continue;
TQString key = e.attribute( "xlink:href" ).mid( 1 );
- if( ! m_defs.tqcontains(key) )
+ if( ! m_defs.contains(key) )
{
// try to find referenced object in document
VObject* obj = findObject( key );
@@ -1328,7 +1328,7 @@ void SvgImport::createObject( VGroup *grp, const TQDomElement &b, const VObject:
bool bFirst = true;
TQString points = b.attribute( "points" ).simplifyWhiteSpace();
- points.tqreplace( ',', ' ' );
+ points.replace( ',', ' ' );
points.remove( '\r' );
points.remove( '\n' );
TQStringList pointList = TQStringList::split( ' ', points );
diff --git a/filters/karbon/xaml/xamlimport.cc b/filters/karbon/xaml/xamlimport.cc
index b7f68bbb..3a755181 100644
--- a/filters/karbon/xaml/xamlimport.cc
+++ b/filters/karbon/xaml/xamlimport.cc
@@ -61,7 +61,7 @@ KoFilter::ConversiontqStatus XAMLImport::convert(const TQCString& from, const TQ
//Find the last extension
TQString strExt;
TQString fileIn ( m_chain->inputFile() );
- const int result=fileIn.tqfindRev('.');
+ const int result=fileIn.findRev('.');
if (result>=0)
{
strExt=fileIn.mid(result).lower();
@@ -133,7 +133,7 @@ XAMLImport::convert()
{
// allow for viewbox def with ',' or whitespace
TQString viewbox( docElem.attribute( "viewBox" ) );
- TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ').simplifyWhiteSpace() );
+ TQStringList points = TQStringList::split( ' ', viewbox.replace( ',', ' ').simplifyWhiteSpace() );
gc->matrix.scale( width / points[2].toFloat() , height / points[3].toFloat() );
m_outerRect.setWidth( m_outerRect.width() * ( points[2].toFloat() / width ) );
@@ -303,19 +303,19 @@ XAMLImport::parseColor( VColor &color, const TQString &s )
TQString g = colors[1];
TQString b = colors[2].left( ( colors[2].length() - 1 ) );
- if( r.tqcontains( "%" ) )
+ if( r.contains( "%" ) )
{
r = r.left( r.length() - 1 );
r = TQString::number( int( ( double( 255 * r.toDouble() ) / 100.0 ) ) );
}
- if( g.tqcontains( "%" ) )
+ if( g.contains( "%" ) )
{
g = g.left( g.length() - 1 );
g = TQString::number( int( ( double( 255 * g.toDouble() ) / 100.0 ) ) );
}
- if( b.tqcontains( "%" ) )
+ if( b.contains( "%" ) )
{
b = b.left( b.length() - 1 );
b = TQString::number( int( ( double( 255 * b.toDouble() ) / 100.0 ) ) );
@@ -347,7 +347,7 @@ XAMLImport::parseColorStops( VGradient *gradient, const TQDomElement &e )
{
float offset;
TQString temp = stop.attribute( "offset" );
- if( temp.tqcontains( '%' ) )
+ if( temp.contains( '%' ) )
{
temp = temp.left( temp.length() - 1 );
offset = temp.toFloat() / 100.0;
@@ -454,8 +454,8 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const TQString &comm
gc->fill.setType( VFill::none );
else if( params.startsWith( "url(" ) )
{
- unsigned int start = params.tqfind("#") + 1;
- unsigned int end = params.tqfindRev(")");
+ unsigned int start = params.find("#") + 1;
+ unsigned int end = params.findRev(")");
TQString key = params.mid( start, end - start );
gc->fill.gradient() = m_gradients[ key ].gradient;
if( m_gradients[ key ].bbox )
@@ -505,8 +505,8 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const TQString &comm
gc->stroke.setType( VStroke::none );
else if( params.startsWith( "url(" ) )
{
- unsigned int start = params.tqfind("#") + 1;
- unsigned int end = params.tqfindRev(")");
+ unsigned int start = params.find("#") + 1;
+ unsigned int end = params.findRev(")");
TQString key = params.mid( start, end - start );
gc->stroke.gradient() = m_gradients[ key ].gradient;
gc->stroke.gradient().transform( m_gradients[ key ].gradientTransform );
@@ -567,7 +567,7 @@ XAMLImport::parsePA( VObject *obj, XAMLGraphicsContext *gc, const TQString &comm
else if( command == "font-family" )
{
TQString family = params;
- family.tqreplace( '\'' , ' ' );
+ family.replace( '\'' , ' ' );
gc->font.setFamily( family );
}
else if( command == "font-size" )
@@ -750,10 +750,10 @@ XAMLImport::parseGroup( VGroup *grp, const TQDomElement &e )
if( !b.attribute( "xlink:href" ).isEmpty() )
{
TQString params = b.attribute( "xlink:href" );
- unsigned int start = params.tqfind("#") + 1;
- unsigned int end = params.tqfindRev(")");
+ unsigned int start = params.find("#") + 1;
+ unsigned int end = params.findRev(")");
TQString key = params.mid( start, end - start );
- if(m_paths.tqcontains(key))
+ if(m_paths.contains(key))
{
TQDomElement a = m_paths[key];
obj = createObject( a );
@@ -854,10 +854,10 @@ void XAMLImport::createText( VGroup *grp, const TQDomElement &b )
continue;
TQString uri = e.attribute( "xlink:href" );
- unsigned int start = uri.tqfind("#") + 1;
- unsigned int end = uri.tqfindRev(")");
+ unsigned int start = uri.find("#") + 1;
+ unsigned int end = uri.findRev(")");
TQString key = uri.mid( start, end - start );
- if( ! m_paths.tqcontains(key) )
+ if( ! m_paths.contains(key) )
{
VObject* obj = findObject( key );
if( obj )
@@ -899,11 +899,11 @@ void XAMLImport::createText( VGroup *grp, const TQDomElement &b )
continue;
TQString uri = e.attribute( "xlink:href" );
- unsigned int start = uri.tqfind("#") + 1;
- unsigned int end = uri.tqfindRev(")");
+ unsigned int start = uri.find("#") + 1;
+ unsigned int end = uri.findRev(")");
TQString key = uri.mid( start, end - start );
- if( ! m_paths.tqcontains(key) )
+ if( ! m_paths.contains(key) )
{
VObject* obj = findObject( key );
if( obj )
@@ -1000,7 +1000,7 @@ VObject* XAMLImport::createObject( const TQDomElement &b )
bool bFirst = true;
TQString points = b.attribute( "points" ).simplifyWhiteSpace();
- points.tqreplace( ',', ' ' );
+ points.replace( ',', ' ' );
points.remove( '\r' );
points.remove( '\n' );
TQStringList pointList = TQStringList::split( ' ', points );