24#include <oox/token/namespaces.hxx>
25#include <oox/token/tokens.hxx>
37 switch( getCurrentElement() )
39 case A_TOKEN( scrgbClr ):
46 case A_TOKEN( srgbClr ):
50 case A_TOKEN( hslClr ):
57 case A_TOKEN( sysClr ):
63 case A_TOKEN( schemeClr ):
66 std::optional<OUString> sSchemeName = rAttribs.
getString( XML_val );
67 if( sSchemeName.has_value() )
72 case A_TOKEN( prstClr ):
83 case A_TOKEN( alpha ):
84 case A_TOKEN( alphaMod ):
85 case A_TOKEN( alphaOff ):
87 case A_TOKEN( blueMod ):
88 case A_TOKEN( blueOff ):
90 case A_TOKEN( hueMod ):
91 case A_TOKEN( hueOff ):
93 case A_TOKEN( lumMod ):
94 case A_TOKEN( lumOff ):
95 case A_TOKEN( green ):
96 case A_TOKEN( greenMod ):
97 case A_TOKEN( greenOff ):
99 case A_TOKEN( redMod ):
100 case A_TOKEN( redOff ):
102 case A_TOKEN( satMod ):
103 case A_TOKEN( satOff ):
104 case A_TOKEN( shade ):
105 case A_TOKEN( tint ):
109 if (aValue.endsWith(
"%"))
118 case A_TOKEN(
comp ):
119 case A_TOKEN( gamma ):
120 case A_TOKEN( gray ):
122 case A_TOKEN( invGamma ):
140 case A_TOKEN( scrgbClr ):
141 case A_TOKEN( srgbClr ):
142 case A_TOKEN( hslClr ):
143 case A_TOKEN( sysClr ):
144 case A_TOKEN( schemeClr ):
145 case A_TOKEN( prstClr ):
162 case A_TOKEN(scrgbClr):
163 case A_TOKEN(srgbClr):
164 case A_TOKEN(hslClr):
165 case A_TOKEN(sysClr):
166 case A_TOKEN(schemeClr):
167 case A_TOKEN(prstClr):
Provides access to attribute values of an element.
OUString getStringDefaulted(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute, returns an empty string if attribute not present...
std::optional< sal_Int32 > getIntegerHex(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (hexadecimal).
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
std::optional< OUString > getString(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute.
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
Returns the token identifier of the value of the specified attribute.
ColorContext(::oox::core::ContextHandler2Helper const &rParent, Color &rColor)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
Context handler for the different color value elements (a:scrgbClr, a:srgbClr, a:hslClr,...
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
virtual void onStartElement(const ::oox::AttributeList &rAttribs) override
ColorValueContext(::oox::core::ContextHandler2Helper const &rParent, Color &rColor)
void addTransformation(sal_Int32 nElement, sal_Int32 nValue=-1)
Inserts the passed color transformation.
void setPrstClr(sal_Int32 nToken)
Sets a predefined color from the a:prstClr element.
void setScrgbClr(sal_Int32 nR, sal_Int32 nG, sal_Int32 nB)
Sets the percentual RGB values from the a:scrgbClr element.
void setSchemeClr(sal_Int32 nToken)
Sets a scheme color from the a:schemeClr element.
void setHslClr(sal_Int32 nHue, sal_Int32 nSat, sal_Int32 nLum)
Sets the HSL values from the a:hslClr element.
void setSysClr(sal_Int32 nToken, sal_Int32 nLastRgb)
Sets a system color from the a:sysClr element.
void setSchemeName(const OUString &sSchemeName)
Sets the scheme name from the a:schemeClr element for interoperability purposes.
void setSrgbClr(sal_Int32 nRgb)
Sets an RGB value (hexadecimal RRGGBB) from the a:srgbClr element.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
ColorsContext(::oox::core::ContextHandler2Helper const &rParent, std::vector< Color > &rColors)
std::vector< Color > & mrColors
const sal_Int32 PER_PERCENT