/src/libreoffice/include/docmodel/uno/UnoTheme.hxx
Line | Count | Source |
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 | | |
10 | | #pragma once |
11 | | |
12 | | #include <cppuhelper/implbase.hxx> |
13 | | |
14 | | #include <com/sun/star/util/XTheme.hpp> |
15 | | |
16 | | #include <docmodel/dllapi.h> |
17 | | |
18 | | namespace model |
19 | | { |
20 | | class Theme; |
21 | | } |
22 | | |
23 | | class DOCMODEL_DLLPUBLIC UnoTheme final : public cppu::WeakImplHelper<css::util::XTheme> |
24 | | { |
25 | | private: |
26 | | std::shared_ptr<model::Theme> mpTheme; |
27 | | |
28 | | public: |
29 | | UnoTheme(std::shared_ptr<model::Theme> const& pTheme) |
30 | 17 | : mpTheme(pTheme) |
31 | 17 | { |
32 | 17 | } |
33 | | |
34 | 17 | std::shared_ptr<model::Theme> const& getTheme() const { return mpTheme; } |
35 | | |
36 | | // XTheme |
37 | | OUString SAL_CALL getName() override; |
38 | | css::uno::Sequence<sal_Int32> SAL_CALL getColorSet() override; |
39 | | }; |
40 | | |
41 | | namespace model::theme |
42 | | { |
43 | | DOCMODEL_DLLPUBLIC css::uno::Reference<css::util::XTheme> |
44 | | createXTheme(std::shared_ptr<model::Theme> const& pTheme); |
45 | | } |
46 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |