[Libreoffice-commits] core.git: 2 commits - i18npool/inc i18npool/source include/com
Stephan Bergmann
sbergman at redhat.com
Wed Dec 18 01:17:38 PST 2013
i18npool/inc/collator_unicode.hxx | 5 +-
i18npool/inc/transliteration_commonclass.hxx | 8 ++-
i18npool/source/breakiterator/breakiteratorImpl.cxx | 4 -
i18npool/source/breakiterator/breakiterator_unicode.cxx | 5 --
i18npool/source/calendar/calendarImpl.cxx | 9 +---
i18npool/source/calendar/calendar_gregorian.cxx | 3 -
i18npool/source/characterclassification/cclass_unicode.cxx | 5 --
i18npool/source/characterclassification/characterclassificationImpl.cxx | 5 --
i18npool/source/characterclassification/unoscripttypedetector.cxx | 6 --
i18npool/source/collator/chaptercollator.cxx | 4 -
i18npool/source/collator/collatorImpl.cxx | 11 +----
i18npool/source/collator/collator_unicode.cxx | 3 -
i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 3 -
i18npool/source/indexentry/indexentrysupplier.cxx | 3 -
i18npool/source/indexentry/indexentrysupplier_common.cxx | 4 -
i18npool/source/inputchecker/inputsequencechecker.cxx | 4 -
i18npool/source/localedata/localedata.cxx | 8 +--
i18npool/source/nativenumber/nativenumbersupplier.cxx | 4 -
i18npool/source/numberformatcode/numberformatcode.cxx | 13 +-----
i18npool/source/ordinalsuffix/ordinalsuffix.cxx | 3 -
i18npool/source/search/textsearch.cxx | 6 +-
i18npool/source/textconversion/textconversion.cxx | 5 --
i18npool/source/textconversion/textconversionImpl.cxx | 5 --
i18npool/source/transliteration/transliterationImpl.cxx | 4 -
i18npool/source/transliteration/transliteration_commonclass.cxx | 8 +--
include/com/sun/star/uno/Any.h | 21 ++++------
26 files changed, 73 insertions(+), 86 deletions(-)
New commits:
commit c6e2fcb2867fc0ecc6f5823d1aaae84ad023d0de
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Dec 18 10:17:02 2013 +0100
Consistently mark these as deleted on all platforms
Change-Id: I87b226fe8ade512fa5559be9cb66cff75543e383
diff --git a/include/com/sun/star/uno/Any.h b/include/com/sun/star/uno/Any.h
index 72357e4..b7574bb 100644
--- a/include/com/sun/star/uno/Any.h
+++ b/include/com/sun/star/uno/Any.h
@@ -232,19 +232,18 @@ public:
inline sal_Bool SAL_CALL operator != ( const Any & rAny ) const SAL_THROW(());
private:
- // not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
- explicit Any( sal_uInt16 );
-#if defined(_MSC_VER)
- // Omitting the following private declarations leads to an internal compiler
- // error on MSVC (version 1310).
- // not impl: forbid use with ambiguous type (sal_Unicode, sal_uInt16)
- template <>
- sal_uInt16 get<sal_uInt16>() const;
- template <>
- bool has<sal_uInt16>() const;
-#endif // defined(_MSC_VER)
+ /// @cond INTERNAL
+ // Forbid use with ambiguous type (sal_Unicode, sal_uInt16):
+ explicit Any(sal_uInt16) SAL_DELETED_FUNCTION;
+ /// @endcond
};
+/// @cond INTERNAL
+// Forbid use with ambiguous type (sal_Unicode, sal_uInt16):
+template<> sal_uInt16 Any::get<sal_uInt16>() const SAL_DELETED_FUNCTION;
+template<> bool Any::has<sal_uInt16>() const SAL_DELETED_FUNCTION;
+/// @endcond
+
/** Template function to generically construct an any from a C++ value.
@tparam C value type
commit 6cd3118b6370a0314e58692e08b68c4dcb0f922a
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Tue Dec 17 01:14:30 2013 -0200
fdo#54938: Convert i18npool to use cppu::supportsService
Change-Id: I9acc496cd95c8362972fa0c41d35b77fc0715aba
Signed-off-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/i18npool/inc/collator_unicode.hxx b/i18npool/inc/collator_unicode.hxx
index b7a0a74..1390d79 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 6e909ea..4363457 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 0123583..fb44d73 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 3bb2e3e..08c0677 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 5f9396b..7539d66 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 d547134..e98dee7 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 d5ce0b7..2591726 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 d65b5a5..4897541 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 14857d6..b2b79e8 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 5193b73..dd2f9ca 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 ee6c37f..bb02ab2 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 52620ac..48f30a1 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 43e5b85..165cb7f 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 4f27493..2e9f70b 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 cdaf612..fc8cc8d 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 5d41620..d5f264f 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 5d70251..a2f9490 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 38e7905..9b826be 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 6359a43..ab050fc 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 8693fb3..61cab41 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 593483c..2730073 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 4c650b4..fbde6f1 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 b143ca9..2fc29c9 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 d700646..0a2e1f5 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 8e5853c..521ed30 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;
}
More information about the Libreoffice-commits
mailing list