13#include <oox/token/properties.hxx>
53 for (
auto const& it : rSourceProps.
m_Effects)
55 m_Effects.push_back(std::make_unique<Effect>(*it));
65 if( it->msName ==
"outerShdw" )
67 sal_Int32 nAttrDir = 0, nAttrDist = 0;
68 sal_Int32 nAttrSizeX = 100000, nAttrSizeY = 100000;
70 sal_Int32 nAttrBlur = 0;
72 std::map< OUString, css::uno::Any >::const_iterator attribIt = it->maAttribs.find(
"dir" );
73 if( attribIt != it->maAttribs.end() )
74 attribIt->second >>= nAttrDir;
76 attribIt = it->maAttribs.find(
"dist" );
77 if( attribIt != it->maAttribs.end() )
78 attribIt->second >>= nAttrDist;
80 attribIt = it->maAttribs.find(
"sx" );
81 if( attribIt != it->maAttribs.end() )
82 attribIt->second >>= nAttrSizeX;
84 attribIt = it->maAttribs.find(
"sy" );
85 if( attribIt != it->maAttribs.end() )
86 attribIt->second >>= nAttrSizeY;
88 attribIt = it->maAttribs.find(
"blurRad" );
89 if( attribIt != it->maAttribs.end() )
90 attribIt->second >>= nAttrBlur;
96 sal_Int32 nXDist = cos(nAngle) * nDist;
97 sal_Int32 nYDist = sin(nAngle) * nDist;
103 rPropMap.
setProperty( PROP_ShadowSizeX, nAttrSizeX);
104 rPropMap.
setProperty( PROP_ShadowSizeY, nAttrSizeY);
115 css::beans::PropertyValue aRet;
119 css::uno::Sequence< css::beans::PropertyValue >
aSeq(
maAttribs.size() );
121 [](
const auto& attrib)
122 { 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
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