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 
10 #ifndef INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
11 #define INCLUDED_OOX_DRAWINGML_EFFECTPROPERTIES_HXX
12 
13 #include <oox/drawingml/color.hxx>
14 #include <oox/helper/propertymap.hxx>
15 
16 #include <memory>
17 #include <vector>
18 #include <map>
19 
20 namespace oox {
21 namespace drawingml {
22 
23 struct EffectShadowProperties
24 {
25     OptValue< sal_Int64 > moShadowDist;
26     OptValue< sal_Int64 > moShadowDir;
27     Color moShadowColor;
28 
29     /** Overwrites all members that are explicitly set in rSourceProps. */
30     void                assignUsed( const EffectShadowProperties& rSourceProps );
31 };
32 
33 struct Effect
34 {
35     OUString msName;
36     std::map< OUString, css::uno::Any > maAttribs;
37     Color moColor;
38 
39     css::beans::PropertyValue getEffect();
40 };
41 
42 struct EffectProperties
43 {
44     EffectShadowProperties maShadow;
45 
46     /** Stores all effect properties, including those not supported by core yet */
47     std::vector<std::unique_ptr<Effect>> m_Effects;
48 
EffectPropertiesoox::drawingml::EffectProperties49     EffectProperties() {}
EffectPropertiesoox::drawingml::EffectProperties50     EffectProperties(EffectProperties const& rOther)
51     {
52         assignUsed(rOther);
53     }
54 
55     /** Overwrites all members that are explicitly set in rSourceProps. */
56     void                assignUsed( const EffectProperties& rSourceProps );
57 
58     /** Writes the properties to the passed property map. */
59     void                pushToPropMap(
60                             PropertyMap& rPropMap,
61                             const GraphicHelper& rGraphicHelper ) const;
62 };
63 
64 } // namespace drawingml
65 } // namespace oox
66 
67 #endif
68 
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
70