update dev300-m58
[ooovba.git] / framework / inc / uiconfiguration / moduleuiconfigurationmanager.hxx
blob37584d5a3bb80ecfdf6209beeddd387d15d0f76e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: moduleuiconfigurationmanager.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef __FRAMEWORK_UICONFIGURATION_MODULEUICONFIGMANAGER_HXX_
32 #define __FRAMEWORK_UICONFIGURATION_MODULEUICONFIGMANAGER_HXX_
35 /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
36 with solaris headers ...
38 #include <vector>
39 #include <list>
40 #include <hash_map>
41 #include <memory>
43 //_________________________________________________________________________________________________________________
44 // my own includes
45 //_________________________________________________________________________________________________________________
46 #include <accelerators/presethandler.hxx>
47 #include <threadhelp/threadhelpbase.hxx>
48 #include <macros/generic.hxx>
49 #include <macros/xinterface.hxx>
50 #include <macros/xtypeprovider.hxx>
51 #include <macros/xserviceinfo.hxx>
52 #include <stdtypes.h>
53 #include <uiconfiguration/moduleimagemanager.hxx>
55 //_________________________________________________________________________________________________________________
56 // interface includes
57 //_________________________________________________________________________________________________________________
58 #include <com/sun/star/lang/XServiceInfo.hpp>
59 #include <com/sun/star/lang/XTypeProvider.hpp>
60 #include <com/sun/star/lang/XComponent.hpp>
61 #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
62 #include <com/sun/star/ui/XUIConfiguration.hpp>
63 #include <com/sun/star/ui/XUIConfigurationManager.hpp>
64 #include <com/sun/star/ui/XModuleUIConfigurationManager.hpp>
65 #include <com/sun/star/ui/UIElementType.hpp>
66 #include <com/sun/star/lang/XInitialization.hpp>
67 #include <com/sun/star/ui/ConfigurationEvent.hpp>
68 #include <com/sun/star/embed/XTransactedObject.hpp>
69 #include <com/sun/star/container/XIndexContainer.hpp>
71 //_________________________________________________________________________________________________________________
72 // other includes
73 //_________________________________________________________________________________________________________________
74 #include <cppuhelper/weak.hxx>
75 #include <cppuhelper/interfacecontainer.hxx>
76 #include <rtl/ustring.hxx>
79 namespace framework
81 class UIConfigurationManagerImpl;
82 class ModuleUIConfigurationManager : public com::sun::star::lang::XTypeProvider ,
83 public com::sun::star::lang::XServiceInfo ,
84 public com::sun::star::lang::XComponent ,
85 public com::sun::star::lang::XInitialization ,
86 public ::com::sun::star::ui::XUIConfiguration ,
87 public ::com::sun::star::ui::XUIConfigurationManager ,
88 public ::com::sun::star::ui::XModuleUIConfigurationManager ,
89 public ::com::sun::star::ui::XUIConfigurationPersistence ,
90 public ::cppu::OWeakObject
92 public:
93 // XInterface, XTypeProvider, XServiceInfo
94 FWK_DECLARE_XINTERFACE
95 FWK_DECLARE_XTYPEPROVIDER
96 DECLARE_XSERVICEINFO
98 ModuleUIConfigurationManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
99 virtual ~ModuleUIConfigurationManager();
101 // XComponent
102 virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
103 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
104 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
106 // XInitialization
107 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
109 // XUIConfiguration
110 virtual void SAL_CALL addConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
111 virtual void SAL_CALL removeConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
113 // XUIConfigurationManager
114 virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException);
115 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);
116 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > SAL_CALL createSettings( ) throw (::com::sun::star::uno::RuntimeException);
117 virtual sal_Bool SAL_CALL hasSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
118 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getSettings( const ::rtl::OUString& ResourceURL, sal_Bool bWriteable ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
119 virtual void SAL_CALL replaceSettings( const ::rtl::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);
120 virtual void SAL_CALL removeSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
121 virtual void SAL_CALL insertSettings( const ::rtl::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);
122 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getImageManager() throw (::com::sun::star::uno::RuntimeException);
123 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getShortCutManager() throw (::com::sun::star::uno::RuntimeException);
124 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getEventsManager() throw (::com::sun::star::uno::RuntimeException);
126 // XModuleUIConfigurationManager
127 virtual sal_Bool SAL_CALL isDefaultSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
128 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getDefaultSettings( const ::rtl::OUString& ResourceURL ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
130 // XUIConfigurationPersistence
131 virtual void SAL_CALL reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
132 virtual void SAL_CALL store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
133 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);
134 virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException);
135 virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
137 private:
138 ::std::auto_ptr<UIConfigurationManagerImpl> m_pImpl;
142 #endif // __FRAMEWORK_UICONFIGURATION_MODULEUICONFIGMANAGER_HXX_