summaryrefslogtreecommitdiff
path: root/cui/source/customize
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-26 13:53:19 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-04 16:57:55 +0200
commitb3c76dee6d44d07eae404b8d7341e6c88e6c4429 (patch)
treec747dd5bddf94c3b4312c7b1861a5087e76e71d6 /cui/source/customize
parenteb68bf18f2d859486c4a737abb2536a6afe45411 (diff)
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new ::create methods Change-Id: I01d4417820f52718836c92faf3c2fae0dc96b30d Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'cui/source/customize')
-rw-r--r--cui/source/customize/cfg.cxx22
1 files changed, 7 insertions, 15 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f1616367812d..adaeaaa94614 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -85,7 +85,9 @@
#include <com/sun/star/frame/XFramesSupplier.hpp>
#include <com/sun/star/frame/XFrames.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
+#include <com/sun/star/graphic/GraphicProvider.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
+#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
#include "dlgname.hxx"
@@ -5052,19 +5054,11 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
uno::Reference< lang::XMultiServiceFactory > xServiceManager =
::comphelper::getProcessServiceFactory();
+ uno::Reference< uno::XComponentContext > xComponentContext =
+ ::comphelper::getProcessComponentContext();
- if ( xServiceManager.is() )
- {
- m_xGraphProvider = uno::Reference< graphic::XGraphicProvider >(
- xServiceManager->createInstance(
- ::rtl::OUString("com.sun.star.graphic.GraphicProvider" ) ),
- uno::UNO_QUERY );
- }
-
- if ( !m_xGraphProvider.is() )
- {
- aBtnImport.Enable( sal_False );
- }
+ m_xGraphProvider = uno::Reference< graphic::XGraphicProvider >(
+ graphic::GraphicProvider::create( xComponentContext ) );
uno::Reference< beans::XPropertySet > xPropSet(
xServiceManager->createInstance( ::rtl::OUString("com.sun.star.util.PathSettings" ) ),
@@ -5094,9 +5088,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow,
aDirectory += ::rtl::OUString( "soffice.cfg/import" );
uno::Reference< lang::XSingleServiceFactory > xStorageFactory(
- xServiceManager->createInstance(
- ::rtl::OUString("com.sun.star.embed.FileSystemStorageFactory" ) ),
- uno::UNO_QUERY );
+ ::com::sun::star::embed::FileSystemStorageFactory::create( xComponentContext ) );
uno::Sequence< uno::Any > aArgs( 2 );
aArgs[ 0 ] <<= aDirectory;