diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-05 15:07:20 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-27 18:18:06 +0100 |
commit | c2bbc9797c2fef9078c11460100996972bebd971 (patch) | |
tree | 914381462eceda8e659d773290b18a27c3825364 /i18npool | |
parent | 60fa5057039d2413d56813df4d45e5cfdfbb40ac (diff) |
fdo#46808, use service constructor for i18n::NativeNumberSupplier
Change-Id: I092ca8f912e26f0743909920c6e740d648b8677e
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/characterclassification/cclass_unicode_parser.cxx | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 24ec060fc613..c3f5ac5b72ca 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -27,6 +27,7 @@ #include <com/sun/star/i18n/UnicodeType.hpp> #include <com/sun/star/i18n/LocaleData.hpp> #include <com/sun/star/i18n/NativeNumberMode.hpp> +#include <com/sun/star/i18n/NativeNumberSupplier.hpp> #include <comphelper/processfactory.hxx> #include <string.h> // memcpy() @@ -1006,26 +1007,10 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if ( !xNatNumSup.is() ) { -#define NATIVENUMBERSUPPLIER_SERVICENAME "com.sun.star.i18n.NativeNumberSupplier" if ( xMSF.is() ) { - xNatNumSup = Reference< XNativeNumberSupplier > ( - xMSF->createInstance( OUString( - RTL_CONSTASCII_USTRINGPARAM( - NATIVENUMBERSUPPLIER_SERVICENAME ) ) ), - UNO_QUERY ); + xNatNumSup = NativeNumberSupplier::create( comphelper::getComponentContext(xMSF) ); } - if ( !xNatNumSup.is() ) - { - throw RuntimeException( OUString( -#ifdef DBG_UTIL - RTL_CONSTASCII_USTRINGPARAM( - "cclass_Unicode::parseText: can't instanciate " - NATIVENUMBERSUPPLIER_SERVICENAME ) -#endif - ), *this ); - } -#undef NATIVENUMBERSUPPLIER_SERVICENAME } OUString aTmp( pTextStart + r.LeadingWhiteSpace, r.EndPos - nPos + r.LeadingWhiteSpace ); |