LibreOffice Module framework (master) 1
imagemanager.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <memory>
23
24#include <com/sun/star/lang/XServiceInfo.hpp>
25#include <com/sun/star/ui/XImageManager.hpp>
26#include <com/sun/star/uno/XComponentContext.hpp>
27
30#include <rtl/ustring.hxx>
31
32namespace framework
33{
34 class ImageManagerImpl;
35 class ImageManager final : public ::cppu::WeakImplHelper< css::ui::XImageManager, css::lang::XServiceInfo>
36 {
37 public:
38 ImageManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext, bool bForModule );
39 virtual ~ImageManager() override;
40
41 virtual OUString SAL_CALL getImplementationName() override
42 {
43 return "com.sun.star.comp.framework.ImageManager";
44 }
45
46 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override
47 {
49 }
50
51 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override
52 {
53 css::uno::Sequence< OUString > aSeq { "com.sun.star.ui.ImageManager" };
54 return aSeq;
55 }
56
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;
61
62 // XInitialization
63 virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
64
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;
73
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;
77
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;
84
85 // Non-UNO methods
87 void setStorage( const css::uno::Reference< css::embed::XStorage >& Storage );
88
89 private:
90 ::std::unique_ptr<ImageManagerImpl> m_pImpl;
91 };
92}
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< css::uno::Reference< css::graphic::XGraphic > > SAL_CALL getImages(::sal_Int16 nImageType, const css::uno::Sequence< OUString > &aCommandURLSequence) override
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual void SAL_CALL store() override
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
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual void SAL_CALL removeImages(::sal_Int16 nImageType, const css::uno::Sequence< OUString > &aResourceURLSequence) override
virtual void SAL_CALL reset() override
virtual void SAL_CALL removeConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener > &Listener) override
virtual void SAL_CALL storeToStorage(const css::uno::Reference< css::embed::XStorage > &Storage) override
virtual void SAL_CALL dispose() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL isModified() override
virtual void SAL_CALL reload() override
virtual OUString SAL_CALL getImplementationName() override
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
virtual css::uno::Sequence< OUString > SAL_CALL getAllImageNames(::sal_Int16 nImageType) override
virtual ~ImageManager() override
virtual void SAL_CALL addConfigurationListener(const css::uno::Reference< css::ui::XUIConfigurationListener > &Listener) override
virtual sal_Bool SAL_CALL hasImage(::sal_Int16 nImageType, const OUString &aCommandURL) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
ImageManager(const css::uno::Reference< css::uno::XComponentContext > &rxContext, bool bForModule)
::std::unique_ptr< ImageManagerImpl > m_pImpl
virtual sal_Bool SAL_CALL isReadOnly() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
void setStorage(const css::uno::Reference< css::embed::XStorage > &Storage)
Sequence< sal_Int8 > aSeq
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool