26#include <oox/token/namespaces.hxx>
27#include <oox/token/tokens.hxx>
34using ::oox::core::ContextHandler2;
48 mrGradientProps( rGradientProps )
59 case A_TOKEN( gsLst ):
65 double fPosition = getLimitedValue< double >( rAttribs.
getDouble( XML_pos, 0.0 ) / 100000.0, 0.0, 1.0 );
81 case A_TOKEN( fillToRect ):
85 case A_TOKEN( tileRect ):
95 mrPatternProps( rPatternProps )
105 case A_TOKEN( bgClr ):
107 case A_TOKEN( fgClr ):
116 mrBlipProps( rBlipProps )
134 case A_TOKEN( clrFrom ):
136 case A_TOKEN( clrTo ):
145 mrBlipProps( rBlipProps )
151 if (!aFragmentPath.isEmpty())
174 case A_TOKEN( biLevel ):
179 case A_TOKEN( grayscl ):
183 case A_TOKEN( clrChange ):
186 case A_TOKEN( duotone ):
189 case A_TOKEN( extLst ):
196 case A_TOKEN( alphaModFix ):
206 mrBlipProps( rBlipProps ),
228 mrBlipProps( rBlipProps )
238 case A_TOKEN( blip ):
241 case A_TOKEN( srcRect ):
245 case A_TOKEN( tile ):
255 case A_TOKEN( stretch ):
268 mrFillProps( rFillProps )
279 ContextHandler2Helper
const & rParent, sal_Int32 nElement,
284 case A_TOKEN( noFill ): { rFillProps.
moFillType = getBaseToken( nElement );
return nullptr; };
285 case A_TOKEN( solidFill ): { rFillProps.
moFillType = getBaseToken( nElement );
return new SolidFillContext( rParent, rFillProps ); };
289 case A_TOKEN( grpFill ): { rFillProps.
moFillType = getBaseToken( nElement );
return nullptr; };
307 mrBlipProps( rBlipProps )
323 case OOX_TOKEN( a14, imgProps ):
343 if( nElement == OOX_TOKEN( a14, imgLayer ) )
348 if( !aFragmentPath.isEmpty() )
356 if( nElement == OOX_TOKEN( a14, imgEffect ) )
365 sal_Int32
const aAttribs[19] = {
366 XML_visible, XML_trans, XML_crackSpacing, XML_pressure, XML_numberOfShades,
367 XML_grainSize, XML_intensity, XML_smoothness, XML_gridSize, XML_pencilSize,
368 XML_size, XML_brushSize, XML_scaling, XML_detail, XML_bright, XML_contrast,
369 XML_colorTemp, XML_sat, XML_amount
371 for(sal_Int32 nAttrib : aAttribs)
376 if( !
sName.isEmpty() )
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
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...
bool hasAttribute(sal_Int32 nAttrToken) const
Returns true, if the specified attribute is present.
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
const css::uno::Reference< css::xml::sax::XFastAttributeList > & getFastAttributeList() const
Returns the wrapped com.sun.star.xml.sax.XFastAttributeList object.
std::optional< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean 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.
std::optional< double > getDouble(sal_Int32 nAttrToken) const
Returns the double value of the specified attribute.
css::uno::Reference< css::graphic::XGraphic > importEmbeddedGraphic(const OUString &rStreamName, const WmfExternal *pExtHeader=nullptr) const
Imports a graphic from the storage stream with the passed path and name.
XmlFilterBase & getFilter() const
Returns the filter instance.
OUString getFragmentPathFromRelId(const OUString &rRelId) const
Returns the full fragment path for the passed relation identifier.
const Relations & getRelations() const
Returns the relations of the current fragment.
bool importBinaryData(StreamDataSequence &orDataSeq, const OUString &rStreamName)
Imports the raw binary data from the specified stream.
OUString getAbsoluteUrl(const OUString &rUrl) const
Returns an absolute URL for the passed relative or absolute URL.
GraphicHelper & getGraphicHelper() const
Returns a helper for the handling of graphics and graphic objects.
Context handler that imports a14:imgProps, a14:imgLayer, a14:imgEffect containers and the a14:artisti...
ArtisticEffectContext(::oox::core::ContextHandler2Helper const &rParent, ArtisticEffectProperties &rEffect)
ArtisticEffectProperties & maEffect
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
virtual ~ArtisticEffectContext() override
Context handler that imports the a:blip element containing the fill bitmap and bitmap color transform...
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
BlipContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, BlipFillProperties &rBlipProps)
BlipFillProperties & mrBlipProps
Context handler that imports the a:extLst element inside a:blip and its children a:ext,...
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
virtual ~BlipExtensionContext() override
BlipFillProperties & mrBlipProps
BlipExtensionContext(::oox::core::ContextHandler2Helper const &rParent, BlipFillProperties &rBlipProps)
Context handler that imports the a:blipFill element.
BlipFillContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, BlipFillProperties &rBlipProps)
BlipFillProperties & mrBlipProps
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
Context handler that imports the a:clrChange element containing the colors of a bitmap color change t...
BlipFillProperties & mrBlipProps
virtual ~ColorChangeContext() override
ColorChangeContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, BlipFillProperties &rBlipProps)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
Context handler for elements that contain a color value element (a:scrgbClr, a:srgbClr,...
Context handler for the different color value elements (a:scrgbClr, a:srgbClr, a:hslClr,...
void setUnused()
Sets the color to unused state.
void clearTransparence()
Removes transparence from the color.
Context handler that imports the a:duotone element containing the colors of a bitmap duotone transfor...
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
DuotoneContext(::oox::core::ContextHandler2Helper const &rParent, BlipFillProperties &rBlipProps)
BlipFillProperties & mrBlipProps
virtual ~DuotoneContext() override
Context handler for elements that contain a fill property element (a:noFill, a:solidFill,...
FillProperties & mrFillProps
::oox::core::ContextHandlerRef createFillContext(::oox::core::ContextHandler2Helper const &rParent, sal_Int32 nElement, const ::oox::AttributeList &rAttribs, FillProperties &rFillProps)
FillPropertiesContext(::oox::core::ContextHandler2Helper const &rParent, FillProperties &rFillProps)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
Context handler that imports the a:gradFill element.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
GradientFillProperties & mrGradientProps
GradientFillContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, GradientFillProperties &rGradientProps)
Context handler that imports the a:pattFill element.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
PatternFillContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, PatternFillProperties &rPatternProps)
PatternFillProperties & mrPatternProps
virtual ~SimpleFillPropertiesContext() override
SimpleFillPropertiesContext(::oox::core::ContextHandler2Helper const &rParent, Color &rColor)
Context handler that imports the a:solidFill element.
SolidFillContext(::oox::core::ContextHandler2Helper const &rParent, FillProperties &rFillProps)
::rtl::Reference< ContextHandler > ContextHandlerRef
IntegerRectangle2D GetRelativeRect(const Reference< XFastAttributeList > &xAttribs)
converts the attributes from a CT_RelativeRect to an IntegerRectangle2D
void fillRect(const ::cppcanvas::CanvasSharedPtr &rCanvas, const ::basegfx::B2DRectangle &rRect, ::cppcanvas::IntSRGBA aFillColor)
uno::Sequence< double > maFillColor
bool isEmpty() const
The original graphic as embedded object.
::oox::ole::OleObjectInfo mrOleObjectInfo
std::map< OUString, css::uno::Any > maAttribs
static OUString getEffectString(sal_Int32 nToken)
Translate effect tokens to strings.
std::optional< css::geometry::IntegerRectangle2D > moClipRect
Stretch fill offsets.
Color maColorChangeTo
Start color of color transformation.
std::optional< css::geometry::IntegerRectangle2D > moFillRect
Bitmap tile or stretch.
std::optional< sal_Int32 > moColorEffect
True = rotate bitmap with shape.
std::optional< sal_Int32 > moBitmapMode
The fill graphic.
std::optional< sal_Int32 > moTileFlip
Anchor point inside bitmap.
Color maDuotoneColors[2]
Destination color of color transformation.
std::optional< sal_Int32 > moAlphaModFix
Artistic effect, not supported by core.
std::optional< sal_Int32 > moTileScaleY
Horizontal scaling of bitmap tiles (1/1000 percent).
std::optional< sal_Int32 > moTileOffsetY
Width of bitmap tiles (EMUs).
std::optional< sal_Int32 > moBrightness
XML token for a color effect.
Color maColorChangeFrom
Bi-Level (Black/White) effect threshold (1/1000 percent)
std::optional< bool > moRotateWithShape
Flip mode of bitmap tiles.
std::optional< sal_Int32 > moBiLevelThreshold
Contrast in the range [-100000,100000].
css::uno::Reference< css::graphic::XGraphic > mxFillGraphic
ArtisticEffectProperties maEffect
Duotone Colors.
std::optional< sal_Int32 > moTileAlign
Vertical scaling of bitmap tiles (1/1000 percent).
std::optional< sal_Int32 > moTileScaleX
Height of bitmap tiles (EMUs).
std::optional< sal_Int32 > moTileOffsetX
std::optional< sal_Int32 > moContrast
Brightness in the range [-100000,100000].
PatternFillProperties maPatternProps
Properties for gradient fills.
GradientFillProperties maGradientProps
Whether the background is used as fill type.
BlipFillProperties maBlipProps
Properties for pattern fills.
Color getBestSolidColor() const
Tries to resolve current settings to a solid color, e.g.
std::optional< sal_Int32 > moFillType
std::optional< css::geometry::IntegerRectangle2D > moFillToRect
Gradient stops (colors/transparence).
std::optional< sal_Int32 > moShadeFlip
Rotation angle of linear gradients.
std::optional< bool > moRotateWithShape
True = scale gradient into shape.
std::optional< sal_Int32 > moGradientPath
std::optional< css::geometry::IntegerRectangle2D > moTileRect
std::optional< bool > moShadeScaled
Flip mode of gradient, if not stretched to shape.
std::optional< sal_Int32 > moShadeAngle
If set, gradient follows rectangle, circle, or shape.
GradientStopMap maGradientStops
Color maPattBgColor
Pattern foreground color.
std::optional< sal_Int32 > moPattPreset
Pattern background color.
StreamDataSequence maEmbeddedData
Data of an embedded OLE object.