summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-12-17 01:14:30 -0200
committerStephan Bergmann <sbergman@redhat.com>2013-12-18 10:17:14 +0100
commit6cd3118b6370a0314e58692e08b68c4dcb0f922a (patch)
treedae1a4f84e21716bd450593719e168d8a3bb2cac /i18npool
parent910ec33b72fa7675e606c4389d50d3a0d4adbe45 (diff)
fdo#54938: Convert i18npool to use cppu::supportsService
Change-Id: I9acc496cd95c8362972fa0c41d35b77fc0715aba Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/inc/collator_unicode.hxx5
-rw-r--r--i18npool/inc/transliteration_commonclass.hxx8
-rw-r--r--i18npool/source/breakiterator/breakiteratorImpl.cxx4
-rw-r--r--i18npool/source/breakiterator/breakiterator_unicode.cxx5
-rw-r--r--i18npool/source/calendar/calendarImpl.cxx9
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx3
-rw-r--r--i18npool/source/characterclassification/cclass_unicode.cxx5
-rw-r--r--i18npool/source/characterclassification/characterclassificationImpl.cxx5
-rw-r--r--i18npool/source/characterclassification/unoscripttypedetector.cxx6
-rw-r--r--i18npool/source/collator/chaptercollator.cxx4
-rw-r--r--i18npool/source/collator/collatorImpl.cxx11
-rw-r--r--i18npool/source/collator/collator_unicode.cxx3
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx3
-rw-r--r--i18npool/source/indexentry/indexentrysupplier.cxx3
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_common.cxx4
-rw-r--r--i18npool/source/inputchecker/inputsequencechecker.cxx4
-rw-r--r--i18npool/source/localedata/localedata.cxx8
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx4
-rw-r--r--i18npool/source/numberformatcode/numberformatcode.cxx13
-rw-r--r--i18npool/source/ordinalsuffix/ordinalsuffix.cxx3
-rw-r--r--i18npool/source/search/textsearch.cxx6
-rw-r--r--i18npool/source/textconversion/textconversion.cxx5
-rw-r--r--i18npool/source/textconversion/textconversionImpl.cxx5
-rw-r--r--i18npool/source/transliteration/transliterationImpl.cxx4
-rw-r--r--i18npool/source/transliteration/transliteration_commonclass.cxx8
25 files changed, 63 insertions, 75 deletions
diff --git a/i18npool/inc/collator_unicode.hxx b/i18npool/inc/collator_unicode.hxx
index b7a0a74ce0f8..1390d79df65c 100644
--- a/i18npool/inc/collator_unicode.hxx
+++ b/i18npool/inc/collator_unicode.hxx
@@ -21,7 +21,8 @@
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/i18n/XCollator.hpp>
-#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase2.hxx>
#include <osl/module.h>
#include <unicode/tblcoll.h>
@@ -32,7 +33,7 @@
namespace com { namespace sun { namespace star { namespace i18n {
-class Collator_Unicode : public cppu::WeakImplHelper1 < XCollator >
+class Collator_Unicode : public cppu::WeakImplHelper2 < XCollator, com::sun::star::lang::XServiceInfo >
{
public:
// Constructors
diff --git a/i18npool/inc/transliteration_commonclass.hxx b/i18npool/inc/transliteration_commonclass.hxx
index 6e909eaad4f5..43634578c81f 100644
--- a/i18npool/inc/transliteration_commonclass.hxx
+++ b/i18npool/inc/transliteration_commonclass.hxx
@@ -21,13 +21,17 @@
#include <com/sun/star/i18n/XExtendedTransliteration.hpp>
#include <com/sun/star/i18n/TransliterationType.hpp>
-#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase2.hxx>
#include <rtl/ustrbuf.h>
#include <rtl/ustring.hxx>
namespace com { namespace sun { namespace star { namespace i18n {
-class transliteration_commonclass : public cppu::WeakImplHelper1< com::sun::star::i18n::XExtendedTransliteration >
+class transliteration_commonclass : public cppu::WeakImplHelper2<
+ com::sun::star::i18n::XExtendedTransliteration,
+ com::sun::star::lang::XServiceInfo
+ >
{
public:
transliteration_commonclass();
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 0123583b0ad9..fb44d733d9ff 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <breakiteratorImpl.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unicode/uchar.h>
#include <i18nutil/unicode.hxx>
#include <rtl/ustrbuf.hxx>
@@ -616,7 +616,7 @@ BreakIteratorImpl::getImplementationName(void) throw( RuntimeException )
sal_Bool SAL_CALL
BreakIteratorImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cBreakIterator);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 3bb2e3ef7c54..08c067741bfc 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -18,6 +18,7 @@
*/
#include <breakiterator_unicode.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <localedata.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/languagetagicu.hxx>
@@ -439,8 +440,6 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak(
return lbr;
}
-
-
OUString SAL_CALL
BreakIterator_Unicode::getImplementationName(void) throw( uno::RuntimeException )
{
@@ -450,7 +449,7 @@ BreakIterator_Unicode::getImplementationName(void) throw( uno::RuntimeException
sal_Bool SAL_CALL
BreakIterator_Unicode::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
- return rServiceName.equalsAscii(cBreakIterator);
+ return cppu::supportsService(this, rServiceName);
}
uno::Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx
index 5f9396b130c6..7539d667c5f3 100644
--- a/i18npool/source/calendar/calendarImpl.cxx
+++ b/i18npool/source/calendar/calendarImpl.cxx
@@ -17,10 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include "calendarImpl.hxx"
#include "localedata.hxx"
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -41,7 +41,6 @@ CalendarImpl::~CalendarImpl()
lookupTable.clear();
}
-
void SAL_CALL
CalendarImpl::loadDefaultCalendar( const Locale& rLocale ) throw(RuntimeException)
{
@@ -344,19 +343,17 @@ CalendarImpl::getImplementationName(void) throw( RuntimeException )
return OUString("com.sun.star.i18n.CalendarImpl");
}
-const sal_Char cCalendar[] = "com.sun.star.i18n.LocaleCalendar";
-
sal_Bool SAL_CALL
CalendarImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cCalendar);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
CalendarImpl::getSupportedServiceNames(void) throw( RuntimeException )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii(cCalendar);
+ aRet[0] = "com.sun.star.i18n.LocaleCalendar";
return aRet;
}
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index d547134fd538..e98dee77010c 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/i18n/reservedWords.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/math.hxx>
#include <stdio.h>
@@ -1174,7 +1175,7 @@ Calendar_gregorian::getImplementationName(void) throw( RuntimeException )
sal_Bool SAL_CALL
Calendar_gregorian::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cCalendar);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
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
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx
index 5193b73c4299..dd2f9ca49d7e 100644
--- a/i18npool/source/collator/chaptercollator.cxx
+++ b/i18npool/source/collator/chaptercollator.cxx
@@ -17,10 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
// prevent internal compiler error with MSVC6SP3
#include <utility>
+#include <cppuhelper/supportsservice.hxx>
#include <chaptercollator.hxx>
#include <com/sun/star/i18n/KCharacterType.hpp>
#include <com/sun/star/i18n/ParseResult.hpp>
@@ -85,7 +85,7 @@ ChapterCollator::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
ChapterCollator::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cChapCollator);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index ee6c37f75e4a..bb02ab2fcd44 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -17,19 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <collatorImpl.hxx>
#include <localedata.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <com/sun/star/i18n/LocaleData.hpp>
#include <rtl/ustrbuf.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star;
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
-
namespace com { namespace sun { namespace star { namespace i18n {
CollatorImpl::CollatorImpl( const Reference < XComponentContext >& rxContext ) : m_xContext(rxContext)
@@ -215,17 +214,15 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS
const sal_Char cCollator[] = "com.sun.star.i18n.Collator";
-OUString SAL_CALL
-CollatorImpl::getImplementationName() throw( RuntimeException )
+OUString SAL_CALL CollatorImpl::getImplementationName() throw( RuntimeException )
{
return OUString::createFromAscii(cCollator);
}
-sal_Bool SAL_CALL
-CollatorImpl::supportsService(const OUString& rServiceName)
+sal_Bool SAL_CALL CollatorImpl::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
- return rServiceName.equalsAscii(cCollator);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 52620ac68b20..48f30a182345 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -27,6 +27,7 @@
#include <collator_unicode.hxx>
#include <localedata.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::lang;
@@ -250,7 +251,7 @@ Collator_Unicode::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
Collator_Unicode::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(implementationName);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 43e5b856da1e..165cb7f50be1 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <string.h>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
// Cyrillic upper case
#define C_CYR_A "\xD0\x90"
@@ -1052,7 +1053,7 @@ OUString DefaultNumberingProvider::getImplementationName(void)
sal_Bool DefaultNumberingProvider::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
- return rServiceName.equalsAscii(cDefaultNumberingProvider);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > DefaultNumberingProvider::getSupportedServiceNames(void)
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index 4f274935c2c2..2e9f70b421f5 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -18,6 +18,7 @@
*/
#include <rtl/ustrbuf.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <indexentrysupplier.hxx>
#include <localedata.hxx>
@@ -184,7 +185,7 @@ IndexEntrySupplier::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
IndexEntrySupplier::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(implementationName);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx
index cdaf612ea876..fc8cc8ddbcca 100644
--- a/i18npool/source/indexentry/indexentrysupplier_common.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx
@@ -17,9 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <indexentrysupplier_common.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <localedata.hxx>
using namespace ::com::sun::star::uno;
@@ -126,7 +126,7 @@ IndexEntrySupplier_Common::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
IndexEntrySupplier_Common::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(implementationName);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx
index 5d41620fceab..d5f264fe8a35 100644
--- a/i18npool/source/inputchecker/inputsequencechecker.cxx
+++ b/i18npool/source/inputchecker/inputsequencechecker.cxx
@@ -17,10 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <inputsequencechecker.hxx>
#include <com/sun/star/i18n/InputSequenceCheckMode.hpp>
#include <com/sun/star/i18n/UnicodeType.hpp>
+#include <cppuhelper/supportsservice.hxx>
#include <i18nutil/unicode.hxx>
#include <rtl/ustrbuf.hxx>
@@ -142,7 +142,7 @@ InputSequenceCheckerImpl::getImplementationName(void) throw( RuntimeException )
sal_Bool SAL_CALL
InputSequenceCheckerImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(serviceName);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 5d702517b8ae..a2f949071fc3 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include <cppuhelper/supportsservice.hxx>
#include <localedata.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -32,7 +32,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star;
-
static const sal_Char clocaledata[] = "com.sun.star.i18n.LocaleData";
typedef sal_Unicode** (SAL_CALL * MyFunc_Type)( sal_Int16&);
@@ -1622,11 +1621,10 @@ LocaleDataImpl::getImplementationName() throw( RuntimeException )
return OUString(clocaledata);
}
-sal_Bool SAL_CALL
-LocaleDataImpl::supportsService(const OUString& rServiceName)
+sal_Bool SAL_CALL LocaleDataImpl::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
- return rServiceName == clocaledata;
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 38e7905031af..9b826be1ccbc 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -24,12 +24,12 @@
#include <localedata.hxx>
#include <data/numberchar.h>
#include <comphelper/string.hxx>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::rtl;
-
typedef struct {
sal_Int16 number;
const sal_Unicode *multiplierChar;
@@ -898,7 +898,7 @@ OUString SAL_CALL NativeNumberSupplier::getImplementationName() throw( RuntimeEx
sal_Bool SAL_CALL
NativeNumberSupplier::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(implementationName);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx
index 6359a43f1fa2..ab050fc75df9 100644
--- a/i18npool/source/numberformatcode/numberformatcode.cxx
+++ b/i18npool/source/numberformatcode/numberformatcode.cxx
@@ -17,13 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <numberformatcode.hxx>
#include <com/sun/star/i18n/KNumberFormatUsage.hpp>
#include <com/sun/star/i18n/KNumberFormatType.hpp>
#include <com/sun/star/i18n/LocaleData.hpp>
-
-
+#include <cppuhelper/supportsservice.hxx>
NumberFormatCodeMapper::NumberFormatCodeMapper(
const ::com::sun::star::uno::Reference <
@@ -269,20 +267,17 @@ NumberFormatCodeMapper::getImplementationName(void)
return OUString("com.sun.star.i18n.NumberFormatCodeMapper");
}
-const sal_Char cNumFormat[] = "com.sun.star.i18n.NumberFormatMapper";
-
-sal_Bool SAL_CALL
-NumberFormatCodeMapper::supportsService(const OUString& rServiceName)
+sal_Bool SAL_CALL NumberFormatCodeMapper::supportsService(const OUString& rServiceName)
throw( ::com::sun::star::uno::RuntimeException )
{
- return rServiceName.equalsAscii(cNumFormat);
+ return cppu::supportsService(this, rServiceName);
}
::com::sun::star::uno::Sequence< OUString > SAL_CALL
NumberFormatCodeMapper::getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException )
{
::com::sun::star::uno::Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii(cNumFormat);
+ aRet[0] = "com.sun.star.i18n.NumberFormatMapper";
return aRet;
}
diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
index 8693fb3a42cd..61cab4120f28 100644
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -21,6 +21,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/languagetagicu.hxx>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <string.h>
#include "ordinalsuffix.hxx"
@@ -142,7 +143,7 @@ OUString SAL_CALL OrdinalSuffix::getImplementationName(void) throw( RuntimeExcep
sal_Bool SAL_CALL OrdinalSuffix::supportsService( const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cOrdinalSuffix);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL OrdinalSuffix::getSupportedServiceNames(void) throw( RuntimeException )
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index 593483cd131e..27300732493b 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/i18n/Transliteration.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <cppuhelper/factory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/weak.hxx>
#ifdef _MSC_VER
@@ -1046,11 +1047,10 @@ TextSearch::getImplementationName()
return getImplementationName_Static();
}
-sal_Bool SAL_CALL
-TextSearch::supportsService(const OUString& rServiceName)
+sal_Bool SAL_CALL TextSearch::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
- return rServiceName == cSearchName;
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/textconversion/textconversion.cxx b/i18npool/source/textconversion/textconversion.cxx
index 4c650b4eefc9..fbde6f16efee 100644
--- a/i18npool/source/textconversion/textconversion.cxx
+++ b/i18npool/source/textconversion/textconversion.cxx
@@ -17,13 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <assert.h>
+#include <cppuhelper/supportsservice.hxx>
#include <textconversion.hxx>
using namespace com::sun::star::uno;
-
namespace com { namespace sun { namespace star { namespace i18n {
#ifndef DISABLE_DYNLOADING
@@ -79,7 +78,7 @@ TextConversion::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
TextConversion::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(implementationName);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx
index b143ca9d9680..2fc29c9fa335 100644
--- a/i18npool/source/textconversion/textconversionImpl.cxx
+++ b/i18npool/source/textconversion/textconversionImpl.cxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <assert.h>
+#include <cppuhelper/supportsservice.hxx>
#include <textconversionImpl.hxx>
#include <localedata.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -26,7 +26,6 @@
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
-
namespace com { namespace sun { namespace star { namespace i18n {
TextConversionResult SAL_CALL
@@ -123,7 +122,7 @@ sal_Bool SAL_CALL
TextConversionImpl::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
- return rServiceName.equalsAscii(cTextConversion);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx
index d700646dcfe2..0a2e1f5dd81f 100644
--- a/i18npool/source/transliteration/transliterationImpl.cxx
+++ b/i18npool/source/transliteration/transliterationImpl.cxx
@@ -27,6 +27,7 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <comphelper/processfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <rtl/instance.hxx>
#include <rtl/string.h>
#include <rtl/ustring.hxx>
@@ -639,11 +640,10 @@ TransliterationImpl::getImplementationName() throw( RuntimeException )
return OUString::createFromAscii(cTrans);
}
-
sal_Bool SAL_CALL
TransliterationImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cTrans);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL
diff --git a/i18npool/source/transliteration/transliteration_commonclass.cxx b/i18npool/source/transliteration/transliteration_commonclass.cxx
index 8e5853c7e31a..521ed30dd0e8 100644
--- a/i18npool/source/transliteration/transliteration_commonclass.cxx
+++ b/i18npool/source/transliteration/transliteration_commonclass.cxx
@@ -17,9 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <transliteration_commonclass.hxx>
#include <com/sun/star/i18n/CollatorOptions.hpp>
+#include <cppuhelper/supportsservice.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -137,17 +137,15 @@ OUString SAL_CALL transliteration_commonclass::getImplementationName() throw( Ru
return OUString::createFromAscii(implementationName);
}
-const sal_Char cTrans[] = "com.sun.star.i18n.Transliteration.l10n";
-
sal_Bool SAL_CALL transliteration_commonclass::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
- return rServiceName.equalsAscii(cTrans);
+ return cppu::supportsService(this, rServiceName);
}
Sequence< OUString > SAL_CALL transliteration_commonclass::getSupportedServiceNames() throw( RuntimeException )
{
Sequence< OUString > aRet(1);
- aRet[0] = OUString::createFromAscii(cTrans);
+ aRet[0] = "com.sun.star.i18n.Transliteration.l10n";
return aRet;
}