1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
25 #define OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
26 
27 #include "oox/helper/helper.hxx"
28 #include "oox/helper/propertymap.hxx"
29 #include "oox/drawingml/color.hxx"
30 #include "oox/drawingml/textfont.hxx"
31 
32 namespace oox { class PropertySet; }
33 
34 namespace oox {
35 namespace drawingml {
36 
37 // ============================================================================
38 
39 struct TextCharacterProperties
40 {
41     PropertyMap         maHyperlinkPropertyMap;
42     TextFont            maLatinFont;
43     TextFont            maAsianFont;
44     TextFont            maComplexFont;
45     TextFont            maSymbolFont;
46     Color               maCharColor;
47     Color               maUnderlineColor;
48     Color               maHighlightColor;
49     OptValue< ::rtl::OUString > moLang;
50     OptValue< sal_Int32 > moHeight;
51     OptValue< sal_Int32 > moSpacing;
52     OptValue< sal_Int32 > moUnderline;
53     OptValue< sal_Int32 > moStrikeout;
54     OptValue< sal_Int32 > moCaseMap;
55     OptValue< bool >    moBold;
56     OptValue< bool >    moItalic;
57     OptValue< bool >    moUnderlineLineFollowText;
58     OptValue< bool >    moUnderlineFillFollowText;
59 
60     /** Overwrites all members that are explicitly set in rSourceProps. */
61     void                assignUsed( const TextCharacterProperties& rSourceProps );
62 
63     /** Returns the current character size. If possible the masterstyle should
64         have been applied before, otherwise the character size can be zero and
65         the default value is returned. */
66     float               getCharHeightPoints( float fDefault ) const;
67 
68     /** Writes the properties to the passed property map. */
69     void                pushToPropMap(
70                             PropertyMap& rPropMap,
71                             const ::oox::core::XmlFilterBase& rFilter ) const;
72 
73     /** Writes the properties to the passed property set. */
74     void                pushToPropSet(
75                             PropertySet& rPropSet,
76                             const ::oox::core::XmlFilterBase& rFilter ) const;
77 };
78 
79 // ============================================================================
80 
81 } // namespace drawingml
82 } // namespace oox
83 
84 #endif
85 
86