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 /odk | |
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 'odk')
3 files changed, 14 insertions, 14 deletions
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx index e77dede8facb..64d2e0f1811c 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx @@ -86,11 +86,11 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments ) for ( sal_Int32 i = 0 ; i < aArguments.getLength(); i++) { OUString aName = aArguments[i].Name; - if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName" ) ) ) + if ( aName == "TypeName" ) aArguments[i].Value >>= sOriginalTypeName; - if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) ) ) + if ( aName == "URL" ) aArguments[i].Value >>= sURL; - if (aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream" ) ) ) + if ( aName == "InputStream" ) aArguments[i].Value >>= xInStream; } diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx index cfd264a4cb31..a20c30e0375d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx @@ -205,7 +205,7 @@ sal_Bool XFlatXml::exporter( aName = aSourceData[i].Name; if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OutputStream"))) aSourceData[i].Value >>= rOutputStream; - else if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL" ) )) + else if ( aName == "URL" ) aSourceData[i].Value >>= sURL; } diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx index e7d933615cfc..fa748a7b6552 100644 --- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx +++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx @@ -342,7 +342,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property // just enable this command // set enable flag according to selection - if ( aText.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Button Disabled" ) )) + if ( aText == "Button Disabled" ) mbButtonEnabled = sal_False; else mbButtonEnabled = sal_True; @@ -375,7 +375,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener { if ( aURL.Protocol.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:")) ) { - if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) ) + if ( aURL.Path == "Command1" ) { // just enable this command ::com::sun::star::frame::FeatureStateEvent aEvent; @@ -386,7 +386,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener aEvent.State <<= Any(); xControl->statusChanged( aEvent ); } - else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) ) + else if ( aURL.Path == "Command2" ) { // just enable this command ::com::sun::star::frame::FeatureStateEvent aEvent; @@ -397,7 +397,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener aEvent.State <<= Any(); xControl->statusChanged( aEvent ); } - else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) ) + else if ( aURL.Path == "Command3" ) { // A toggle dropdown box is normally used for a group of commands // where the user can select the last issued command easily. @@ -419,7 +419,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener aArgs[0].Value <<= sal_Int32( 0 ); SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True ); } - else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) ) + else if ( aURL.Path == "Command4" ) { // A dropdown box is normally used for a group of dependent modes, where // the user can only select one. The modes cannot be combined. @@ -443,7 +443,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener aArgs[0].Value <<= nPos; SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True ); } - else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) ) + else if ( aURL.Path == "Command5" ) { // A spin button Sequence< NamedValue > aArgs( 5 ); @@ -462,7 +462,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetValues")), aArgs, sal_True ); } - else if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) ) + else if ( aURL.Path == "Command7" ) { // A dropdown box is normally used for a group of commands // where the user can select one of a defined set. @@ -497,13 +497,13 @@ void SAL_CALL BaseDispatch::removeStatusListener( const Reference< XStatusListen void SAL_CALL BaseDispatch::controlEvent( const ControlEvent& Event ) throw (RuntimeException) { - if ( Event.aURL.Protocol.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:" ) )) + if ( Event.aURL.Protocol == "vnd.demo.complextoolbarcontrols.demoaddon:" ) { - if ( Event.aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Command2" ) )) + if ( Event.aURL.Path == "Command2" ) { // We get notifications whenever the text inside the combobox has been changed. // We store the new text into a member. - if ( Event.Event.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "TextChanged" ) )) + if ( Event.Event == "TextChanged" ) { rtl::OUString aNewText; sal_Bool bHasText( sal_False ); |