Kaydet (Commit) 99268dbe authored tarafından Szabolcs Dezsi's avatar Szabolcs Dezsi Kaydeden (comit) Jan Holesovsky

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 ) {/' \{\} \;
üst 7acf99de
...@@ -1017,10 +1017,10 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa ...@@ -1017,10 +1017,10 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
DBG(printf ("pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr())); DBG(printf ("pro name: %s\n", OUStringToOString( aPropName, RTL_TEXTENCODING_UTF8 ).getStr()));
if ( aPropName == "NumberingType" ) if ( aPropName == "NumberingType" )
nNumberingType = *( (sal_Int16*)pValue ); nNumberingType = *( (sal_Int16*)pValue );
else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Prefix" ) ) ) { else if ( aPropName == "Prefix" ) {
if( *(OUString*)pValue == US( ")" ) ) if( *(OUString*)pValue == US( ")" ) )
bPBoth = true; bPBoth = true;
} else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Suffix" ) ) ) { } else if ( aPropName == "Suffix" ) {
if( *(OUString*)pValue == US( "." ) ) if( *(OUString*)pValue == US( "." ) )
bSDot = true; bSDot = true;
else if( *(OUString*)pValue == US( ")" ) ) else if( *(OUString*)pValue == US( ")" ) )
...@@ -1042,9 +1042,9 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa ...@@ -1042,9 +1042,9 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
if ( aFontDesc.Name == "StarSymbol" ) if ( aFontDesc.Name == "StarSymbol" )
aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252; aFontDesc.CharSet = RTL_TEXTENCODING_MS_1252;
} else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "BulletRelSize" ) ) ) { } else if ( aPropName == "BulletRelSize" ) {
nBulletRelSize = *( (sal_Int16*)pValue ); nBulletRelSize = *( (sal_Int16*)pValue );
} else if ( aPropName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GraphicURL" ) ) ) { } else if ( aPropName == "GraphicURL" ) {
aGraphicURL = ( *(OUString*)pValue ); aGraphicURL = ( *(OUString*)pValue );
DBG(printf ("graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr())); DBG(printf ("graphic url: %s\n", OUStringToOString( aGraphicURL, RTL_TEXTENCODING_UTF8 ).getStr()));
} else if ( aPropName == "GraphicSize" ) } else if ( aPropName == "GraphicSize" )
......
...@@ -720,7 +720,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) ...@@ -720,7 +720,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
rProp.Value >>= bFlipV; rProp.Value >>= bFlipV;
if ( rProp.Name == "AdjustmentValues" ) if ( rProp.Name == "AdjustmentValues" )
nAdjustmentValuesIndex = i; nAdjustmentValuesIndex = i;
else if( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Handles" ) )) { else if ( rProp.Name == "Handles" ) {
if( !bIsDefaultObject ) if( !bIsDefaultObject )
bPredefinedHandlesUsed = sal_False; bPredefinedHandlesUsed = sal_False;
// TODO: update nAdjustmentsWhichNeedsToBeConverted here // TODO: update nAdjustmentsWhichNeedsToBeConverted here
......
...@@ -739,11 +739,11 @@ void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUStr ...@@ -739,11 +739,11 @@ void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUStr
DBG(printf("write attribute name: %s\n", USS( rAttributeName ))); DBG(printf("write attribute name: %s\n", USS( rAttributeName )));
const char* sAttributeName = NULL; const char* sAttributeName = NULL;
if( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Visibility" ) ) ) { if ( rAttributeName == "Visibility" ) {
sAttributeName = "style.visibility"; sAttributeName = "style.visibility";
} else if( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "X" ) ) ) { } else if ( rAttributeName == "X" ) {
sAttributeName = "ppt_x"; sAttributeName = "ppt_x";
} else if( rAttributeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Y" ) ) ) { } else if ( rAttributeName == "Y" ) {
sAttributeName = "ppt_y"; sAttributeName = "ppt_y";
} }
......
...@@ -609,7 +609,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ...@@ -609,7 +609,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
for( sal_Int32 n = 0; n < nProps; ++n ) { for( sal_Int32 n = 0; n < nProps; ++n ) {
const beans::Property& rProp = pProps[ 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] == '/') if (m_info.name && m_info.name[0] == '/')
g_warning ("Odd NFS title on item '%s' == '%s'", g_warning ("Odd NFS title on item '%s' == '%s'",
getURI(), m_info.name); getURI(), m_info.name);
...@@ -619,20 +619,20 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ...@@ -619,20 +619,20 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
else if ( rProp.Name == "ContentType" ) else if ( rProp.Name == "ContentType" )
xRow->appendString( rProp, getContentType () ); 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) if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE)
xRow->appendBoolean( rProp, ( m_info.type == GNOME_VFS_FILE_TYPE_REGULAR || xRow->appendBoolean( rProp, ( m_info.type == GNOME_VFS_FILE_TYPE_REGULAR ||
m_info.type == GNOME_VFS_FILE_TYPE_UNKNOWN ) ); m_info.type == GNOME_VFS_FILE_TYPE_UNKNOWN ) );
else else
xRow->appendVoid( rProp ); 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) if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE)
xRow->appendBoolean( rProp, ( m_info.type == GNOME_VFS_FILE_TYPE_DIRECTORY ) ); xRow->appendBoolean( rProp, ( m_info.type == GNOME_VFS_FILE_TYPE_DIRECTORY ) );
else else
xRow->appendVoid( rProp ); xRow->appendVoid( rProp );
} }
else if (rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsReadOnly" ) ) ) { else if ( rProp.Name == "IsReadOnly" ) {
GnomeVFSFileInfo* fileInfo = gnome_vfs_file_info_new (); GnomeVFSFileInfo* fileInfo = gnome_vfs_file_info_new ();
...@@ -652,7 +652,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ...@@ -652,7 +652,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
xRow->appendVoid( rProp ); xRow->appendVoid( rProp );
gnome_vfs_file_info_unref (fileInfo); 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) if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_SIZE)
xRow->appendLong( rProp, m_info.size ); xRow->appendLong( rProp, m_info.size );
else else
...@@ -665,21 +665,21 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( ...@@ -665,21 +665,21 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsCompactDisk" ) ) ) rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsCompactDisk" ) ) )
xRow->appendBoolean( rProp, sal_False ); 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) if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_CTIME)
xRow->appendTimestamp( rProp, getDateFromUnix( m_info.ctime ) ); xRow->appendTimestamp( rProp, getDateFromUnix( m_info.ctime ) );
else else
xRow->appendVoid( rProp ); 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) if (m_info.valid_fields & GNOME_VFS_FILE_INFO_FIELDS_MTIME)
xRow->appendTimestamp( rProp, getDateFromUnix( m_info.mtime ) ); xRow->appendTimestamp( rProp, getDateFromUnix( m_info.mtime ) );
else else
xRow->appendVoid( rProp ); 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. // We do this by sniffing in gnome-vfs; rather expensively.
#ifdef DEBUG #ifdef DEBUG
g_warning ("FIXME: Requested mime-type - an expensive op. indeed!"); g_warning ("FIXME: Requested mime-type - an expensive op. indeed!");
...@@ -804,7 +804,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ...@@ -804,7 +804,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
aRet[ n ] <<= getReadOnlyException( this ); aRet[ n ] <<= getReadOnlyException( this );
else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) { else if ( rValue.Name == "Title" ) {
if ( rValue.Value >>= aNewTitle ) { if ( rValue.Value >>= aNewTitle ) {
if ( aNewTitle.isEmpty() ) if ( aNewTitle.isEmpty() )
aRet[ n ] <<= lang::IllegalArgumentException aRet[ n ] <<= lang::IllegalArgumentException
......
...@@ -100,7 +100,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext ...@@ -100,7 +100,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - " "serviceManager - "
"No rdb URI specified" ) ; "No rdb URI specified" ) ;
if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { if ( sUnoUrl == "local" ) {
Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry();
OSL_ENSURE( xSimpleRegistry.is() , OSL_ENSURE( xSimpleRegistry.is() ,
"serviceManager - " "serviceManager - "
......
...@@ -70,7 +70,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext ...@@ -70,7 +70,7 @@ Reference< XMultiComponentFactory > serviceManager( Reference< XComponentContext
"serviceManager - " "serviceManager - "
"No rdb URI specified" ) ; "No rdb URI specified" ) ;
if( sUnoUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "local" ) ) ) { if ( sUnoUrl == "local" ) {
Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry(); Reference< XSimpleRegistry > xSimpleRegistry = createSimpleRegistry();
OSL_ENSURE( xSimpleRegistry.is() , OSL_ENSURE( xSimpleRegistry.is() ,
"serviceManager - " "serviceManager - "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment