diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 15:31:24 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:41 +0200 |
commit | 99268dbe1fc25bc2d04eefa1a9f7e2cf7b398065 (patch) | |
tree | f9865652a2a4fd5d1452a4cbdc22028c21ad3894 | |
parent | 7acf99de38a74673a4e57d2b7862757029ee289e (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 ) {/' \{\} \;
-rw-r--r-- | oox/source/export/drawingml.cxx | 8 | ||||
-rw-r--r-- | oox/source/export/shapes.cxx | 2 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-epptooxml.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/gvfs/gvfs_content.cxx | 18 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/csfit/helper.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/tools/standalone/mscsfit/helper.cxx | 2 |
6 files changed, 19 insertions, 19 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 3ab7dd91d7af..f2c28e985655 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -1017,10 +1017,10 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa DBG(printf ("pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr())); if ( aPropName == "NumberingType" ) nNumberingType = *( (sal_Int16*)pValue ); - else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Prefix" ) ) ) { + else if ( aPropName == "Prefix" ) { if( *(OUString*)pValue == US( ")" ) ) bPBoth = true; - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Suffix" ) ) ) { + } else if ( aPropName == "Suffix" ) { if( *(OUString*)pValue == US( "." ) ) bSDot = true; else if( *(OUString*)pValue == US( ")" ) ) @@ -1042,9 +1042,9 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa if ( aFontDesc.Name == "StarSymbol" ) aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252; - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletRelSize" ) ) ) { + } else if ( aPropName == "BulletRelSize" ) { nBulletRelSize = *( (sal_Int16*)pValue ); - } else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicURL" ) ) ) { + } else if ( aPropName == "GraphicURL" ) { aGraphicURL = ( *(OUString*)pValue ); DBG(printf ("graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr())); } else if ( aPropName == "GraphicSize" ) diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 066a53fb813e..f71226c62247 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -720,7 +720,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) rProp.Value >>= bFlipV; if ( rProp.Name == "AdjustmentValues" ) nAdjustmentValuesIndex = i; - else if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Handles" ) )) { + else if ( rProp.Name == "Handles" ) { if( !bIsDefaultObject ) bPredefinedHandlesUsed = sal_False; // TODO: update nAdjustmentsWhichNeedsToBeConverted here diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 8118a70ff662..c72bb6455dc8 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -739,11 +739,11 @@ void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUStr DBG(printf("write attribute name: %s\n", USS( rAttributeName ))); const char* sAttributeName = NULL; - if( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Visibility" ) ) ) { + if ( rAttributeName == "Visibility" ) { sAttributeName = "style.visibility"; - } else if( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "X" ) ) ) { + } else if ( rAttributeName == "X" ) { sAttributeName = "ppt_x"; - } else if( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Y" ) ) ) { + } else if ( rAttributeName == "Y" ) { sAttributeName = "ppt_y"; } diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx index 13f764088edb..51db0a3bd70e 100644 --- a/ucb/source/ucp/gvfs/gvfs_content.cxx +++ b/ucb/source/ucp/gvfs/gvfs_content.cxx @@ -609,7 +609,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( for( sal_Int32 n = 0; n < nProps; ++n ) { const beans::Property& rProp = pProps[ n ]; - if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) { + if ( rProp.Name == "Title" ) { if (m_info.name && m_info.name[0] == '/') g_warning ("Odd NFS title on item '%s' == '%s'", getURI(), m_info.name); @@ -619,20 +619,20 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else if ( rProp.Name == "ContentType" ) xRow->appendString( rProp, getContentType () ); - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ) { + else if ( rProp.Name == "IsDocument" ) { if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE) xRow->appendBoolean( rProp, ( m_info.type == GNOME_VFS_FILE_TYPE_REGULAR || m_info.type == GNOME_VFS_FILE_TYPE_UNKNOWN ) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ) { + else if ( rProp.Name == "IsFolder" ) { if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE) xRow->appendBoolean( rProp, ( m_info.type == GNOME_VFS_FILE_TYPE_DIRECTORY ) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) { + else if ( rProp.Name == "IsReadOnly" ) { GnomeVFSFileInfo* fileInfo = gnome_vfs_file_info_new (); @@ -652,7 +652,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( xRow->appendVoid( rProp ); gnome_vfs_file_info_unref (fileInfo); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ) { + else if ( rProp.Name == "Size" ) { if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE) xRow->appendLong( rProp, m_info.size ); else @@ -665,21 +665,21 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsCompactDisk" ) ) ) xRow->appendBoolean( rProp, sal_False ); - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateCreated" ) ) ) { + else if ( rProp.Name == "DateCreated" ) { if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_CTIME) xRow->appendTimestamp( rProp, getDateFromUnix( m_info.ctime ) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DateModified" ) ) ) { + else if ( rProp.Name == "DateModified" ) { if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MTIME) xRow->appendTimestamp( rProp, getDateFromUnix( m_info.mtime ) ); else xRow->appendVoid( rProp ); } - else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ) { + else if ( rProp.Name == "MediaType" ) { // We do this by sniffing in gnome-vfs; rather expensively. #ifdef DEBUG g_warning ("FIXME: Requested mime-type - an expensive op. indeed!"); @@ -804,7 +804,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) aRet[ n ] <<= getReadOnlyException( this ); - else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) { + else if ( rValue.Name == "Title" ) { if ( rValue.Value >>= aNewTitle ) { if ( aNewTitle.isEmpty() ) aRet[ n ] <<= lang::IllegalArgumentException diff --git a/xmlsecurity/tools/standalone/csfit/helper.cxx b/xmlsecurity/tools/standalone/csfit/helper.cxx index 51074f5c6e2b..ed06f3973d20 100644 --- a/xmlsecurity/tools/standalone/csfit/helper.cxx +++ b/xmlsecurity/tools/standalone/csfit/helper.cxx @@ -100,7 +100,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "No rdb URI specified" ) ; - if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { + if ( sUnoUrl == "local" ) { Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); OSL_ENSURE( xSimpleRegistry.is() , "serviceManager - " diff --git a/xmlsecurity/tools/standalone/mscsfit/helper.cxx b/xmlsecurity/tools/standalone/mscsfit/helper.cxx index bde0a2abbc2b..924270b910b2 100644 --- a/xmlsecurity/tools/standalone/mscsfit/helper.cxx +++ b/xmlsecurity/tools/standalone/mscsfit/helper.cxx @@ -70,7 +70,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext "serviceManager - " "No rdb URI specified" ) ; - if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { + if ( sUnoUrl == "local" ) { Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); OSL_ENSURE( xSimpleRegistry.is() , "serviceManager - " |