Update git submodules
[LibreOffice.git] / framework / inc / uiconfiguration / imagemanager.hxx
bloba78fb675ed2867856293a9e900d64847b037f7aa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
22 #include <memory>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/ui/XImageManager.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <cppuhelper/implbase.hxx>
29 #include <cppuhelper/supportsservice.hxx>
30 #include <rtl/ustring.hxx>
32 namespace framework
34 class ImageManagerImpl;
35 class ImageManager final : public ::cppu::WeakImplHelper< css::ui::XImageManager, css::lang::XServiceInfo>
37 public:
38 ImageManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext, bool bForModule );
39 virtual ~ImageManager() override;
41 virtual OUString SAL_CALL getImplementationName() override
43 return u"com.sun.star.comp.framework.ImageManager"_ustr;
46 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
48 return cppu::supportsService(this, ServiceName);
51 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
53 css::uno::Sequence< OUString > aSeq { u"com.sun.star.ui.ImageManager"_ustr };
54 return aSeq;
57 // XComponent
58 virtual void SAL_CALL dispose() override;
59 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
60 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
62 // XInitialization
63 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
65 // XImageManager
66 virtual void SAL_CALL reset() override;
67 virtual css::uno::Sequence< OUString > SAL_CALL getAllImageNames( ::sal_Int16 nImageType ) override;
68 virtual sal_Bool SAL_CALL hasImage( ::sal_Int16 nImageType, const OUString& aCommandURL ) override;
69 virtual css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > > SAL_CALL getImages( ::sal_Int16 nImageType, const css::uno::Sequence< OUString >& aCommandURLSequence ) override;
70 virtual void SAL_CALL replaceImages( ::sal_Int16 nImageType, const css::uno::Sequence< OUString >& aCommandURLSequence, const css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > >& aGraphicsSequence ) override;
71 virtual void SAL_CALL removeImages( ::sal_Int16 nImageType, const css::uno::Sequence< OUString >& aResourceURLSequence ) override;
72 virtual void SAL_CALL insertImages( ::sal_Int16 nImageType, const css::uno::Sequence< OUString >& aCommandURLSequence, const css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > >& aGraphicSequence ) override;
74 // XUIConfiguration
75 virtual void SAL_CALL addConfigurationListener( const css::uno::Reference< css::ui::XUIConfigurationListener >& Listener ) override;
76 virtual void SAL_CALL removeConfigurationListener( const css::uno::Reference< css::ui::XUIConfigurationListener >& Listener ) override;
78 // XUIConfigurationPersistence
79 virtual void SAL_CALL reload() override;
80 virtual void SAL_CALL store() override;
81 virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage >& Storage ) override;
82 virtual sal_Bool SAL_CALL isModified() override;
83 virtual sal_Bool SAL_CALL isReadOnly() override;
85 // Non-UNO methods
86 /// @throws css::uno::RuntimeException
87 void setStorage( const css::uno::Reference< css::embed::XStorage >& Storage );
89 private:
90 ::std::unique_ptr<ImageManagerImpl> m_pImpl;
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */