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 /sd | |
parent | 7e708545e4e32910d93cd471eb8438dca4ab47b6 (diff) |
fdo#46808, use service constructor for i18n::Collator
Change-Id: If6ad17fa9e274beff7ba872a095ced65438962af
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/animations/CustomAnimationCreateDialog.cxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index fc803fb3425b..53b26cbc1cb0 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -27,7 +27,7 @@ ************************************************************************/ -#include <com/sun/star/i18n/XCollator.hpp> +#include <com/sun/star/i18n/Collator.hpp> #include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> @@ -225,22 +225,15 @@ private: ImplStlEffectCategorySortHelper::ImplStlEffectCategorySortHelper() { - uno::Reference<lang::XMultiServiceFactory> xFac( ::comphelper::getProcessServiceFactory() ); - if( xFac.is() ) - { - mxCollator.set( xFac->createInstance( "com.sun.star.i18n.Collator" ), uno::UNO_QUERY ); + mxCollator = i18n::Collator::create( ::comphelper::getProcessComponentContext() ); - if( mxCollator.is() ) - { - const lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale(); - mxCollator->loadDefaultCollator(rLocale, 0); - } - } + const lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale(); + mxCollator->loadDefaultCollator(rLocale, 0); } bool ImplStlEffectCategorySortHelper::operator()( const CustomAnimationPresetPtr& p1, const CustomAnimationPresetPtr& p2 ) { - return mxCollator.is() ? mxCollator->compareString(p1->getLabel(), p2->getLabel()) == -1 : false; + return mxCollator->compareString(p1->getLabel(), p2->getLabel()) == -1; } CustomAnimationCreateTabPage::CustomAnimationCreateTabPage( Window* pParent, CustomAnimationCreateDialog* pDialogParent, int nTabId, const PresetCategoryList& rCategoryList, bool bHasText ) |