26 #include <oox/token/namespaces.hxx>
27 #include <oox/token/tokens.hxx>
34 using ::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())
161 OUString aRelId = rAttribs.
getString( R_TOKEN( link ), OUString() );
174 case A_TOKEN( biLevel ):
175 case A_TOKEN( grayscl ):
179 case A_TOKEN( clrChange ):
182 case A_TOKEN( duotone ):
185 case A_TOKEN( extLst ):
192 case A_TOKEN( alphaModFix ):
202 mrBlipProps( rBlipProps ),
224 mrBlipProps( rBlipProps )
234 case A_TOKEN( blip ):
237 case A_TOKEN( srcRect ):
241 case A_TOKEN( tile ):
251 case A_TOKEN( stretch ):
264 mrFillProps( rFillProps )
280 case A_TOKEN( noFill ): { rFillProps.
moFillType = getBaseToken( nElement );
return nullptr; };
281 case A_TOKEN( solidFill ): { rFillProps.
moFillType = getBaseToken( nElement );
return new SolidFillContext( rParent, rFillProps ); };
285 case A_TOKEN( grpFill ): { rFillProps.
moFillType = getBaseToken( nElement );
return nullptr; };
303 mrBlipProps( rBlipProps )
319 case OOX_TOKEN( a14, imgProps ):
339 if( nElement == OOX_TOKEN( a14, imgLayer ) )
344 if( !aFragmentPath.isEmpty() )
352 if( nElement == OOX_TOKEN( a14, imgEffect ) )
361 sal_Int32
const aAttribs[19] = {
362 XML_visible, XML_trans, XML_crackSpacing, XML_pressure, XML_numberOfShades,
363 XML_grainSize, XML_intensity, XML_smoothness, XML_gridSize, XML_pencilSize,
364 XML_size, XML_brushSize, XML_scaling, XML_detail, XML_bright, XML_contrast,
365 XML_colorTemp, XML_sat, XML_amount
367 for(sal_Int32 nAttrib : aAttribs)
372 if( !sName.isEmpty() )
Context handler that imports the a:clrChange element containing the colors of a bitmap color change t...
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
ArtisticEffectProperties maEffect
Duotone Colors.
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.
OptValue< bool > moShadeScaled
Flip mode of gradient, if not stretched to shape.
Context handler that imports the a:blipFill element.
virtual ~BlipExtensionContext() override
OptValue< sal_Int32 > moAlphaModFix
Artistic effect, not supported by core.
PatternFillContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, PatternFillProperties &rPatternProps)
BlipFillProperties maBlipProps
Properties for pattern fills.
Color maDuotoneColors[2]
Destination color of color transformation.
OptValue< css::geometry::IntegerRectangle2D > moFillToRect
Gradient stops (colors/transparence).
OptValue< bool > getBool(sal_Int32 nAttrToken) const
Returns the boolean value of the specified attribute.
Context handler that imports the a:extLst element inside a:blip and its children a:ext, which can contain transformations to the bitmap.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
OptValue< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
Returns the 32-bit signed integer value of the specified attribute (decimal).
OptValue< sal_Int32 > moTileAlign
Vertical scaling of bitmap tiles (1/1000 percent).
OptValue< bool > moRotateWithShape
True = scale gradient into shape.
OptValue< sal_Int32 > moFillType
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
BlipFillProperties & mrBlipProps
exports com.sun.star. embed
Context handler that imports the a:solidFill element.
OptValue< css::geometry::IntegerRectangle2D > moClipRect
Stretch fill offsets.
std::map< OUString, css::uno::Any > maAttribs
Color getBestSolidColor() const
Tries to resolve current settings to a solid color, e.g.
OptValue< double > getDouble(sal_Int32 nAttrToken) const
Returns the double value of the specified attribute.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
OptValue< OUString > getString(sal_Int32 nAttrToken) const
Returns the string value of the specified attribute.
ArtisticEffectProperties & maEffect
FillProperties & mrFillProps
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
FillPropertiesContext(::oox::core::ContextHandler2Helper const &rParent, FillProperties &rFillProps)
OptValue< sal_Int32 > moBitmapMode
The fill graphic.
virtual ~ArtisticEffectContext() override
OptValue< css::geometry::IntegerRectangle2D > moTileRect
BlipFillProperties & mrBlipProps
virtual ~ColorChangeContext() override
ColorChangeContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, BlipFillProperties &rBlipProps)
GraphicHelper & getGraphicHelper() const
Returns a helper for the handling of graphics and graphic objects.
bool importBinaryData(StreamDataSequence &orDataSeq, const OUString &rStreamName)
Imports the raw binary data from the specified stream.
ArtisticEffectContext(::oox::core::ContextHandler2Helper const &rParent, ArtisticEffectProperties &rEffect)
OptValue< sal_Int32 > moBrightness
XML token for a color effect.
OptValue< sal_Int32 > moTileFlip
Anchor point inside bitmap.
bool hasAttribute(sal_Int32 nAttrToken) const
Returns true, if the specified attribute is present.
OptValue< bool > moRotateWithShape
Flip mode of bitmap tiles.
OptValue< sal_Int32 > moTileOffsetY
Width of bitmap tiles (EMUs).
void fillRect(const ::cppcanvas::CanvasSharedPtr &rCanvas, const ::basegfx::B2DRectangle &rRect,::cppcanvas::IntSRGBA aFillColor)
Context handler that imports the a:gradFill element.
Context handler for the different color value elements (a:scrgbClr, a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr).
SolidFillContext(::oox::core::ContextHandler2Helper const &rParent, FillProperties &rFillProps)
DuotoneContext(::oox::core::ContextHandler2Helper const &rParent, BlipFillProperties &rBlipProps)
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
OptValue< sal_Int32 > moContrast
Brightness in the range [-100000,100000].
const Relations & getRelations() const
Returns the relations of the current fragment.
Context handler for elements that contain a color value element (a:scrgbClr, a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr).
GradientFillProperties & mrGradientProps
OptValue< css::geometry::IntegerRectangle2D > moFillRect
Bitmap tile or stretch.
GradientFillProperties maGradientProps
Solid fill color and transparence.
BlipFillProperties & mrBlipProps
OUString getFragmentPathFromRelId(const OUString &rRelId) const
Returns the full fragment path for the passed relation identifier.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
Color maColorChangeTo
Start color of color transformation.
static OUString getEffectString(sal_Int32 nToken)
Translate effect tokens to strings.
StreamDataSequence maEmbeddedData
Data of an embedded OLE object.
Color maColorChangeFrom
Contrast in the range [-100000,100000].
IntegerRectangle2D GetRelativeRect(const Reference< XFastAttributeList > &xAttribs)
converts the attributes from a CT_RelativeRect to an IntegerRectangle2D
Provides access to attribute values of an element.
Context handler that imports the a:duotone element containing the colors of a bitmap duotone transfor...
void clearTransparence()
Removes transparence from the color.
OptValue< sal_Int32 > moGradientPath
OptValue< sal_Int32 > moShadeAngle
If set, gradient follows rectangle, circle, or shape.
PatternFillProperties & mrPatternProps
OptValue< sal_Int32 > moTileOffsetX
virtual ~DuotoneContext() override
uno::Sequence< double > maFillColor
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
GradientStopMap maGradientStops
Color maPattBgColor
Pattern foreground color.
BlipFillProperties & mrBlipProps
Context handler for elements that contain a fill property element (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill).
XmlFilterBase & getFilter() const
Returns the filter instance.
::rtl::Reference< ContextHandler > ContextHandlerRef
::oox::ole::OleObjectInfo mrOleObjectInfo
OptValue< sal_Int32 > moTileScaleX
Height of bitmap tiles (EMUs).
const css::uno::Reference< css::xml::sax::XFastAttributeList > & getFastAttributeList() const
Returns the wrapped com.sun.star.xml.sax.XFastAttributeList object.
void setUnused()
Sets the color to unused state.
SimpleFillPropertiesContext(::oox::core::ContextHandler2Helper const &rParent, Color &rColor)
OptValue< sal_Int32 > moColorEffect
True = rotate bitmap with shape.
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
bool isEmpty() const
The original graphic as embedded object.
::oox::core::ContextHandlerRef createFillContext(::oox::core::ContextHandler2Helper const &rParent, sal_Int32 nElement, const ::oox::AttributeList &rAttribs, FillProperties &rFillProps)
BlipFillContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, BlipFillProperties &rBlipProps)
OUString getAbsoluteUrl(const OUString &rUrl) const
Returns an absolute URL for the passed relative or absolute URL.
Context handler that imports a14:imgProps, a14:imgLayer, a14:imgEffect containers and the a14:artisti...
PatternFillProperties maPatternProps
Properties for gradient fills.
BlipExtensionContext(::oox::core::ContextHandler2Helper const &rParent, BlipFillProperties &rBlipProps)
Context handler that imports the a:blip element containing the fill bitmap and bitmap color transform...
OptValue< sal_Int32 > moShadeFlip
Rotation angle of linear gradients.
BlipContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, BlipFillProperties &rBlipProps)
css::uno::Reference< css::graphic::XGraphic > mxFillGraphic
virtual ~SimpleFillPropertiesContext() override
Helper class that provides a context stack.
GradientFillContext(::oox::core::ContextHandler2Helper const &rParent, const ::oox::AttributeList &rAttribs, GradientFillProperties &rGradientProps)
OptValue< sal_Int32 > moTileScaleY
Horizontal scaling of bitmap tiles (1/1000 percent).
OptValue< sal_Int32 > getToken(sal_Int32 nAttrToken) const
Returns the token identifier of the value of the specified attribute.
OptValue< sal_Int32 > moPattPreset
Pattern background color.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const ::oox::AttributeList &rAttribs) override
BlipFillProperties & mrBlipProps
Context handler that imports the a:pattFill element.