1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_FRAMEWORK_INC_UICONFIGURATION_MODULEIMAGEMANAGER_HXX
21 #define INCLUDED_FRAMEWORK_INC_UICONFIGURATION_MODULEIMAGEMANAGER_HXX
23 #include <macros/generic.hxx>
24 #include <macros/xinterface.hxx>
25 #include <macros/xtypeprovider.hxx>
26 #include <macros/xserviceinfo.hxx>
28 #include <uiconfiguration/imagetype.hxx>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/lang/XTypeProvider.hpp>
32 #include <com/sun/star/lang/XComponent.hpp>
33 #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
34 #include <com/sun/star/ui/XUIConfigurationStorage.hpp>
35 #include <com/sun/star/ui/XUIConfiguration.hpp>
36 #include <com/sun/star/ui/XImageManager.hpp>
37 #include <com/sun/star/lang/XInitialization.hpp>
38 #include <com/sun/star/ui/ConfigurationEvent.hpp>
39 #include <com/sun/star/embed/XTransactedObject.hpp>
41 #include <cppuhelper/implbase1.hxx>
42 #include <cppuhelper/interfacecontainer.hxx>
43 #include <rtl/ustring.hxx>
45 #include <vcl/image.hxx>
46 #include <rtl/ref.hxx>
54 class ImageManagerImpl
;
56 class ModuleImageManager
: public ::cppu::WeakImplHelper1
< ::com::sun::star::ui::XImageManager
>
59 ModuleImageManager( const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>& xContext
);
60 virtual ~ModuleImageManager();
63 virtual void SAL_CALL
dispose() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
64 virtual void SAL_CALL
addEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
>& xListener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 virtual void SAL_CALL
removeEventListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XEventListener
>& aListener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 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
, std::exception
) SAL_OVERRIDE
;
71 virtual void SAL_CALL
reset()
72 throw (css::lang::IllegalAccessException
,
73 css::uno::RuntimeException
,
74 std::exception
) SAL_OVERRIDE
;
75 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getAllImageNames( ::sal_Int16 nImageType
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 virtual sal_Bool SAL_CALL
hasImage( ::sal_Int16 nImageType
, const OUString
& aCommandURL
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
77 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
< OUString
>& aCommandURLSequence
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
78 virtual void SAL_CALL
replaceImages( ::sal_Int16 nImageType
, const ::com::sun::star::uno::Sequence
< 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
, std::exception
) SAL_OVERRIDE
;
79 virtual void SAL_CALL
removeImages( ::sal_Int16 nImageType
, const ::com::sun::star::uno::Sequence
< OUString
>& aResourceURLSequence
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::IllegalAccessException
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
80 virtual void SAL_CALL
insertImages( ::sal_Int16 nImageType
, const ::com::sun::star::uno::Sequence
< 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
, std::exception
) SAL_OVERRIDE
;
83 virtual void SAL_CALL
addConfigurationListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::ui::XUIConfigurationListener
>& Listener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
84 virtual void SAL_CALL
removeConfigurationListener( const ::com::sun::star::uno::Reference
< ::com::sun::star::ui::XUIConfigurationListener
>& Listener
) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
86 // XUIConfigurationPersistence
87 virtual void SAL_CALL
reload() throw (::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
88 virtual void SAL_CALL
store() throw (::com::sun::star::uno::Exception
, ::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 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
, std::exception
) SAL_OVERRIDE
;
90 virtual sal_Bool SAL_CALL
isModified() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
91 virtual sal_Bool SAL_CALL
isReadOnly() throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
94 ::std::unique_ptr
<ImageManagerImpl
> m_pImpl
;
98 #endif // INCLUDED_FRAMEWORK_INC_UICONFIGURATION_MODULEIMAGEMANAGER_HXX
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */