56#include <osl/diagnose.h>
71 const sal_uInt32
nCount(rChilds.size());
133 pLast = whiteSpaceHandling(pCandidate, pLast);
138 OSL_ENSURE(
false,
"Unexpected token inside SVGTokenText (!)");
151 : maDocument(aAbsolutePath),
161 OSL_ENSURE(
false,
"SvgDocHdl destructed with active target (!)");
167 if (std::none_of(rOwnedTopLevels.begin(), rOwnedTopLevels.end(),
168 [&](std::unique_ptr<SvgNode>
const &
p) { return p.get() == mpTarget; }))
171 OSL_ENSURE(
maCssContents.empty(),
"SvgDocHdl destructed with active css style stack entry (!)");
176 OSL_ENSURE(!
mpTarget,
"Already a target at document start (!)");
177 OSL_ENSURE(
maCssContents.empty(),
"SvgDocHdl startDocument with active css style stack entry (!)");
182 OSL_ENSURE(!
mpTarget,
"Still a target at document end (!)");
183 OSL_ENSURE(
maCssContents.empty(),
"SvgDocHdl endDocument with active css style stack entry (!)");
558 OSL_ENSURE(
false,
"Closing token, but no context (!)");
566 const OUString& aText(pSvgTitleDescNode->
getText());
585 if(aCommentFreeSource.getLength())
594 OSL_ENSURE(
false,
"Closing CssStyle, but no collector string on stack (!)");
601 whiteSpaceHandling(pWhitespaceCheck,
nullptr);
607 const sal_uInt32
nLength(aChars.getLength());
623 pTarget =
dynamic_cast< SvgCharacterNode*
>(rChilds[rChilds.size() - 1].get());
648 const OUString aTrimmedChars(aChars.trim());
650 if(!aTrimmedChars.isEmpty())
652 std::vector< OUString >::iterator aString(
maCssContents.end() - 1);
653 (*aString) += aTrimmedChars;
658 OSL_ENSURE(
false,
"Closing CssStyle, but no collector string on stack (!)");
void concatenate(std::u16string_view rText)
const OUString & getTextBeforeSpaceHandling() const
virtual const SvgStyleAttributes * getSvgStyleAttributes() const override
const OUString & getText() const
Text content.
void whiteSpaceHandling()
SvgDocHdl(const OUString &rAbsolutePath)
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
virtual void SAL_CALL endElement(const OUString &aName) override
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
virtual void SAL_CALL characters(const OUString &aChars) override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
virtual void SAL_CALL startDocument() override
virtual ~SvgDocHdl() override
std::vector< OUString > maCssContents
void appendNode(std::unique_ptr< SvgNode > pNode)
append another root node, ownership changes
const SvgNodeVector & getSvgNodeVector() const
data read access
void parseAttributes(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs)
style helpers
const std::vector< std::unique_ptr< SvgNode > > & getChildren() const
SVGToken getType() const
basic data read access
const SvgNode * getParent() const
virtual void parseAttribute(const OUString &rTokenName, SVGToken aSVGToken, const OUString &aContent)
virtual const SvgStyleAttributes * getSvgStyleAttributes() const
BaselineShift getBaselineShift() const
void addCssStyleSheet(std::u16string_view aSelectors, const SvgStyleAttributes &rNewStyle)
CssStyleSheet add helpers.
bool isTextCss() const
textCss access
const OUString & getText() const
x content, set if found in current context
void concatenate(std::u16string_view rChars)
add new chars
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
OUString SVGTokenToStr(const SVGToken &rToken)
SVGToken StrToSVGToken(const OUString &rStr, bool bCaseIndependent)
OUString removeBlockComments(const OUString &rCandidate)
std::vector< std::unique_ptr< SvgNode > > SvgNodeVector