[Libreoffice-commits] core.git: svgio/inc svgio/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 30 10:21:32 UTC 2021


 svgio/inc/svgtoken.hxx                         |  270 ++++++++++++-------------
 svgio/source/svgreader/svganode.cxx            |    8 
 svgio/source/svgreader/svgcharacternode.cxx    |   16 -
 svgio/source/svgreader/svgcirclenode.cxx       |   12 -
 svgio/source/svgreader/svgclippathnode.cxx     |    8 
 svgio/source/svgreader/svgdocumenthandler.cxx  |  156 +++++++-------
 svgio/source/svgreader/svgellipsenode.cxx      |   14 -
 svgio/source/svgreader/svggnode.cxx            |   12 -
 svgio/source/svgreader/svggradientnode.cxx     |   32 +-
 svgio/source/svgreader/svggradientstopnode.cxx |    6 
 svgio/source/svgreader/svgimagenode.cxx        |   18 -
 svgio/source/svgreader/svglinenode.cxx         |   14 -
 svgio/source/svgreader/svgmarkernode.cxx       |   20 -
 svgio/source/svgreader/svgmasknode.cxx         |   18 -
 svgio/source/svgreader/svgnode.cxx             |   28 +-
 svgio/source/svgreader/svgpathnode.cxx         |   10 
 svgio/source/svgreader/svgpatternnode.cxx      |   24 +-
 svgio/source/svgreader/svgpolynode.cxx         |    8 
 svgio/source/svgreader/svgrectnode.cxx         |   18 -
 svgio/source/svgreader/svgstyleattributes.cxx  |  118 +++++-----
 svgio/source/svgreader/svgstylenode.cxx        |    4 
 svgio/source/svgreader/svgsvgnode.cxx          |   18 -
 svgio/source/svgreader/svgsymbolnode.cxx       |    8 
 svgio/source/svgreader/svgtextnode.cxx         |   18 -
 svgio/source/svgreader/svgtextpathnode.cxx     |   12 -
 svgio/source/svgreader/svgtitledescnode.cxx    |    2 
 svgio/source/svgreader/svgtoken.cxx            |  268 ++++++++++++------------
 svgio/source/svgreader/svgtools.cxx            |   26 +-
 svgio/source/svgreader/svgtrefnode.cxx         |    6 
 svgio/source/svgreader/svgtspannode.cxx        |    4 
 svgio/source/svgreader/svgusenode.cxx          |   18 -
 svgio/source/svgreader/svgvisitor.cxx          |    6 
 32 files changed, 600 insertions(+), 600 deletions(-)

New commits:
commit 91daf2c6b1661f27df6ee41f7395ed0fcb677cf0
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Apr 28 13:08:07 2021 +0900
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Fri Apr 30 12:20:52 2021 +0200

    svgio: change SVGToken enum to enum class
    
    Change-Id: Ic2618c91b1793463b7ce0a42ec1db100d11acfa4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114898
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/svgio/inc/svgtoken.hxx b/svgio/inc/svgtoken.hxx
index b1d55b4e2d17..fe5e67a630bb 100644
--- a/svgio/inc/svgtoken.hxx
+++ b/svgio/inc/svgtoken.hxx
@@ -25,159 +25,159 @@
 namespace svgio::svgreader
     {
         // SVG token mapper with hashing
-        enum SVGToken
+        enum class SVGToken
         {
-            SVGTokenUnknown = 0,
+            Unknown = 0,
 
             // diverse attribute tokens
-            SVGTokenWidth,
-            SVGTokenHeight,
-            SVGTokenViewBox,
-            SVGTokenTransform,
-            SVGTokenStyle,
-            SVGTokenDisplay, // #i121656#
-            SVGTokenD,
-            SVGTokenX,
-            SVGTokenY,
-            SVGTokenXmlns,
-            SVGTokenVersion,
-            SVGTokenId,
-            SVGTokenRx,
-            SVGTokenRy,
-            SVGTokenPoints,
-            SVGTokenDx,
-            SVGTokenDy,
-            SVGTokenRotate,
-            SVGTokenTextLength,
-            SVGTokenLengthAdjust,
-            SVGTokenFont,
-            SVGTokenFontFamily,
-            SVGTokenFontSize,
-            SVGTokenFontSizeAdjust,
-            SVGTokenFontStretch,
-            SVGTokenFontStyle,
-            SVGTokenFontVariant,
-            SVGTokenFontWeight,
-            SVGTokenDirection,
-            SVGTokenLetterSpacing,
-            SVGTokenTextDecoration,
-            SVGTokenUnicodeBidi,
-            SVGTokenWordSpacing,
-            SVGTokenCharacter, // not in the hash, just for simple text handling in SvgCharacterNode
-            SVGTokenTspan,
-            SVGTokenTref,
-            SVGTokenTextPath,
-            SVGTokenStartOffset,
-            SVGTokenMethod,
-            SVGTokenSpacing,
-            SVGTokenTextAlign,
-            SVGTokenPathLength,
-            SVGTokenType,
-            SVGTokenClass,
-            SVGTokenTextAnchor,
-            SVGTokenXmlSpace,
-            SVGTokenColor,
-            SVGTokenClipPathNode,
-            SVGTokenClipPathProperty,
-            SVGTokenMask,
-            SVGTokenClipPathUnits,
-            SVGTokenMaskUnits,
-            SVGTokenMaskContentUnits,
-            SVGTokenClipRule,
-            SVGTokenMarker,
-            SVGTokenMarkerStart,
-            SVGTokenMarkerMid,
-            SVGTokenMarkerEnd,
-            SVGTokenRefX,
-            SVGTokenRefY,
-            SVGTokenMarkerUnits,
-            SVGTokenMarkerWidth,
-            SVGTokenMarkerHeight,
-            SVGTokenOrient,
-            SVGTokenPattern,
-            SVGTokenPatternUnits,
-            SVGTokenPatternContentUnits,
-            SVGTokenPatternTransform,
-            SVGTokenOpacity,
-            SVGTokenVisibility,
-            SVGTokenTitle,
-            SVGTokenDesc,
+            Width,
+            Height,
+            ViewBox,
+            Transform,
+            Style,
+            Display, // #i121656#
+            D,
+            X,
+            Y,
+            Xmlns,
+            Version,
+            Id,
+            Rx,
+            Ry,
+            Points,
+            Dx,
+            Dy,
+            Rotate,
+            TextLength,
+            LengthAdjust,
+            Font,
+            FontFamily,
+            FontSize,
+            FontSizeAdjust,
+            FontStretch,
+            FontStyle,
+            FontVariant,
+            FontWeight,
+            Direction,
+            LetterSpacing,
+            TextDecoration,
+            UnicodeBidi,
+            WordSpacing,
+            Character, // not in the hash, just for simple text handling in SvgCharacterNode
+            Tspan,
+            Tref,
+            TextPath,
+            StartOffset,
+            Method,
+            Spacing,
+            TextAlign,
+            PathLength,
+            Type,
+            Class,
+            TextAnchor,
+            XmlSpace,
+            Color,
+            ClipPathNode,
+            ClipPathProperty,
+            Mask,
+            ClipPathUnits,
+            MaskUnits,
+            MaskContentUnits,
+            ClipRule,
+            Marker,
+            MarkerStart,
+            MarkerMid,
+            MarkerEnd,
+            RefX,
+            RefY,
+            MarkerUnits,
+            MarkerWidth,
+            MarkerHeight,
+            Orient,
+            Pattern,
+            PatternUnits,
+            PatternContentUnits,
+            PatternTransform,
+            Opacity,
+            Visibility,
+            Title,
+            Desc,
 
             // AspectRatio and params
-            SVGTokenPreserveAspectRatio,
-            SVGTokenDefer,
-            SVGTokenNone,
-            SVGTokenXMinYMin,
-            SVGTokenXMidYMin,
-            SVGTokenXMaxYMin,
-            SVGTokenXMinYMid,
-            SVGTokenXMidYMid,
-            SVGTokenXMaxYMid,
-            SVGTokenXMinYMax,
-            SVGTokenXMidYMax,
-            SVGTokenXMaxYMax,
-            SVGTokenMeet,
-            SVGTokenSlice,
+            PreserveAspectRatio,
+            Defer,
+            None,
+            XMinYMin,
+            XMidYMin,
+            XMaxYMin,
+            XMinYMid,
+            XMidYMid,
+            XMaxYMid,
+            XMinYMax,
+            XMidYMax,
+            XMaxYMax,
+            Meet,
+            Slice,
 
             // structural elements
-            SVGTokenDefs,
-            SVGTokenG,
-            SVGTokenSvg,
-            SVGTokenSymbol,
-            SVGTokenUse,
-            SVGTokenA,
+            Defs,
+            G,
+            Svg,
+            Symbol,
+            Use,
+            A,
 
             // shape elements
-            SVGTokenCircle,
-            SVGTokenEllipse,
-            SVGTokenLine,
-            SVGTokenPath,
-            SVGTokenPolygon,
-            SVGTokenPolyline,
-            SVGTokenRect,
-            SVGTokenImage,
+            Circle,
+            Ellipse,
+            Line,
+            Path,
+            Polygon,
+            Polyline,
+            Rect,
+            Image,
 
             // gradient elements and tokens
-            SVGTokenLinearGradient,
-            SVGTokenRadialGradient,
-            SVGTokenStop,
-            SVGTokenOffset,
-            SVGTokenX1,
-            SVGTokenY1,
-            SVGTokenX2,
-            SVGTokenY2,
-            SVGTokenCx,
-            SVGTokenCy,
-            SVGTokenFx,
-            SVGTokenFy,
-            SVGTokenR,
-            SVGTokenGradientUnits,
-            SVGTokenGradientTransform,
-            SVGTokenSpreadMethod,
-            SVGTokenXlinkHref,
-            SVGTokenStopColor,
-            SVGTokenStopOpacity,
+            LinearGradient,
+            RadialGradient,
+            Stop,
+            Offset,
+            X1,
+            Y1,
+            X2,
+            Y2,
+            Cx,
+            Cy,
+            Fx,
+            Fy,
+            R,
+            GradientUnits,
+            GradientTransform,
+            SpreadMethod,
+            XlinkHref,
+            StopColor,
+            StopOpacity,
 
             // fill tokens
-            SVGTokenFill,
-            SVGTokenFillOpacity,
-            SVGTokenFillRule,
+            Fill,
+            FillOpacity,
+            FillRule,
 
             // stroke tokens
-            SVGTokenStroke,
-            SVGTokenStrokeDasharray,
-            SVGTokenStrokeDashoffset,
-            SVGTokenStrokeLinecap,
-            SVGTokenStrokeLinejoin,
-            SVGTokenStrokeMiterlimit,
-            SVGTokenStrokeOpacity,
-            SVGTokenStrokeWidth,
+            Stroke,
+            StrokeDasharray,
+            StrokeDashoffset,
+            StrokeLinecap,
+            StrokeLinejoin,
+            StrokeMiterlimit,
+            StrokeOpacity,
+            StrokeWidth,
 
             // text tokens
-            SVGTokenText,
-            SVGTokenBaselineShift,
+            Text,
+            BaselineShift,
 
-            SVGTokenFlowRoot
+            FlowRoot
         };
 
         SVGToken StrToSVGToken(const OUString& rStr, bool bCaseIndependent);
diff --git a/svgio/source/svgreader/svganode.cxx b/svgio/source/svgreader/svganode.cxx
index 35e5e290b4fd..ad4483423100 100644
--- a/svgio/source/svgreader/svganode.cxx
+++ b/svgio/source/svgreader/svganode.cxx
@@ -24,7 +24,7 @@ namespace svgio::svgreader
         SvgANode::SvgANode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenA, rDocument, pParent),
+        :   SvgNode(SVGToken::A, rDocument, pParent),
             maSvgStyleAttributes(*this)
         {
         }
@@ -49,12 +49,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -64,7 +64,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenXlinkHref:
+                case SVGToken::XlinkHref:
                     //TODO: add support for xlink:href
                     break;
                 default:
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index a0ab6d9b08a9..5443fd56067a 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -43,7 +43,7 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenX:
+                case SVGToken::X:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -56,7 +56,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY:
+                case SVGToken::Y:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -69,7 +69,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenDx:
+                case SVGToken::Dx:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -82,7 +82,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenDy:
+                case SVGToken::Dy:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -95,7 +95,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenRotate:
+                case SVGToken::Rotate:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -108,7 +108,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTextLength:
+                case SVGToken::TextLength:
                 {
                     SvgNumber aNum;
 
@@ -121,7 +121,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenLengthAdjust:
+                case SVGToken::LengthAdjust:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -187,7 +187,7 @@ namespace svgio::svgreader
             SvgDocument& rDocument,
             SvgNode* pParent,
             const OUString& rText)
-        :   SvgNode(SVGTokenCharacter, rDocument, pParent),
+        :   SvgNode(SVGToken::Character, rDocument, pParent),
             maText(rText)
         {
         }
diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx
index 2841107492c0..6ba6ded89134 100644
--- a/svgio/source/svgreader/svgcirclenode.cxx
+++ b/svgio/source/svgreader/svgcirclenode.cxx
@@ -27,7 +27,7 @@ namespace svgio::svgreader
         SvgCircleNode::SvgCircleNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenCircle, rDocument, pParent),
+        :   SvgNode(SVGToken::Circle, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maCx(0),
             maCy(0),
@@ -55,12 +55,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenCx:
+                case SVGToken::Cx:
                 {
                     SvgNumber aNum;
 
@@ -70,7 +70,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenCy:
+                case SVGToken::Cy:
                 {
                     SvgNumber aNum;
 
@@ -80,7 +80,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenR:
+                case SVGToken::R:
                 {
                     SvgNumber aNum;
 
@@ -93,7 +93,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx
index e321e6511a07..d5ff52dd97e0 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -31,7 +31,7 @@ namespace svgio::svgreader
         SvgClipPathNode::SvgClipPathNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenClipPathNode, rDocument, pParent),
+        :   SvgNode(SVGToken::ClipPathNode, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maClipPathUnits(userSpaceOnUse)
         {
@@ -57,12 +57,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -72,7 +72,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenClipPathUnits:
+                case SVGToken::ClipPathUnits:
                 {
                     if(!aContent.isEmpty())
                     {
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index 1a44d64ae127..ccc0bc306c8b 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -49,6 +49,9 @@
 
 using namespace com::sun::star;
 
+namespace svgio::svgreader
+{
+
 namespace
 {
     svgio::svgreader::SvgCharacterNode* whiteSpaceHandling(svgio::svgreader::SvgNode const * pNode, svgio::svgreader::SvgCharacterNode* pLast)
@@ -66,7 +69,7 @@ namespace
                 {
                     switch(pCandidate->getType())
                     {
-                        case svgio::svgreader::SVGTokenCharacter:
+                        case SVGToken::Character:
                         {
                             // clean whitespace in text span
                             svgio::svgreader::SvgCharacterNode* pCharNode = static_cast< svgio::svgreader::SvgCharacterNode* >(pCandidate);
@@ -108,9 +111,9 @@ namespace
                             }
                             break;
                         }
-                        case svgio::svgreader::SVGTokenTspan:
-                        case svgio::svgreader::SVGTokenTextPath:
-                        case svgio::svgreader::SVGTokenTref:
+                        case SVGToken::Tspan:
+                        case SVGToken::TextPath:
+                        case SVGToken::Tref:
                         {
                             // recursively clean whitespaces in subhierarchy
                             pLast = whiteSpaceHandling(pCandidate, pLast);
@@ -128,11 +131,8 @@ namespace
 
         return pLast;
     }
-}
+} // end anonymous namespace
 
-
-namespace svgio::svgreader
-{
         SvgDocHdl::SvgDocHdl(const OUString& aAbsolutePath)
         :   maDocument(aAbsolutePath),
             mpTarget(nullptr),
@@ -179,10 +179,10 @@ namespace svgio::svgreader
 
             const SVGToken aSVGToken(StrToSVGToken(aName, false));
 
-            switch(aSVGToken)
+            switch (aSVGToken)
             {
                 /// structural elements
-                case SVGTokenSymbol:
+                case SVGToken::Symbol:
                 {
                     /// new basic node for Symbol. Content gets scanned, but
                     /// will not be decomposed (see SvgNode::decomposeSvgNode and bReferenced)
@@ -190,29 +190,29 @@ namespace svgio::svgreader
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenDefs:
-                case SVGTokenG:
+                case SVGToken::Defs:
+                case SVGToken::G:
                 {
                     /// new node for Defs/G
                     mpTarget = new SvgGNode(aSVGToken, maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenSvg:
+                case SVGToken::Svg:
                 {
                     /// new node for Svg
                     mpTarget = new SvgSvgNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenUse:
+                case SVGToken::Use:
                 {
                     /// new node for Use
                     mpTarget = new SvgUseNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenA:
+                case SVGToken::A:
                 {
                     /// new node for A
                     mpTarget = new SvgANode(maDocument, mpTarget);
@@ -221,56 +221,56 @@ namespace svgio::svgreader
                 }
 
                 /// shape elements
-                case SVGTokenCircle:
+                case SVGToken::Circle:
                 {
                     /// new node for Circle
                     mpTarget = new SvgCircleNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenEllipse:
+                case SVGToken::Ellipse:
                 {
                     /// new node for Ellipse
                     mpTarget = new SvgEllipseNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenLine:
+                case SVGToken::Line:
                 {
                     /// new node for Line
                     mpTarget = new SvgLineNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenPath:
+                case SVGToken::Path:
                 {
                     /// new node for Path
                     mpTarget = new SvgPathNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenPolygon:
+                case SVGToken::Polygon:
                 {
                     /// new node for Polygon
                     mpTarget = new SvgPolyNode(maDocument, mpTarget, false);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenPolyline:
+                case SVGToken::Polyline:
                 {
                     /// new node for Polyline
                     mpTarget = new SvgPolyNode(maDocument, mpTarget, true);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenRect:
+                case SVGToken::Rect:
                 {
                     /// new node for Rect
                     mpTarget = new SvgRectNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenImage:
+                case SVGToken::Image:
                 {
                     /// new node for Image
                     mpTarget = new SvgImageNode(maDocument, mpTarget);
@@ -279,8 +279,8 @@ namespace svgio::svgreader
                 }
 
                 /// title and description
-                case SVGTokenTitle:
-                case SVGTokenDesc:
+                case SVGToken::Title:
+                case SVGToken::Desc:
                 {
                     /// new node for Title and/or Desc
                     mpTarget = new SvgTitleDescNode(aSVGToken, maDocument, mpTarget);
@@ -288,8 +288,8 @@ namespace svgio::svgreader
                 }
 
                 /// gradients
-                case SVGTokenLinearGradient:
-                case SVGTokenRadialGradient:
+                case SVGToken::LinearGradient:
+                case SVGToken::RadialGradient:
                 {
                     mpTarget = new SvgGradientNode(aSVGToken, maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
@@ -297,7 +297,7 @@ namespace svgio::svgreader
                 }
 
                 /// gradient stops
-                case SVGTokenStop:
+                case SVGToken::Stop:
                 {
                     mpTarget = new SvgGradientStopNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
@@ -305,25 +305,25 @@ namespace svgio::svgreader
                 }
 
                 /// text
-                case SVGTokenText:
+                case SVGToken::Text:
                 {
                     mpTarget = new SvgTextNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenTspan:
+                case SVGToken::Tspan:
                 {
                     mpTarget = new SvgTspanNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenTref:
+                case SVGToken::Tref:
                 {
                     mpTarget = new SvgTrefNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenTextPath:
+                case SVGToken::TextPath:
                 {
                     mpTarget = new SvgTextPathNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
@@ -331,7 +331,7 @@ namespace svgio::svgreader
                 }
 
                 /// styles (as stylesheets)
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     SvgStyleNode* pNew = new SvgStyleNode(maDocument, mpTarget);
                     mpTarget = pNew;
@@ -362,14 +362,14 @@ namespace svgio::svgreader
 
                 /// structural elements clip-path and mask. Content gets scanned, but
                 /// will not be decomposed (see SvgNode::decomposeSvgNode and bReferenced)
-                case SVGTokenClipPathNode:
+                case SVGToken::ClipPathNode:
                 {
                     /// new node for ClipPath
                     mpTarget = new SvgClipPathNode(maDocument, mpTarget);
                     mpTarget->parseAttributes(xAttribs);
                     break;
                 }
-                case SVGTokenMask:
+                case SVGToken::Mask:
                 {
                     /// new node for Mask
                     mpTarget = new SvgMaskNode(maDocument, mpTarget);
@@ -378,7 +378,7 @@ namespace svgio::svgreader
                 }
 
                 /// structural element marker
-                case SVGTokenMarker:
+                case SVGToken::Marker:
                 {
                     /// new node for marker
                     mpTarget = new SvgMarkerNode(maDocument, mpTarget);
@@ -387,7 +387,7 @@ namespace svgio::svgreader
                 }
 
                 /// structural element pattern
-                case SVGTokenPattern:
+                case SVGToken::Pattern:
                 {
                     /// new node for pattern
                     mpTarget = new SvgPatternNode(maDocument, mpTarget);
@@ -396,7 +396,7 @@ namespace svgio::svgreader
                 }
 
                 // ignore FlowRoot and child nodes
-                case SVGTokenFlowRoot:
+                case SVGToken::FlowRoot:
                 {
                     bSkip = true;
                     break;
@@ -417,68 +417,68 @@ namespace svgio::svgreader
                 return;
 
             const SVGToken aSVGToken(StrToSVGToken(aName, false));
-            SvgNode* pWhitespaceCheck(SVGTokenText == aSVGToken ? mpTarget : nullptr);
-            SvgStyleNode* pCssStyle(SVGTokenStyle == aSVGToken ? static_cast< SvgStyleNode* >(mpTarget) : nullptr);
-            SvgTitleDescNode* pSvgTitleDescNode(SVGTokenTitle == aSVGToken || SVGTokenDesc == aSVGToken ? static_cast< SvgTitleDescNode* >(mpTarget) : nullptr);
+            SvgNode* pWhitespaceCheck(SVGToken::Text == aSVGToken ? mpTarget : nullptr);
+            SvgStyleNode* pCssStyle(SVGToken::Style == aSVGToken ? static_cast< SvgStyleNode* >(mpTarget) : nullptr);
+            SvgTitleDescNode* pSvgTitleDescNode(SVGToken::Title == aSVGToken || SVGToken::Desc == aSVGToken ? static_cast< SvgTitleDescNode* >(mpTarget) : nullptr);
 
             // if we are in skipping mode and we reach the flowRoot end tag: stop skipping mode
-            if(bSkip && aSVGToken == SVGTokenFlowRoot)
+            if(bSkip && aSVGToken == SVGToken::FlowRoot)
                 bSkip = false;
             // we are in skipping mode: do nothing until we found the flowRoot end tag
             else if(bSkip)
                 return;
 
-            switch(aSVGToken)
+            switch (aSVGToken)
             {
                 /// valid tokens for which a new one was created
 
                 /// structural elements
-                case SVGTokenDefs:
-                case SVGTokenG:
-                case SVGTokenSvg:
-                case SVGTokenSymbol:
-                case SVGTokenUse:
-                case SVGTokenA:
+                case SVGToken::Defs:
+                case SVGToken::G:
+                case SVGToken::Svg:
+                case SVGToken::Symbol:
+                case SVGToken::Use:
+                case SVGToken::A:
 
                 /// shape elements
-                case SVGTokenCircle:
-                case SVGTokenEllipse:
-                case SVGTokenLine:
-                case SVGTokenPath:
-                case SVGTokenPolygon:
-                case SVGTokenPolyline:
-                case SVGTokenRect:
-                case SVGTokenImage:
+                case SVGToken::Circle:
+                case SVGToken::Ellipse:
+                case SVGToken::Line:
+                case SVGToken::Path:
+                case SVGToken::Polygon:
+                case SVGToken::Polyline:
+                case SVGToken::Rect:
+                case SVGToken::Image:
 
                 /// title and description
-                case SVGTokenTitle:
-                case SVGTokenDesc:
+                case SVGToken::Title:
+                case SVGToken::Desc:
 
                 /// gradients
-                case SVGTokenLinearGradient:
-                case SVGTokenRadialGradient:
+                case SVGToken::LinearGradient:
+                case SVGToken::RadialGradient:
 
                 /// gradient stops
-                case SVGTokenStop:
+                case SVGToken::Stop:
 
                 /// text
-                case SVGTokenText:
-                case SVGTokenTspan:
-                case SVGTokenTextPath:
-                case SVGTokenTref:
+                case SVGToken::Text:
+                case SVGToken::Tspan:
+                case SVGToken::TextPath:
+                case SVGToken::Tref:
 
                 /// styles (as stylesheets)
-                case SVGTokenStyle:
+                case SVGToken::Style:
 
                 /// structural elements clip-path and mask
-                case SVGTokenClipPathNode:
-                case SVGTokenMask:
+                case SVGToken::ClipPathNode:
+                case SVGToken::Mask:
 
                 /// structural element marker
-                case SVGTokenMarker:
+                case SVGToken::Marker:
 
                 /// structural element pattern
-                case SVGTokenPattern:
+                case SVGToken::Pattern:
 
                 /// content handling after parsing
                 {
@@ -510,7 +510,7 @@ namespace svgio::svgreader
 
                 if(!aText.isEmpty())
                 {
-                    if(SVGTokenTitle == aSVGToken)
+                    if(SVGToken::Title == aSVGToken)
                     {
                         mpTarget->parseAttribute(getStrTitle(), aSVGToken, aText);
                     }
@@ -561,9 +561,9 @@ namespace svgio::svgreader
 
             switch(mpTarget->getType())
             {
-                case SVGTokenText:
-                case SVGTokenTspan:
-                case SVGTokenTextPath:
+                case SVGToken::Text:
+                case SVGToken::Tspan:
+                case SVGToken::TextPath:
                 {
                     const auto& rChilds = mpTarget->getChildren();
                     SvgCharacterNode* pTarget = nullptr;
@@ -586,7 +586,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     SvgStyleNode& rSvgStyleNode = static_cast< SvgStyleNode& >(*mpTarget);
 
@@ -610,8 +610,8 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTitle:
-                case SVGTokenDesc:
+                case SVGToken::Title:
+                case SVGToken::Desc:
                 {
                     SvgTitleDescNode& rSvgTitleDescNode = static_cast< SvgTitleDescNode& >(*mpTarget);
 
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx
index 6e05a418fa0c..4e83e010d3c7 100644
--- a/svgio/source/svgreader/svgellipsenode.cxx
+++ b/svgio/source/svgreader/svgellipsenode.cxx
@@ -27,7 +27,7 @@ namespace svgio::svgreader
         SvgEllipseNode::SvgEllipseNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenEllipse, rDocument, pParent),
+        :   SvgNode(SVGToken::Ellipse, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maCx(0),
             maCy(0),
@@ -56,12 +56,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenCx:
+                case SVGToken::Cx:
                 {
                     SvgNumber aNum;
 
@@ -71,7 +71,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenCy:
+                case SVGToken::Cy:
                 {
                     SvgNumber aNum;
 
@@ -81,7 +81,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenRx:
+                case SVGToken::Rx:
                 {
                     SvgNumber aNum;
 
@@ -94,7 +94,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenRy:
+                case SVGToken::Ry:
                 {
                     SvgNumber aNum;
 
@@ -107,7 +107,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx
index 56c06644184b..1d32de448517 100644
--- a/svgio/source/svgreader/svggnode.cxx
+++ b/svgio/source/svgreader/svggnode.cxx
@@ -29,7 +29,7 @@ namespace svgio::svgreader
         :   SvgNode(aType, rDocument, pParent),
             maSvgStyleAttributes(*this)
         {
-            OSL_ENSURE(aType == SVGTokenDefs || aType == SVGTokenG, "SvgGNode should only be used for Group and Defs (!)");
+            OSL_ENSURE(aType == SVGToken::Defs || aType == SVGToken::G, "SvgGNode should only be used for Group and Defs (!)");
         }
 
         SvgGNode::~SvgGNode()
@@ -38,14 +38,14 @@ namespace svgio::svgreader
 
         const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const
         {
-            if (SVGTokenDefs == getType())
+            if (SVGToken::Defs == getType())
             {
                 // tdf#98599 attributes may be inherit by the children, therefore read them
                 return checkForCssStyle("defs", maSvgStyleAttributes);
             }
             else
             {
-                // #i125258# for SVGTokenG take CssStyles into account
+                // #i125258# for SVGToken::G take CssStyles into account
                 return checkForCssStyle("g", maSvgStyleAttributes);
             }
         }
@@ -61,12 +61,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -85,7 +85,7 @@ namespace svgio::svgreader
 
         void SvgGNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool bReferenced) const
         {
-            if(SVGTokenDefs == getType())
+            if(SVGToken::Defs == getType())
             {
                 // #i125258# no decompose needed for defs element, call parent for SVGTokenDefs
                 SvgNode::decomposeSvgNode(rTarget, bReferenced);
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx
index 639467b929fe..a35ebb76504c 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -52,7 +52,7 @@ namespace svgio::svgreader
             maXLink(),
             mpXLink(nullptr)
         {
-            OSL_ENSURE(aType == SVGTokenLinearGradient || aType == SVGTokenRadialGradient, "SvgGradientNode should only be used for Linear and Radial gradient (!)");
+            OSL_ENSURE(aType == SVGToken::LinearGradient || aType == SVGToken::RadialGradient, "SvgGradientNode should only be used for Linear and Radial gradient (!)");
         }
 
         SvgGradientNode::~SvgGradientNode()
@@ -63,7 +63,7 @@ namespace svgio::svgreader
         const SvgStyleAttributes* SvgGradientNode::getSvgStyleAttributes() const
         {
             return checkForCssStyle(
-                SVGTokenLinearGradient == getType() ? OUString("linearGradient") : OUString("radialGradient"),
+                SVGToken::LinearGradient == getType() ? OUString("linearGradient") : OUString("radialGradient"),
                 maSvgStyleAttributes);
         }
 
@@ -78,12 +78,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenX1:
+                case SVGToken::X1:
                 {
                     SvgNumber aNum;
 
@@ -93,7 +93,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY1:
+                case SVGToken::Y1:
                 {
                     SvgNumber aNum;
 
@@ -103,7 +103,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenX2:
+                case SVGToken::X2:
                 {
                     SvgNumber aNum;
 
@@ -113,7 +113,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY2:
+                case SVGToken::Y2:
                 {
                     SvgNumber aNum;
 
@@ -123,7 +123,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenCx:
+                case SVGToken::Cx:
                 {
                     SvgNumber aNum;
 
@@ -133,7 +133,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenCy:
+                case SVGToken::Cy:
                 {
                     SvgNumber aNum;
 
@@ -143,7 +143,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFx:
+                case SVGToken::Fx:
                 {
                     SvgNumber aNum;
 
@@ -153,7 +153,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFy:
+                case SVGToken::Fy:
                 {
                     SvgNumber aNum;
 
@@ -163,7 +163,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenR:
+                case SVGToken::R:
                 {
                     SvgNumber aNum;
 
@@ -176,7 +176,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenGradientUnits:
+                case SVGToken::GradientUnits:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -191,7 +191,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenSpreadMethod:
+                case SVGToken::SpreadMethod:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -210,7 +210,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenGradientTransform:
+                case SVGToken::GradientTransform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -220,7 +220,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenXlinkHref:
+                case SVGToken::XlinkHref:
                 {
                     const sal_Int32 nLen(aContent.getLength());
 
diff --git a/svgio/source/svgreader/svggradientstopnode.cxx b/svgio/source/svgreader/svggradientstopnode.cxx
index f271cddc83c3..980333576e92 100644
--- a/svgio/source/svgreader/svggradientstopnode.cxx
+++ b/svgio/source/svgreader/svggradientstopnode.cxx
@@ -24,7 +24,7 @@ namespace svgio::svgreader
         SvgGradientStopNode::SvgGradientStopNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenStop, rDocument, pParent),
+        :   SvgNode(SVGToken::Stop, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maOffset()
         {
@@ -50,12 +50,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenOffset:
+                case SVGToken::Offset:
                 {
                     SvgNumber aNum;
 
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 1af8b20d2bde..e1ed24faf36a 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -39,7 +39,7 @@ namespace svgio::svgreader
         SvgImageNode::SvgImageNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenRect, rDocument, pParent),
+        :   SvgNode(SVGToken::Rect, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maSvgAspectRatio(),
             maX(0),
@@ -73,17 +73,17 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenPreserveAspectRatio:
+                case SVGToken::PreserveAspectRatio:
                 {
                     maSvgAspectRatio = readSvgAspectRatio(aContent);
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -93,7 +93,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenX:
+                case SVGToken::X:
                 {
                     SvgNumber aNum;
 
@@ -103,7 +103,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY:
+                case SVGToken::Y:
                 {
                     SvgNumber aNum;
 
@@ -113,7 +113,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenWidth:
+                case SVGToken::Width:
                 {
                     SvgNumber aNum;
 
@@ -126,7 +126,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenHeight:
+                case SVGToken::Height:
                 {
                     SvgNumber aNum;
 
@@ -139,7 +139,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenXlinkHref:
+                case SVGToken::XlinkHref:
                 {
                     const sal_Int32 nLen(aContent.getLength());
 
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx
index e0064764017d..155da1ee9a2d 100644
--- a/svgio/source/svgreader/svglinenode.cxx
+++ b/svgio/source/svgreader/svglinenode.cxx
@@ -26,7 +26,7 @@ namespace svgio::svgreader
         SvgLineNode::SvgLineNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenLine, rDocument, pParent),
+        :   SvgNode(SVGToken::Line, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maX1(0),
             maY1(0),
@@ -55,12 +55,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenX1:
+                case SVGToken::X1:
                 {
                     SvgNumber aNum;
 
@@ -70,7 +70,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY1:
+                case SVGToken::Y1:
                 {
                     SvgNumber aNum;
 
@@ -80,7 +80,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenX2:
+                case SVGToken::X2:
                 {
                     SvgNumber aNum;
 
@@ -90,7 +90,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY2:
+                case SVGToken::Y2:
                 {
                     SvgNumber aNum;
 
@@ -100,7 +100,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx
index 89375c75691a..f69584553198 100644
--- a/svgio/source/svgreader/svgmarkernode.cxx
+++ b/svgio/source/svgreader/svgmarkernode.cxx
@@ -24,7 +24,7 @@ namespace svgio::svgreader
         SvgMarkerNode::SvgMarkerNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenMarker, rDocument, pParent),
+        :   SvgNode(SVGToken::Marker, rDocument, pParent),
             aPrimitives(),
             maSvgStyleAttributes(*this),
             maSvgAspectRatio(),
@@ -58,12 +58,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenViewBox:
+                case SVGToken::ViewBox:
                 {
                     const basegfx::B2DRange aRange(readViewBox(aContent, *this));
 
@@ -73,12 +73,12 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPreserveAspectRatio:
+                case SVGToken::PreserveAspectRatio:
                 {
                     maSvgAspectRatio = readSvgAspectRatio(aContent);
                     break;
                 }
-                case SVGTokenRefX:
+                case SVGToken::RefX:
                 {
                     SvgNumber aNum;
 
@@ -88,7 +88,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenRefY:
+                case SVGToken::RefY:
                 {
                     SvgNumber aNum;
 
@@ -98,7 +98,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMarkerUnits:
+                case SVGToken::MarkerUnits:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -113,7 +113,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMarkerWidth:
+                case SVGToken::MarkerWidth:
                 {
                     SvgNumber aNum;
 
@@ -126,7 +126,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMarkerHeight:
+                case SVGToken::MarkerHeight:
                 {
                     SvgNumber aNum;
 
@@ -139,7 +139,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenOrient:
+                case SVGToken::Orient:
                 {
                     const sal_Int32 nLen(aContent.getLength());
 
diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx
index 543b8eede681..e5573a77928a 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -32,7 +32,7 @@ namespace svgio::svgreader
         SvgMaskNode::SvgMaskNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenMask, rDocument, pParent),
+        :   SvgNode(SVGToken::Mask, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maX(SvgNumber(-10.0, Unit_percent, true)),
             maY(SvgNumber(-10.0, Unit_percent, true)),
@@ -63,12 +63,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenX:
+                case SVGToken::X:
                 {
                     SvgNumber aNum;
 
@@ -78,7 +78,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY:
+                case SVGToken::Y:
                 {
                     SvgNumber aNum;
 
@@ -88,7 +88,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenWidth:
+                case SVGToken::Width:
                 {
                     SvgNumber aNum;
 
@@ -101,7 +101,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenHeight:
+                case SVGToken::Height:
                 {
                     SvgNumber aNum;
 
@@ -114,7 +114,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -124,7 +124,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMaskUnits:
+                case SVGToken::MaskUnits:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -139,7 +139,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMaskContentUnits:
+                case SVGToken::MaskContentUnits:
                 {
                     if(!aContent.isEmpty())
                     {
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index 0d8b5c68a0a2..82cd4d6d8014 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -193,7 +193,7 @@ namespace svgio::svgreader
             // meaning its parent is <svg>
             const SvgNode* pParent = this->getParent();
 
-            if(pParent && pParent->getType() == SVGTokenSvg)
+            if(pParent && pParent->getType() == SVGToken::Svg)
             {
                 // #i125329# find Css selector '*', add as last element if found
                 const SvgStyleAttributes* pNew = getDocument().findGlobalCssStyleAttributes("*");
@@ -274,7 +274,7 @@ namespace svgio::svgreader
             mbDecomposing(false),
             mbCssStyleVectorBuilt(false)
         {
-            OSL_ENSURE(SVGTokenUnknown != maType, "SvgNode with unknown type created (!)");
+            OSL_ENSURE(SVGToken::Unknown != maType, "SvgNode with unknown type created (!)");
 
             if(pParent)
             {
@@ -283,7 +283,7 @@ namespace svgio::svgreader
             else
             {
 #ifdef DBG_UTIL
-                if(SVGTokenSvg != getType())
+                if(SVGToken::Svg != getType())
                 {
                     OSL_ENSURE(false, "No parent for this node (!)");
                 }
@@ -421,7 +421,7 @@ namespace svgio::svgreader
         {
             switch(aSVGToken)
             {
-                case SVGTokenId:
+                case SVGToken::Id:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -429,7 +429,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenClass:
+                case SVGToken::Class:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -437,7 +437,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenXmlSpace:
+                case SVGToken::XmlSpace:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -452,7 +452,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenDisplay:
+                case SVGToken::Display:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -479,12 +479,12 @@ namespace svgio::svgreader
 
             if(!bReferenced)
             {
-                if(SVGTokenDefs == getType() ||
-                    SVGTokenSymbol == getType() ||
-                    SVGTokenClipPathNode == getType() ||
-                    SVGTokenMask == getType() ||
-                    SVGTokenMarker == getType() ||
-                    SVGTokenPattern == getType())
+                if(SVGToken::Defs == getType() ||
+                    SVGToken::Symbol == getType() ||
+                    SVGToken::ClipPathNode == getType() ||
+                    SVGToken::Mask == getType() ||
+                    SVGToken::Marker == getType() ||
+                    SVGToken::Pattern == getType())
                 {
                     // do not decompose defs or symbol nodes (these hold only style-like
                     // objects which may be used by referencing them) except when doing
@@ -555,7 +555,7 @@ namespace svgio::svgreader
                         OUString aObjectName;
 
                         // use path as object name when outmost element
-                        if(SVGTokenSvg == getType())
+                        if (SVGToken::Svg == getType())
                         {
                             aObjectName = getDocument().getAbsolutePath();
 
diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx
index 4aaca4e8d620..773f34f2cf4d 100644
--- a/svgio/source/svgreader/svgpathnode.cxx
+++ b/svgio/source/svgreader/svgpathnode.cxx
@@ -25,7 +25,7 @@ namespace svgio::svgreader
         SvgPathNode::SvgPathNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenPath, rDocument, pParent),
+        :   SvgNode(SVGToken::Path, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maPathLength()
         {
@@ -51,12 +51,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenD:
+                case SVGToken::D:
                 {
                     basegfx::B2DPolyPolygon aPath;
 
@@ -69,7 +69,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -79,7 +79,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPathLength:
+                case SVGToken::PathLength:
                 {
                     SvgNumber aNum;
 
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index 3e7402cb07a3..1aea78255108 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -33,7 +33,7 @@ namespace svgio::svgreader
         SvgPatternNode::SvgPatternNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenPattern, rDocument, pParent),
+        :   SvgNode(SVGToken::Pattern, rDocument, pParent),
             aPrimitives(),
             maSvgStyleAttributes(*this),
             maSvgAspectRatio(),
@@ -67,12 +67,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenViewBox:
+                case SVGToken::ViewBox:
                 {
                     const basegfx::B2DRange aRange(readViewBox(aContent, *this));
 
@@ -82,12 +82,12 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPreserveAspectRatio:
+                case SVGToken::PreserveAspectRatio:
                 {
                     maSvgAspectRatio = readSvgAspectRatio(aContent);
                     break;
                 }
-                case SVGTokenX:
+                case SVGToken::X:
                 {
                     SvgNumber aNum;
 
@@ -97,7 +97,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY:
+                case SVGToken::Y:
                 {
                     SvgNumber aNum;
 
@@ -107,7 +107,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenWidth:
+                case SVGToken::Width:
                 {
                     SvgNumber aNum;
 
@@ -120,7 +120,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenHeight:
+                case SVGToken::Height:
                 {
                     SvgNumber aNum;
 
@@ -133,7 +133,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPatternUnits:
+                case SVGToken::PatternUnits:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -148,7 +148,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPatternContentUnits:
+                case SVGToken::PatternContentUnits:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -163,7 +163,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPatternTransform:
+                case SVGToken::PatternTransform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -173,7 +173,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenXlinkHref:
+                case SVGToken::XlinkHref:
                 {
                     const sal_Int32 nLen(aContent.getLength());
 
diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx
index 86cbe164ff7f..d7bcb0f07330 100644
--- a/svgio/source/svgreader/svgpolynode.cxx
+++ b/svgio/source/svgreader/svgpolynode.cxx
@@ -28,7 +28,7 @@ namespace svgio::svgreader
             SvgDocument& rDocument,
             SvgNode* pParent,
             bool bIsPolyline)
-        :   SvgNode(SVGTokenPolygon, rDocument, pParent),
+        :   SvgNode(SVGToken::Polygon, rDocument, pParent),
             maSvgStyleAttributes(*this),
             mbIsPolyline(bIsPolyline)
         {
@@ -54,12 +54,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenPoints:
+                case SVGToken::Points:
                 {
                     basegfx::B2DPolygon aPath;
 
@@ -77,7 +77,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx
index 8b26bb5035d1..03018fbd1d34 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -27,7 +27,7 @@ namespace svgio::svgreader
         SvgRectNode::SvgRectNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenRect, rDocument, pParent),
+        :   SvgNode(SVGToken::Rect, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maX(0),
             maY(0),
@@ -58,12 +58,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenX:
+                case SVGToken::X:
                 {
                     SvgNumber aNum;
 
@@ -73,7 +73,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY:
+                case SVGToken::Y:
                 {
                     SvgNumber aNum;
 
@@ -83,7 +83,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenWidth:
+                case SVGToken::Width:
                 {
                     SvgNumber aNum;
 
@@ -96,7 +96,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenHeight:
+                case SVGToken::Height:
                 {
                     SvgNumber aNum;
 
@@ -109,7 +109,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenRx:
+                case SVGToken::Rx:
                 {
                     SvgNumber aNum;
 
@@ -122,7 +122,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenRy:
+                case SVGToken::Ry:
                 {
                     SvgNumber aNum;
 
@@ -135,7 +135,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 2c24c4b9acc5..cfc6381e8d0d 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -361,7 +361,7 @@ namespace svgio::svgreader
                 aGeoToUnit.scale(1.0 / rGeoRange.getWidth(), 1.0 / rGeoRange.getHeight());
             }
 
-            if(SVGTokenLinearGradient == rFillGradient.getType())
+            if(SVGToken::LinearGradient == rFillGradient.getType())
             {
                 basegfx::B2DPoint aStart(0.0, 0.0);
                 basegfx::B2DPoint aEnd(1.0, 0.0);
@@ -914,7 +914,7 @@ namespace svgio::svgreader
 
             // remember prepared marker; pStart, pMid and pEnd may all be equal when
             // only 'marker' was used instead of 'marker-start', 'marker-mid' or 'marker-end',
-            // see 'case SVGTokenMarker' in this file; thus in this case only one common
+            // see 'case SVGToken::Marker' in this file; thus in this case only one common
             // marker in primitive form will be prepared
             const SvgMarkerNode* pPrepared = nullptr;
 
@@ -1116,7 +1116,7 @@ namespace svgio::svgreader
             {
                 // create fill
                 basegfx::B2DPolyPolygon aPath(rPath);
-                const bool bNeedToCheckClipRule(SVGTokenPath == mrOwner.getType() || SVGTokenPolygon == mrOwner.getType());
+                const bool bNeedToCheckClipRule(SVGToken::Path == mrOwner.getType() || SVGToken::Polygon == mrOwner.getType());
                 const bool bClipPathIsNonzero(bNeedToCheckClipRule && mbIsClipPathContent && FillRule_nonzero == maClipRule);
                 const bool bFillRuleIsNonzero(bNeedToCheckClipRule && !mbIsClipPathContent && FillRule_nonzero == getFillRule());
 
@@ -1137,9 +1137,9 @@ namespace svgio::svgreader
             add_stroke(rPath, rTarget, aGeoRange);
 
             // Svg supports markers for path, polygon, polyline and line
-            if(SVGTokenPath == mrOwner.getType() ||         // path
-                SVGTokenPolygon == mrOwner.getType() ||     // polygon, polyline
-                SVGTokenLine == mrOwner.getType())          // line
+            if(SVGToken::Path == mrOwner.getType() ||         // path
+                SVGToken::Polygon == mrOwner.getType() ||     // polygon, polyline
+                SVGToken::Line == mrOwner.getType())          // line
             {
                 // try to add markers
                 add_markers(rPath, rTarget, pHelpPointIndices);
@@ -1213,7 +1213,7 @@ namespace svgio::svgreader
             // class="Page" set, has a parent that also is a GroupNode
             // at which class="Slide" is set.
             // Multiple Slides/Pages are possible for Draw and Impress.
-            if(SVGTokenG == mrOwner.getType() && mrOwner.getClass())
+            if(SVGToken::G == mrOwner.getType() && mrOwner.getClass())
             {
                 const OUString aOwnerClass(*mrOwner.getClass());
 
@@ -1221,7 +1221,7 @@ namespace svgio::svgreader
                 {
                     const SvgNode* pParent(mrOwner.getParent());
 
-                    if(nullptr != pParent && SVGTokenG == pParent->getType() && pParent->getClass())
+                    if(nullptr != pParent && SVGToken::G == pParent->getType() && pParent->getClass())
                     {
                         const OUString aParentClass(*pParent->getClass());
 
@@ -1290,7 +1290,7 @@ namespace svgio::svgreader
             maBaselineShift(BaselineShift_Baseline),
             maBaselineShiftNumber(0),
             maResolvingParent(30, 0),
-            mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()),
+            mbIsClipPathContent(SVGToken::ClipPathNode == mrOwner.getType()),
             mbStrokeDasharraySet(false)
         {
             const SvgStyleAttributes* pParentStyle = getParentStyle();
@@ -1314,7 +1314,7 @@ namespace svgio::svgreader
         {
             switch(aSVGToken)
             {
-                case SVGTokenFill:
+                case SVGToken::Fill:
                 {
                     SvgPaint aSvgPaint;
                     OUString aURL;
@@ -1334,7 +1334,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFillOpacity:
+                case SVGToken::FillOpacity:
                 {
                     SvgNumber aNum;
 
@@ -1344,7 +1344,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFillRule:
+                case SVGToken::FillRule:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1359,7 +1359,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStroke:
+                case SVGToken::Stroke:
                 {
                     SvgPaint aSvgPaint;
                     OUString aURL;
@@ -1379,7 +1379,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeDasharray:
+                case SVGToken::StrokeDasharray:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1400,7 +1400,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeDashoffset:
+                case SVGToken::StrokeDashoffset:
                 {
                     SvgNumber aNum;
 
@@ -1413,7 +1413,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeLinecap:
+                case SVGToken::StrokeLinecap:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1432,7 +1432,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeLinejoin:
+                case SVGToken::StrokeLinejoin:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1451,7 +1451,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeMiterlimit:
+                case SVGToken::StrokeMiterlimit:
                 {
                     SvgNumber aNum;
 
@@ -1464,7 +1464,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeOpacity:
+                case SVGToken::StrokeOpacity:
                 {
 
                     SvgNumber aNum;
@@ -1475,7 +1475,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStrokeWidth:
+                case SVGToken::StrokeWidth:
                 {
                     SvgNumber aNum;
 
@@ -1488,7 +1488,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStopColor:
+                case SVGToken::StopColor:
                 {
                     SvgPaint aSvgPaint;
                     OUString aURL;
@@ -1504,7 +1504,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenStopOpacity:
+                case SVGToken::StopOpacity:
                 {
                     SvgNumber aNum;
 
@@ -1517,11 +1517,11 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFont:
+                case SVGToken::Font:
                 {
                     break;
                 }
-                case SVGTokenFontFamily:
+                case SVGToken::FontFamily:
                 {
                     SvgStringVector aSvgStringVector;
 
@@ -1531,7 +1531,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFontSize:
+                case SVGToken::FontSize:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1587,11 +1587,11 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFontSizeAdjust:
+                case SVGToken::FontSizeAdjust:
                 {
                     break;
                 }
-                case SVGTokenFontStretch:
+                case SVGToken::FontStretch:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1642,7 +1642,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFontStyle:
+                case SVGToken::FontStyle:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1661,11 +1661,11 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenFontVariant:
+                case SVGToken::FontVariant:
                 {
                     break;
                 }
-                case SVGTokenFontWeight:
+                case SVGToken::FontWeight:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1716,15 +1716,15 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenDirection:
+                case SVGToken::Direction:
                 {
                     break;
                 }
-                case SVGTokenLetterSpacing:
+                case SVGToken::LetterSpacing:
                 {
                     break;
                 }
-                case SVGTokenTextDecoration:
+                case SVGToken::TextDecoration:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1751,15 +1751,15 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenUnicodeBidi:
+                case SVGToken::UnicodeBidi:
                 {
                     break;
                 }
-                case SVGTokenWordSpacing:
+                case SVGToken::WordSpacing:
                 {
                     break;
                 }
-                case SVGTokenTextAnchor:
+                case SVGToken::TextAnchor:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1778,7 +1778,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTextAlign:
+                case SVGToken::TextAlign:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1801,7 +1801,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenColor:
+                case SVGToken::Color:
                 {
                     SvgPaint aSvgPaint;
                     OUString aURL;
@@ -1817,7 +1817,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenOpacity:
+                case SVGToken::Opacity:
                 {
                     SvgNumber aNum;
 
@@ -1827,7 +1827,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenVisibility:
+                case SVGToken::Visibility:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1850,27 +1850,27 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTitle:
+                case SVGToken::Title:
                 {
                     maTitle = aContent;
                     break;
                 }
-                case SVGTokenDesc:
+                case SVGToken::Desc:
                 {
                     maDesc = aContent;
                     break;
                 }
-                case SVGTokenClipPathProperty:
+                case SVGToken::ClipPathProperty:
                 {
                     readLocalUrl(aContent, maClipPathXLink);
                     break;
                 }
-                case SVGTokenMask:
+                case SVGToken::Mask:
                 {
                     readLocalUrl(aContent, maMaskXLink);
                     break;
                 }
-                case SVGTokenClipRule:
+                case SVGToken::ClipRule:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -1885,7 +1885,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMarker:
+                case SVGToken::Marker:
                 {
                     if(bCaseIndependent)
                     {
@@ -1894,22 +1894,22 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMarkerStart:
+                case SVGToken::MarkerStart:
                 {
                     readLocalUrl(aContent, maMarkerStartXLink);
                     break;
                 }
-                case SVGTokenMarkerMid:
+                case SVGToken::MarkerMid:
                 {
                     readLocalUrl(aContent, maMarkerMidXLink);
                     break;
                 }
-                case SVGTokenMarkerEnd:
+                case SVGToken::MarkerEnd:
                 {
                     readLocalUrl(aContent, maMarkerEndXLink);
                     break;
                 }
-                case SVGTokenDisplay:
+                case SVGToken::Display:
                 {
                     // There may be display:none statements inside of style defines, e.g. the following line:
                     // style="display:none"
@@ -1921,7 +1921,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenBaselineShift:
+                case SVGToken::BaselineShift:
                 {
                     if(!aContent.isEmpty())
                     {
@@ -2097,7 +2097,7 @@ namespace svgio::svgreader
 
                     if(pNode)
                     {
-                        if(SVGTokenLinearGradient == pNode->getType() || SVGTokenRadialGradient == pNode->getType())
+                        if(SVGToken::LinearGradient == pNode->getType() || SVGToken::RadialGradient == pNode->getType())
                         {
                             return static_cast< const SvgGradientNode* >(pNode);
                         }
@@ -2127,7 +2127,7 @@ namespace svgio::svgreader
 
                     if(pNode)
                     {
-                        if(SVGTokenLinearGradient == pNode->getType() || SVGTokenRadialGradient  == pNode->getType())
+                        if(SVGToken::LinearGradient == pNode->getType() || SVGToken::RadialGradient  == pNode->getType())
                         {
                             return static_cast< const SvgGradientNode* >(pNode);
                         }
@@ -2158,7 +2158,7 @@ namespace svgio::svgreader
 
                     if(pNode)
                     {
-                        if(SVGTokenPattern == pNode->getType())
+                        if(SVGToken::Pattern == pNode->getType())
                         {
                             return static_cast< const SvgPatternNode* >(pNode);
                         }
@@ -2189,7 +2189,7 @@ namespace svgio::svgreader
 
                     if(pNode)
                     {
-                        if(SVGTokenPattern == pNode->getType())
+                        if(SVGToken::Pattern == pNode->getType())
                         {
                             return static_cast< const SvgPatternNode* >(pNode);
                         }
@@ -2311,19 +2311,19 @@ namespace svgio::svgreader
             // single slides into <g visibility="hidden">. Not sure why
             // this happens, but this leads (correctly) to empty imported
             // Graphics.
-            // Thus, if Visibility_hidden is active and owner is a SVGTokenG
-            // and it's parent is also a SVGTokenG and it has a Class 'SlideGroup'
+            // Thus, if Visibility_hidden is active and owner is a SVGToken::G
+            // and it's parent is also a SVGToken::G and it has a Class 'SlideGroup'
             // set, check if we are an Impress export.
             // We are an Impress export if an SVG-Node titled 'ooo:meta_slides'
             // exists.
             // All together gives:
             if(Visibility_hidden == maVisibility
-                && SVGTokenG == mrOwner.getType()
+                && SVGToken::G == mrOwner.getType()
                 && nullptr != mrOwner.getDocument().findSvgNodeById("ooo:meta_slides"))
             {
                 const SvgNode* pParent(mrOwner.getParent());
 
-                if(nullptr != pParent && SVGTokenG == pParent->getType() && pParent->getClass())
+                if(nullptr != pParent && SVGToken::G == pParent->getType() && pParent->getClass())
                 {
                     const OUString aClass(*pParent->getClass());
 
diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx
index dfb6fdd23142..d9a335fede12 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -26,7 +26,7 @@ namespace svgio::svgreader
         SvgStyleNode::SvgStyleNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenStyle, rDocument, pParent),
+        :   SvgNode(SVGToken::Style, rDocument, pParent),
             maSvgStyleAttributes(),
             mbTextCss(false)
         {
@@ -62,7 +62,7 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenType:
+                case SVGToken::Type:
                 {
                     if(!aContent.isEmpty())
                     {
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 65a1d09b8bdf..d071c1aed87b 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -33,7 +33,7 @@ namespace svgio::svgreader
         SvgSvgNode::SvgSvgNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenSvg, rDocument, pParent),
+        :   SvgNode(SVGToken::Svg, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maSvgAspectRatio(),
             maX(),
@@ -123,12 +123,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenViewBox:
+                case SVGToken::ViewBox:
                 {
                     const basegfx::B2DRange aRange(readViewBox(aContent, *this));
 
@@ -138,12 +138,12 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenPreserveAspectRatio:
+                case SVGToken::PreserveAspectRatio:
                 {
                     maSvgAspectRatio = readSvgAspectRatio(aContent);
                     break;
                 }
-                case SVGTokenX:
+                case SVGToken::X:
                 {
                     SvgNumber aNum;
 
@@ -153,7 +153,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenY:
+                case SVGToken::Y:
                 {
                     SvgNumber aNum;
 
@@ -163,7 +163,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenWidth:
+                case SVGToken::Width:
                 {
                     SvgNumber aNum;
 
@@ -176,7 +176,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenHeight:
+                case SVGToken::Height:
                 {
                     SvgNumber aNum;
 
@@ -189,7 +189,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenVersion:
+                case SVGToken::Version:
                 {
                     SvgNumber aNum;
 
diff --git a/svgio/source/svgreader/svgsymbolnode.cxx b/svgio/source/svgreader/svgsymbolnode.cxx
index 6de296b8e0d3..c7a61217d0f5 100644
--- a/svgio/source/svgreader/svgsymbolnode.cxx
+++ b/svgio/source/svgreader/svgsymbolnode.cxx
@@ -24,7 +24,7 @@ namespace svgio::svgreader
         SvgSymbolNode::SvgSymbolNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenSvg, rDocument, pParent),
+        :   SvgNode(SVGToken::Svg, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maSvgAspectRatio()
         {
@@ -50,17 +50,17 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenViewBox:
+                case SVGToken::ViewBox:
                 {
                     readViewBox(aContent, *this);
                     break;
                 }
-                case SVGTokenPreserveAspectRatio:
+                case SVGToken::PreserveAspectRatio:
                 {
                     maSvgAspectRatio = readSvgAspectRatio(aContent);
                     break;
diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx
index 202c7ef83371..ee096712969a 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -30,7 +30,7 @@ namespace svgio::svgreader
         SvgTextNode::SvgTextNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenText, rDocument, pParent),
+        :   SvgNode(SVGToken::Text, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maSvgTextPositions()
         {
@@ -59,12 +59,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenTransform:
+                case SVGToken::Transform:
                 {
                     const basegfx::B2DHomMatrix aMatrix(readTransform(aContent, *this));
 
@@ -108,14 +108,14 @@ namespace svgio::svgreader
         {
             switch(rCandidate.getType())
             {
-                case SVGTokenCharacter:
+                case SVGToken::Character:
                 {
                     // direct SvgTextPathNode derivates, decompose them
                     const SvgCharacterNode& rSvgCharacterNode = static_cast< const SvgCharacterNode& >(rCandidate);
                     rSvgCharacterNode.decomposeText(rTarget, rSvgTextPosition);
                     break;
                 }
-                case SVGTokenTextPath:
+                case SVGToken::TextPath:
                 {
                     // direct TextPath decompose
                     const SvgTextPathNode& rSvgTextPathNode = static_cast< const SvgTextPathNode& >(rCandidate);
@@ -151,7 +151,7 @@ namespace svgio::svgreader
 
                     break;
                 }
-                case SVGTokenTspan:
+                case SVGToken::Tspan:
                 {
                     // Tspan may have children, call recursively
                     const SvgTspanNode& rSvgTspanNode = static_cast< const SvgTspanNode& >(rCandidate);
@@ -177,7 +177,7 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenTref:
+                case SVGToken::Tref:
                 {
                     const SvgTrefNode& rSvgTrefNode = static_cast< const SvgTrefNode& >(rCandidate);
                     const SvgTextNode* pRefText = rSvgTrefNode.getReferencedSvgTextNode();
@@ -218,8 +218,8 @@ namespace svgio::svgreader
 
         void SvgTextNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer& rTarget, bool /*bReferenced`*/) const
         {
-            // text has a group of child nodes, allowed are SVGTokenCharacter, SVGTokenTspan,
-            // SVGTokenTref and SVGTokenTextPath. These increase a given current text position
+            // text has a group of child nodes, allowed are SVGToken::Character, SVGToken::Tspan,
+            // SVGToken::Tref and SVGToken::TextPath. These increase a given current text position
             const SvgStyleAttributes* pStyle = getSvgStyleAttributes();
 
             if(!pStyle || getChildren().empty())
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index 7793e2634e5a..46b749434c95 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -241,7 +241,7 @@ namespace svgio::svgreader
         SvgTextPathNode::SvgTextPathNode(
             SvgDocument& rDocument,
             SvgNode* pParent)
-        :   SvgNode(SVGTokenTextPath, rDocument, pParent),
+        :   SvgNode(SVGToken::TextPath, rDocument, pParent),
             maSvgStyleAttributes(*this),
             maXLink(),
             maStartOffset()
@@ -268,12 +268,12 @@ namespace svgio::svgreader
             // parse own
             switch(aSVGToken)
             {
-                case SVGTokenStyle:
+                case SVGToken::Style:
                 {
                     readLocalCssStyle(aContent);
                     break;
                 }
-                case SVGTokenStartOffset:
+                case SVGToken::StartOffset:
                 {
                     SvgNumber aNum;
 
@@ -286,15 +286,15 @@ namespace svgio::svgreader
                     }
                     break;
                 }
-                case SVGTokenMethod:
+                case SVGToken::Method:
                 {
                     break;
                 }
-                case SVGTokenSpacing:
+                case SVGToken::Spacing:
                 {
                     break;
                 }
-                case SVGTokenXlinkHref:
+                case SVGToken::XlinkHref:
                 {
                     const sal_Int32 nLen(aContent.getLength());
 
diff --git a/svgio/source/svgreader/svgtitledescnode.cxx b/svgio/source/svgreader/svgtitledescnode.cxx
index 0475a8275c88..b71b38fb716f 100644
--- a/svgio/source/svgreader/svgtitledescnode.cxx
+++ b/svgio/source/svgreader/svgtitledescnode.cxx
@@ -30,7 +30,7 @@ namespace svgio::svgreader
         :   SvgNode(aType, rDocument, pParent),
             maText()
         {
-            OSL_ENSURE(aType == SVGTokenTitle || aType == SVGTokenDesc, "SvgTitleDescNode should only be used for Title and Desc (!)");
+            OSL_ENSURE(aType == SVGToken::Title || aType == SVGToken::Desc, "SvgTitleDescNode should only be used for Title and Desc (!)");
         }
 
         SvgTitleDescNode::~SvgTitleDescNode()
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index 20ce65a53c49..e3c4f85f1436 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -168,145 +168,145 @@ namespace svgio::svgreader
             typedef std::unordered_map< OUString, SVGToken > SVGTokenMapper;
             typedef std::pair< OUString, SVGToken > SVGTokenValueType;
             static SVGTokenMapper aSVGTokenMapperList {
-                { aSVGStrWidth, SVGTokenWidth },
-                { aSVGStrHeight, SVGTokenHeight },
-                { aSVGStrViewBox, SVGTokenViewBox },
-                { aSVGStrTransform, SVGTokenTransform },
-                { aSVGStrStyle, SVGTokenStyle },
-                { aSVGStrDisplay, SVGTokenDisplay }, // #i121656#
-                { aSVGStrD, SVGTokenD },
-                { aSVGStrX, SVGTokenX },
-                { aSVGStrY, SVGTokenY },
-                { aSVGStrXmlns, SVGTokenXmlns },
-                { aSVGStrVersion, SVGTokenVersion },
-                { aSVGStrId, SVGTokenId },
-                { aSVGStrRx, SVGTokenRx },
-                { aSVGStrRy, SVGTokenRy },
-                { aSVGStrPoints, SVGTokenPoints },
-                { aSVGStrDx, SVGTokenDx },
-                { aSVGStrDy, SVGTokenDy },
-                { aSVGStrRotate, SVGTokenRotate },
-                { aSVGStrTextLength, SVGTokenTextLength },
-                { aSVGStrLengthAdjust, SVGTokenLengthAdjust },
-                { aSVGStrFont, SVGTokenFont },
-                { aSVGStrFontFamily, SVGTokenFontFamily },
-                { aSVGStrFontSize, SVGTokenFontSize },
-                { aSVGStrFontSizeAdjust, SVGTokenFontSizeAdjust },
-                { aSVGStrFontStretch, SVGTokenFontStretch },
-                { aSVGStrFontStyle, SVGTokenFontStyle },
-                { aSVGStrFontVariant, SVGTokenFontVariant },
-                { aSVGStrFontWeight, SVGTokenFontWeight },
-                { aSVGStrDirection, SVGTokenDirection },
-                { aSVGStrLetterSpacing, SVGTokenLetterSpacing },
-                { aSVGStrTextDecoration, SVGTokenTextDecoration },
-                { aSVGStrUnicodeBidi, SVGTokenUnicodeBidi },
-                { aSVGStrWordSpacing, SVGTokenWordSpacing },
-                { aSVGStrTspan, SVGTokenTspan },
-                { aSVGStrTref, SVGTokenTref },
-                { aSVGStrTextPath, SVGTokenTextPath },
-                { aSVGStrStartOffset, SVGTokenStartOffset },
-                { aSVGStrMethod, SVGTokenMethod },
-                { aSVGStrSpacing, SVGTokenSpacing },
-                { aSVGStrTextAlign, SVGTokenTextAlign },
-                { aSVGStrPathLength, SVGTokenPathLength },
-                { aSVGStrType, SVGTokenType },
-                { aSVGStrClass, SVGTokenClass },
-                { aSVGStrTextAnchor, SVGTokenTextAnchor },
-                { aSVGStrXmlSpace, SVGTokenXmlSpace },
-                { aSVGStrColor, SVGTokenColor },
-                { aSVGStrClipPathNode, SVGTokenClipPathNode },
-                { aSVGStrClipPathProperty, SVGTokenClipPathProperty },
-                { aSVGStrMask, SVGTokenMask },
-                { aSVGStrClipPathUnits, SVGTokenClipPathUnits },
-                { aSVGStrMaskUnits, SVGTokenMaskUnits },
-                { aSVGStrMaskContentUnits, SVGTokenMaskContentUnits },
-                { aSVGStrClipRule, SVGTokenClipRule },
-                { aSVGStrMarker, SVGTokenMarker },
-                { aSVGStrMarkerStart, SVGTokenMarkerStart },
-                { aSVGStrMarkerMid, SVGTokenMarkerMid },
-                { aSVGStrMarkerEnd, SVGTokenMarkerEnd },
-                { aSVGStrRefX, SVGTokenRefX },
-                { aSVGStrRefY, SVGTokenRefY },
-                { aSVGStrMarkerUnits, SVGTokenMarkerUnits },
-                { aSVGStrMarkerWidth, SVGTokenMarkerWidth },
-                { aSVGStrMarkerHeight, SVGTokenMarkerHeight },
-                { aSVGStrOrient, SVGTokenOrient },
-                { aSVGStrPattern, SVGTokenPattern },
-                { aSVGStrPatternUnits, SVGTokenPatternUnits },
-                { aSVGStrPatternContentUnits, SVGTokenPatternContentUnits },
-                { aSVGStrPatternTransform, SVGTokenPatternTransform },
-                { aSVGStrOpacity, SVGTokenOpacity },
-                { aSVGStrVisibility, SVGTokenVisibility },
-                { aSVGStrTitle, SVGTokenTitle },
-                { aSVGStrDesc, SVGTokenDesc },
+                { aSVGStrWidth, SVGToken::Width },
+                { aSVGStrHeight, SVGToken::Height },
+                { aSVGStrViewBox, SVGToken::ViewBox },
+                { aSVGStrTransform, SVGToken::Transform },
+                { aSVGStrStyle, SVGToken::Style },
+                { aSVGStrDisplay, SVGToken::Display }, // #i121656#
+                { aSVGStrD, SVGToken::D },
+                { aSVGStrX, SVGToken::X },
+                { aSVGStrY, SVGToken::Y },
+                { aSVGStrXmlns, SVGToken::Xmlns },
+                { aSVGStrVersion, SVGToken::Version },
+                { aSVGStrId, SVGToken::Id },
+                { aSVGStrRx, SVGToken::Rx },
+                { aSVGStrRy, SVGToken::Ry },
+                { aSVGStrPoints, SVGToken::Points },
+                { aSVGStrDx, SVGToken::Dx },
+                { aSVGStrDy, SVGToken::Dy },
+                { aSVGStrRotate, SVGToken::Rotate },
+                { aSVGStrTextLength, SVGToken::TextLength },
+                { aSVGStrLengthAdjust, SVGToken::LengthAdjust },
+                { aSVGStrFont, SVGToken::Font },
+                { aSVGStrFontFamily, SVGToken::FontFamily },
+                { aSVGStrFontSize, SVGToken::FontSize },
+                { aSVGStrFontSizeAdjust, SVGToken::FontSizeAdjust },
+                { aSVGStrFontStretch, SVGToken::FontStretch },
+                { aSVGStrFontStyle, SVGToken::FontStyle },
+                { aSVGStrFontVariant, SVGToken::FontVariant },
+                { aSVGStrFontWeight, SVGToken::FontWeight },
+                { aSVGStrDirection, SVGToken::Direction },
+                { aSVGStrLetterSpacing, SVGToken::LetterSpacing },
+                { aSVGStrTextDecoration, SVGToken::TextDecoration },
+                { aSVGStrUnicodeBidi, SVGToken::UnicodeBidi },
+                { aSVGStrWordSpacing, SVGToken::WordSpacing },
+                { aSVGStrTspan, SVGToken::Tspan },
+                { aSVGStrTref, SVGToken::Tref },
+                { aSVGStrTextPath, SVGToken::TextPath },
+                { aSVGStrStartOffset, SVGToken::StartOffset },
+                { aSVGStrMethod, SVGToken::Method },
+                { aSVGStrSpacing, SVGToken::Spacing },

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list