tdf#130857 qt weld: Implement QtInstanceWidget::get_text_height
[LibreOffice.git] / oox / source / drawingml / effectproperties.hxx
blob992e2bddf3ef2eee086571782429ce74425503bd
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/.
8 */
10 #ifndef INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
11 #define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
13 #include <oox/drawingml/color.hxx>
14 #include <oox/helper/propertymap.hxx>
16 #include <memory>
17 #include <vector>
18 #include <map>
20 namespace model {
21 enum class RectangleAlignment;
24 namespace oox::drawingml {
26 struct EffectGlowProperties
28 std::optional< sal_Int64 > moGlowRad; // size of glow effect
29 Color moGlowColor;
30 // TODO saturation and luminance missing
32 void assignUsed( const EffectGlowProperties& rSourceProps );
35 struct EffectSoftEdgeProperties
37 std::optional<sal_Int64> moRad; // size of effect
39 void assignUsed(const EffectSoftEdgeProperties& rSourceProps);
42 struct EffectShadowProperties
44 std::optional< sal_Int64 > moShadowDist;
45 std::optional< sal_Int64 > moShadowDir;
46 std::optional< sal_Int64 > moShadowSx;
47 std::optional< sal_Int64 > moShadowSy;
48 Color moShadowColor;
49 std::optional< sal_Int64 > moShadowBlur; // size of blur effect
50 std::optional< model::RectangleAlignment > moShadowAlignment;
52 /** Overwrites all members that are explicitly set in rSourceProps. */
53 void assignUsed( const EffectShadowProperties& rSourceProps );
56 struct Effect
58 OUString msName;
59 std::map< OUString, css::uno::Any > maAttribs;
60 Color moColor;
62 css::beans::PropertyValue getEffect();
65 struct EffectProperties
67 EffectShadowProperties maShadow;
68 EffectGlowProperties maGlow;
69 EffectSoftEdgeProperties maSoftEdge;
71 /** Stores all effect properties, including those not supported by core yet */
72 std::vector<std::unique_ptr<Effect>> m_Effects;
74 EffectProperties() {}
75 EffectProperties(EffectProperties const& rOther)
77 assignUsed(rOther);
80 /** Overwrites all members that are explicitly set in rSourceProps. */
81 void assignUsed( const EffectProperties& rSourceProps );
83 /** Writes the properties to the passed property map. */
84 void pushToPropMap(
85 PropertyMap& rPropMap,
86 const GraphicHelper& rGraphicHelper ) const;
89 } // namespace oox::drawingml
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */