diff options
Diffstat (limited to '')
-rw-r--r-- | svgio/inc/svgdocument.hxx | 6 | ||||
-rw-r--r-- | svgio/inc/svgnode.hxx | 7 | ||||
-rw-r--r-- | svgio/inc/svgstyleattributes.hxx | 9 | ||||
-rw-r--r-- | svgio/inc/svgswitchnode.hxx | 55 | ||||
-rw-r--r-- | svgio/inc/svgtoken.hxx | 1 |
5 files changed, 68 insertions, 10 deletions
diff --git a/svgio/inc/svgdocument.hxx b/svgio/inc/svgdocument.hxx index 77b4d38911..9f79342c0c 100644 --- a/svgio/inc/svgdocument.hxx +++ b/svgio/inc/svgdocument.hxx @@ -34,9 +34,6 @@ namespace svgio::svgreader /// the document hierarchy with all root nodes SvgNodeVector maNodes; - /// invalid nodes that have no parent - SvgNodeVector maOrphanNodes; - /// the absolute path of the Svg file in progress (if available) const OUString maAbsolutePath; @@ -75,9 +72,6 @@ namespace svgio::svgreader /// data read access const SvgNodeVector& getSvgNodeVector() const { return maNodes; } const OUString& getAbsolutePath() const { return maAbsolutePath; } - - /// invalid nodes that have no parent - void addOrphanNode(SvgNode* pOrphan) { maOrphanNodes.emplace_back(pOrphan); } }; } // end of namespace svgio::svgreader diff --git a/svgio/inc/svgnode.hxx b/svgio/inc/svgnode.hxx index 63abc4f8cb..16c1f50bc3 100644 --- a/svgio/inc/svgnode.hxx +++ b/svgio/inc/svgnode.hxx @@ -95,6 +95,9 @@ namespace svgio::svgreader /// Class svan value std::optional<OUString> mpClass; + /// systemLanguage values + std::vector<OUString> maSystemLanguage; + /// XmlSpace value XmlSpace maXmlSpace; @@ -174,6 +177,10 @@ namespace svgio::svgreader std::optional<OUString> const & getClass() const { return mpClass; } void setClass(OUString const &); + /// SystemLanguage access + std::vector<OUString> const & getSystemLanguage() const { return maSystemLanguage; } + void setSystemLanguage(OUString const &); + /// XmlSpace access XmlSpace getXmlSpace() const; void setXmlSpace(XmlSpace eXmlSpace) { maXmlSpace = eXmlSpace; } diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx index bf921f8b1b..c5c095462f 100644 --- a/svgio/inc/svgstyleattributes.hxx +++ b/svgio/inc/svgstyleattributes.hxx @@ -243,10 +243,6 @@ namespace svgio::svgreader mutable std::vector<sal_uInt16> maResolvingParent; - // defines if this attributes are part of a ClipPath. If yes, - // rough geometry will be created on decomposition by patching - // values for fill, stroke, strokeWidth and others - bool mbIsClipPathContent : 1; // #121221# Defines if evtl. an empty array *is* set bool mbStrokeDasharraySet : 1; @@ -318,6 +314,11 @@ namespace svgio::svgreader SvgStyleAttributes(SvgNode& rOwner); ~SvgStyleAttributes(); + // Check if this attribute is part of a ClipPath. + // If so, rough geometry will be created on decomposition by patching + // values for fill, stroke, strokeWidth and others + bool isClipPathContent() const; + /// fill content bool isFillSet() const; // #i125258# ask if fill is a direct hard attribute (no hierarchy) const basegfx::BColor* getFill() const; diff --git a/svgio/inc/svgswitchnode.hxx b/svgio/inc/svgswitchnode.hxx new file mode 100644 index 0000000000..b83ae0c4ac --- /dev/null +++ b/svgio/inc/svgswitchnode.hxx @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include "svgstyleattributes.hxx" +#include <basegfx/matrix/b2dhommatrix.hxx> + +namespace svgio::svgreader +{ +class SvgSwitchNode final : public SvgNode +{ +private: + /// use styles + SvgStyleAttributes maSvgStyleAttributes; + + /// variable scan values, dependent of given XAttributeList + std::optional<basegfx::B2DHomMatrix> mpaTransform; + +public: + SvgSwitchNode(SvgDocument& rDocument, SvgNode* pParent); + virtual ~SvgSwitchNode() override; + + virtual const SvgStyleAttributes* getSvgStyleAttributes() const override; + virtual void parseAttribute(SVGToken aSVGToken, const OUString& aContent) override; + virtual void decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, + bool bReferenced) const override; + + /// transform content + const std::optional<basegfx::B2DHomMatrix>& getTransform() const { return mpaTransform; } + void setTransform(const std::optional<basegfx::B2DHomMatrix>& pMatrix) + { + mpaTransform = pMatrix; + } +}; + +} // end of namespace svgio::svgreader + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx index 26a5d8f5f4..26ef86efc5 100644 --- a/svgio/inc/svgtoken.hxx +++ b/svgio/inc/svgtoken.hxx @@ -109,6 +109,7 @@ namespace svgio::svgreader PatternContentUnits, PatternTransform, Opacity, + SystemLanguage, Visibility, Title, Desc, |