From 2f998bdf8f5c504f09833febe0cd16ce743f57a5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 10 Dec 2012 14:39:29 +0200 Subject: fdo#46808, use service constructor for embed::FileSystemStorageFactory Change-Id: Ic523e4b0a662a68a1a222b7697fcdae56d69903c --- framework/inc/services.h | 1 - framework/source/accelerators/presethandler.cxx | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/inc/services.h b/framework/inc/services.h index beae088e22ea..d8f38672d57b 100644 --- a/framework/inc/services.h +++ b/framework/inc/services.h @@ -68,7 +68,6 @@ namespace framework{ #define SERVICENAME_GLOBALACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.GlobalAcceleratorConfiguration") #define SERVICENAME_MODULEACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.ModuleAcceleratorConfiguration") #define SERVICENAME_DOCUMENTACCELERATORCONFIGURATION DECLARE_ASCII("com.sun.star.ui.DocumentAcceleratorConfiguration") -#define SERVICENAME_FILESYSTEMSTORAGEFACTORY DECLARE_ASCII("com.sun.star.embed.FileSystemStorageFactory" ) #define SERVICENAME_PACKAGESTRUCTURECREATOR DECLARE_ASCII("com.sun.star.embed.PackageStructureCreator" ) #define SERVICENAME_TOOLBARFACTORY DECLARE_ASCII("com.sun.star.ui.ToolBarFactory" ) #define SERVICENAME_TOOLBARCONTROLLERFACTORY DECLARE_ASCII("com.sun.star.frame.ToolBarControllerFactory" ) diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index d0a57391b6d9..80c013b2c55c 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -254,7 +255,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag lArgs[0] <<= sShareLayer; lArgs[1] <<= css::embed::ElementModes::READ | css::embed::ElementModes::NOCREATE; - css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory(xSMGR->createInstance(SERVICENAME_FILESYSTEMSTORAGEFACTORY) , css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = css::embed::FileSystemStorageFactory::create( comphelper::getComponentContext(xSMGR) ); css::uno::Reference< css::embed::XStorage > xStorage; try @@ -304,7 +305,7 @@ css::uno::Reference< css::embed::XStorage > PresetHandler::getOrCreateRootStorag lArgs[0] <<= sUserLayer; lArgs[1] <<= css::embed::ElementModes::READWRITE; - css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory(xSMGR->createInstance(SERVICENAME_FILESYSTEMSTORAGEFACTORY) , css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory = css::embed::FileSystemStorageFactory::create( comphelper::getComponentContext(xSMGR) ); css::uno::Reference< css::embed::XStorage > xStorage; try -- cgit