update dev300-m58
[ooovba.git] / framework / inc / uiconfiguration / moduleimagemanager.hxx
blob5e24d2a377fe119b4ef75454c1165ff74be9ade8
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: moduleimagemanager.hxx,v $
10 * $Revision: 1.7 $
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_MODULEIMAGEMANAGER_HXX_
32 #define __FRAMEWORK_UICONFIGURATION_MODULEIMAGEMANAGER_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 <threadhelp/threadhelpbase.hxx>
47 #include <macros/generic.hxx>
48 #include <macros/xinterface.hxx>
49 #include <macros/xtypeprovider.hxx>
50 #include <macros/xserviceinfo.hxx>
51 #include <stdtypes.h>
52 #include <uiconfiguration/imagetype.hxx>
54 //_________________________________________________________________________________________________________________
55 // interface includes
56 //_________________________________________________________________________________________________________________
57 #include <com/sun/star/lang/XServiceInfo.hpp>
58 #include <com/sun/star/lang/XTypeProvider.hpp>
59 #include <com/sun/star/lang/XComponent.hpp>
60 #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
61 #include <com/sun/star/ui/XUIConfigurationStorage.hpp>
62 #include <com/sun/star/ui/XUIConfiguration.hpp>
63 #include <com/sun/star/ui/XImageManager.hpp>
64 #include <com/sun/star/lang/XInitialization.hpp>
65 #include <com/sun/star/ui/ConfigurationEvent.hpp>
66 #include <com/sun/star/embed/XTransactedObject.hpp>
67 #include <com/sun/star/ui/XImageManager.hpp>
69 //_________________________________________________________________________________________________________________
70 // other includes
71 //_________________________________________________________________________________________________________________
72 #include <cppuhelper/implbase1.hxx>
73 #include <cppuhelper/interfacecontainer.hxx>
74 #include <rtl/ustring.hxx>
76 #include <vcl/image.hxx>
77 #include <tools/color.hxx>
78 #include <rtl/ref.hxx>
80 #include <vector>
82 namespace framework
84 class ImageManagerImpl;
86 class ModuleImageManager : private ThreadHelpBase , // Struct for right initalization of mutex member! Must be first of baseclasses.
87 public ::cppu::WeakImplHelper1< ::com::sun::star::ui::XImageManager>
89 public:
90 ModuleImageManager( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xServiceManager );
91 virtual ~ModuleImageManager();
93 // XComponent
94 virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
95 virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
96 virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
98 // XInitialization
99 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);
101 // XImageManager
102 virtual void SAL_CALL reset() throw (::com::sun::star::uno::RuntimeException);
103 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getAllImageNames( ::sal_Int16 nImageType ) throw (::com::sun::star::uno::RuntimeException);
104 virtual ::sal_Bool SAL_CALL hasImage( ::sal_Int16 nImageType, const ::rtl::OUString& aCommandURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
105 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);
106 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);
107 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);
108 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);
110 // XUIConfiguration
111 virtual void SAL_CALL addConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
112 virtual void SAL_CALL removeConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
114 // XUIConfigurationPersistence
115 virtual void SAL_CALL reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
116 virtual void SAL_CALL store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
117 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);
118 virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException);
119 virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException);
121 private:
122 ::std::auto_ptr<ImageManagerImpl> m_pImpl;
126 #endif // __FRAMEWORK_UICONFIGURATION_MODULEUICONFIGMANAGER_HXX_