From 0666e43c45876199ddc71e378554878cca6f0539 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 2 Nov 2012 15:13:28 +0200 Subject: fdo#46808, use service constructor for i18n::CharacterClassification Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76 --- vcl/source/app/unohelp.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'vcl') diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index b0a30b188e38..c63bcc646cd4 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include @@ -55,15 +55,7 @@ uno::Reference < i18n::XBreakIterator > vcl::unohelper::CreateBreakIterator() uno::Reference < i18n::XCharacterClassification > vcl::unohelper::CreateCharacterClassification() { - uno::Reference < i18n::XCharacterClassification > xB; - uno::Reference< lang::XMultiServiceFactory > xMSF = comphelper::getProcessServiceFactory(); - uno::Reference < uno::XInterface > xI = xMSF->createInstance( ::rtl::OUString("com.sun.star.i18n.CharacterClassification") ); - if ( xI.is() ) - { - uno::Any x = xI->queryInterface( ::getCppuType((const uno::Reference< i18n::XCharacterClassification >*)0) ); - x >>= xB; - } - return xB; + return i18n::CharacterClassification::create( comphelper::getProcessComponentContext() ); } ::rtl::OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, sal_Bool bSUPD ) -- cgit