diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-12-17 01:14:30 -0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-18 10:17:14 +0100 |
commit | 6cd3118b6370a0314e58692e08b68c4dcb0f922a (patch) | |
tree | dae1a4f84e21716bd450593719e168d8a3bb2cac /i18npool/source/characterclassification | |
parent | 910ec33b72fa7675e606c4389d50d3a0d4adbe45 (diff) |
fdo#54938: Convert i18npool to use cppu::supportsService
Change-Id: I9acc496cd95c8362972fa0c41d35b77fc0715aba
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool/source/characterclassification')
3 files changed, 6 insertions, 10 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index d5ce0b77d1ae..25917262ea5e 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -17,13 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <cclass_unicode.hxx> #include <com/sun/star/i18n/UnicodeScript.hpp> #include <com/sun/star/i18n/UnicodeType.hpp> #include <com/sun/star/i18n/KCharacterType.hpp> #include <unicode/uchar.h> #include <comphelper/string.hxx> +#include <cppuhelper/supportsservice.hxx> #include <breakiteratorImpl.hxx> using namespace ::com::sun::star::uno; @@ -267,10 +267,9 @@ OUString SAL_CALL cclass_Unicode::getImplementationName() throw( RuntimeExceptio return OUString::createFromAscii(cClass); } - sal_Bool SAL_CALL cclass_Unicode::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return rServiceName.equalsAscii(cClass); + return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL cclass_Unicode::getSupportedServiceNames() throw( RuntimeException ) diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx index d65b5a5e8018..4897541c7653 100644 --- a/i18npool/source/characterclassification/characterclassificationImpl.cxx +++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - +#include <cppuhelper/supportsservice.hxx> #include <characterclassificationImpl.hxx> #include <localedata.hxx> #include <rtl/ustrbuf.hxx> @@ -25,7 +25,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; - namespace com { namespace sun { namespace star { namespace i18n { CharacterClassificationImpl::CharacterClassificationImpl( @@ -205,7 +204,7 @@ sal_Bool SAL_CALL CharacterClassificationImpl::supportsService(const OUString& rServiceName) throw( RuntimeException ) { - return rServiceName.equalsAscii(cClass); + return cppu::supportsService(this, rServiceName); } Sequence< OUString > SAL_CALL diff --git a/i18npool/source/characterclassification/unoscripttypedetector.cxx b/i18npool/source/characterclassification/unoscripttypedetector.cxx index 14857d6df5f3..b2b79e8037a8 100644 --- a/i18npool/source/characterclassification/unoscripttypedetector.cxx +++ b/i18npool/source/characterclassification/unoscripttypedetector.cxx @@ -18,12 +18,10 @@ */ #include "unoscripttypedetector.hxx" +#include <cppuhelper/supportsservice.hxx> #include <i18nutil/scripttypedetector.hxx> -// ---------------------------------------------------- // class UnoScriptTypeDetector -// ----------------------------------------------------; - sal_Int16 SAL_CALL UnoScriptTypeDetector::getScriptDirection( const OUString& Text, sal_Int32 nPos, sal_Int16 defaultScriptDirection ) throw (::com::sun::star::uno::RuntimeException) { @@ -74,7 +72,7 @@ UnoScriptTypeDetector::getImplementationName() throw( ::com::sun::star::uno::Run sal_Bool SAL_CALL UnoScriptTypeDetector::supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ) { - return ServiceName != sDetector; + return cppu::supportsService(this, ServiceName); } ::com::sun::star::uno::Sequence< OUString > SAL_CALL |