diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-09 17:13:22 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-17 12:24:54 +0100 |
commit | b93ea039ebc20203913b3829a1392e56f07353a9 (patch) | |
tree | a4c7ec26f1f933996ae2c3ab6068f8630a9e0f85 | |
parent | 86b12c3448a24eb1f3ef51c0fcbaef75b771d211 (diff) |
fwk: Use constructor feature for UIConfigurationManager.
Change-Id: Icd42b6b9b62271606659651a2f463e1ee2956fe6
-rw-r--r-- | framework/inc/uiconfiguration/uiconfigurationmanager.hxx | 181 | ||||
-rw-r--r-- | framework/source/register/registerservices.cxx | 2 | ||||
-rw-r--r-- | framework/source/uiconfiguration/uiconfigurationmanager.cxx | 183 | ||||
-rw-r--r-- | framework/util/fwk.component | 3 |
4 files changed, 165 insertions, 204 deletions
diff --git a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx b/framework/inc/uiconfiguration/uiconfigurationmanager.hxx deleted file mode 100644 index b8cb148046f6..000000000000 --- a/framework/inc/uiconfiguration/uiconfigurationmanager.hxx +++ /dev/null @@ -1,181 +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_UICONFIGURATIONMANAGER_HXX -#define INCLUDED_FRAMEWORK_INC_UICONFIGURATION_UICONFIGURATIONMANAGER_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 <uiconfiguration/imagemanager.hxx> - -#include <com/sun/star/container/XIndexContainer.hpp> -#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/XUIConfigurationManager2.hpp> -#include <com/sun/star/ui/ConfigurationEvent.hpp> -#include <com/sun/star/ui/UIElementType.hpp> -#include <com/sun/star/ui/XAcceleratorConfiguration.hpp> - -#include <cppuhelper/implbase2.hxx> -#include <rtl/ustring.hxx> - - -namespace framework -{ - class UIConfigurationManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses. - public ::cppu::WeakImplHelper2< - com::sun::star::lang::XServiceInfo , - com::sun::star::ui::XUIConfigurationManager2 > - { - public: - // XInterface, XTypeProvider, XServiceInfo - DECLARE_XSERVICEINFO - - UIConfigurationManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rxContext ); - virtual ~UIConfigurationManager(); - - // 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); - - // XUIConfiguration - virtual void SAL_CALL addConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException); - - // XUIConfigurationManager - virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > > SAL_CALL getUIElementsInfo( sal_Int16 ElementType ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL createSettings( ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasSettings( const OUString& ResourceURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( const OUString& ResourceURL, sal_Bool bWriteable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL replaceSettings( const OUString& ResourceURL, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& aNewData ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeSettings( const OUString& ResourceURL ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess >& aNewData ) throw (::com::sun::star::container::ElementExistException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getImageManager() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > SAL_CALL getShortCutManager() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getEventsManager() throw (::com::sun::star::uno::RuntimeException); - - // XUIConfigurationPersistence - virtual void SAL_CALL reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL storeToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException); - - // XUIConfigurationStorage - virtual void SAL_CALL setStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasStorage() throw (::com::sun::star::uno::RuntimeException); - - private: - // private data types - enum NotifyOp - { - NotifyOp_Remove, - NotifyOp_Insert, - NotifyOp_Replace - }; - - struct UIElementInfo - { - UIElementInfo( const OUString& rResourceURL, const OUString& rUIName ) : - aResourceURL( rResourceURL), aUIName( rUIName ) {} - OUString aResourceURL; - OUString aUIName; - }; - - struct UIElementData - { - UIElementData() : bModified( false ), bDefault( true ) {}; - - OUString aResourceURL; - OUString aName; - bool bModified; // has been changed since last storing - bool bDefault; // default settings - com::sun::star::uno::Reference< com::sun::star::container::XIndexAccess > xSettings; - }; - - struct UIElementType; - friend struct UIElementType; - typedef ::boost::unordered_map< OUString, UIElementData, OUStringHash, ::std::equal_to< OUString > > UIElementDataHashMap; - - struct UIElementType - { - UIElementType() : bModified( false ), - bLoaded( false ), - bDefaultLayer( false ), - nElementType( ::com::sun::star::ui::UIElementType::UNKNOWN ) {} - - - bool bModified; - bool bLoaded; - bool bDefaultLayer; - sal_Int16 nElementType; - UIElementDataHashMap aElementsHashMap; - com::sun::star::uno::Reference< com::sun::star::embed::XStorage > xStorage; - }; - - typedef ::std::vector< UIElementType > UIElementTypesVector; - typedef ::std::vector< ::com::sun::star::ui::ConfigurationEvent > ConfigEventNotifyContainer; - typedef ::boost::unordered_map< OUString, UIElementInfo, OUStringHash, ::std::equal_to< OUString > > UIElementInfoHashMap; - - // private methods - void impl_Initialize(); - void implts_notifyContainerListener( const ::com::sun::star::ui::ConfigurationEvent& aEvent, NotifyOp eOp ); - void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType ); - void impl_preloadUIElementTypeList( sal_Int16 nElementType ); - UIElementData* impl_findUIElementData( const OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true ); - void impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData ); - void impl_storeElementTypeData( com::sun::star::uno::Reference< com::sun::star::embed::XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState = true ); - void impl_resetElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer ); - void impl_reloadElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer ); - - UIElementTypesVector m_aUIElements; - com::sun::star::uno::Reference< com::sun::star::embed::XStorage > m_xDocConfigStorage; - bool m_bReadOnly; - bool m_bModified; - bool m_bConfigRead; - bool m_bDisposed; - OUString m_aXMLPostfix; - OUString m_aPropUIName; - OUString m_aPropResourceURL; - OUString m_aModuleIdentifier; - com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext; - ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener - com::sun::star::uno::Reference< com::sun::star::lang::XComponent > m_xImageManager; - com::sun::star::uno::Reference< com::sun::star::ui::XAcceleratorConfiguration > m_xAccConfig; - }; -} - -#endif // INCLUDED_FRAMEWORK_INC_UICONFIGURATION_UICONFIGURATIONMANAGER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/source/register/registerservices.cxx b/framework/source/register/registerservices.cxx index d96555393cb5..c29de9195cec 100644 --- a/framework/source/register/registerservices.cxx +++ b/framework/source/register/registerservices.cxx @@ -43,7 +43,6 @@ #include <uielement/objectmenucontroller.hxx> #include <uielement/controlmenucontroller.hxx> #include <uielement/uicommanddescription.hxx> -#include <uiconfiguration/uiconfigurationmanager.hxx> #include <uiconfiguration/moduleuicfgsupplier.hxx> #include <uiconfiguration/moduleuiconfigurationmanager.hxx> #include <uifactory/menubarfactory.hxx> @@ -76,7 +75,6 @@ COMPONENTGETFACTORY ( fwk, IFFACTORY( ::framework::ControlMenuController ) else IFFACTORY( ::framework::UICommandDescription ) else IFFACTORY( ::framework::ModuleManager ) else - IFFACTORY( ::framework::UIConfigurationManager ) else IFFACTORY( ::framework::ModuleUIConfigurationManagerSupplier ) else IFFACTORY( ::framework::ModuleUIConfigurationManager ) else IFFACTORY( ::framework::MenuBarFactory ) else diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx index 604a19cfd8e7..faa529ee9493 100644 --- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx +++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx @@ -17,19 +17,18 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <uiconfiguration/uiconfigurationmanager.hxx> #include <threadhelp/resetableguard.hxx> -#include <services.h> +#include <threadhelp/threadhelpbase.hxx> +#include <uiconfiguration/imagemanager.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/constitemcontainer.hxx> #include <uielement/uielementtypenames.hxx> #include <framework/menuconfiguration.hxx> -#include <framework/toolboxconfiguration.hxx> - #include <framework/statusbarconfiguration.hxx> +#include <framework/toolboxconfiguration.hxx> #include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/embed/ElementModes.hpp> #include <com/sun/star/embed/XTransactedObject.hpp> #include <com/sun/star/lang/XInitialization.hpp> @@ -38,13 +37,18 @@ #include <com/sun/star/ui/UIElementType.hpp> #include <com/sun/star/ui/ConfigurationEvent.hpp> #include <com/sun/star/ui/DocumentAcceleratorConfiguration.hpp> +#include <com/sun/star/ui/XAcceleratorConfiguration.hpp> +#include <com/sun/star/ui/XUIConfigurationManager2.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <cppuhelper/implbase2.hxx> +#include <cppuhelper/supportsservice.hxx> #include <vcl/svapp.hxx> +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> -//_________________________________________________________________________________________________________________ -// namespaces -//_________________________________________________________________________________________________________________ +#include <boost/unordered_map.hpp> using namespace com::sun::star::uno; using namespace com::sun::star::io; @@ -52,22 +56,151 @@ using namespace com::sun::star::embed; using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace com::sun::star::beans; -using namespace ::com::sun::star::ui; +using namespace com::sun::star::ui; +using namespace framework; -namespace framework +namespace { + +class UIConfigurationManager : private ThreadHelpBase, // Struct for right initalization of mutex member! Must be first of baseclasses. + public ::cppu::WeakImplHelper2< + css::lang::XServiceInfo , + css::ui::XUIConfigurationManager2 > { +public: + virtual OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { + return OUString("com.sun.star.comp.framework.UIConfigurationManager"); + } + + 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.ui.UIConfigurationManager"); + return aSeq; + } -//***************************************************************************************************************** -// XInterface, XTypeProvider, XServiceInfo -//***************************************************************************************************************** -DEFINE_XSERVICEINFO_MULTISERVICE_2 ( UIConfigurationManager , - ::cppu::OWeakObject , - OUString("com.sun.star.ui.UIConfigurationManager"), - OUString("com.sun.star.comp.framework.UIConfigurationManager") - ) + UIConfigurationManager( const css::uno::Reference< css::uno::XComponentContext > & rxContext ); + virtual ~UIConfigurationManager(); + + // XComponent + virtual void SAL_CALL dispose() throw (css::uno::RuntimeException); + virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) throw (css::uno::RuntimeException); + virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) throw (css::uno::RuntimeException); + + // XUIConfiguration + virtual void SAL_CALL addConfigurationListener( const css::uno::Reference< css::ui::XUIConfigurationListener >& Listener ) throw (css::uno::RuntimeException); + virtual void SAL_CALL removeConfigurationListener( const css::uno::Reference< css::ui::XUIConfigurationListener >& Listener ) throw (css::uno::RuntimeException); + + // XUIConfigurationManager + virtual void SAL_CALL reset() throw (css::uno::RuntimeException); + virtual css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > SAL_CALL getUIElementsInfo( sal_Int16 ElementType ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XIndexContainer > SAL_CALL createSettings( ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasSettings( const OUString& ResourceURL ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); + virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getSettings( const OUString& ResourceURL, sal_Bool bWriteable ) throw (css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::uno::RuntimeException); + virtual void SAL_CALL replaceSettings( const OUString& ResourceURL, const css::uno::Reference< css::container::XIndexAccess >& aNewData ) throw (css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::lang::IllegalAccessException, css::uno::RuntimeException); + virtual void SAL_CALL removeSettings( const OUString& ResourceURL ) throw (css::container::NoSuchElementException, css::lang::IllegalArgumentException, css::lang::IllegalAccessException, css::uno::RuntimeException); + virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, const css::uno::Reference< css::container::XIndexAccess >& aNewData ) throw (css::container::ElementExistException, css::lang::IllegalArgumentException, css::lang::IllegalAccessException, css::uno::RuntimeException); + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getImageManager() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL getShortCutManager() throw (css::uno::RuntimeException); + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getEventsManager() throw (css::uno::RuntimeException); + + // XUIConfigurationPersistence + virtual void SAL_CALL reload() throw (css::uno::Exception, css::uno::RuntimeException); + virtual void SAL_CALL store() throw (css::uno::Exception, css::uno::RuntimeException); + virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage >& Storage ) throw (css::uno::Exception, css::uno::RuntimeException); + virtual sal_Bool SAL_CALL isModified() throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL isReadOnly() throw (css::uno::RuntimeException); + + // XUIConfigurationStorage + virtual void SAL_CALL setStorage( const css::uno::Reference< css::embed::XStorage >& Storage ) throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasStorage() throw (css::uno::RuntimeException); + +private: + // private data types + enum NotifyOp + { + NotifyOp_Remove, + NotifyOp_Insert, + NotifyOp_Replace + }; + + struct UIElementInfo + { + UIElementInfo( const OUString& rResourceURL, const OUString& rUIName ) : + aResourceURL( rResourceURL), aUIName( rUIName ) {} + OUString aResourceURL; + OUString aUIName; + }; + + struct UIElementData + { + UIElementData() : bModified( false ), bDefault( true ) {}; + + OUString aResourceURL; + OUString aName; + bool bModified; // has been changed since last storing + bool bDefault; // default settings + css::uno::Reference< css::container::XIndexAccess > xSettings; + }; -DEFINE_INIT_SERVICE ( UIConfigurationManager, {} ) + struct UIElementType; + friend struct UIElementType; + typedef ::boost::unordered_map< OUString, UIElementData, OUStringHash, ::std::equal_to< OUString > > UIElementDataHashMap; + struct UIElementType + { + UIElementType() : bModified( false ), + bLoaded( false ), + bDefaultLayer( false ), + nElementType( css::ui::UIElementType::UNKNOWN ) {} + + + bool bModified; + bool bLoaded; + bool bDefaultLayer; + sal_Int16 nElementType; + UIElementDataHashMap aElementsHashMap; + css::uno::Reference< css::embed::XStorage > xStorage; + }; + + typedef ::std::vector< UIElementType > UIElementTypesVector; + typedef ::std::vector< css::ui::ConfigurationEvent > ConfigEventNotifyContainer; + typedef ::boost::unordered_map< OUString, UIElementInfo, OUStringHash, ::std::equal_to< OUString > > UIElementInfoHashMap; + + // private methods + void impl_Initialize(); + void implts_notifyContainerListener( const css::ui::ConfigurationEvent& aEvent, NotifyOp eOp ); + void impl_fillSequenceWithElementTypeInfo( UIElementInfoHashMap& aUIElementInfoCollection, sal_Int16 nElementType ); + void impl_preloadUIElementTypeList( sal_Int16 nElementType ); + UIElementData* impl_findUIElementData( const OUString& aResourceURL, sal_Int16 nElementType, bool bLoad = true ); + void impl_requestUIElementData( sal_Int16 nElementType, UIElementData& aUIElementData ); + void impl_storeElementTypeData( css::uno::Reference< css::embed::XStorage >& xStorage, UIElementType& rElementType, bool bResetModifyState = true ); + void impl_resetElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer ); + void impl_reloadElementTypeData( UIElementType& rDocElementType, ConfigEventNotifyContainer& rRemoveNotifyContainer, ConfigEventNotifyContainer& rReplaceNotifyContainer ); + + UIElementTypesVector m_aUIElements; + css::uno::Reference< css::embed::XStorage > m_xDocConfigStorage; + bool m_bReadOnly; + bool m_bModified; + bool m_bConfigRead; + bool m_bDisposed; + OUString m_aXMLPostfix; + OUString m_aPropUIName; + OUString m_aPropResourceURL; + OUString m_aModuleIdentifier; + css::uno::Reference< css::uno::XComponentContext > m_xContext; + cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; /// container for ALL Listener + css::uno::Reference< css::lang::XComponent > m_xImageManager; + css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xAccConfig; +}; // important: The order and position of the elements must match the constant // definition of "::com::sun::star::ui::UIElementType" @@ -1292,6 +1425,16 @@ void UIConfigurationManager::implts_notifyContainerListener( const Configuration } } -} // namespace framework +} + +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +com_sun_star_comp_framework_UIConfigurationManager_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence<css::uno::Any> const &) +{ + rtl::Reference<UIConfigurationManager> x(new UIConfigurationManager(context)); + x->acquire(); + return static_cast<cppu::OWeakObject *>(x.get()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/framework/util/fwk.component b/framework/util/fwk.component index 8d3dee374ed0..aff24e61eab6 100644 --- a/framework/util/fwk.component +++ b/framework/util/fwk.component @@ -115,7 +115,8 @@ <implementation name="com.sun.star.comp.framework.UICommandDescription"> <service name="com.sun.star.frame.UICommandDescription"/> </implementation> - <implementation name="com.sun.star.comp.framework.UIConfigurationManager"> + <implementation name="com.sun.star.comp.framework.UIConfigurationManager" + constructor="com_sun_star_comp_framework_UIConfigurationManager_get_implementation"> <service name="com.sun.star.ui.UIConfigurationManager"/> </implementation> <implementation name="com.sun.star.comp.framework.UIElementFactoryManager"> |