[Libreoffice-commits] core.git: 7 commits - cui/inc cui/source dbaccess/inc dbaccess/source desktop/source embeddedobj/source forms/source framework/inc framework/source framework/util offapi/com offapi/UnoApi_offapi.mk sc/inc sc/source sd/source sfx2/inc sfx2/source solenv/bin svtools/inc svtools/source sw/inc sw/source vbahelper/source vcl/inc vcl/source
Matúš Kukan
matus.kukan at collabora.com
Thu Jan 30 01:49:35 PST 2014
cui/inc/pch/precompiled_cui.hxx | 2
cui/source/customize/acccfg.cxx | 4
cui/source/customize/cfg.cxx | 4
dbaccess/inc/pch/precompiled_dbu.hxx | 2
dbaccess/source/ui/app/AppDetailView.cxx | 4
dbaccess/source/ui/control/opendoccontrols.cxx | 6
dbaccess/source/ui/control/toolboxcontroller.cxx | 4
desktop/source/migration/migration.cxx | 4
embeddedobj/source/general/docholder.cxx | 4
forms/source/helper/commandimageprovider.cxx | 6
framework/inc/helper/mischelper.hxx | 28
framework/inc/helper/persistentwindowstate.hxx | 1
framework/inc/pch/precompiled_fwk.hxx | 2
framework/inc/services/substitutepathvars.hxx | 285 ---------
framework/inc/services/taskcreatorsrv.hxx | 148 ----
framework/inc/taskcreatordefs.hxx | 58 +
framework/inc/uiconfiguration/moduleuicfgsupplier.hxx | 101 ---
framework/inc/uifactory/configurationaccessfactorymanager.hxx | 3
framework/inc/uifactory/windowcontentfactorymanager.hxx | 74 --
framework/source/classes/taskcreator.cxx | 2
framework/source/layoutmanager/layoutmanager.cxx | 4
framework/source/register/registerservices.cxx | 8
framework/source/services/autorecovery.cxx | 29
framework/source/services/substitutepathvars.cxx | 315 +++++++++-
framework/source/services/taskcreatorsrv.cxx | 168 +++--
framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 168 ++---
framework/source/uielement/menubarmanager.cxx | 6
framework/source/uielement/newmenucontroller.cxx | 4
framework/source/uielement/toolbarmanager.cxx | 6
framework/source/uielement/toolbarsmenucontroller.cxx | 4
framework/source/uifactory/menubarfactory.cxx | 5
framework/source/uifactory/uielementfactorymanager.cxx | 3
framework/source/uifactory/windowcontentfactorymanager.cxx | 165 ++---
framework/util/fwk.component | 14
offapi/UnoApi_offapi.mk | 3
offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl | 18
offapi/com/sun/star/ui/WindowContentFactoryManager.idl | 6
offapi/com/sun/star/ui/theModuleUIConfigurationManagerSupplier.idl | 52 +
offapi/com/sun/star/ui/theWindowContentFactoryManager.idl | 41 +
sc/inc/pch/precompiled_sc.hxx | 2
sc/inc/pch/precompiled_scfilt.hxx | 2
sc/source/filter/excel/xltoolbar.cxx | 4
sc/source/ui/docshell/docsh.cxx | 4
sd/source/ui/dlg/dlgass.cxx | 4
sfx2/inc/pch/precompiled_sfx.hxx | 4
sfx2/source/appl/imagemgr.cxx | 4
sfx2/source/dialog/dockwin.cxx | 4
sfx2/source/sidebar/CommandInfoProvider.cxx | 4
solenv/bin/native-code.py | 2
svtools/inc/pch/precompiled_svt.hxx | 2
svtools/source/misc/acceleratorexecute.cxx | 4
svtools/source/uno/contextmenuhelper.cxx | 4
sw/inc/pch/precompiled_msword.hxx | 2
sw/source/filter/ww8/ww8toolbar.cxx | 4
vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 4
vcl/inc/pch/precompiled_vcl.hxx | 2
vcl/source/window/toolbox2.cxx | 4
57 files changed, 853 insertions(+), 968 deletions(-)
New commits:
commit 92c8a8fc823e8a96fb3997386364652b759a31fa
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Jan 9 20:08:25 2014 +0100
fwk: Ctor feature for single-instance ModuleUIConfigurationManagerSupplier.
Change-Id: I4674ed6852807e08ff8319515b0ab4e9535b668a
diff --git a/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx b/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx
deleted file mode 100644
index 6a34a12..0000000
--- a/framework/inc/uiconfiguration/moduleuicfgsupplier.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_UICONFIGURATION_MODULEUICFGSUPPLIER_HXX
-#define INCLUDED_FRAMEWORK_INC_UICONFIGURATION_MODULEUICFGSUPPLIER_HXX
-
-
-/** Attention: stl headers must(!) be included at first. Otherwise it can make trouble
- with solaris headers ...
-*/
-#include <vector>
-#include <list>
-#include <boost/unordered_map.hpp>
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
-#include <macros/xserviceinfo.hxx>
-#include <stdtypes.h>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <com/sun/star/ui/XModuleUIConfigurationManager2.hpp>
-#include <com/sun/star/frame/XModuleManager2.hpp>
-#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/embed/XTransactedObject.hpp>
-
-#include <cppuhelper/implbase3.hxx>
-#include <rtl/ustring.hxx>
-
-
-namespace framework
-{
- class ModuleUIConfigurationManagerSupplier : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
- public cppu::WeakImplHelper3<
- com::sun::star::lang::XServiceInfo ,
- com::sun::star::lang::XComponent ,
- com::sun::star::ui::XModuleUIConfigurationManagerSupplier >
- {
- public:
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
-
- ModuleUIConfigurationManagerSupplier( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
- virtual ~ModuleUIConfigurationManagerSupplier();
-
- // XComponent
- virtual void SAL_CALL dispose()
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener )
- throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XModuleUIConfigurationManagerSupplier
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager( const OUString& ModuleIdentifier )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-
- private:
- typedef ::boost::unordered_map< OUString, com::sun::star::uno::Reference< ::com::sun::star::ui::XModuleUIConfigurationManager2 >, OUStringHash, ::std::equal_to< OUString > > ModuleToModuleCfgMgr;
-
-//TODO_AS void impl_initStorages();
-
- // private methods
- ModuleToModuleCfgMgr m_aModuleToModuleUICfgMgrMap;
- bool m_bDisposed;
-// TODO_AS bool m_bInit;
- OUString m_aDefaultConfigURL;
- OUString m_aUserConfigURL;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDefaultCfgRootStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xUserCfgRootStorage;
- com::sun::star::uno::Reference< com::sun::star::embed::XTransactedObject > m_xUserRootCommit;
- com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager2 > m_xModuleMgr;
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
- ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener
- };
-}
-
-#endif // INCLUDED_FRAMEWORK_INC_UICONFIGURATION_MODULEUICFGSUPPLIER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index 5e5040d..b66c1b9 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -34,7 +34,6 @@
)
=================================================================================================================*/
#include <services/desktop.hxx>
-#include <uiconfiguration/moduleuicfgsupplier.hxx>
#include <uifactory/menubarfactory.hxx>
#include <uifactory/toolboxfactory.hxx>
#include "uiconfiguration/windowstateconfiguration.hxx"
@@ -45,7 +44,6 @@
COMPONENTGETFACTORY ( fwk,
IFFACTORY( ::framework::Desktop ) else
- IFFACTORY( ::framework::ModuleUIConfigurationManagerSupplier ) else
IFFACTORY( ::framework::MenuBarFactory ) else
IFFACTORY( ::framework::ToolBoxFactory ) else
IFFACTORY( ::framework::WindowStateConfiguration ) else
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index 48f116a..66c3c82 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -17,11 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <uiconfiguration/moduleuicfgsupplier.hxx>
-#include <threadhelp/resetableguard.hxx>
-#include <services.h>
+#include <stdtypes.h>
-#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -31,10 +28,18 @@
#include <com/sun/star/io/XSeekable.hpp>
#include <com/sun/star/embed/XPackageStructureCreator.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManager.hpp>
-
-#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/XUIConfigurationManager.hpp>
+#include <com/sun/star/ui/XModuleUIConfigurationManager2.hpp>
+#include <com/sun/star/frame/XModuleManager2.hpp>
+
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <vcl/svapp.hxx>
+#include <boost/unordered_map.hpp>
+
using namespace com::sun::star::uno;
using namespace com::sun::star::io;
using namespace com::sun::star::lang;
@@ -43,53 +48,63 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::embed;
using namespace ::com::sun::star::ui;
using namespace ::com::sun::star::frame;
+using namespace framework;
-namespace framework
-{
+namespace {
-class RootStorageWrapper : public ::cppu::WeakImplHelper1< com::sun::star::embed::XTransactedObject >
+typedef cppu::WeakComponentImplHelper2<
+ css::lang::XServiceInfo,
+ css::ui::XModuleUIConfigurationManagerSupplier >
+ ModuleUIConfigurationManagerSupplier_BASE;
+
+class ModuleUIConfigurationManagerSupplier : private osl::Mutex,
+ public ModuleUIConfigurationManagerSupplier_BASE
{
- public:
- // XInterface, XTypeProvider
- RootStorageWrapper( const Reference< XTransactedObject >& xRootCommit ) : m_xRootCommit( xRootCommit ) {}
- virtual ~RootStorageWrapper() {}
+public:
+ ModuleUIConfigurationManagerSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ virtual ~ModuleUIConfigurationManagerSupplier();
- // XTransactedObject
- virtual void SAL_CALL commit() throw ( com::sun::star::io::IOException, com::sun::star::lang::WrappedTargetException )
- {
- m_xRootCommit->commit();
- }
+ virtual OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ {
+ return OUString("com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier");
+ }
- virtual void SAL_CALL revert() throw ( com::sun::star::io::IOException, com::sun::star::lang::WrappedTargetException )
- {
- m_xRootCommit->revert();
- }
+ virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ {
+ return cppu::supportsService(this, ServiceName);
+ }
- private:
- Reference< XTransactedObject > m_xRootCommit;
-};
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
+ throw (css::uno::RuntimeException)
+ {
+ css::uno::Sequence< OUString > aSeq(1);
+ aSeq[0] = OUString("com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
+ return aSeq;
+ }
-//*****************************************************************************************************************
-// XInterface, XTypeProvider, XServiceInfo
-//*****************************************************************************************************************
+ // XModuleUIConfigurationManagerSupplier
+ virtual css::uno::Reference< css::ui::XUIConfigurationManager > SAL_CALL getUIConfigurationManager( const OUString& ModuleIdentifier )
+ throw (css::container::NoSuchElementException, css::uno::RuntimeException);
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2( ModuleUIConfigurationManagerSupplier ,
- ::cppu::OWeakObject ,
- "com.sun.star.ui.ModuleUIConfigurationManagerSupplier" ,
- IMPLEMENTATIONNAME_MODULEUICONFIGURATIONMANAGERSUPPLIER
- )
+private:
+ virtual void SAL_CALL disposing() SAL_OVERRIDE;
-DEFINE_INIT_SERVICE ( ModuleUIConfigurationManagerSupplier, {} )
+ typedef ::boost::unordered_map< OUString, css::uno::Reference< css::ui::XModuleUIConfigurationManager2 >, OUStringHash, ::std::equal_to< OUString > > ModuleToModuleCfgMgr;
+//TODO_AS void impl_initStorages();
+ // private methods
+ ModuleToModuleCfgMgr m_aModuleToModuleUICfgMgrMap;
+ css::uno::Reference< css::frame::XModuleManager2 > m_xModuleMgr;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+};
ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( const Reference< XComponentContext >& xContext ) :
- ThreadHelpBase( &Application::GetSolarMutex() )
- , m_bDisposed( false )
-//TODO_AS , m_bInit( false )
+ ModuleUIConfigurationManagerSupplier_BASE(*static_cast<osl::Mutex *>(this))
, m_xModuleMgr( ModuleManager::create( xContext ) )
, m_xContext( xContext )
- , m_aListenerContainer( m_aLock.getShareableOslMutex() )
{
try
{
@@ -107,7 +122,12 @@ ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( cons
ModuleUIConfigurationManagerSupplier::~ModuleUIConfigurationManagerSupplier()
{
- m_xUserRootCommit.clear();
+ disposing();
+}
+
+void SAL_CALL ModuleUIConfigurationManagerSupplier::disposing()
+{
+ osl::MutexGuard g(rBHelper.rMutex);
// dispose all our module user interface configuration managers
ModuleToModuleCfgMgr::iterator pIter = m_aModuleToModuleUICfgMgrMap.begin();
@@ -118,53 +138,16 @@ ModuleUIConfigurationManagerSupplier::~ModuleUIConfigurationManagerSupplier()
xComponent->dispose();
++pIter;
}
-}
-
-// XComponent
-void SAL_CALL ModuleUIConfigurationManagerSupplier::dispose()
-throw ( RuntimeException )
-{
- Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY );
-
- css::lang::EventObject aEvent( xThis );
- m_aListenerContainer.disposeAndClear( aEvent );
-
- {
- ResetableGuard aGuard( m_aLock );
- m_bDisposed = true;
- }
-}
-
-void SAL_CALL ModuleUIConfigurationManagerSupplier::addEventListener( const Reference< XEventListener >& xListener )
-throw ( RuntimeException )
-{
- {
- ResetableGuard aGuard( m_aLock );
-
- /* SAFE AREA ----------------------------------------------------------------------------------------------- */
- if ( m_bDisposed )
- throw DisposedException();
- }
-
- m_aListenerContainer.addInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
-}
-
-void SAL_CALL ModuleUIConfigurationManagerSupplier::removeEventListener( const Reference< XEventListener >& xListener )
-throw ( RuntimeException )
-{
- /* SAFE AREA ----------------------------------------------------------------------------------------------- */
- m_aListenerContainer.removeInterface( ::getCppuType( ( const Reference< XEventListener >* ) NULL ), xListener );
+ m_aModuleToModuleUICfgMgrMap.clear();
+ m_xModuleMgr.clear();
}
// XModuleUIConfigurationManagerSupplier
Reference< XUIConfigurationManager > SAL_CALL ModuleUIConfigurationManagerSupplier::getUIConfigurationManager( const OUString& sModuleIdentifier )
throw ( NoSuchElementException, RuntimeException)
{
- ResetableGuard aGuard( m_aLock );
-
+ osl::MutexGuard g(rBHelper.rMutex);
/* SAFE AREA ----------------------------------------------------------------------------------------------- */
- if ( m_bDisposed )
- throw DisposedException();
ModuleToModuleCfgMgr::iterator pIter = m_aModuleToModuleUICfgMgrMap.find( sModuleIdentifier );
if ( pIter == m_aModuleToModuleUICfgMgrMap.end() )
@@ -203,6 +186,31 @@ throw ( NoSuchElementException, RuntimeException)
return pIter->second;
}
-} // namespace framework
+struct Instance {
+ explicit Instance(
+ css::uno::Reference<css::uno::XComponentContext> const & context):
+ instance(static_cast<cppu::OWeakObject *>(
+ new ModuleUIConfigurationManagerSupplier(context)))
+ {
+ }
+
+ css::uno::Reference<css::uno::XInterface> instance;
+};
+
+struct Singleton:
+ public rtl::StaticWithArg<
+ Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton>
+{};
+
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_framework_ModuleUIConfigurationManagerSupplier_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(static_cast<cppu::OWeakObject *>(
+ Singleton::get(context).instance.get()));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index d8792ec..fc94a5e 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -85,7 +85,8 @@
constructor="com_sun_star_comp_framework_ModuleUIConfigurationManager_get_implementation">
<service name="com.sun.star.ui.ModuleUIConfigurationManager"/>
</implementation>
- <implementation name="com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier">
+ <implementation name="com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier"
+ constructor="com_sun_star_comp_framework_ModuleUIConfigurationManagerSupplier_get_implementation">
<service name="com.sun.star.ui.ModuleUIConfigurationManagerSupplier"/>
<singleton name="com.sun.star.ui.theModuleUIConfigurationManagerSupplier"/>
</implementation>
commit 19e16083c61c46a9d014b2db79e70194c14dec64
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Wed Jan 29 18:58:18 2014 +0100
Introduce com.sun.star.ui.theModuleUIConfigurationManagerSupplier singleton.
Change-Id: I7b503e5d49865c9ff287bf72eaff1995ce871790
diff --git a/cui/inc/pch/precompiled_cui.hxx b/cui/inc/pch/precompiled_cui.hxx
index 5108a64..42a1560 100644
--- a/cui/inc/pch/precompiled_cui.hxx
+++ b/cui/inc/pch/precompiled_cui.hxx
@@ -210,7 +210,7 @@
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/ui/ItemType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/theUICategoryDescription.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index d15fd53..d555932 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -54,7 +54,7 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
@@ -854,7 +854,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
// get module accelerator configuration
- css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier( css::ui::ModuleUIConfigurationManagerSupplier::create(m_xContext) );
+ css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(m_xContext) );
css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName);
m_xModule = xUICfgManager->getShortCutManager();
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f55addc..738757a 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -76,7 +76,7 @@
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/ui/ImageManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationListener.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
@@ -1641,7 +1641,7 @@ void SvxConfigPage::Reset( const SfxItemSet& )
}
uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier >
- xModuleCfgSupplier( css::ui::ModuleUIConfigurationManagerSupplier::create(xContext) );
+ xModuleCfgSupplier( css::ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
// Set up data for module specific menus
SaveInData* pModuleData = NULL;
diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx
index 14c809c..0b5b62b 100644
--- a/dbaccess/inc/pch/precompiled_dbu.hxx
+++ b/dbaccess/inc/pch/precompiled_dbu.hxx
@@ -254,7 +254,7 @@
#include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp>
#include <com/sun/star/ui/ImageType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XContextMenuInterceptor.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index f08fcd0..0495f50 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -23,7 +23,7 @@
#include "dbu_app.hrc"
#include "AppView.hxx"
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/sdbcx/XViewsSupplier.hpp>
@@ -463,7 +463,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
try
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
- ModuleUIConfigurationManagerSupplier::create( getDetailView()->getBorderWin().getView()->getORB() );
+ theModuleUIConfigurationManagerSupplier::get( getDetailView()->getBorderWin().getView()->getORB() );
Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
OUString( "com.sun.star.sdb.OfficeDatabaseDocument" )
);
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 008f367..ed1e47b 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
@@ -52,7 +52,7 @@ namespace dbaui
using ::com::sun::star::container::XNameAccess;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::beans::PropertyValue;
- using ::com::sun::star::ui::ModuleUIConfigurationManagerSupplier;
+ using ::com::sun::star::ui::theModuleUIConfigurationManagerSupplier;
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
using ::com::sun::star::ui::XUIConfigurationManager;
using ::com::sun::star::ui::XImageManager;
@@ -126,7 +126,7 @@ namespace dbaui
break;
Reference< XModuleUIConfigurationManagerSupplier > xSupplier(
- ModuleUIConfigurationManagerSupplier::create(xContext) );
+ theModuleUIConfigurationManagerSupplier::get(xContext) );
Reference< XUIConfigurationManager > xManager( xSupplier->getUIConfigurationManager( _rModuleName ) );
Reference< XImageManager > xImageManager;
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index 85cdfc7..9caceec 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -23,7 +23,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/menu.hxx>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
#include <vcl/svapp.hxx>
@@ -188,7 +188,7 @@ namespace dbaui
try
{
- Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier = ModuleUIConfigurationManagerSupplier::create( getContext() );
+ Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier = theModuleUIConfigurationManagerSupplier::get( getContext() );
Reference<XUIConfigurationManager> xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( OUString("com.sun.star.sdb.OfficeDatabaseDocument") );
Reference<XImageManager> xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index c6e0466..4b53ec3 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -53,7 +53,7 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/FileSystemStorageFactory.hpp>
#include <com/sun/star/embed/XStorage.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
#include <com/sun/star/ui/XUIConfiguration.hpp>
@@ -1350,7 +1350,7 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules
const OUString sMenubarResourceURL("private:resource/menubar/menubar");
const OUString sToolbarResourcePre("private:resource/toolbar/");
- uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = ui::ModuleUIConfigurationManagerSupplier::create( ::comphelper::getProcessComponentContext() );
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = ui::theModuleUIConfigurationManagerSupplier::get( ::comphelper::getProcessComponentContext() );
for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
{
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index b633456..1e3f710 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -56,7 +56,7 @@
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/embed/StateChangeInProgressException.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
@@ -552,7 +552,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl()
if ( !aModuleIdent.isEmpty() )
{
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModConfSupplier =
- ui::ModuleUIConfigurationManagerSupplier::create(m_xContext);
+ ui::theModuleUIConfigurationManagerSupplier::get(m_xContext);
uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > xModUIConfMan(
xModConfSupplier->getUIConfigurationManager( aModuleIdent ),
uno::UNO_QUERY_THROW );
diff --git a/forms/source/helper/commandimageprovider.cxx b/forms/source/helper/commandimageprovider.cxx
index 5734296..bdacb89 100644
--- a/forms/source/helper/commandimageprovider.cxx
+++ b/forms/source/helper/commandimageprovider.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/ui/ImageType.hpp>
@@ -50,7 +50,7 @@ namespace frm
using ::com::sun::star::ui::XUIConfigurationManagerSupplier;
using ::com::sun::star::ui::XUIConfigurationManager;
using ::com::sun::star::ui::XModuleUIConfigurationManagerSupplier;
- using ::com::sun::star::ui::ModuleUIConfigurationManagerSupplier;
+ using ::com::sun::star::ui::theModuleUIConfigurationManagerSupplier;
using ::com::sun::star::frame::ModuleManager;
using ::com::sun::star::frame::XModuleManager2;
using ::com::sun::star::graphic::XGraphic;
@@ -108,7 +108,7 @@ namespace frm
OUString sModuleID = xModuleManager->identify( _rxDocument );
Reference< XModuleUIConfigurationManagerSupplier > xSuppUIConfig(
- ModuleUIConfigurationManagerSupplier::create(_rContext) );
+ theModuleUIConfigurationManagerSupplier::get(_rContext) );
Reference< XUIConfigurationManager > xUIConfig(
xSuppUIConfig->getUIConfigurationManager( sModuleID ), UNO_SET_THROW );
m_xModuleImageManager.set( xUIConfig->getImageManager(), UNO_QUERY_THROW );
diff --git a/framework/inc/pch/precompiled_fwk.hxx b/framework/inc/pch/precompiled_fwk.hxx
index c88be55..32b8d6d 100644
--- a/framework/inc/pch/precompiled_fwk.hxx
+++ b/framework/inc/pch/precompiled_fwk.hxx
@@ -204,7 +204,7 @@
#include <com/sun/star/ui/ItemType.hpp>
#include <com/sun/star/ui/ModuleAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ModuleUIConfigurationManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index e0d8746..ce5d134 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/awt/PosSize.hpp>
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/awt/XSystemDependentWindowPeer.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
@@ -267,7 +267,7 @@ void LayoutManager::implts_reset( sal_Bool bAttached )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier;
if ( xContext.is() )
- xModuleCfgSupplier = ModuleUIConfigurationManagerSupplier::create( xContext );
+ xModuleCfgSupplier = theModuleUIConfigurationManagerSupplier::get( xContext );
if ( xModuleCfgMgr.is() )
{
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index b3fb3bf..7504d07 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -50,7 +50,7 @@
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ItemStyle.hpp>
#include <com/sun/star/frame/status/Visibility.hpp>
@@ -1523,7 +1523,7 @@ void MenuBarManager::RetrieveShortcuts( std::vector< MenuItemHandler* >& aMenuSh
if ( !xModuleAccelCfg.is() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
- ModuleUIConfigurationManagerSupplier::create( m_xContext );
+ theModuleUIConfigurationManagerSupplier::get( m_xContext );
try
{
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
@@ -1607,7 +1607,7 @@ void MenuBarManager::RetrieveImageManagers()
if ( !m_xModuleImageManager.is() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
- ModuleUIConfigurationManagerSupplier::create( m_xContext );
+ theModuleUIConfigurationManagerSupplier::get( m_xContext );
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
m_xModuleImageManager.set( xUICfgMgr->getImageManager(), UNO_QUERY );
m_xModuleImageManager->addConfigurationListener( Reference< XUIConfigurationListener >(
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index c424aa2..98f63dc 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/awt/XDevice.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/awt/MenuItemStyle.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
@@ -202,7 +202,7 @@ void NewMenuController::setAccelerators( PopupMenu* pPopupMenu )
if ( !xModuleAccelCfg.is() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
- ModuleUIConfigurationManagerSupplier::create( m_xContext );
+ theModuleUIConfigurationManagerSupplier::get( m_xContext );
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
if ( xUICfgMgr.is() )
{
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 51bb67c..e36f49a 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -46,7 +46,7 @@
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
@@ -1185,7 +1185,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
if ( !m_xModuleImageManager.is() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
- ModuleUIConfigurationManagerSupplier::create( m_xContext );
+ theModuleUIConfigurationManagerSupplier::get( m_xContext );
m_xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
m_xModuleImageManager = Reference< XImageManager >( m_xUICfgMgr->getImageManager(), UNO_QUERY );
m_xModuleImageManager->addConfigurationListener( Reference< XUIConfigurationListener >(
@@ -2210,7 +2210,7 @@ bool ToolBarManager::RetrieveShortcut( const OUString& rCommandURL, OUString& rS
if ( !xModuleAccelCfg.is() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier =
- ModuleUIConfigurationManagerSupplier::create( m_xContext );
+ theModuleUIConfigurationManagerSupplier::get( m_xContext );
try
{
Reference< XUIConfigurationManager > xUICfgMgr = xModuleCfgMgrSupplier->getUIConfigurationManager( m_aModuleIdentifier );
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index f758c6b..9230df8 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -39,7 +39,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/ui/XUIElementSettings.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/WindowStateConfiguration.hpp>
@@ -830,7 +830,7 @@ void SAL_CALL ToolbarsMenuController::initialize( const Sequence< Any >& aArgume
xPersistentWindowStateSupplier->getByName( aModuleIdentifier ) >>= m_xPersistentWindowState;
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
- ModuleUIConfigurationManagerSupplier::create( m_xContext );
+ theModuleUIConfigurationManagerSupplier::get( m_xContext );
m_xModuleCfgMgr = xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
Reference< XController > xController = m_xFrame->getController();
diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx
index cbda3ce..b973960 100644
--- a/framework/source/uifactory/menubarfactory.cxx
+++ b/framework/source/uifactory/menubarfactory.cxx
@@ -28,8 +28,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
-
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <vcl/menu.hxx>
@@ -150,7 +149,7 @@ void MenuBarFactory::CreateUIElement(const OUString& ResourceURL
if ( !aModuleIdentifier.isEmpty() )
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier =
- ModuleUIConfigurationManagerSupplier::create( _rxContext );
+ theModuleUIConfigurationManagerSupplier::get( _rxContext );
xCfgMgr = xModuleCfgSupplier->getUIConfigurationManager( aModuleIdentifier );
bHasSettings = xCfgMgr->hasSettings( aResourceURL );
}
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index 5e9296c..d8792ec 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -87,6 +87,7 @@
</implementation>
<implementation name="com.sun.star.comp.framework.ModuleUIConfigurationManagerSupplier">
<service name="com.sun.star.ui.ModuleUIConfigurationManagerSupplier"/>
+ <singleton name="com.sun.star.ui.theModuleUIConfigurationManagerSupplier"/>
</implementation>
<implementation name="com.sun.star.comp.framework.ObjectMenuController"
constructor="com_sun_star_comp_framework_ObjectMenuController_get_implementation">
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 9df3d69..936073c 100755
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -418,13 +418,13 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/ui,\
GlobalAcceleratorConfiguration \
ModuleAcceleratorConfiguration \
ModuleUIConfigurationManager \
- ModuleUIConfigurationManagerSupplier \
UICategoryDescription \
UIConfigurationManager \
UIElementFactoryManager \
WindowContentFactory \
WindowContentFactoryManager \
WindowStateConfiguration \
+ theModuleUIConfigurationManagerSupplier \
theUICategoryDescription \
theUIElementFactoryManager \
theWindowContentFactoryManager \
diff --git a/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl b/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl
index 7c46a99..60e1bd5 100644
--- a/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl
+++ b/offapi/com/sun/star/ui/ModuleUIConfigurationManagerSupplier.idl
@@ -24,21 +24,13 @@
module com { module sun { module star { module ui {
-/** specifies a central user interface configuration provider which gives
- access to module based user interface configuration managers.
+/**
+ A legacy (single-instance) service-variant of
+ theModuleUIConfigurationManagerSupplier singleton.
- @since OOo 2.0
-
- Controls module based user interface configuration managers.
+ @deprecated Use theModuleUIConfigurationManagerSupplier singleton instead.
- <p>
- There can only exists one user interface configuration manager for
- a module. A user interface configuration manager supports to get and set
- user interface configuration data for configurable user interface elements.
-
- @see ConfigurableUIElement
- @see XUIConfigurationManager
- </p>
+ @since OOo 2.0
*/
service ModuleUIConfigurationManagerSupplier : XModuleUIConfigurationManagerSupplier;
diff --git a/offapi/com/sun/star/ui/theModuleUIConfigurationManagerSupplier.idl b/offapi/com/sun/star/ui/theModuleUIConfigurationManagerSupplier.idl
new file mode 100644
index 0000000..fbc3778
--- /dev/null
+++ b/offapi/com/sun/star/ui/theModuleUIConfigurationManagerSupplier.idl
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_ui_theModuleUIConfigurationManagerSupplier_idl__
+#define __com_sun_star_ui_theModuleUIConfigurationManagerSupplier_idl__
+
+#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.idl>
+#include <com/sun/star/beans/XPropertySet.idl>
+
+module com { module sun { module star { module ui {
+
+/** specifies a central user interface configuration provider which gives
+ access to module based user interface configuration managers.
+
+ Controls module based user interface configuration managers.
+
+ <p>
+ There can only exist one user interface configuration manager for
+ a module. A user interface configuration manager supports to get and set
+ user interface configuration data for configurable user interface elements.
+
+ @see ConfigurableUIElement
+ @see XUIConfigurationManager
+ </p>
+
+ Prior to LibreOffice 4.3, this singleton was only available as a
+ (single-instance) ModuleUIConfigurationManagerSupplier service.
+
+ @since LibreOffice 4.3
+*/
+singleton theModuleUIConfigurationManagerSupplier : XModuleUIConfigurationManagerSupplier;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 22f19b9..ea23135 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -457,7 +457,7 @@
#include <com/sun/star/ucb/XContent.hpp>
#include <com/sun/star/ucb/XContentAccess.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/FilePicker.hpp>
diff --git a/sc/inc/pch/precompiled_scfilt.hxx b/sc/inc/pch/precompiled_scfilt.hxx
index f82b625..eb5fcf7 100644
--- a/sc/inc/pch/precompiled_scfilt.hxx
+++ b/sc/inc/pch/precompiled_scfilt.hxx
@@ -317,7 +317,7 @@
#include <com/sun/star/text/XTextCursor.hpp>
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/ui/ItemType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/uno/Reference.h>
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 9d41e2b..2e588d9 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -11,7 +11,7 @@
#include <stdarg.h>
#include <com/sun/star/document/IndexedPropertyValues.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -397,7 +397,7 @@ bool ScCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
return true;
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::ModuleUIConfigurationManagerSupplier::create(xContext) );
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
std::vector<ScCTB>::iterator it_end = rCTB.end();
for ( std::vector<ScCTB>::iterator it = rCTB.begin(); it != it_end; ++it )
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index cd55cd0..4f3bbf0 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -48,7 +48,7 @@
#include <com/sun/star/script/vba/XVBAEventProcessor.hpp>
#include <com/sun/star/sheet/XSpreadsheetView.hpp>
#include <com/sun/star/task/XJob.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
@@ -2970,7 +2970,7 @@ void ScDocShell::ResetKeyBindings( ScOptionsUtil::KeyBindingType eType )
return;
Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgSupplier(
- ModuleUIConfigurationManagerSupplier::create(xContext) );
+ theModuleUIConfigurationManagerSupplier::get(xContext) );
// Grab the Calc configuration.
Reference<XUIConfigurationManager> xConfigMgr =
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 6ebe262..4f58c96 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -47,7 +47,7 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
@@ -1789,7 +1789,7 @@ Image AssistentDlgImpl::GetUiIconForCommand (const OUString& sCommandURL)
break;
Reference<ui::XModuleUIConfigurationManagerSupplier> xSupplier (
- ui::ModuleUIConfigurationManagerSupplier::create(xContext));
+ ui::theModuleUIConfigurationManagerSupplier::get(xContext));
Reference<com::sun::star::ui::XUIConfigurationManager> xManager (
xSupplier->getUIConfigurationManager(
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index 5a6b6c1..577a8d4 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -441,7 +441,7 @@
#include <com/sun/star/ui/ContextChangeEventObject.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ImageType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
#include <com/sun/star/ui/theUIElementFactoryManager.hpp>
#include <com/sun/star/ui/UIElementType.hpp>
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx
index 7b59f9e..8444682 100644
--- a/sfx2/source/appl/imagemgr.cxx
+++ b/sfx2/source/appl/imagemgr.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/frame/XController.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
@@ -170,7 +170,7 @@ Image SAL_CALL GetImage(
if ( !xModuleCfgMgrSupplier.is() )
{
- xModuleCfgMgrSupplier = ModuleUIConfigurationManagerSupplier::create(
+ xModuleCfgMgrSupplier = theModuleUIConfigurationManagerSupplier::get(
::comphelper::getProcessComponentContext() );
m_xModuleCfgMgrSupplier = xModuleCfgMgrSupplier;
diff --git a/sfx2/source/sidebar/CommandInfoProvider.cxx b/sfx2/source/sidebar/CommandInfoProvider.cxx
index 61d1b62..2001e9e 100644
--- a/sfx2/source/sidebar/CommandInfoProvider.cxx
+++ b/sfx2/source/sidebar/CommandInfoProvider.cxx
@@ -28,7 +28,7 @@
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
using namespace css;
using namespace cssu;
@@ -198,7 +198,7 @@ Reference<ui::XAcceleratorConfiguration> CommandInfoProvider::GetModuleAccelerat
{
try
{
- Reference<ui::XModuleUIConfigurationManagerSupplier> xSupplier = ui::ModuleUIConfigurationManagerSupplier::create(mxContext);
+ Reference<ui::XModuleUIConfigurationManagerSupplier> xSupplier = ui::theModuleUIConfigurationManagerSupplier::get(mxContext);
Reference<ui::XUIConfigurationManager> xManager (
xSupplier->getUIConfigurationManager(GetModuleIdentifier()));
if (xManager.is())
diff --git a/svtools/inc/pch/precompiled_svt.hxx b/svtools/inc/pch/precompiled_svt.hxx
index cb98da3..d5177e4 100644
--- a/svtools/inc/pch/precompiled_svt.hxx
+++ b/svtools/inc/pch/precompiled_svt.hxx
@@ -221,7 +221,7 @@
#include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/ImageType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/dialogs/AddressBookSourcePilot.hpp>
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index 3d83a9b..92237e2 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/ui/GlobalAcceleratorConfiguration.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/KeyModifier.hpp>
@@ -381,7 +381,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(
- css::ui::ModuleUIConfigurationManagerSupplier::create(rxContext) );
+ css::ui::theModuleUIConfigurationManagerSupplier::get(rxContext) );
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg;
try
diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index 6132665..48b10b3 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -29,7 +29,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/ImageType.hpp>
#include <com/sun/star/frame/theUICommandDescription.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
@@ -417,7 +417,7 @@ ContextMenuHelper::associateUIConfigurationManagers()
aModuleId = xModuleManager->identify( xFrame );
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
- ui::ModuleUIConfigurationManagerSupplier::create(
+ ui::theModuleUIConfigurationManagerSupplier::get(
::comphelper::getProcessComponentContext() ) );
uno::Reference< ui::XUIConfigurationManager > xUICfgMgr(
xModuleCfgMgrSupplier->getUIConfigurationManager( aModuleId ));
diff --git a/sw/inc/pch/precompiled_msword.hxx b/sw/inc/pch/precompiled_msword.hxx
index 7622359..aac38b4 100644
--- a/sw/inc/pch/precompiled_msword.hxx
+++ b/sw/inc/pch/precompiled_msword.hxx
@@ -81,7 +81,7 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ui/ItemType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
#include <com/sun/star/uno/Sequence.h>
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 1192207..1fd2ec6 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -13,7 +13,7 @@
#include <stdarg.h>
#include <com/sun/star/document/IndexedPropertyValues.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
@@ -223,7 +223,7 @@ bool SwCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
try
{
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::ModuleUIConfigurationManagerSupplier::create(xContext) );
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( "com.sun.star.text.TextDocument" ) );
helper.setMSOCommandMap( new MSOWordCommandConvertor() );
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index 4725c66..a162cbf 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "vbacommandbarhelper.hxx"
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManager.hpp>
@@ -111,7 +111,7 @@ void VbaCommandBarHelper::Init( ) throw (css::uno::RuntimeException)
}
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUICfgMgrSupp(
- css::ui::ModuleUIConfigurationManagerSupplier::create(mxContext) );
+ css::ui::theModuleUIConfigurationManagerSupplier::get(mxContext) );
m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW );
diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx
index b859ff2..88c1b0f 100644
--- a/vcl/inc/pch/precompiled_vcl.hxx
+++ b/vcl/inc/pch/precompiled_vcl.hxx
@@ -250,7 +250,7 @@
#include <com/sun/star/svg/XSVGWriter.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <com/sun/star/ui/ImageType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManager.hpp>
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 6ffe5dc..90278a7 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/frame/XModuleManager2.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/ui/ImageType.hpp>
-#include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp>
+#include <com/sun/star/ui/theModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XImageManager.hpp>
#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
#include <com/sun/star/ui/XUIConfigurationManagerSupplier.hpp>
@@ -765,7 +765,7 @@ static Image getCommandImage(const OUString& rCommand, bool bLarge,
}
try {
- uno::Reference<ui::XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(ui::ModuleUIConfigurationManagerSupplier::create(rContext));
+ uno::Reference<ui::XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(ui::theModuleUIConfigurationManagerSupplier::get(rContext));
uno::Reference<ui::XUIConfigurationManager> xUICfgMgr(xModuleCfgMgrSupplier->getUIConfigurationManager(rModuleId));
uno::Sequence< uno::Reference<graphic::XGraphic> > aGraphicSeq;
commit a8f9feb9c13722509d052583e252e875638aaf1b
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Jan 9 17:32:35 2014 +0100
fwk: Constructor feature for single-instance TaskCreatorService.
Change-Id: I9e994ebb4822458039709690aa5dd0a7f75735ac
diff --git a/framework/inc/helper/persistentwindowstate.hxx b/framework/inc/helper/persistentwindowstate.hxx
index bc042f7..09ede33 100644
--- a/framework/inc/helper/persistentwindowstate.hxx
+++ b/framework/inc/helper/persistentwindowstate.hxx
@@ -30,6 +30,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XFrameActionListener.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <unotools/moduleoptions.hxx>
#include <cppuhelper/implbase2.hxx>
diff --git a/framework/inc/services/taskcreatorsrv.hxx b/framework/inc/services/taskcreatorsrv.hxx
deleted file mode 100644
index 4fc9642..0000000
--- a/framework/inc/services/taskcreatorsrv.hxx
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_SERVICES_TASKCREATORSRV_HXX
-#define INCLUDED_FRAMEWORK_INC_SERVICES_TASKCREATORSRV_HXX
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
-#include <macros/xserviceinfo.hxx>
-#include <general.h>
-#include <stdtypes.h>
-
-#include <com/sun/star/uno/XInterface.hpp>
-#include <com/sun/star/frame/XFrame2.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/awt/Rectangle.hpp>
-
-#include <cppuhelper/implbase2.hxx>
-#include <comphelper/sequenceashashmap.hxx>
-
-//_______________________________________________
-// definition
-
-/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
-const char ARGUMENT_PARENTFRAME[] = "ParentFrame"; // XFrame
-
-/** [OUString] if it's not a special name (beginning with "_" ... which are not allowed here!)
- it will be set as the API name of the new created frame.
- */
-const char ARGUMENT_FRAMENAME[] = "FrameName"; // OUString
-
-/// [sal_Bool] If its set to sal_True we will make the new created frame visible.
-const char ARGUMENT_MAKEVISIBLE[] = "MakeVisible"; // sal_Bool
-
-/** [sal_Bool] If not "ContainerWindow" property is set it force creation of a
- top level window as new container window.
- */
-const char ARGUMENT_CREATETOPWINDOW[] = "CreateTopWindow"; // sal_Bool
-
-/// [Rectangle] Place the new created frame on this place and resize the container window.
-const char ARGUMENT_POSSIZE[] = "PosSize"; // Rectangle
-
-/// [XWindow] an outside created window, used as container window of the new created frame.
-const char ARGUMENT_CONTAINERWINDOW[] = "ContainerWindow"; // XWindow
-
-/** [sal_Bool] enable/disable special mode, where this frame will be part of
- the persistent window state feature suitable for any office module window
- */
-const char ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE[] = "SupportPersistentWindowState"; // sal_Bool
-
-/** [sal_Bool] enable/disable special mode, where the title bar of our
- the new created frame will be updated automaticly.
- Default = ON !
- */
-const char ARGUMENT_ENABLE_TITLEBARUPDATE[] = "EnableTitleBarUpdate"; // sal_Bool
-
-
-namespace framework
-{
-
-//_______________________________________________
-/**
- * TODO document me
- */
-class TaskCreatorService : // attention! Must be the first base class to guarentee right initialize lock ...
- private ThreadHelpBase,
- public ::cppu::WeakImplHelper2<
- css::lang::XServiceInfo,
- css::lang::XSingleServiceFactory>
-{
- //___________________________________________
- // member
-
- private:
-
- //---------------------------------------
- /** @short the global uno service manager.
- @descr Must be used to create own needed services.
- */
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
-
- //___________________________________________
- // interface
-
- public:
-
- TaskCreatorService(const css::uno::Reference< css::uno::XComponentContext >& xContext);
- virtual ~TaskCreatorService( );
-
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
-
- // XSingleServiceFactory
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance()
- throw(css::uno::Exception ,
- css::uno::RuntimeException);
-
- virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const css::uno::Sequence< css::uno::Any >& lArguments)
- throw(css::uno::Exception ,
- css::uno::RuntimeException);
- //___________________________________________
- // helper
-
- private:
-
- css::uno::Reference< css::awt::XWindow > implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
- const css::awt::Rectangle& aPosSize ,
- sal_Bool bTopWindow );
-
- void implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const;
-
- css::uno::Reference< css::frame::XFrame2 > implts_createFrame( const css::uno::Reference< css::frame::XFrame >& xParentFrame ,
- const css::uno::Reference< css::awt::XWindow >& xContainerWindow ,
- const OUString& sName );
-
- void implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
- void implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
-
- void implts_establishDocModifyListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
-
- OUString impl_filterNames( const OUString& sName );
-};
-
-} // namespace framework
-
-#endif // INCLUDED_FRAMEWORK_INC_SERVICES_TASKCREATORSRV_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/inc/taskcreatordefs.hxx b/framework/inc/taskcreatordefs.hxx
new file mode 100644
index 0000000..7da0772
--- /dev/null
+++ b/framework/inc/taskcreatordefs.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
+#define INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
+
+/// [XFrame] if it's set, it will be used as parent frame for the new created frame.
+const char ARGUMENT_PARENTFRAME[] = "ParentFrame"; // XFrame
+
+/** [OUString] if it's not a special name (beginning with "_" ... which are not allowed here!)
+ it will be set as the API name of the new created frame.
+ */
+const char ARGUMENT_FRAMENAME[] = "FrameName"; // OUString
+
+/// [sal_Bool] If its set to sal_True we will make the new created frame visible.
+const char ARGUMENT_MAKEVISIBLE[] = "MakeVisible"; // sal_Bool
+
+/** [sal_Bool] If not "ContainerWindow" property is set it force creation of a
+ top level window as new container window.
+ */
+const char ARGUMENT_CREATETOPWINDOW[] = "CreateTopWindow"; // sal_Bool
+
+/// [Rectangle] Place the new created frame on this place and resize the container window.
+const char ARGUMENT_POSSIZE[] = "PosSize"; // Rectangle
+
+/// [XWindow] an outside created window, used as container window of the new created frame.
+const char ARGUMENT_CONTAINERWINDOW[] = "ContainerWindow"; // XWindow
+
+/** [sal_Bool] enable/disable special mode, where this frame will be part of
+ the persistent window state feature suitable for any office module window
+ */
+const char ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE[] = "SupportPersistentWindowState"; // sal_Bool
+
+/** [sal_Bool] enable/disable special mode, where the title bar of our
+ the new created frame will be updated automaticly.
+ Default = ON !
+ */
+const char ARGUMENT_ENABLE_TITLEBARUPDATE[] = "EnableTitleBarUpdate"; // sal_Bool
+
+#endif // INCLUDED_FRAMEWORK_INC_TASKCREATORDEFS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 410aa0a..b425aaa 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -18,10 +18,10 @@
*/
#include <classes/taskcreator.hxx>
-#include "services/taskcreatorsrv.hxx"
#include <threadhelp/readguard.hxx>
#include <loadenv/targethelper.hxx>
#include <services.h>
+#include <taskcreatordefs.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/TaskCreator.hpp>
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index c302267..5e5040d 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -40,7 +40,6 @@
#include "uiconfiguration/windowstateconfiguration.hxx"
#include <uifactory/statusbarfactory.hxx>
#include <services/sessionlistener.hxx>
-#include <services/taskcreatorsrv.hxx>
#include <services/ContextChangeEventMultiplexer.hxx>
@@ -53,7 +52,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY( ::framework::StatusBarFactory ) else
IFFACTORY( ::framework::SessionListener ) else
IFFACTORY( ::framework::SessionListener ) else
- IFFACTORY( ::framework::TaskCreatorService ) else
IFFACTORY( ::framework::ContextChangeEventMultiplexer )
)
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 6ce88a9..a45a72a 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -17,58 +17,107 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "services/taskcreatorsrv.hxx"
-
#include <helper/persistentwindowstate.hxx>
#include <helper/tagwindowasmodified.hxx>
#include <helper/titlebarupdate.hxx>
-#include <threadhelp/readguard.hxx>
-#include <threadhelp/writeguard.hxx>
#include <loadenv/targethelper.hxx>
-#include <services.h>
+#include <taskcreatordefs.hxx>
#include <com/sun/star/frame/Frame.hpp>
-#include <com/sun/star/frame/XController.hpp>
-#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/awt/Toolkit.hpp>
-#include <com/sun/star/awt/XTopWindow.hpp>
#include <com/sun/star/awt/WindowDescriptor.hpp>
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <comphelper/sequenceashashmap.hxx>
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <svtools/colorcfg.hxx>
-#include <vcl/svapp.hxx>
-
#include <toolkit/helper/vclunohelper.hxx>
+#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
-//_______________________________________________
-// namespaces
+using namespace framework;
+
+namespace {
+
+typedef ::cppu::WeakComponentImplHelper2<
+ css::lang::XServiceInfo,
+ css::lang::XSingleServiceFactory> TaskCreatorService_BASE;
-namespace framework
+class TaskCreatorService : private osl::Mutex,
+ public TaskCreatorService_BASE
{
-//-----------------------------------------------
-DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2(TaskCreatorService ,
- ::cppu::OWeakObject ,
- "com.sun.star.frame.TaskCreator",
- IMPLEMENTATIONNAME_FWK_TASKCREATOR)
+private:
-//-----------------------------------------------
-DEFINE_INIT_SERVICE(
- TaskCreatorService,
- {
- /*Attention
- I think we don't need any mutex or lock here ... because we are called by our own static method impl_createInstance()
- to create a new instance of this class by our own supported service factory.
- see macro DEFINE_XSERVICEINFO_MULTISERVICE and "impl_initService()" for further information!
- */
- }
- )
+ //---------------------------------------
+ /** @short the global uno service manager.
+ @descr Must be used to create own needed services.
+ */
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+
+public:
+
+ TaskCreatorService(const css::uno::Reference< css::uno::XComponentContext >& xContext);
+ virtual ~TaskCreatorService( );
+
+ virtual OUString SAL_CALL getImplementationName()
+ throw (css::uno::RuntimeException)
+ {
+ return OUString("com.sun.star.comp.framework.TaskCreator");
+ }
+
+ virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
+ throw (css::uno::RuntimeException)
+ {
+ return cppu::supportsService(this, ServiceName);
+ }
+
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
+ throw (css::uno::RuntimeException)
+ {
+ css::uno::Sequence< OUString > aSeq(1);
+ aSeq[0] = OUString("com.sun.star.frame.TaskCreator");
+ return aSeq;
+ }
+
+ // XSingleServiceFactory
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance()
+ throw(css::uno::Exception ,
+ css::uno::RuntimeException);
+
+ virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const css::uno::Sequence< css::uno::Any >& lArguments)
+ throw(css::uno::Exception ,
+ css::uno::RuntimeException);
+
+private:
+
+ css::uno::Reference< css::awt::XWindow > implts_createContainerWindow( const css::uno::Reference< css::awt::XWindow >& xParentWindow ,
+ const css::awt::Rectangle& aPosSize ,
+ sal_Bool bTopWindow );
+
+ void implts_applyDocStyleToWindow(const css::uno::Reference< css::awt::XWindow >& xWindow) const;
+
+ css::uno::Reference< css::frame::XFrame2 > implts_createFrame( const css::uno::Reference< css::frame::XFrame >& xParentFrame ,
+ const css::uno::Reference< css::awt::XWindow >& xContainerWindow ,
+ const OUString& sName );
+
+ void implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
+ void implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
+
+ void implts_establishDocModifyListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame );
+
+ OUString impl_filterNames( const OUString& sName );
+};
//-----------------------------------------------
TaskCreatorService::TaskCreatorService(const css::uno::Reference< css::uno::XComponentContext >& xContext)
- : ThreadHelpBase (&Application::GetSolarMutex())
+ : TaskCreatorService_BASE(*static_cast<osl::Mutex *>(this))
, m_xContext (xContext )
{
}
@@ -185,14 +234,8 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
const css::awt::Rectangle& aPosSize ,
sal_Bool bTopWindow )
{
- // SAFE ->
- ReadGuard aReadLock( m_aLock );
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
- aReadLock.unlock();
- // <- SAFE
-
// get toolkit to create task container window
- css::uno::Reference< css::awt::XToolkit2 > xToolkit = css::awt::Toolkit::create( xContext );
+ css::uno::Reference< css::awt::XToolkit2 > xToolkit = css::awt::Toolkit::create( m_xContext );
// Check if child frames can be created really. We need at least a valid window at the parent frame ...
css::uno::Reference< css::awt::XWindowPeer > xParentWindowPeer;
@@ -248,14 +291,8 @@ css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFram
const css::uno::Reference< css::awt::XWindow >& xContainerWindow,
const OUString& sName )
{
- // SAFE ->
- ReadGuard aReadLock( m_aLock );
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
- aReadLock.unlock();
- // <- SAFE
-
// create new frame.
- css::uno::Reference< css::frame::XFrame2 > xNewFrame = css::frame::Frame::create( xContext );
+ css::uno::Reference< css::frame::XFrame2 > xNewFrame = css::frame::Frame::create( m_xContext );
// Set window on frame.
// Do it before calling any other interface methods ...
@@ -281,17 +318,11 @@ css::uno::Reference< css::frame::XFrame2 > TaskCreatorService::implts_createFram
//-----------------------------------------------
void TaskCreatorService::implts_establishWindowStateListener( const css::uno::Reference< css::frame::XFrame2 >& xFrame )
{
- // SAFE ->
- ReadGuard aReadLock( m_aLock );
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
- aReadLock.unlock();
- // <- SAFE
-
// Special feature: It's allowed for frames using a top level window only!
// We must create a special listener service and couple it with the new created task frame.
// He will restore or save the window state of it ...
// See used classes for further information too.
- PersistentWindowState* pPersistentStateHandler = new PersistentWindowState( xContext );
+ PersistentWindowState* pPersistentStateHandler = new PersistentWindowState( m_xContext );
css::uno::Reference< css::lang::XInitialization > xInit(static_cast< ::cppu::OWeakObject* >(pPersistentStateHandler), css::uno::UNO_QUERY_THROW);
css::uno::Sequence< css::uno::Any > lInitData(1);
@@ -316,13 +347,7 @@ void TaskCreatorService::implts_establishDocModifyListener( const css::uno::Refe
//-----------------------------------------------
void TaskCreatorService::implts_establishTitleBarUpdate( const css::uno::Reference< css::frame::XFrame2 >& xFrame )
{
- // SAFE ->
- ReadGuard aReadLock( m_aLock );
- css::uno::Reference< css::uno::XComponentContext > xContext = m_xContext;
- aReadLock.unlock();
- // <- SAFE
-
- TitleBarUpdate* pHelper = new TitleBarUpdate (xContext);
+ TitleBarUpdate* pHelper = new TitleBarUpdate (m_xContext);
css::uno::Reference< css::lang::XInitialization > xInit(static_cast< ::cppu::OWeakObject* >(pHelper), css::uno::UNO_QUERY_THROW);
css::uno::Sequence< css::uno::Any > lInitData(1);
@@ -338,6 +363,31 @@ OUString TaskCreatorService::impl_filterNames( const OUString& sName )
return sFiltered;
}
-} // namespace framework
+struct Instance {
+ explicit Instance(
+ css::uno::Reference<css::uno::XComponentContext> const & context):
+ instance(
+ static_cast<cppu::OWeakObject *>(new TaskCreatorService(context)))
+ {
+ }
+
+ css::uno::Reference<css::uno::XInterface> instance;
+};
+
+struct Singleton:
+ public rtl::StaticWithArg<
+ Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton>
+{};
+
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+com_sun_star_comp_framework_TaskCreator_get_implementation(
+ css::uno::XComponentContext *context,
+ css::uno::Sequence<css::uno::Any> const &)
+{
+ return cppu::acquire(static_cast<cppu::OWeakObject *>(
+ Singleton::get(context).instance.get()));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/util/fwk.component b/framework/util/fwk.component
index d53c75d..5e9296c 100644
--- a/framework/util/fwk.component
+++ b/framework/util/fwk.component
@@ -121,7 +121,8 @@
constructor="com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation">
<service name="com.sun.star.task.StatusIndicatorFactory"/>
</implementation>
- <implementation name="com.sun.star.comp.framework.TaskCreator">
+ <implementation name="com.sun.star.comp.framework.TaskCreator"
+ constructor="com_sun_star_comp_framework_TaskCreator_get_implementation">
<service name="com.sun.star.frame.TaskCreator"/>
</implementation>
<implementation name="com.sun.star.comp.framework.ToolBarControllerFactory"
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 468e328..8dd033b 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -59,6 +59,7 @@ core_constructor_list = [
"com_sun_star_comp_framework_PathSettings_get_implementation",
"com_sun_star_comp_framework_PathSubstitution_get_implementation",
"com_sun_star_comp_framework_StatusIndicatorFactory_get_implementation",
+ "com_sun_star_comp_framework_TaskCreator_get_implementation",
"com_sun_star_comp_framework_ToolBarControllerFactory_get_implementation",
"com_sun_star_comp_framework_UIConfigurationManager_get_implementation",
"com_sun_star_comp_framework_UIElementFactoryManager_get_implementation",
commit 6c15ca4d9d4a7b3116330dd0a17f7fadaed2eff4
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu Jan 9 19:36:11 2014 +0100
fwk: Constructor feature for single-instance SubstitutePathVariables.
Change-Id: Ibd626f00bb844ae8ec1cab773093b8c94bf8d936
diff --git a/framework/inc/services/substitutepathvars.hxx b/framework/inc/services/substitutepathvars.hxx
deleted file mode 100644
index 7b5b352..0000000
--- a/framework/inc/services/substitutepathvars.hxx
+++ /dev/null
@@ -1,285 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_FRAMEWORK_INC_SERVICES_SUBSTITUTEPATHVARS_HXX
-#define INCLUDED_FRAMEWORK_INC_SERVICES_SUBSTITUTEPATHVARS_HXX
-
-/** Attention: stl headers must(!) be included at first. Otherwise it can make trouble
- with solaris headers ...
-*/
-#include <vector>
-#include <list>
-#include <boost/unordered_map.hpp>
-
-#include <threadhelp/threadhelpbase.hxx>
-#include <macros/generic.hxx>
-#include <macros/xinterface.hxx>
-#include <macros/xtypeprovider.hxx>
-#include <macros/xserviceinfo.hxx>
-#include <stdtypes.h>
-
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/container/NoSuchElementException.hpp>
-#include <com/sun/star/util/XStringSubstitution.hpp>
-
-#include <cppuhelper/implbase2.hxx>
-#include <rtl/ustring.hxx>
-#include <unotools/configitem.hxx>
-#include <tools/link.hxx>
-#include <i18nlangtag/lang.h>
-
-namespace framework
-{
-
-// Must be zero value based
-enum EnvironmentType
-{
- ET_HOST = 0 ,
- ET_YPDOMAIN ,
- ET_DNSDOMAIN ,
- ET_NTDOMAIN ,
- ET_OS ,
- ET_UNKNOWN ,
- ET_COUNT
-};
-
-// Must be zero value based
-enum OperatingSystem
-{
- OS_WINDOWS = 0,
- OS_UNIX ,
- OS_SOLARIS ,
- OS_LINUX ,
- OS_UNKNOWN ,
- OS_COUNT
-};
-
-struct SubstituteRule
-{
- SubstituteRule() {}
- SubstituteRule( const OUString& aVarName,
- const OUString& aValue,
- const com::sun::star::uno::Any& aVal,
- EnvironmentType aType ) :
- aSubstVariable( aVarName ), aSubstValue( aValue ), aEnvValue( aVal ), aEnvType( aType ) {}
-
- OUString aSubstVariable;
- OUString aSubstValue;
- com::sun::star::uno::Any aEnvValue;
- EnvironmentType aEnvType;
-};
-
-struct SubstitutePathNotify
-{
- SubstitutePathNotify() {};
-
- const com::sun::star::uno::Sequence<OUString> aPropertyNames;
-};
-
-class SubstituteVariables : public ::boost::unordered_map< OUString,
- SubstituteRule,
- OUStringHash,
- ::std::equal_to< OUString > >
-{
- public:
- inline void free()
- {
- SubstituteVariables().swap( *this );
- }
-};
-
-typedef std::vector< SubstituteRule > SubstituteRuleVector;
-class SubstitutePathVariables_Impl : public utl::ConfigItem
-{
- public:
- SubstitutePathVariables_Impl( const Link& aNotifyLink );
- virtual ~SubstitutePathVariables_Impl();
-
- static OperatingSystem GetOperatingSystemFromString( const OUString& );
- static EnvironmentType GetEnvTypeFromString( const OUString& );
-
- void GetSharePointsRules( SubstituteVariables& aSubstVarMap );
-
- /** is called from the ConfigManager before application ends or from the
- PropertyChangeListener if the sub tree broadcasts changes. */
- virtual void Notify( const com::sun::star::uno::Sequence< OUString >& aPropertyNames );
- virtual void Commit();
-
- private:
- // Wrapper methods for low-level functions
- OperatingSystem GetOperatingSystem();
- const OUString& GetYPDomainName();
- const OUString& GetDNSDomainName();
- const OUString& GetNTDomainName();
- const OUString& GetHostName();
-
- bool FilterRuleSet( const SubstituteRuleVector& aRuleSet, SubstituteRule& aActiveRule );
-
- void ReadSharePointsFromConfiguration( com::sun::star::uno::Sequence< OUString >& aSharePointsSeq );
- void ReadSharePointRuleSetFromConfiguration( const OUString& aSharePointName,
- const OUString& aSharePointNodeName,
- SubstituteRuleVector& aRuleSet );
-
- // Stored values for domains and host
- bool m_bYPDomainRetrieved;
- OUString m_aYPDomain;
- bool m_bDNSDomainRetrieved;
- OUString m_aDNSDomain;
- bool m_bNTDomainRetrieved;
- OUString m_aNTDomain;
- bool m_bHostRetrieved;
- OUString m_aHost;
-
- Link m_aListenerNotify;
- const OUString m_aSharePointsNodeName;
- const OUString m_aDirPropertyName;
- const OUString m_aEnvPropertyName;
- const OUString m_aLevelSep;
-};
-
-enum PreDefVariable
-{
- PREDEFVAR_INST,
- PREDEFVAR_PROG,
- PREDEFVAR_USER,
- PREDEFVAR_WORK,
- PREDEFVAR_HOME,
- PREDEFVAR_TEMP,
- PREDEFVAR_PATH,
- PREDEFVAR_LANG,
- PREDEFVAR_LANGID,
- PREDEFVAR_VLANG,
- PREDEFVAR_INSTPATH,
- PREDEFVAR_PROGPATH,
- PREDEFVAR_USERPATH,
- PREDEFVAR_INSTURL,
- PREDEFVAR_PROGURL,
- PREDEFVAR_USERURL,
- PREDEFVAR_WORKDIRURL,
- // New variable of hierachy service (#i32656#)
- PREDEFVAR_BASEINSTURL,
- PREDEFVAR_USERDATAURL,
- PREDEFVAR_BRANDBASEURL,
- PREDEFVAR_COUNT
-};
-
-struct PredefinedPathVariables
-{
- // Predefined variables supported by substitute variables
- LanguageType m_eLanguageType; // Lanuage type of Office
- OUString m_FixedVar[ PREDEFVAR_COUNT ]; // Variable value access by PreDefVariable
- OUString m_FixedVarNames[ PREDEFVAR_COUNT ]; // Variable name access by PreDefVariable
-};
-
-struct ReSubstFixedVarOrder
-{
- sal_Int32 nVarValueLength;
- PreDefVariable eVariable;
-
- bool operator< ( const ReSubstFixedVarOrder& aFixedVarOrder ) const
- {
- // Reverse operator< to have high to low ordering
- return ( nVarValueLength > aFixedVarOrder.nVarValueLength );
- }
-};
-
-struct ReSubstUserVarOrder
-{
- sal_Int32 nVarValueLength;
- OUString aVarName;
-
- bool operator< ( const ReSubstUserVarOrder& aUserVarOrder ) const
- {
- // Reverse operator< to have high to low ordering
- return ( nVarValueLength > aUserVarOrder.nVarValueLength );
- }
-};
-
-typedef std::list< ReSubstFixedVarOrder > ReSubstFixedVarOrderVector;
-typedef std::list< ReSubstUserVarOrder > ReSubstUserVarOrderVector;
-
-class SubstitutePathVariables : private ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses.
- public ::cppu::WeakImplHelper2< ::com::sun::star::util::XStringSubstitution, css::lang::XServiceInfo >
-{
- friend class SubstitutePathVariables_Impl;
-
- public:
- SubstitutePathVariables( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
- virtual ~SubstitutePathVariables();
-
- // XInterface, XTypeProvider, XServiceInfo
- DECLARE_XSERVICEINFO
-
- // XStringSubstitution
- virtual OUString SAL_CALL substituteVariables( const OUString& aText, sal_Bool bSubstRequired )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL reSubstituteVariables( const OUString& aText )
- throw (::com::sun::star::uno::RuntimeException);
- virtual OUString SAL_CALL getSubstituteVariableValue( const OUString& variable )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-
- protected:
- DECL_LINK(implts_ConfigurationNotify, void *);
-
- void SetPredefinedPathVariables( PredefinedPathVariables& );
- OUString ConvertOSLtoUCBURL( const OUString& aOSLCompliantURL ) const;
-
- // Special case (transient) values can change during runtime!
- // Don't store them in the pre defined struct
- OUString GetWorkPath() const;
- OUString GetWorkVariableValue() const;
- OUString GetPathVariableValue() const;
-
- OUString GetHomeVariableValue() const;
-
- // XStringSubstitution implementation methods
- OUString impl_substituteVariable( const OUString& aText, bool bSustRequired )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
- OUString impl_reSubstituteVariables( const OUString& aText )
- throw (::com::sun::star::uno::RuntimeException);
- OUString impl_getSubstituteVariableValue( const OUString& variable )
- throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
-
- private:
- class VarNameToIndexMap : public boost::unordered_map< OUString,
- PreDefVariable,
- OUStringHash,
- ::std::equal_to< OUString > >
- {
- inline void free()
- {
- VarNameToIndexMap().swap( *this );
- }
- };
-
- VarNameToIndexMap m_aPreDefVarMap; // Mapping from pre-def variable names to enum for array access
- SubstituteVariables m_aSubstVarMap; // Active rule set map indexed by variable name!
- PredefinedPathVariables m_aPreDefVars; // All predefined variables
- SubstitutePathVariables_Impl m_aImpl; // Implementation class that access the configuration
- ReSubstFixedVarOrderVector m_aReSubstFixedVarOrder; // To speed up resubstitution fixed variables (order for lookup)
- ReSubstUserVarOrderVector m_aReSubstUserVarOrder; // To speed up resubstitution user variables
- com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
-};
-
-}
-
-#endif // INCLUDED_FRAMEWORK_INC_SERVICES_SUBSTITUTEPATHVARS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx
index e74acce..c302267 100644
--- a/framework/source/register/registerservices.cxx
+++ b/framework/source/register/registerservices.cxx
@@ -42,7 +42,6 @@
#include <services/sessionlistener.hxx>
#include <services/taskcreatorsrv.hxx>
-#include <services/substitutepathvars.hxx>
#include <services/ContextChangeEventMultiplexer.hxx>
COMPONENTGETFACTORY ( fwk,
@@ -55,7 +54,6 @@ COMPONENTGETFACTORY ( fwk,
IFFACTORY( ::framework::SessionListener ) else
IFFACTORY( ::framework::SessionListener ) else
IFFACTORY( ::framework::TaskCreatorService ) else
- IFFACTORY( ::framework::SubstitutePathVariables ) else
IFFACTORY( ::framework::ContextChangeEventMultiplexer )
)
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index a7a44f0..35db7707 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -19,13 +19,10 @@
#include <config_folders.h>
-#include "services/substitutepathvars.hxx"
-#include <threadhelp/resetableguard.hxx>
#include <helper/networkdomain.hxx>
-#include "services.h"
-
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/supportsservice.hxx>
#include <unotools/configitem.hxx>
#include <unotools/localfilehelper.hxx>
#include <unotools/configmgr.hxx>
@@ -37,6 +34,7 @@
#include <osl/socket.hxx>
#include <osl/process.h>
#include <i18nlangtag/languagetag.hxx>
+#include <tools/link.hxx>
#include <tools/urlobj.hxx>
#include <tools/resmgr.hxx>
#include <tools/wldcrd.hxx>
@@ -45,9 +43,12 @@
#include <officecfg/Office/Paths.hxx>
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list