Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / oox / inc / drawingml / textcharacterproperties.hxx
blobc806dde960f77c3d9b1b2d21015627f5c641de36
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
21 #define INCLUDED_OOX_DRAWINGML_TEXTCHARACTERPROPERTIES_HXX
23 #include <oox/helper/helper.hxx>
24 #include <oox/helper/propertymap.hxx>
25 #include <oox/drawingml/color.hxx>
26 #include <oox/drawingml/drawingmltypes.hxx>
27 #include <drawingml/textfont.hxx>
28 #include <oox/drawingml/effectproperties.hxx>
30 #include <drawingml/fillproperties.hxx>
31 #include <drawingml/lineproperties.hxx>
33 namespace oox { class PropertySet; }
35 namespace oox::drawingml {
37 struct EffectProperties;
39 struct TextCharacterProperties
41 PropertyMap maHyperlinkPropertyMap;
42 TextFont maLatinFont;
43 TextFont maLatinThemeFont;
44 TextFont maAsianFont;
45 TextFont maAsianThemeFont;
46 TextFont maComplexFont;
47 TextFont maComplexThemeFont;
48 TextFont maSymbolFont;
49 Color maUnderlineColor;
50 Color maHighlightColor;
51 std::optional< OUString > moLang;
52 std::optional< sal_Int32 > moHeight;
53 /// If a font scale has to be applied manually to moHeight.
54 std::optional< double > moFontScale;
55 std::optional< sal_Int32 > moSpacing;
56 std::optional< sal_Int32 > moUnderline;
57 std::optional< sal_Int32 > moBaseline;
58 std::optional< sal_Int32 > moStrikeout;
59 std::optional< sal_Int32 > moCaseMap;
60 std::optional< bool > moBold;
61 std::optional< bool > moItalic;
62 std::optional< bool > moUnderlineLineFollowText;
63 std::optional< bool > moUnderlineFillFollowText;
64 std::optional<LineProperties> moTextOutlineProperties;
66 FillProperties maFillProperties;
67 /// Set if there was a property set that alters run visually during import
68 bool mbHasVisualRunProperties;
70 /// Set if there was an empty paragraph property set during import
71 /// <a:pPr><a:defRPr/></a:pPr>
72 /// In that case we use the default paragraph properties from the
73 /// <c:txPr><a:p><a:pPr><a:defRPr>...</a:defRPr>
74 bool mbHasEmptyParaProperties;
75 /// For text effect properties in shapes
76 EffectPropertiesPtr mpEffectPropertiesPtr;
78 std::vector<css::beans::PropertyValue> maTextEffectsProperties;
80 /** Overwrites all members that are explicitly set in rSourceProps. */
81 void assignUsed( const TextCharacterProperties& rSourceProps );
83 /** Returns the current character size. If possible the masterstyle should
84 have been applied before, otherwise the character size can be zero and
85 the default value is returned. */
86 float getCharHeightPoints( float fDefault ) const;
88 /** Writes the properties to the passed property map. */
89 void pushToPropMap(
90 PropertyMap& rPropMap,
91 const ::oox::core::XmlFilterBase& rFilter ) const;
93 /** Writes the properties to the passed property set. */
94 void pushToPropSet(
95 PropertySet& rPropSet,
96 const ::oox::core::XmlFilterBase& rFilter ) const;
98 /** Get effect properties. */
99 EffectProperties& getEffectProperties() const { return *mpEffectPropertiesPtr; }
101 TextCharacterProperties() : mbHasVisualRunProperties(false), mbHasEmptyParaProperties(false), mpEffectPropertiesPtr(std::make_shared<EffectProperties>()) {}
105 } // namespace oox::drawingml
107 #endif
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */