24#include <com/sun/star/xml/sax/XAttributeList.hpp>
36 class SvgStyleAttributes;
93 std::optional<OUString>
mpId;
125 const OUString& aConcatenated);
128 const OUString& aConcatenated);
147 void parseAttributes(
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs);
170 std::optional<OUString>
const &
getId()
const {
return mpId; }
171 void setId(OUString
const &);
void parseAttributes(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs)
style helpers
void setAlternativeParent(const SvgNode *pAlternativeParent=nullptr)
alternative parent
virtual ~SvgNode() override
virtual bool supportsParentStyle() const
#i125258# tell if this node is allowed to have a parent style (e.g. defs do not)
std::optional< OUString > const & getId() const
Id access.
std::unique_ptr< SvgStyleAttributes > mpLocalCssStyle
possible local CssStyle, e.g. style="fill:red; stroke:red;"
const std::vector< std::unique_ptr< SvgNode > > & getChildren() const
Display getDisplay() const
Display access #i121656#.
virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer &rTarget, bool bReferenced) const
SVGToken maType
basic data, Type, document we belong to and parent (if not root)
SVGToken getType() const
basic data read access
Display maDisplay
Display value #i121656#.
SvgNode(SVGToken aType, SvgDocument &rDocument, SvgNode *pParent)
void fillCssStyleVectorUsingHierarchyAndSelectors(const SvgNode &rCurrent, const OUString &aConcatenated)
const SvgStyleAttributes * checkForCssStyle(const SvgStyleAttributes &rOriginal) const
helper to evtl. link to css style
void setXmlSpace(XmlSpace eXmlSpace)
std::vector< std::unique_ptr< SvgNode > > maChildren
sub hierarchy
XmlSpace getXmlSpace() const
XmlSpace access.
void setClass(OUString const &)
SvgNode & operator=(const SvgNode &)=delete
XmlSpace maXmlSpace
XmlSpace value.
virtual double getCurrentXHeightInherited() const override
return xheight of node inherited from parents
double getCurrentXHeight() const
::std::vector< const SvgStyleAttributes * > maCssStyleVector
const SvgNode * getParent() const
std::optional< OUString > mpId
Id svan value.
std::optional< OUString > mpClass
Class svan value.
void fillCssStyleVector(const SvgStyleAttributes &rOriginal)
helper for filling the CssStyle vector once dependent on mbCssStyleVectorBuilt
virtual double getCurrentFontSizeInherited() const override
return font size of node inherited from parents
std::optional< OUString > const & getClass() const
Class access.
bool mbCssStyleVectorBuilt
SvgNode(const SvgNode &)=delete
const SvgNode * mpAlternativeParent
virtual basegfx::B2DRange getCurrentViewPort() const override
InfoProvider support for %, em and ex values.
void fillCssStyleVectorUsingParent(const SvgNode &rCurrent)
double getCurrentFontSize() const
void addCssStyle(const SvgDocument &rDocument, const OUString &aConcatenated)
virtual void parseAttribute(const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent)
void accept(Visitor &rVisitor)
void setId(OUString const &)
void readLocalCssStyle(std::u16string_view aContent)
scan helper to read and interpret a local CssStyle to mpLocalCssStyle
virtual const SvgStyleAttributes * getSvgStyleAttributes() const
bool hasLocalCssStyle()
Check if there is a local css style.
const SvgDocument & getDocument() const
void setDisplay(Display eDisplay)
virtual ~Visitor()=default
virtual void visit(SvgNode const &pNode)=0
Display getDisplayFromContent(std::u16string_view aContent)