diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 15:05:52 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 15:07:41 +0200 |
commit | 743f22045c4ec08c46c259fc0ba240194a391457 (patch) | |
tree | faed42bb31c4ee767619eb5c3ebd4dec0a41fa03 /ucb | |
parent | 0c6ebe5d225d6a655f078977455cec6d0a3afa6e (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 'ucb')
-rw-r--r-- | ucb/source/core/provprox.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/file/bc.cxx | 24 | ||||
-rw-r--r-- | ucb/source/ucp/file/filglob.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpurl.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/odma/odma_content.cxx | 6 |
5 files changed, 18 insertions, 18 deletions
diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index c73fe311e54b..f8ef7a066b2e 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -347,7 +347,7 @@ UcbContentProviderProxy::getContentProvider() m_xProvider = Reference< XContentProvider >( m_xSMgr->createInstance( m_aService ), UNO_QUERY ); - if(m_aArguments.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("NoConfig"))) + if ( m_aArguments == "NoConfig" ) { Reference<XInitialization> xInit(m_xProvider,UNO_QUERY); if(xInit.is()) { diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 4c1c9f04415e..8c6e2e7a47f5 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -274,7 +274,7 @@ sal_Bool SAL_CALL BaseContent::supportsService( const rtl::OUString& ServiceName ) throw( RuntimeException) { - if (ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.ucb.FileContent"))) + if ( ServiceName == "com.sun.star.ucb.FileContent" ) return true; else return false; @@ -355,7 +355,7 @@ BaseContent::execute( const Command& aCommand, { aAny <<= getCommandInfo(); } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("setPropertyValues"))) + else if ( aCommand.Name == "setPropertyValues" ) { Sequence< beans::PropertyValue > sPropertyValues; @@ -365,7 +365,7 @@ BaseContent::execute( const Command& aCommand, else aAny <<= setPropertyValues( CommandId,sPropertyValues ); // calls endTask by itself } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertyValues"))) + else if ( aCommand.Name == "getPropertyValues" ) { Sequence< beans::Property > ListOfRequestedProperties; @@ -376,7 +376,7 @@ BaseContent::execute( const Command& aCommand, aAny <<= getPropertyValues( CommandId, ListOfRequestedProperties ); } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("open"))) + else if ( aCommand.Name == "open" ) { OpenCommandArgument2 aOpenArgument; if( ! ( aCommand.Argument >>= aOpenArgument ) ) @@ -389,7 +389,7 @@ BaseContent::execute( const Command& aCommand, aAny <<= result; } } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("delete"))) + else if ( aCommand.Name == "delete" ) { if( ! aCommand.Argument.has< sal_Bool >() ) m_pMyShell->installError( CommandId, @@ -397,7 +397,7 @@ BaseContent::execute( const Command& aCommand, else deleteContent( CommandId ); } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("transfer"))) + else if ( aCommand.Name == "transfer" ) { TransferInfo aTransferInfo; if( ! ( aCommand.Argument >>= aTransferInfo ) ) @@ -406,7 +406,7 @@ BaseContent::execute( const Command& aCommand, else transfer( CommandId, aTransferInfo ); } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("insert"))) + else if ( aCommand.Name == "insert" ) { InsertCommandArgument aInsertArgument; if( ! ( aCommand.Argument >>= aInsertArgument ) ) @@ -415,7 +415,7 @@ BaseContent::execute( const Command& aCommand, else insert( CommandId,aInsertArgument ); } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCasePreservingURL"))) + else if ( aCommand.Name == "getCasePreservingURL" ) { Sequence< beans::Property > seq(1); seq[0] = beans::Property( @@ -428,7 +428,7 @@ BaseContent::execute( const Command& aCommand, if(!xRow->wasNull()) aAny <<= CasePreservingURL; } - else if (aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("createNewContent"))) + else if ( aCommand.Name == "createNewContent" ) { ucb::ContentInfo aArg; if ( !( aCommand.Argument >>= aArg ) ) @@ -830,16 +830,16 @@ BaseContent::getPropertyValues( const beans::Property& rProp = pProps[ n ]; Any& rValue = pValues[ n ]; - if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContentType"))) + if ( rProp.Name == "ContentType" ) { rValue <<= m_bFolder ? m_pMyShell->FolderContentType : m_pMyShell->FileContentType; } - else if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFolder"))) + else if ( rProp.Name == "IsFolder" ) { rValue <<= m_bFolder; } - else if (rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsDocument"))) + else if ( rProp.Name == "IsDocument" ) { rValue <<= sal_Bool( !m_bFolder ); } diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index d436fa096745..a6176ccbae46 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -219,7 +219,7 @@ namespace fileaccess { if( aParent[ aParent.getLength()-1] == sal_Unicode(':') && aParent.getLength() == 6 ) aParent += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - if( aParent.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("file://")) ) + if ( aParent == "file://" ) aParent = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); return aParent; diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 324d820ba42c..60f42e80d90b 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -341,7 +341,7 @@ rtl::OUString FTPURL::parent(bool internal) const if(last.isEmpty()) bff.appendAscii(".."); - else if(last.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".."))) + else if ( last == ".." ) bff.append(last).appendAscii("/.."); bff.append(m_aType); diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index 687aacf41baa..8ac01f85e818 100644 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_content.cxx @@ -832,15 +832,15 @@ uno::Sequence< uno::Any > Content::setPropertyValues( { changePropertyValue(rValue,n,m_aProps->m_sTitle,nChanged,aRet,aChanges); } - else if ( rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "Author") ) ) + else if ( rValue.Name == "Author" ) { changePropertyValue(rValue,n,m_aProps->m_sAuthor,nChanged,aRet,aChanges); } - else if ( rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "Keywords") ) ) + else if ( rValue.Name == "Keywords" ) { changePropertyValue(rValue,n,m_aProps->m_sKeywords,nChanged,aRet,aChanges); } - else if ( rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "Subject") ) ) + else if ( rValue.Name == "Subject" ) { changePropertyValue(rValue,n,m_aProps->m_sSubject,nChanged,aRet,aChanges); } |