From c2bbc9797c2fef9078c11460100996972bebd971 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 5 Nov 2012 15:07:20 +0200 Subject: fdo#46808, use service constructor for i18n::NativeNumberSupplier Change-Id: I092ca8f912e26f0743909920c6e740d648b8677e --- .../characterclassification/cclass_unicode_parser.cxx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'i18npool/source/characterclassification') 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 #include #include +#include #include #include // 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 ); -- cgit on> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author