diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-08 14:53:57 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-28 13:06:18 +0100 |
commit | 56ea15091c69d280310aa8b28bb1e9488eaad756 (patch) | |
tree | 5c97dee49a30aa1b51c7f54f7990723268f28878 /comphelper/source/misc/string.cxx | |
parent | 7e708545e4e32910d93cd471eb8438dca4ab47b6 (diff) |
fdo#46808, use service constructor for i18n::Collator
Change-Id: If6ad17fa9e274beff7ba872a095ced65438962af
Diffstat (limited to 'comphelper/source/misc/string.cxx')
-rw-r--r-- | comphelper/source/misc/string.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 2fe8a3f508f8..1dae9e8c203f 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/i18n/BreakIterator.hpp> #include <com/sun/star/i18n/CharType.hpp> +#include <com/sun/star/i18n/Collator.hpp> namespace comphelper { namespace string { @@ -343,12 +344,7 @@ NaturalStringSorter::NaturalStringSorter( const uno::Reference< uno::XComponentContext > &rContext, const lang::Locale &rLocale) : m_aLocale(rLocale) { - uno::Reference< lang::XMultiComponentFactory > xFactory(rContext->getServiceManager(), - uno::UNO_SET_THROW); - - m_xCollator = uno::Reference< i18n::XCollator >(xFactory->createInstanceWithContext( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")), rContext), - uno::UNO_QUERY_THROW); + m_xCollator = i18n::Collator::create( rContext ); m_xCollator->loadDefaultCollator(m_aLocale, 0); m_xBI = i18n::BreakIterator::create( rContext ); } |