summaryrefslogtreecommitdiff
path: root/unotools/source/i18n/charclass.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-02 15:13:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-05 18:05:00 +0100
commit0666e43c45876199ddc71e378554878cca6f0539 (patch)
tree39fd44bd26cceaa71a86a06c480d80c8351b5e0f /unotools/source/i18n/charclass.cxx
parentebc61e11cdb02f5cc33aeabead3d191eaf0d23d3 (diff)
fdo#46808, use service constructor for i18n::CharacterClassification
Change-Id: I0499ad7de27b1539e97f01ab8aa0ef2d6713ae76
Diffstat (limited to 'unotools/source/i18n/charclass.cxx')
-rw-r--r--unotools/source/i18n/charclass.cxx14
1 files changed, 5 insertions, 9 deletions
diff --git a/unotools/source/i18n/charclass.cxx b/unotools/source/i18n/charclass.cxx
index 7a873abd566d..fa718cb119d3 100644
--- a/unotools/source/i18n/charclass.cxx
+++ b/unotools/source/i18n/charclass.cxx
@@ -18,13 +18,12 @@
*/
+#include <comphelper/processfactory.hxx>
#include <unotools/charclass.hxx>
#include <tools/string.hxx>
#include <tools/debug.hxx>
-#include "instance.hxx"
-
-#define CHARCLASS_SERVICENAME "com.sun.star.i18n.CharacterClassification"
+#include <com/sun/star/i18n/CharacterClassification.hpp>
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
@@ -32,14 +31,12 @@ using namespace ::com::sun::star::uno;
CharClass::CharClass(
- const Reference< lang::XMultiServiceFactory > & xSF,
+ const Reference< uno::XComponentContext > & rxContext,
const lang::Locale& rLocale
)
- :
- xSMgr( xSF )
{
setLocale( rLocale );
- xCC = Reference< XCharacterClassification > ( intl_createInstance( xSMgr, CHARCLASS_SERVICENAME, "CharClass" ), uno::UNO_QUERY );
+ xCC = CharacterClassification::create( rxContext );
}
@@ -47,8 +44,7 @@ CharClass::CharClass(
const ::com::sun::star::lang::Locale& rLocale )
{
setLocale( rLocale );
- Reference< lang::XMultiServiceFactory > xNil;
- xCC = Reference< XCharacterClassification > ( intl_createInstance( xNil, CHARCLASS_SERVICENAME, "CharClass" ), uno::UNO_QUERY );
+ xCC = CharacterClassification::create( comphelper::getProcessComponentContext() );
}