LibreOffice Module oox (master) 1
theme.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 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_OOX_DRAWINGML_THEME_HXX
21#define INCLUDED_OOX_DRAWINGML_THEME_HXX
22
23#include <functional>
24
25#include <com/sun/star/uno/Reference.hxx>
28#include <oox/dllapi.h>
29#include <oox/helper/refmap.hxx>
31#include <rtl/ustring.hxx>
32#include <sal/types.h>
33
34namespace com::sun::star {
35 namespace drawing { class XDrawPage; }
36 namespace xml::dom { class XDocument; }
37}
38
39namespace oox::drawingml {
40
41struct EffectProperties;
42struct FillProperties;
43struct LineProperties;
44struct TextCharacterProperties;
45
46const sal_Int32 THEMED_STYLE_SUBTLE = 1;
47const sal_Int32 THEMED_STYLE_MODERATE = 2;
48const sal_Int32 THEMED_STYLE_INTENSE = 3;
49
54
55class TextFont;
56
58{
59public:
60 void setStyleName( const OUString& rStyleName ) { maStyleName = rStyleName; }
61 void setThemeName(const OUString& rThemeName) { maThemeName = rThemeName; }
62
63 ClrScheme& getClrScheme() { return maClrScheme; }
64 const ClrScheme& getClrScheme() const { return maClrScheme; }
65
66 FillStyleList& getFillStyleList() { return maFillStyleList; }
67 const FillStyleList& getFillStyleList() const { return maFillStyleList; }
68 FillStyleList& getBgFillStyleList() { return maBgFillStyleList; }
69 const FillStyleList& getBgFillStyleList() const { return maBgFillStyleList; }
71 const FillProperties* getFillStyle( sal_Int32 nIndex ) const;
72
73 LineStyleList& getLineStyleList() { return maLineStyleList; }
74 const LineStyleList& getLineStyleList() const { return maLineStyleList; }
76 const LineProperties* getLineStyle( sal_Int32 nIndex ) const;
77
78 EffectStyleList& getEffectStyleList() { return maEffectStyleList; }
79 const EffectStyleList& getEffectStyleList() const { return maEffectStyleList; }
80 const EffectProperties* getEffectStyle( sal_Int32 nIndex ) const;
81
82 FontScheme& getFontScheme() { return maFontScheme; }
83 const FontScheme& getFontScheme() const { return maFontScheme; }
85 const TextCharacterProperties* getFontStyle( sal_Int32 nSchemeType ) const;
87 const TextFont* resolveFont( std::u16string_view rName ) const;
88
89 Shape& getSpDef() { return maSpDef; }
90 const Shape& getSpDef() const { return maSpDef; }
91
92 Shape& getLnDef() { return maLnDef; }
93 const Shape& getLnDef() const { return maLnDef; }
94
95 Shape& getTxDef() { return maTxDef; }
96 const Shape& getTxDef() const { return maTxDef; }
97
98 const css::uno::Reference<css::xml::dom::XDocument>& getFragment() const { return mxFragment; }
99 void setFragment( const css::uno::Reference< css::xml::dom::XDocument>& xRef ) { mxFragment=xRef; }
100
101 void addTheme(const css::uno::Reference<css::drawing::XDrawPage>& xDrawPage) const;
102
103private:
104 OUString maStyleName;
105 OUString maThemeName;
115 css::uno::Reference< css::xml::dom::XDocument> mxFragment;
116};
117
118
119} // namespace oox::drawingml
120
121#endif
122
123/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
carries a CT_TextFont
Definition: textfont.hxx:33
void setFragment(const css::uno::Reference< css::xml::dom::XDocument > &xRef)
Definition: theme.hxx:99
const css::uno::Reference< css::xml::dom::XDocument > & getFragment() const
Definition: theme.hxx:98
OUString maStyleName
Definition: theme.hxx:104
css::uno::Reference< css::xml::dom::XDocument > mxFragment
Definition: theme.hxx:115
FillStyleList & getFillStyleList()
Definition: theme.hxx:66
LineStyleList & getLineStyleList()
Definition: theme.hxx:73
EffectStyleList maEffectStyleList
Definition: theme.hxx:110
void setThemeName(const OUString &rThemeName)
Definition: theme.hxx:61
const FillStyleList & getFillStyleList() const
Definition: theme.hxx:67
const FontScheme & getFontScheme() const
Definition: theme.hxx:83
EffectStyleList & getEffectStyleList()
Definition: theme.hxx:78
const LineStyleList & getLineStyleList() const
Definition: theme.hxx:74
FontScheme maFontScheme
Definition: theme.hxx:111
const Shape & getLnDef() const
Definition: theme.hxx:93
FillStyleList maBgFillStyleList
Definition: theme.hxx:108
Shape & getLnDef()
Definition: theme.hxx:92
ClrScheme & getClrScheme()
Definition: theme.hxx:63
void setStyleName(const OUString &rStyleName)
Definition: theme.hxx:60
const ClrScheme & getClrScheme() const
Definition: theme.hxx:64
FillStyleList & getBgFillStyleList()
Definition: theme.hxx:68
Shape & getSpDef()
Definition: theme.hxx:89
const Shape & getTxDef() const
Definition: theme.hxx:96
const EffectStyleList & getEffectStyleList() const
Definition: theme.hxx:79
OUString maThemeName
Definition: theme.hxx:105
Shape & getTxDef()
Definition: theme.hxx:95
LineStyleList maLineStyleList
Definition: theme.hxx:109
const FillStyleList & getBgFillStyleList() const
Definition: theme.hxx:69
FillStyleList maFillStyleList
Definition: theme.hxx:107
FontScheme & getFontScheme()
Definition: theme.hxx:82
const Shape & getSpDef() const
Definition: theme.hxx:90
ClrScheme maClrScheme
Definition: theme.hxx:106
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
const sal_Int32 THEMED_STYLE_INTENSE
Definition: theme.hxx:48
const sal_Int32 THEMED_STYLE_SUBTLE
Definition: theme.hxx:46
RefVector< LineProperties > LineStyleList
Definition: theme.hxx:51
RefVector< FillProperties > FillStyleList
Definition: theme.hxx:50
RefMap< sal_Int32, TextCharacterProperties > FontScheme
Definition: theme.hxx:53
RefVector< EffectProperties > EffectStyleList
Definition: theme.hxx:52
const sal_Int32 THEMED_STYLE_MODERATE
Definition: theme.hxx:47