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/calendar | |
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/calendar')
-rw-r--r-- | i18npool/source/calendar/calendarImpl.cxx | 9 | ||||
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 3 |
2 files changed, 5 insertions, 7 deletions
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 |