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>
27 #include <oox/drawingml/shape.hxx>
28 #include <oox/dllapi.h>
29 #include <oox/helper/refmap.hxx>
30 #include <oox/helper/refvector.hxx>
31 #include <rtl/ustring.hxx>
32 #include <sal/types.h>
33 
34 namespace com::sun::star {
35  namespace drawing { class XDrawPage; }
36  namespace xml::dom { class XDocument; }
37 }
38 
39 namespace oox::drawingml {
40 
41 struct EffectProperties;
42 struct FillProperties;
43 struct LineProperties;
44 struct TextCharacterProperties;
45 
46 const sal_Int32 THEMED_STYLE_SUBTLE = 1;
47 const sal_Int32 THEMED_STYLE_MODERATE = 2;
48 const sal_Int32 THEMED_STYLE_INTENSE = 3;
49 
54 
55 class TextFont;
56 
58 {
59 public:
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( const OUString& 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 
103 private:
104  OUString maStyleName;
105  OUString maThemeName;
107  FillStyleList maFillStyleList;
108  FillStyleList maBgFillStyleList;
109  LineStyleList maLineStyleList;
110  EffectStyleList maEffectStyleList;
111  FontScheme maFontScheme;
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: */
RefMap< sal_Int32, TextCharacterProperties > FontScheme
Definition: theme.hxx:53
FillStyleList & getBgFillStyleList()
Definition: theme.hxx:68
FillStyleList maFillStyleList
Definition: theme.hxx:107
const sal_Int32 THEMED_STYLE_SUBTLE
Definition: theme.hxx:46
const LineStyleList & getLineStyleList() const
Definition: theme.hxx:74
const Shape & getSpDef() const
Definition: theme.hxx:90
Shape & getLnDef()
Definition: theme.hxx:92
EffectStyleList maEffectStyleList
Definition: theme.hxx:110
ClrScheme & getClrScheme()
Definition: theme.hxx:63
FontScheme maFontScheme
Definition: theme.hxx:111
exports com.sun.star. drawing
const sal_Int32 THEMED_STYLE_INTENSE
Definition: theme.hxx:48
OUString maThemeName
Definition: theme.hxx:105
OUString maStyleName
Definition: theme.hxx:104
LineStyleList maLineStyleList
Definition: theme.hxx:109
RefVector< EffectProperties > EffectStyleList
Definition: theme.hxx:52
const ClrScheme & getClrScheme() const
Definition: theme.hxx:64
ClrScheme maClrScheme
Definition: theme.hxx:106
LineStyleList & getLineStyleList()
Definition: theme.hxx:73
const EffectStyleList & getEffectStyleList() const
Definition: theme.hxx:79
FontScheme & getFontScheme()
Definition: theme.hxx:82
const sal_Int32 THEMED_STYLE_MODERATE
Definition: theme.hxx:47
EffectStyleList & getEffectStyleList()
Definition: theme.hxx:78
RefVector< LineProperties > LineStyleList
Definition: theme.hxx:51
FillStyleList maBgFillStyleList
Definition: theme.hxx:108
Shape & getSpDef()
Definition: theme.hxx:89
const FillStyleList & getFillStyleList() const
Definition: theme.hxx:67
const FontScheme & getFontScheme() const
Definition: theme.hxx:83
RefVector< FillProperties > FillStyleList
Definition: theme.hxx:50
css::uno::Reference< css::xml::dom::XDocument > mxFragment
Definition: theme.hxx:115
const FillStyleList & getBgFillStyleList() const
Definition: theme.hxx:69
const css::uno::Reference< css::xml::dom::XDocument > & getFragment() const
Definition: theme.hxx:98
const Shape & getLnDef() const
Definition: theme.hxx:93
FillStyleList & getFillStyleList()
Definition: theme.hxx:66
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
void setFragment(const css::uno::Reference< css::xml::dom::XDocument > &xRef)
Definition: theme.hxx:99
Shape & getTxDef()
Definition: theme.hxx:95
void setThemeName(const OUString &rThemeName)
Definition: theme.hxx:61
carries a CT_TextFont
Definition: textfont.hxx:32
const Shape & getTxDef() const
Definition: theme.hxx:96
void setStyleName(const OUString &rStyleName)
Definition: theme.hxx:60