1f8e07b45SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3f8e07b45SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4f8e07b45SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5f8e07b45SAndrew Rist  * distributed with this work for additional information
6f8e07b45SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7f8e07b45SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8f8e07b45SAndrew Rist  * "License"); you may not use this file except in compliance
9f8e07b45SAndrew Rist  * with the License.  You may obtain a copy of the License at
10f8e07b45SAndrew Rist  *
11f8e07b45SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12f8e07b45SAndrew Rist  *
13f8e07b45SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14f8e07b45SAndrew Rist  * software distributed under the License is distributed on an
15f8e07b45SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16f8e07b45SAndrew Rist  * KIND, either express or implied.  See the License for the
17f8e07b45SAndrew Rist  * specific language governing permissions and limitations
18f8e07b45SAndrew Rist  * under the License.
19f8e07b45SAndrew Rist  *
20f8e07b45SAndrew Rist  *************************************************************/
21f8e07b45SAndrew Rist 
22f8e07b45SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef __FRAMEWORK_UICONFIGURATION_MODULEIMAGEMANAGER_HXX_
25cdf0e10cSrcweir #define __FRAMEWORK_UICONFIGURATION_MODULEIMAGEMANAGER_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir /** Attention: stl headers must(!) be included at first. Otherwhise it can make trouble
29cdf0e10cSrcweir                with solaris headers ...
30cdf0e10cSrcweir */
31cdf0e10cSrcweir #include <vector>
32cdf0e10cSrcweir #include <list>
33cdf0e10cSrcweir #include <hash_map>
34cdf0e10cSrcweir #include <memory>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir //_________________________________________________________________________________________________________________
37cdf0e10cSrcweir //	my own includes
38cdf0e10cSrcweir //_________________________________________________________________________________________________________________
39cdf0e10cSrcweir #include <threadhelp/threadhelpbase.hxx>
40cdf0e10cSrcweir #include <macros/generic.hxx>
41cdf0e10cSrcweir #include <macros/xinterface.hxx>
42cdf0e10cSrcweir #include <macros/xtypeprovider.hxx>
43cdf0e10cSrcweir #include <macros/xserviceinfo.hxx>
44cdf0e10cSrcweir #include <stdtypes.h>
45cdf0e10cSrcweir #include <uiconfiguration/imagetype.hxx>
46cdf0e10cSrcweir 
47cdf0e10cSrcweir //_________________________________________________________________________________________________________________
48cdf0e10cSrcweir //	interface includes
49cdf0e10cSrcweir //_________________________________________________________________________________________________________________
50cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
51cdf0e10cSrcweir #include <com/sun/star/lang/XTypeProvider.hpp>
52cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp>
53cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
54cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfigurationStorage.hpp>
55cdf0e10cSrcweir #include <com/sun/star/ui/XUIConfiguration.hpp>
56cdf0e10cSrcweir #include <com/sun/star/ui/XImageManager.hpp>
57cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp>
58cdf0e10cSrcweir #include <com/sun/star/ui/ConfigurationEvent.hpp>
59cdf0e10cSrcweir #include <com/sun/star/embed/XTransactedObject.hpp>
60cdf0e10cSrcweir #include <com/sun/star/ui/XImageManager.hpp>
61cdf0e10cSrcweir 
62cdf0e10cSrcweir //_________________________________________________________________________________________________________________
63cdf0e10cSrcweir //	other includes
64cdf0e10cSrcweir //_________________________________________________________________________________________________________________
65cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
66cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
67cdf0e10cSrcweir #include <rtl/ustring.hxx>
68cdf0e10cSrcweir 
69cdf0e10cSrcweir #include <vcl/image.hxx>
70cdf0e10cSrcweir #include <tools/color.hxx>
71cdf0e10cSrcweir #include <rtl/ref.hxx>
72cdf0e10cSrcweir 
73cdf0e10cSrcweir #include <vector>
74cdf0e10cSrcweir 
75cdf0e10cSrcweir namespace framework
76cdf0e10cSrcweir {
77cdf0e10cSrcweir     class ImageManagerImpl;
78cdf0e10cSrcweir 
79*30acf5e8Spfg     class ModuleImageManager :    private ThreadHelpBase						                  ,	// Struct for right initialization of mutex member! Must be first of baseclasses.
80cdf0e10cSrcweir 							      public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XImageManager>
81cdf0e10cSrcweir     {
82cdf0e10cSrcweir         public:
83cdf0e10cSrcweir             ModuleImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
84cdf0e10cSrcweir             virtual ~ModuleImageManager();
85cdf0e10cSrcweir 
86cdf0e10cSrcweir             // XComponent
87cdf0e10cSrcweir             virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
88cdf0e10cSrcweir             virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
89cdf0e10cSrcweir             virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
90cdf0e10cSrcweir 
91cdf0e10cSrcweir             // XInitialization
92cdf0e10cSrcweir             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);
93cdf0e10cSrcweir 
94cdf0e10cSrcweir             // XImageManager
95cdf0e10cSrcweir             virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException);
96cdf0e10cSrcweir             virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllImageNames( ::sal_Int16 nImageType ) throw (::com::sun::star::uno::RuntimeException);
97cdf0e10cSrcweir             virtual ::sal_Bool SAL_CALL hasImage( ::sal_Int16 nImageType, const ::rtl::OUString& aCommandURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
98cdf0e10cSrcweir             virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > SAL_CALL getImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCommandURLSequence ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
99cdf0e10cSrcweir             virtual void SAL_CALL replaceImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCommandURLSequence, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& aGraphicsSequence ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
100cdf0e10cSrcweir             virtual void SAL_CALL removeImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aResourceURLSequence ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
101cdf0e10cSrcweir             virtual void SAL_CALL insertImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aCommandURLSequence, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& aGraphicSequence ) throw (::com::sun::star::container::ElementExistException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException);
102cdf0e10cSrcweir 
103cdf0e10cSrcweir             // XUIConfiguration
104cdf0e10cSrcweir             virtual void SAL_CALL addConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
105cdf0e10cSrcweir             virtual void SAL_CALL removeConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
106cdf0e10cSrcweir 
107cdf0e10cSrcweir             // XUIConfigurationPersistence
108cdf0e10cSrcweir             virtual void SAL_CALL reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
109cdf0e10cSrcweir             virtual void SAL_CALL store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
110cdf0e10cSrcweir             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);
111cdf0e10cSrcweir             virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException);
112cdf0e10cSrcweir             virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
113cdf0e10cSrcweir 
114cdf0e10cSrcweir         private:
115cdf0e10cSrcweir             ::std::auto_ptr<ImageManagerImpl>                                               m_pImpl;
116cdf0e10cSrcweir    };
117cdf0e10cSrcweir }
118cdf0e10cSrcweir 
119cdf0e10cSrcweir #endif // __FRAMEWORK_UICONFIGURATION_MODULEUICONFIGMANAGER_HXX_
120