Kaydet (Commit) be1833cb authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert singleton theBrowseNodeFactory to new style

Change-Id: I68fa7f5dde1928e895575bc602b54de83279fb7c
üst bae42fd6
......@@ -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 )
......
......@@ -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& )
......
......@@ -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 ) );
......
......@@ -305,6 +305,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/script,\
DocumentDialogLibraryContainer \
DocumentScriptLibraryContainer \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/script/browse,\
theBrowseNodeFactory \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/script/provider,\
theMasterScriptProviderFactory \
MasterScriptProviderFactory \
......@@ -1030,7 +1033,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/report/
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/script/browse,\
BrowseNode \
BrowseNodeFactory \
theBrowseNodeFactory \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/script/provider,\
LanguageScriptProvider \
......
......@@ -28,6 +28,7 @@ module com { module sun { module star { module script { module browse {
This service is used to create Root XBrowseNodes.
@since OOo 2.0
@deprecated use the singleton theBrowseNodeFactory
*/
service BrowseNodeFactory
{
......
......@@ -20,7 +20,7 @@
#ifndef __com_sun_star_script_browse_theBrowseNodeFactory_idl__
#define __com_sun_star_script_browse_theBrowseNodeFactory_idl__
#include <com/sun/star/script/browse/BrowseNodeFactory.idl>
#include <com/sun/star/script/browse/XBrowseNodeFactory.idl>
module com { module sun { module star { module script { module browse {
......@@ -34,10 +34,7 @@ module com { module sun { module star { module script { module browse {
@since OOo 2.0
*/
singleton theBrowseNodeFactory
{
service BrowseNodeFactory;
};
singleton theBrowseNodeFactory : XBrowseNodeFactory;
}; }; }; }; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment