summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-22 12:20:16 +0200
committerNoel Grandin <noel@peralex.com>2013-03-04 14:22:32 +0200
commit4633b07bed7d71d1ab9d7fa30d979f054043958b (patch)
tree844313217c10a5576b03d48d972912caaa9c6ab4
parentba660eb85665b1893c86217daf1dad78d68ba192 (diff)
fdo#46808, remove some unnecessary getProcessServiceFactory calls
Change-Id: I62652b0fd9a28e0e7eaea65569764bc534b112f1
-rw-r--r--sfx2/source/view/viewsh.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 88f87635d9d4..de6b6d39fe43 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -228,10 +228,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
::rtl::OUString aLabel;
css::uno::Reference< css::frame::XModuleManager2 > xModuleManager( s_xModuleManager );
css::uno::Reference< css::container::XNameAccess > xNameAccess( s_xNameAccess );
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR(
- ::comphelper::getProcessServiceFactory(), css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::uno::XComponentContext > xContext(
- ::comphelper::getProcessComponentContext(), css::uno::UNO_QUERY_THROW);
+ css::uno::Reference< css::uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
try
{
@@ -246,8 +243,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
if ( !xNameAccess.is() )
{
xNameAccess = css::uno::Reference< css::container::XNameAccess >(
- css::frame::UICommandDescription::create(
- comphelper::getComponentContext(xSMGR)),
+ css::frame::UICommandDescription::create(xContext),
css::uno::UNO_QUERY_THROW );
s_xNameAccess = xNameAccess;
}
@@ -362,9 +358,8 @@ enum ETypeFamily
{
try
{
- css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR (::comphelper::getProcessServiceFactory() , css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::uno::XComponentContext > xContext (::comphelper::getProcessComponentContext() , css::uno::UNO_QUERY_THROW);
- css::uno::Reference< css::frame::XModuleManager2 > xModuleManager(css::frame::ModuleManager::create(xContext));
+ css::uno::Reference< css::uno::XComponentContext > xContext (::comphelper::getProcessComponentContext());
+ css::uno::Reference< css::frame::XModuleManager2 > xModuleManager(css::frame::ModuleManager::create(xContext));
::rtl::OUString sModule = xModuleManager->identify(xFrame);
::rtl::OUString sType ;