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 <svx/svxdllapi.h>
12 #include <rtl/ustring.hxx>
15 #include <tools/color.hxx>
16 #include <docmodel/theme/ThemeColorType.hxx>
25 struct SVXCORE_DLLPUBLIC ThemePaletteEffect
29 sal_Int16 mnLumOff
= 0;
30 sal_Int16 mnLumMod
= 10'000;
32 sal_Int16
getPercentage()
35 return mnLumOff
/ 100;
37 return (-10'000 + mnLumMod
) / 100;
41 struct SVXCORE_DLLPUBLIC ThemePaletteColorData
44 model::ThemeColorType meThemeColorType
;
45 std::array
<ThemePaletteEffect
, 6> maEffects
;
47 sal_Int16
getLumMod(sal_uInt16 nEffect
) const { return maEffects
[nEffect
].mnLumMod
; }
48 sal_Int16
getLumOff(sal_uInt16 nEffect
) const { return maEffects
[nEffect
].mnLumOff
; }
51 struct SVXCORE_DLLPUBLIC ThemePaletteCollection
53 std::array
<ThemePaletteColorData
, 12> maColors
;
56 class SVXCORE_DLLPUBLIC ThemeColorPaletteManager final
58 std::shared_ptr
<model::ColorSet
> m_pColorSet
;
61 ThemeColorPaletteManager(std::shared_ptr
<model::ColorSet
> const& pColorSet
);
62 ThemePaletteCollection
generate();
63 OString
generateJSON();
66 } // end svx namespace
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */