From be1833cbc497080af531a207f216a4f560c0b9e9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 14 May 2013 14:19:58 +0200 Subject: fdo#46808, Convert singleton theBrowseNodeFactory to new style Change-Id: I68fa7f5dde1928e895575bc602b54de83279fb7c --- cui/source/customize/cfgutil.cxx | 5 ++--- cui/source/customize/selector.cxx | 4 ++-- cui/source/dialogs/scriptdlg.cxx | 6 ++---- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 98bec2a3ca23..174a3fd4e296 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include @@ -567,8 +567,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::uno::XComp comphelper::getProcessComponentContext() ); try { - Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName( - OUString( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); + Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( xCtx ); rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); } catch( Exception& e ) diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index 89d0a7627efe..1f2105ce28d2 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -484,8 +485,7 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame try { - Reference< browse::XBrowseNodeFactory > xFac( xContext->getValueByName( - OUString( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory") ), UNO_QUERY_THROW ); + Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( xContext ); rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) ); } catch( const Exception& ) diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index cc3bcc0076c5..672ff5e3e297 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -166,12 +167,9 @@ void SFTreeListBox::Init( const OUString& language ) OUString userStr("user"); OUString shareStr("share"); - OUString singleton("/singletons/com.sun.star.script.browse.theBrowseNodeFactory"); - try { - Reference< browse::XBrowseNodeFactory > xFac( - xCtx->getValueByName( singleton ), UNO_QUERY_THROW ); + Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get(xCtx); rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROORGANIZER ) ); -- cgit v1.2.3