13#include <oox/token/properties.hxx>
55 for (
auto const& it : rSourceProps.
m_Effects)
57 m_Effects.push_back(std::make_unique<Effect>(*it));
67 if( it->msName ==
"outerShdw" )
69 sal_Int32 nAttrDir = 0, nAttrDist = 0;
70 sal_Int32 nAttrSizeX = 100000, nAttrSizeY = 100000;
72 sal_Int32 nAttrBlur = 0;
74 std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find(
"dir" );
75 if( attribIt != it->maAttribs.end() )
76 attribIt->second >>= nAttrDir;
78 attribIt = it->maAttribs.find(
"dist" );
79 if( attribIt != it->maAttribs.end() )
80 attribIt->second >>= nAttrDist;
82 attribIt = it->maAttribs.find(
"sx" );
83 if( attribIt != it->maAttribs.end() )
84 attribIt->second >>= nAttrSizeX;
86 attribIt = it->maAttribs.find(
"sy" );
87 if( attribIt != it->maAttribs.end() )
88 attribIt->second >>= nAttrSizeY;
90 attribIt = it->maAttribs.find(
"blurRad" );
91 if( attribIt != it->maAttribs.end() )
92 attribIt->second >>= nAttrBlur;
98 sal_Int32 nXDist = cos(nAngle) * nDist;
99 sal_Int32 nYDist = sin(nAngle) * nDist;
105 rPropMap.
setProperty( PROP_ShadowSizeX, nAttrSizeX);
106 rPropMap.
setProperty( PROP_ShadowSizeY, nAttrSizeY);
111 PROP_ShadowAlignment,
120 css::beans::PropertyValue aRet;
124 css::uno::Sequence< css::beans::PropertyValue >
aSeq(
maAttribs.size() );
126 [](
const auto& attrib)
127 { return comphelper::makePropertyValue(attrib.first, attrib.second); });
Provides helper functions for colors, device measurement conversion, graphics, and graphic objects ha...
A helper that maps property identifiers to property values.
bool setProperty(sal_Int32 nPropId, Type &&rValue)
Sets the specified property to the passed value.
void assignIfUsed(const Color &rColor)
Overwrites this color with the passed color, if it is used.
Sequence< sal_Int8 > aSeq
constexpr double deg2rad(double v)
sal_Int32 convertEmuToHmm(sal_Int64 nValue)
Converts the passed 64-bit integer value from EMUs to 1/100 mm.
const sal_Int32 PER_DEGREE
void assignIfUsed(std::optional< Type > &rDestValue, const std::optional< Type > &rSourceValue)
std::optional< sal_Int64 > moGlowRad
void assignUsed(const EffectGlowProperties &rSourceProps)
EffectGlowProperties maGlow
EffectSoftEdgeProperties maSoftEdge
std::vector< std::unique_ptr< Effect > > m_Effects
Stores all effect properties, including those not supported by core yet.
void assignUsed(const EffectProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
EffectShadowProperties maShadow
void pushToPropMap(PropertyMap &rPropMap, const GraphicHelper &rGraphicHelper) const
Writes the properties to the passed property map.
std::optional< sal_Int64 > moShadowDist
std::optional< sal_Int64 > moShadowSx
std::optional< sal_Int64 > moShadowBlur
std::optional< sal_Int64 > moShadowSy
std::optional< sal_Int64 > moShadowDir
std::optional< model::RectangleAlignment > moShadowAlignment
void assignUsed(const EffectShadowProperties &rSourceProps)
Overwrites all members that are explicitly set in rSourceProps.
std::optional< sal_Int64 > moRad
void assignUsed(const EffectSoftEdgeProperties &rSourceProps)
std::map< OUString, css::uno::Any > maAttribs
css::beans::PropertyValue getEffect()
constexpr OUStringLiteral PROP_Shadow
constexpr OUStringLiteral PROP_ShadowXDistance
constexpr OUStringLiteral PROP_ShadowTransparence
constexpr OUStringLiteral PROP_ShadowColor
constexpr OUStringLiteral PROP_ShadowYDistance
constexpr OUStringLiteral PROP_ShadowBlur