Coverage Report

Created: 2025-12-08 09:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/include/svx/dialog/ThemeDialog.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 <svx/svxdllapi.h>
13
#include <vcl/weld.hxx>
14
#include <svx/svdpage.hxx>
15
#include <svx/dialog/ThemeColorEditDialog.hxx>
16
17
namespace model
18
{
19
class Theme;
20
}
21
22
namespace svx
23
{
24
class SVX_DLLPUBLIC ThemeDialog final : public weld::GenericDialogController
25
{
26
private:
27
    model::Theme* mpTheme;
28
    std::shared_ptr<svx::ThemeColorEditDialog> mxSubDialog;
29
    std::vector<model::ColorSet> maColorSets;
30
31
    std::unique_ptr<weld::IconView> mxIconViewThemeColors;
32
    std::unique_ptr<weld::Button> mxAdd;
33
34
    std::shared_ptr<model::ColorSet> mpCurrentColorSet;
35
36
    void runThemeColorEditDialog();
37
    void initColorSets();
38
    static VclPtr<VirtualDevice> CreateColorSetPreview(const model::ColorSet& rColorSet);
39
40
public:
41
    ThemeDialog(weld::Window* pParent, model::Theme* pTheme);
42
    virtual ~ThemeDialog() override;
43
44
    DECL_LINK(ItemActivatedHdl, weld::IconView&, bool);
45
    DECL_LINK(SelectionChangedHdl, weld::IconView&, void);
46
    DECL_LINK(ButtonClicked, weld::Button&, void);
47
48
0
    std::shared_ptr<model::ColorSet> const& getCurrentColorSet() { return mpCurrentColorSet; }
49
};
50
51
} // end svx namespace
52
53
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */