summaryrefslogtreecommitdiffstats
path: root/filters/karbon/svg
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/svg
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/svg')
-rw-r--r--filters/karbon/svg/svgimport.cc42
1 files changed, 21 insertions, 21 deletions
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 );