xref: /trunk/main/oox/inc/oox/drawingml/theme.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*e3508121SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*e3508121SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*e3508121SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*e3508121SAndrew Rist  * distributed with this work for additional information
6*e3508121SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*e3508121SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*e3508121SAndrew Rist  * "License"); you may not use this file except in compliance
9*e3508121SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*e3508121SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*e3508121SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*e3508121SAndrew Rist  * software distributed under the License is distributed on an
15*e3508121SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*e3508121SAndrew Rist  * KIND, either express or implied.  See the License for the
17*e3508121SAndrew Rist  * specific language governing permissions and limitations
18*e3508121SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*e3508121SAndrew Rist  *************************************************************/
21*e3508121SAndrew Rist 
22*e3508121SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef OOX_DRAWINGML_THEME_HXX
25cdf0e10cSrcweir #define OOX_DRAWINGML_THEME_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "oox/drawingml/clrscheme.hxx"
28cdf0e10cSrcweir #include "oox/drawingml/shape.hxx"
29cdf0e10cSrcweir #include "oox/drawingml/textfont.hxx"
30cdf0e10cSrcweir 
31cdf0e10cSrcweir namespace oox {
32cdf0e10cSrcweir namespace drawingml {
33cdf0e10cSrcweir 
34cdf0e10cSrcweir // ============================================================================
35cdf0e10cSrcweir 
36cdf0e10cSrcweir const sal_Int32 THEMED_STYLE_SUBTLE     = 1;
37cdf0e10cSrcweir const sal_Int32 THEMED_STYLE_MODERATE   = 2;
38cdf0e10cSrcweir const sal_Int32 THEMED_STYLE_INTENSE    = 3;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir typedef RefVector< FillProperties >                     FillStyleList;
41cdf0e10cSrcweir typedef RefVector< LineProperties >                     LineStyleList;
42cdf0e10cSrcweir typedef RefVector< PropertyMap >                        EffectStyleList;
43cdf0e10cSrcweir typedef RefMap< sal_Int32, TextCharacterProperties >    FontScheme;
44cdf0e10cSrcweir 
45cdf0e10cSrcweir // ============================================================================
46cdf0e10cSrcweir 
47cdf0e10cSrcweir class Theme
48cdf0e10cSrcweir {
49cdf0e10cSrcweir public:
50cdf0e10cSrcweir     explicit            Theme();
51cdf0e10cSrcweir                         ~Theme();
52cdf0e10cSrcweir 
setStyleName(const::rtl::OUString & rStyleName)53cdf0e10cSrcweir     inline void                     setStyleName( const ::rtl::OUString& rStyleName ) { maStyleName = rStyleName; }
getStyleName() const54cdf0e10cSrcweir     inline const ::rtl::OUString&   getStyleName() const { return maStyleName; }
55cdf0e10cSrcweir 
getClrScheme()56cdf0e10cSrcweir     inline ClrScheme&               getClrScheme() { return maClrScheme; }
getClrScheme() const57cdf0e10cSrcweir     inline const ClrScheme&         getClrScheme() const { return maClrScheme; }
58cdf0e10cSrcweir 
getFillStyleList()59cdf0e10cSrcweir     inline FillStyleList&           getFillStyleList() { return maFillStyleList; }
getFillStyleList() const60cdf0e10cSrcweir     inline const FillStyleList&     getFillStyleList() const { return maFillStyleList; }
getBgFillStyleList()61cdf0e10cSrcweir     inline FillStyleList&           getBgFillStyleList() { return maBgFillStyleList; }
getBgFillStyleList() const62cdf0e10cSrcweir     inline const FillStyleList&     getBgFillStyleList() const { return maBgFillStyleList; }
63cdf0e10cSrcweir     /** Returns the fill properties of the passed one-based themed style index. */
64cdf0e10cSrcweir     const FillProperties*           getFillStyle( sal_Int32 nIndex ) const;
65cdf0e10cSrcweir 
getLineStyleList()66cdf0e10cSrcweir     inline LineStyleList&           getLineStyleList() { return maLineStyleList; }
getLineStyleList() const67cdf0e10cSrcweir     inline const LineStyleList&     getLineStyleList() const { return maLineStyleList; }
68cdf0e10cSrcweir     /** Returns the line properties of the passed one-based themed style index. */
69cdf0e10cSrcweir     const LineProperties*           getLineStyle( sal_Int32 nIndex ) const;
70cdf0e10cSrcweir 
getEffectStyleList()71cdf0e10cSrcweir     inline EffectStyleList&         getEffectStyleList() { return maEffectStyleList; }
getEffectStyleList() const72cdf0e10cSrcweir     inline const EffectStyleList&   getEffectStyleList() const { return maEffectStyleList; }
73cdf0e10cSrcweir     /** Returns the effect properties of the passed one-based themed style index. */
74cdf0e10cSrcweir     const PropertyMap*              getEffectStyle( sal_Int32 nIndex ) const;
75cdf0e10cSrcweir 
getFontScheme()76cdf0e10cSrcweir     inline FontScheme&              getFontScheme() { return maFontScheme; }
getFontScheme() const77cdf0e10cSrcweir     inline const FontScheme&        getFontScheme() const { return maFontScheme; }
78cdf0e10cSrcweir     /** Returns theme font properties by scheme type (major/minor). */
79cdf0e10cSrcweir     const TextCharacterProperties*  getFontStyle( sal_Int32 nSchemeType ) const;
80cdf0e10cSrcweir     /** Returns theme font by placeholder name, e.g. the major latin theme font for the font name '+mj-lt'. */
81cdf0e10cSrcweir     const TextFont*                 resolveFont( const ::rtl::OUString& rName ) const;
82cdf0e10cSrcweir 
getSpDef()83cdf0e10cSrcweir     inline Shape&                   getSpDef() { return maSpDef; }
getSpDef() const84cdf0e10cSrcweir     inline const Shape&             getSpDef() const { return maSpDef; }
85cdf0e10cSrcweir 
getLnDef()86cdf0e10cSrcweir     inline Shape&                   getLnDef() { return maLnDef; }
getLnDef() const87cdf0e10cSrcweir     inline const Shape&             getLnDef() const { return maLnDef; }
88cdf0e10cSrcweir 
getTxDef()89cdf0e10cSrcweir     inline Shape&                   getTxDef() { return maTxDef; }
getTxDef() const90cdf0e10cSrcweir     inline const Shape&             getTxDef() const { return maTxDef; }
91cdf0e10cSrcweir 
92cdf0e10cSrcweir private:
93cdf0e10cSrcweir     ::rtl::OUString     maStyleName;
94cdf0e10cSrcweir     ClrScheme           maClrScheme;
95cdf0e10cSrcweir     FillStyleList       maFillStyleList;
96cdf0e10cSrcweir     FillStyleList       maBgFillStyleList;
97cdf0e10cSrcweir     LineStyleList       maLineStyleList;
98cdf0e10cSrcweir     EffectStyleList     maEffectStyleList;
99cdf0e10cSrcweir     FontScheme          maFontScheme;
100cdf0e10cSrcweir     Shape               maSpDef;
101cdf0e10cSrcweir     Shape               maLnDef;
102cdf0e10cSrcweir     Shape               maTxDef;
103cdf0e10cSrcweir };
104cdf0e10cSrcweir 
105cdf0e10cSrcweir // ============================================================================
106cdf0e10cSrcweir 
107cdf0e10cSrcweir } // namespace drawingml
108cdf0e10cSrcweir } // namespace oox
109cdf0e10cSrcweir 
110cdf0e10cSrcweir #endif
111