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_SVX_SOURCE_UNOGALLERY_UNOGALTHEME_HXX
21 #define INCLUDED_SVX_SOURCE_UNOGALLERY_UNOGALTHEME_HXX
25 #include <cppuhelper/implbase.hxx>
26 #include <svl/lstner.hxx>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/gallery/XGalleryTheme.hpp>
33 namespace unogallery
{ class GalleryItem
; }
35 namespace unogallery
{
38 class GalleryTheme
: public ::cppu::WeakImplHelper
<
39 css::gallery::XGalleryTheme
,
40 css::lang::XServiceInfo
>,
43 friend class ::unogallery::GalleryItem
;
47 explicit GalleryTheme( std::u16string_view rThemeName
);
48 virtual ~GalleryTheme() override
;
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
;
58 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
59 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
62 virtual css::uno::Type SAL_CALL
getElementType() override
;
63 virtual sal_Bool SAL_CALL
hasElements() override
;
66 virtual ::sal_Int32 SAL_CALL
getCount( ) override
;
67 virtual css::uno::Any SAL_CALL
getByIndex( ::sal_Int32 Index
) override
;
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
;
78 virtual void Notify( SfxBroadcaster
& rBC
, const SfxHint
& rHint
) override
;
82 typedef ::std::vector
< ::unogallery::GalleryItem
* > GalleryItemVector
;
84 GalleryItemVector maItemVector
;
86 ::GalleryTheme
* mpTheme
;
88 ::GalleryTheme
* implGetTheme() const { return mpTheme
;}
90 void implReleaseItems( GalleryObject
const * pObj
);
92 void implRegisterGalleryItem( ::unogallery::GalleryItem
& rItem
);
93 void implDeregisterGalleryItem( ::unogallery::GalleryItem
& rItem
);
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */