LibreOffice Module writerfilter (master) 1
ThemeColorHandler.hxx
Go to the documentation of this file.
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
11#pragma once
12
13#include "LoggedResources.hxx"
14
15#include <com/sun/star/beans/PropertyValue.hpp>
16
17#include "PropertyIds.hxx"
18
21
22#include <memory>
23#include <optional>
24
26{
29{
30public:
31 sal_Int32 mnColor = 0;
32 sal_Int32 mnIndex = -1;
33 sal_Int32 mnTint = 0;
34 sal_Int32 mnShade = 0;
35
37 : LoggedProperties("ThemeColorHandler")
38 {
39 }
40
41 virtual void lcl_attribute(Id aName, Value& rValue) override
42 {
43 sal_Int32 nIntValue = rValue.getInt();
44
45 switch (aName)
46 {
47 case NS_ooxml::LN_CT_Color_val:
48 mnColor = nIntValue;
49 break;
50 case NS_ooxml::LN_CT_Color_themeColor:
51 mnIndex = nIntValue;
52 break;
53
54 case NS_ooxml::LN_CT_Color_themeTint:
55 mnTint = nIntValue;
56 break;
57
58 case NS_ooxml::LN_CT_Color_themeShade:
59 mnShade = nIntValue;
60 break;
61 }
62 }
63
64 virtual void lcl_sprm(Sprm& /*sprm*/) override {}
65};
66}
67
68/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
An SPRM: Section, Paragraph and Run Modifier.
virtual int getInt() const =0
Returns integer representation of the value.
Class to process all text effects like glow, textOutline, ...
virtual void lcl_sprm(Sprm &) override
virtual void lcl_attribute(Id aName, Value &rValue) override
OUString aName
sal_uInt32 Id