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/.
11 #include <config_options.h>
12 #include <svx/svxdllapi.h>
13 #include <rtl/ustring.hxx>
16 #include <tools/color.hxx>
17 #include <docmodel/theme/ThemeColorType.hxx>
30 struct SVXCORE_DLLPUBLIC ThemePaletteEffect
34 sal_Int16 mnLumOff
= 0;
35 sal_Int16 mnLumMod
= 10'000;
37 sal_Int16
getPercentage()
40 return mnLumOff
/ 100;
42 return (-10'000 + mnLumMod
) / 100;
46 struct SVXCORE_DLLPUBLIC ThemePaletteColorData
49 model::ThemeColorType meThemeColorType
= model::ThemeColorType::Unknown
;
50 std::array
<ThemePaletteEffect
, 6> maEffects
;
52 sal_Int16
getLumMod(sal_uInt16 nEffect
) const { return maEffects
[nEffect
].mnLumMod
; }
53 sal_Int16
getLumOff(sal_uInt16 nEffect
) const { return maEffects
[nEffect
].mnLumOff
; }
56 struct SVXCORE_DLLPUBLIC ThemePaletteCollection
58 std::array
<ThemePaletteColorData
, 12> maColors
;
61 class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC
) ThemeColorPaletteManager final
63 std::shared_ptr
<model::ColorSet
> m_pColorSet
;
66 ThemeColorPaletteManager(std::shared_ptr
<model::ColorSet
> const& pColorSet
);
67 ThemePaletteCollection
generate();
68 void generateJSON(tools::JsonWriter
& aTree
);
71 } // end svx namespace
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */