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 xml::dom { class XDocument; }
36 }
37 
38 namespace oox::drawingml {
39 
40 struct EffectProperties;
41 struct FillProperties;
42 struct LineProperties;
43 struct TextCharacterProperties;
44 
45 const sal_Int32 THEMED_STYLE_SUBTLE = 1;
46 const sal_Int32 THEMED_STYLE_MODERATE = 2;
47 const sal_Int32 THEMED_STYLE_INTENSE = 3;
48 
53 
54 class TextFont;
55 
57 {
58 public:
59  Theme();
60  ~Theme();
61 
62  void setStyleName( const OUString& rStyleName ) { maStyleName = rStyleName; }
63 
64  ClrScheme& getClrScheme() { return maClrScheme; }
65  const ClrScheme& getClrScheme() const { return maClrScheme; }
66 
67  FillStyleList& getFillStyleList() { return maFillStyleList; }
68  const FillStyleList& getFillStyleList() const { return maFillStyleList; }
69  FillStyleList& getBgFillStyleList() { return maBgFillStyleList; }
70  const FillStyleList& getBgFillStyleList() const { return maBgFillStyleList; }
72  const FillProperties* getFillStyle( sal_Int32 nIndex ) const;
73 
74  LineStyleList& getLineStyleList() { return maLineStyleList; }
75  const LineStyleList& getLineStyleList() const { return maLineStyleList; }
77  const LineProperties* getLineStyle( sal_Int32 nIndex ) const;
78 
79  EffectStyleList& getEffectStyleList() { return maEffectStyleList; }
80  const EffectStyleList& getEffectStyleList() const { return maEffectStyleList; }
81  const EffectProperties* getEffectStyle( sal_Int32 nIndex ) const;
82 
83  FontScheme& getFontScheme() { return maFontScheme; }
84  const FontScheme& getFontScheme() const { return maFontScheme; }
86  const TextCharacterProperties* getFontStyle( sal_Int32 nSchemeType ) const;
88  const TextFont* resolveFont( const OUString& rName ) const;
89 
90  Shape& getSpDef() { return maSpDef; }
91  const Shape& getSpDef() const { return maSpDef; }
92 
93  Shape& getLnDef() { return maLnDef; }
94  const Shape& getLnDef() const { return maLnDef; }
95 
96  Shape& getTxDef() { return maTxDef; }
97  const Shape& getTxDef() const { return maTxDef; }
98 
99  const css::uno::Reference<css::xml::dom::XDocument>& getFragment() const { return mxFragment; }
100  void setFragment( const css::uno::Reference< css::xml::dom::XDocument>& xRef ) { mxFragment=xRef; }
101 
102 private:
103  OUString maStyleName;
105  FillStyleList maFillStyleList;
106  FillStyleList maBgFillStyleList;
107  LineStyleList maLineStyleList;
108  EffectStyleList maEffectStyleList;
109  FontScheme maFontScheme;
113  css::uno::Reference< css::xml::dom::XDocument> mxFragment;
114 };
115 
116 
117 } // namespace oox::drawingml
118 
119 #endif
120 
121 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
RefMap< sal_Int32, TextCharacterProperties > FontScheme
Definition: theme.hxx:52
FillStyleList & getBgFillStyleList()
Definition: theme.hxx:69
FillStyleList maFillStyleList
Definition: theme.hxx:105
const sal_Int32 THEMED_STYLE_SUBTLE
Definition: theme.hxx:45
const LineStyleList & getLineStyleList() const
Definition: theme.hxx:75
const Shape & getSpDef() const
Definition: theme.hxx:91
Shape & getLnDef()
Definition: theme.hxx:93
EffectStyleList maEffectStyleList
Definition: theme.hxx:108
ClrScheme & getClrScheme()
Definition: theme.hxx:64
FontScheme maFontScheme
Definition: theme.hxx:109
const sal_Int32 THEMED_STYLE_INTENSE
Definition: theme.hxx:47
OUString maStyleName
Definition: theme.hxx:103
LineStyleList maLineStyleList
Definition: theme.hxx:107
RefVector< EffectProperties > EffectStyleList
Definition: theme.hxx:51
const ClrScheme & getClrScheme() const
Definition: theme.hxx:65
ClrScheme maClrScheme
Definition: theme.hxx:104
LineStyleList & getLineStyleList()
Definition: theme.hxx:74
const EffectStyleList & getEffectStyleList() const
Definition: theme.hxx:80
FontScheme & getFontScheme()
Definition: theme.hxx:83
const sal_Int32 THEMED_STYLE_MODERATE
Definition: theme.hxx:46
EffectStyleList & getEffectStyleList()
Definition: theme.hxx:79
RefVector< LineProperties > LineStyleList
Definition: theme.hxx:50
FillStyleList maBgFillStyleList
Definition: theme.hxx:106
Shape & getSpDef()
Definition: theme.hxx:90
const FillStyleList & getFillStyleList() const
Definition: theme.hxx:68
const FontScheme & getFontScheme() const
Definition: theme.hxx:84
RefVector< FillProperties > FillStyleList
Definition: theme.hxx:49
css::uno::Reference< css::xml::dom::XDocument > mxFragment
Definition: theme.hxx:113
const FillStyleList & getBgFillStyleList() const
Definition: theme.hxx:70
const css::uno::Reference< css::xml::dom::XDocument > & getFragment() const
Definition: theme.hxx:99
const Shape & getLnDef() const
Definition: theme.hxx:94
FillStyleList & getFillStyleList()
Definition: theme.hxx:67
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
void setFragment(const css::uno::Reference< css::xml::dom::XDocument > &xRef)
Definition: theme.hxx:100
Shape & getTxDef()
Definition: theme.hxx:96
carries a CT_TextFont
Definition: textfont.hxx:32
const Shape & getTxDef() const
Definition: theme.hxx:97
void setStyleName(const OUString &rStyleName)
Definition: theme.hxx:62