summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 19:49:53 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 20:03:42 +0200
commitd6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch)
treeb5a12df1fcae025715633469b75ab4c9b6f6d279 /odk
parent0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff)
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx3
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx3
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx14
3 files changed, 5 insertions, 15 deletions
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index 8080e5638515..dbd11bcecd8a 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -231,8 +231,7 @@ sal_Bool MyService1Impl::supportsService( OUString const & serviceName )
throw (RuntimeException)
{
// this object only supports one service, so the test is simple
- return serviceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "my_module.MyService1") );
+ return serviceName == "my_module.MyService1";
}
Sequence< OUString > MyService1Impl::getSupportedServiceNames()
throw (RuntimeException)
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index 6d498dbe95df..af999111d893 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -158,8 +158,7 @@ sal_Bool MyService2Impl::supportsService( OUString const & serviceName )
throw (RuntimeException)
{
// this object only supports one service, so the test is simple
- return serviceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(
- "my_module.MyService2") );
+ return serviceName == "my_module.MyService2";
}
Sequence< OUString > MyService2Impl::getSupportedServiceNames()
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index 219d028dd4a4..2550faa21570 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -170,13 +170,8 @@ Reference< XDispatch > SAL_CALL MyProtocolHandler::queryDispatch( const URL& a
// ohne ein entsprechendes Dokument funktioniert der Handler nicht
return xRet;
- if ( aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command1" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command2" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command3" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command4" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command5" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command6" ) ) ||
- aURL.Path.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Command7" ) ) )
+ if ( aURL.Path == "Command1" || aURL.Path == "Command2" || aURL.Path == "Command3" || aURL.Path == "Command4" || aURL.Path == "Command5"
+ || aURL.Path == "Command6" || aURL.Path == "Command7" )
{
xRet = aListenerHelper.GetDispatch( mxFrame, aURL.Path );
if ( !xRet.is() )
@@ -212,10 +207,7 @@ Sequence < Reference< XDispatch > > SAL_CALL MyProtocolHandler::queryDispatches(
sal_Bool SAL_CALL MyProtocolHandler_supportsService( const ::rtl::OUString& ServiceName )
throw (RuntimeException)
{
- return (
- ServiceName.equalsAscii(MYPROTOCOLHANDLER_SERVICENAME ) ||
- ServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.frame.ProtocolHandler"))
- );
+ return ( ServiceName.equalsAscii(MYPROTOCOLHANDLER_SERVICENAME) || ServiceName == "com.sun.star.frame.ProtocolHandler" );
}
Sequence< ::rtl::OUString > SAL_CALL MyProtocolHandler_getSupportedServiceNames( )