LibreOffice Module svx (master) 1
unogaltheme.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#ifndef INCLUDED_SVX_SOURCE_UNOGALLERY_UNOGALTHEME_HXX
21#define INCLUDED_SVX_SOURCE_UNOGALLERY_UNOGALTHEME_HXX
22
23#include <vector>
24
26#include <svl/lstner.hxx>
27#include <com/sun/star/lang/XServiceInfo.hpp>
28#include <com/sun/star/gallery/XGalleryTheme.hpp>
29
30class Gallery;
31class GalleryTheme;
32struct GalleryObject;
33namespace unogallery { class GalleryItem; }
34
35namespace unogallery {
36
37
38class GalleryTheme : public ::cppu::WeakImplHelper<
39 css::gallery::XGalleryTheme,
40 css::lang::XServiceInfo >,
41 public SfxListener
42{
43 friend class ::unogallery::GalleryItem;
44
45public:
46
47 explicit GalleryTheme( std::u16string_view rThemeName );
48 virtual ~GalleryTheme() override;
49
50protected:
51
52 // XServiceInfo
53 virtual OUString SAL_CALL getImplementationName() override;
54 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
55 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
56
57 // XTypeProvider
58 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
59 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) override;
60
61 // XElementAccess
62 virtual css::uno::Type SAL_CALL getElementType() override;
63 virtual sal_Bool SAL_CALL hasElements() override;
64
65 // XIndexAccess
66 virtual ::sal_Int32 SAL_CALL getCount( ) override;
67 virtual css::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) override;
68
69 // XGalleryThemes
70 virtual OUString SAL_CALL getName( ) override;
71 virtual void SAL_CALL update( ) override;
72 virtual ::sal_Int32 SAL_CALL insertURLByIndex( const OUString& URL, ::sal_Int32 Index ) override;
73 virtual ::sal_Int32 SAL_CALL insertGraphicByIndex( const css::uno::Reference< css::graphic::XGraphic >& Graphic, ::sal_Int32 Index ) override;
74 virtual ::sal_Int32 SAL_CALL insertDrawingByIndex( const css::uno::Reference< css::lang::XComponent >& Drawing, ::sal_Int32 Index ) override;
75 virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) override;
76
77 // SfxListener
78 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
79
80private:
81
82 typedef ::std::vector< ::unogallery::GalleryItem* > GalleryItemVector;
83
87
89
90 void implReleaseItems( GalleryObject const * pObj );
91
94};
95
96}
97
98#endif
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
struct _ADOIndex Index
virtual ::sal_Int32 SAL_CALL insertURLByIndex(const OUString &URL, ::sal_Int32 Index) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unogaltheme.cxx:72
virtual void SAL_CALL update() override
virtual ~GalleryTheme() override
Definition: unogaltheme.cxx:49
virtual ::sal_Int32 SAL_CALL insertDrawingByIndex(const css::uno::Reference< css::lang::XComponent > &Drawing, ::sal_Int32 Index) override
virtual OUString SAL_CALL getName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unogaltheme.cxx:77
GalleryItemVector maItemVector
Definition: unogaltheme.hxx:84
GalleryTheme(std::u16string_view rThemeName)
Definition: unogaltheme.cxx:39
virtual sal_Bool SAL_CALL hasElements() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ::sal_Int32 SAL_CALL insertGraphicByIndex(const css::uno::Reference< css::graphic::XGraphic > &Graphic, ::sal_Int32 Index) override
void implRegisterGalleryItem(::unogallery::GalleryItem &rItem)
virtual css::uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: unogaltheme.cxx:82
virtual css::uno::Type SAL_CALL getElementType() override
::GalleryTheme * mpTheme
Definition: unogaltheme.hxx:86
::GalleryTheme * implGetTheme() const
Definition: unogaltheme.hxx:88
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: unogaltheme.cxx:94
void implDeregisterGalleryItem(::unogallery::GalleryItem &rItem)
virtual OUString SAL_CALL getImplementationName() override
Definition: unogaltheme.cxx:67
virtual void SAL_CALL removeByIndex(::sal_Int32 Index) override
virtual ::sal_Int32 SAL_CALL getCount() override
::std::vector< ::unogallery::GalleryItem * > GalleryItemVector
Definition: unogaltheme.hxx:82
void implReleaseItems(GalleryObject const *pObj)
unsigned char sal_Bool