diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2014-01-14 12:27:09 -0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-16 10:25:53 +0100 |
commit | a2218b0d8b39e5018342b9085a3ec98941631952 (patch) | |
tree | 5aa97c50be7479c6d301fdd5718424debbff5a38 /svl | |
parent | f32f8285966a0455a7c0db71e196e5ea92390329 (diff) |
fdo#54938: Convert svx and svl to cppu::supportsService...
...final season
Change-Id: Ie51ac231def4a8a6e2681b81de7580798c95eed2
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/numfmuno.cxx | 23 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 11 |
2 files changed, 11 insertions, 23 deletions
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index b71d52bcd9ff..b733602d564a 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <tools/color.hxx> #include <i18nlangtag/mslangid.hxx> #include <osl/mutex.hxx> @@ -25,6 +24,7 @@ #include <com/sun/star/util/Date.hpp> #include <com/sun/star/beans/PropertyAttribute.hpp> +#include <cppuhelper/supportsservice.hxx> #include "numfmuno.hxx" #include <svl/numuno.hxx> @@ -34,11 +34,6 @@ using namespace com::sun::star; -#define SERVICENAME_NUMBERFORMATTER "com.sun.star.util.NumberFormatter" -#define SERVICENAME_NUMBERSETTINGS "com.sun.star.util.NumberFormatSettings" -#define SERVICENAME_NUMBERFORMATS "com.sun.star.util.NumberFormats" -#define SERVICENAME_NUMBERFORMAT "com.sun.star.util.NumberFormatProperties" - #define PROPERTYNAME_FMTSTR "FormatString" #define PROPERTYNAME_LOCALE "Locale" #define PROPERTYNAME_TYPE "Type" @@ -384,7 +379,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::getImplementationName() sal_Bool SAL_CALL SvNumberFormatterServiceObj::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMATTER); + return cppu::supportsService( this, ServiceName ); } uno::Sequence<OUString> SAL_CALL SvNumberFormatterServiceObj::getSupportedServiceNames() @@ -392,7 +387,7 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatterServiceObj::getSupportedServic { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = SERVICENAME_NUMBERFORMATTER; + pArray[0] = "com.sun.star.util.NumberFormatter"; return aRet; } @@ -676,7 +671,7 @@ OUString SAL_CALL SvNumberFormatsObj::getImplementationName() sal_Bool SAL_CALL SvNumberFormatsObj::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMATS); + return cppu::supportsService( this, ServiceName ); } uno::Sequence<OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNames() @@ -684,7 +679,7 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = OUString(SERVICENAME_NUMBERFORMATS); + pArray[0] = "com.sun.star.util.NumberFormats"; return aRet; } @@ -933,7 +928,7 @@ OUString SAL_CALL SvNumberFormatObj::getImplementationName() sal_Bool SAL_CALL SvNumberFormatObj::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMAT); + return cppu::supportsService( this, ServiceName ); } uno::Sequence<OUString> SAL_CALL SvNumberFormatObj::getSupportedServiceNames() @@ -941,7 +936,7 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatObj::getSupportedServiceNames() { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = SERVICENAME_NUMBERFORMAT; + pArray[0] = "com.sun.star.util.NumberFormatProperties"; return aRet; } @@ -1092,7 +1087,7 @@ OUString SAL_CALL SvNumberFormatSettingsObj::getImplementationName() sal_Bool SAL_CALL SvNumberFormatSettingsObj::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - return ServiceName.equalsAscii(SERVICENAME_NUMBERSETTINGS); + return cppu::supportsService( this, ServiceName ); } uno::Sequence<OUString> SAL_CALL SvNumberFormatSettingsObj::getSupportedServiceNames() @@ -1100,7 +1095,7 @@ uno::Sequence<OUString> SAL_CALL SvNumberFormatSettingsObj::getSupportedServiceN { uno::Sequence<OUString> aRet(1); OUString* pArray = aRet.getArray(); - pArray[0] = SERVICENAME_NUMBERSETTINGS; + pArray[0] = "com.sun.star.util.NumberFormatSettings"; return aRet; } diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index c59e296c43a6..215758b50a03 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -22,6 +22,7 @@ #include <unotools/pathoptions.hxx> #include <cppuhelper/factory.hxx> +#include <cppuhelper/supportsservice.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> #include <com/sun/star/registry/XSimpleRegistry.hpp> @@ -1357,28 +1358,21 @@ void PasswordContainer::Notify() } } - OUString SAL_CALL PasswordContainer::getImplementationName( ) throw(uno::RuntimeException) { return impl_getStaticImplementationName(); } - sal_Bool SAL_CALL PasswordContainer::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException) { - if ( ServiceName.equalsAscii("com.sun.star.task.PasswordContainer") ) - return sal_True; - else - return sal_False; + return cppu::supportsService( this, ServiceName ); } - Sequence< OUString > SAL_CALL PasswordContainer::getSupportedServiceNames( ) throw(uno::RuntimeException) { return impl_getStaticSupportedServiceNames(); } - Sequence< OUString > SAL_CALL PasswordContainer::impl_getStaticSupportedServiceNames( ) throw(uno::RuntimeException) { Sequence< OUString > aRet(1); @@ -1386,7 +1380,6 @@ Sequence< OUString > SAL_CALL PasswordContainer::impl_getStaticSupportedServiceN return aRet; } - OUString SAL_CALL PasswordContainer::impl_getStaticImplementationName() throw(uno::RuntimeException) { return OUString("stardiv.svl.PasswordContainer"); |