summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-14 14:19:58 +0200
committerNoel Grandin <noel@peralex.com>2013-05-15 08:25:37 +0200
commitbe1833cbc497080af531a207f216a4f560c0b9e9 (patch)
tree405fd5cd58cf4229364c3bce84882f173cbb57b4 /cui/source
parentbae42fd6dac1d6fa8330eeede66ec22cddb82311 (diff)
fdo#46808, Convert singleton theBrowseNodeFactory to new style
Change-Id: I68fa7f5dde1928e895575bc602b54de83279fb7c
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/cfgutil.cxx5
-rw-r--r--cui/source/customize/selector.cxx4
-rw-r--r--cui/source/dialogs/scriptdlg.cxx6
3 files changed, 6 insertions, 9 deletions
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 <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <com/sun/star/script/browse/XBrowseNode.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
-#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
+#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
#include <com/sun/star/script/provider/XScriptProvider.hpp>
@@ -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 <com/sun/star/frame/UICommandDescription.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
#include <com/sun/star/script/provider/XScriptProvider.hpp>
+#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
#include <com/sun/star/script/browse/XBrowseNode.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
@@ -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 <com/sun/star/script/browse/BrowseNodeTypes.hpp>
#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
+#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
#include <com/sun/star/script/provider/ScriptErrorRaisedException.hpp>
#include <com/sun/star/script/provider/ScriptExceptionRaisedException.hpp>
#include <com/sun/star/script/provider/ScriptFrameworkErrorType.hpp>
@@ -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 ) );