diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 14:28:18 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 14:30:05 +0200 |
commit | 8a01ee624318ac08800af89d988971114637a04e (patch) | |
tree | e4acf35e42ab0c1d0b593bd8970fa2c435f90c95 /oox/source/export | |
parent | 6cf547f02c79278430ee75483a3128076cfc609e (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:
find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\) ) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'oox/source/export')
-rw-r--r-- | oox/source/export/drawingml.cxx | 10 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 01e4c015f3b3..3ab7dd91d7af 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1015,7 +1015,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa if ( pValue ) { OUString aPropName( pPropValue[ i ].Name ); DBG(printf ("pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr())); - if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NumberingType" ) ) ) + if ( aPropName == "NumberingType" ) nNumberingType = *( (sal_Int16*)pValue ); else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Prefix" ) ) ) { if( *(OUString*)pValue == US( ")" ) ) @@ -1025,12 +1025,12 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa bSDot = true; else if( *(OUString*)pValue == US( ")" ) ) bPBehind = true; - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletChar" ) ) ) + } else if ( aPropName == "BulletChar" ) { aBulletChar = String ( *( (String*)pValue ) ).GetChar( 0 ); //printf ("bullet char: %d\n", aBulletChar.getStr()); } - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletFont" ) ) ) + else if ( aPropName == "BulletFont" ) { aFontDesc = *( (awt::FontDescriptor*)pValue ); bHasFontDesc = true; @@ -1039,7 +1039,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa // instead of a Unicode encoding the encoding RTL_TEXTENCODING_SYMBOL was used. // Because there might exist a lot of damaged documemts I added this two lines // which fixes the bullet problem for the export. - if ( aFontDesc.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StarSymbol" ) ) ) + if ( aFontDesc.Name == "StarSymbol" ) aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252; } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletRelSize" ) ) ) { @@ -1047,7 +1047,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicURL" ) ) ) { aGraphicURL = ( *(OUString*)pValue ); DBG(printf ("graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr())); - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicSize" ) ) ) + } else if ( aPropName == "GraphicSize" ) { if ( pPropValue[ i ].Value.getValueType() == ::getCppuType( (awt::Size*)0) ) { diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 640418447d1f..066a53fb813e 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -713,12 +713,12 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) const PropertyValue& rProp = aGeometrySeq[ i ]; DBG(printf("geometry property: %s\n", USS( rProp.Name ))); - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MirroredX" ) )) + if ( rProp.Name == "MirroredX" ) rProp.Value >>= bFlipH; - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MirroredY" ) )) + if ( rProp.Name == "MirroredY" ) rProp.Value >>= bFlipV; - if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AdjustmentValues" ) )) + if ( rProp.Name == "AdjustmentValues" ) nAdjustmentValuesIndex = i; else if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Handles" ) )) { if( !bIsDefaultObject ) |