summaryrefslogtreecommitdiff
path: root/svgio
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-07-15 09:27:10 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-07-15 10:38:08 +0200
commit242b7d0162d55be0945ca849c3de841fbf6cb475 (patch)
treea43c676a1a781a46f2b78dbcba0e8922f168f8ae /svgio
parent126067992d7a2b3edc5dd6ce5e896343da537589 (diff)
svgio: simplify code
Change-Id: I100256b63fadeb4a0e4b8e4cbb67e58d2a1ce433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137096 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio')
-rw-r--r--svgio/inc/svgstyleattributes.hxx3
-rw-r--r--svgio/source/svgreader/svganode.cxx2
-rw-r--r--svgio/source/svgreader/svgcirclenode.cxx2
-rw-r--r--svgio/source/svgreader/svgclippathnode.cxx2
-rw-r--r--svgio/source/svgreader/svgellipsenode.cxx2
-rw-r--r--svgio/source/svgreader/svggnode.cxx2
-rw-r--r--svgio/source/svgreader/svggradientnode.cxx2
-rw-r--r--svgio/source/svgreader/svggradientstopnode.cxx2
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx2
-rw-r--r--svgio/source/svgreader/svglinenode.cxx2
-rw-r--r--svgio/source/svgreader/svgmarkernode.cxx2
-rw-r--r--svgio/source/svgreader/svgmasknode.cxx2
-rw-r--r--svgio/source/svgreader/svgpathnode.cxx2
-rw-r--r--svgio/source/svgreader/svgpatternnode.cxx2
-rw-r--r--svgio/source/svgreader/svgpolynode.cxx2
-rw-r--r--svgio/source/svgreader/svgrectnode.cxx2
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx7
-rw-r--r--svgio/source/svgreader/svgsvgnode.cxx2
-rw-r--r--svgio/source/svgreader/svgsymbolnode.cxx2
-rw-r--r--svgio/source/svgreader/svgtextnode.cxx2
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx2
-rw-r--r--svgio/source/svgreader/svgtrefnode.cxx2
-rw-r--r--svgio/source/svgreader/svgtspannode.cxx2
-rw-r--r--svgio/source/svgreader/svgusenode.cxx2
24 files changed, 26 insertions, 28 deletions
diff --git a/svgio/inc/svgstyleattributes.hxx b/svgio/inc/svgstyleattributes.hxx
index edba8d0c539f..87c17647eeb8 100644
--- a/svgio/inc/svgstyleattributes.hxx
+++ b/svgio/inc/svgstyleattributes.hxx
@@ -277,8 +277,7 @@ namespace svgio::svgreader
public:
/// local attribute scanner
- void parseStyleAttribute(SVGToken aSVGToken, const OUString& rContent,
- bool bCaseIndependent);
+ void parseStyleAttribute(SVGToken aSVGToken, const OUString& rContent);
/// helper which does the necessary with a given path
void add_text(
diff --git a/svgio/source/svgreader/svganode.cxx b/svgio/source/svgreader/svganode.cxx
index d634be369441..5d992a3d28ef 100644
--- a/svgio/source/svgreader/svganode.cxx
+++ b/svgio/source/svgreader/svganode.cxx
@@ -44,7 +44,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx
index a9f8fa75941e..0ec940f9f737 100644
--- a/svgio/source/svgreader/svgcirclenode.cxx
+++ b/svgio/source/svgreader/svgcirclenode.cxx
@@ -50,7 +50,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx
index 3d814694db64..764c874dbe5f 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -53,7 +53,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx
index 2317648ef808..b6208dd3b4db 100644
--- a/svgio/source/svgreader/svgellipsenode.cxx
+++ b/svgio/source/svgreader/svgellipsenode.cxx
@@ -51,7 +51,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx
index 02341d459147..aca500af60ab 100644
--- a/svgio/source/svgreader/svggnode.cxx
+++ b/svgio/source/svgreader/svggnode.cxx
@@ -56,7 +56,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx
index 7355a1ee22fd..02e1b85bf17f 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -65,7 +65,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svggradientstopnode.cxx b/svgio/source/svgreader/svggradientstopnode.cxx
index 5c7c0542ab95..f28f198e5e7a 100644
--- a/svgio/source/svgreader/svggradientstopnode.cxx
+++ b/svgio/source/svgreader/svggradientstopnode.cxx
@@ -44,7 +44,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 1d6fd654bc61..d439c45ede9b 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -63,7 +63,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx
index d593155fa38c..b49f9c7a46b6 100644
--- a/svgio/source/svgreader/svglinenode.cxx
+++ b/svgio/source/svgreader/svglinenode.cxx
@@ -50,7 +50,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx
index 31a277dfe81a..9cc1cee6ce17 100644
--- a/svgio/source/svgreader/svgmarkernode.cxx
+++ b/svgio/source/svgreader/svgmarkernode.cxx
@@ -52,7 +52,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx
index abc1aeed6454..71531637f565 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -59,7 +59,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx
index 1a5f931dea64..b3b498bd067e 100644
--- a/svgio/source/svgreader/svgpathnode.cxx
+++ b/svgio/source/svgreader/svgpathnode.cxx
@@ -45,7 +45,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index b2f4785b4631..ff7f5768d3d0 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -56,7 +56,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx
index 64d1949d7d63..886634563e2e 100644
--- a/svgio/source/svgreader/svgpolynode.cxx
+++ b/svgio/source/svgreader/svgpolynode.cxx
@@ -49,7 +49,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx
index 2bb1f166f595..d744343de200 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -53,7 +53,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index de3aaa970df3..822ea4c65994 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -239,7 +239,7 @@ namespace svgio::svgreader
}
// valid token-value pair, parse it
- parseStyleAttribute(StrToSVGToken(aOUTokenName, true), aOUTokenValue, true);
+ parseStyleAttribute(StrToSVGToken(aOUTokenName, true), aOUTokenValue);
}
}
@@ -1298,8 +1298,7 @@ namespace svgio::svgreader
void SvgStyleAttributes::parseStyleAttribute(
SVGToken aSVGToken,
- const OUString& aContent,
- bool bIsInStyleSheet)
+ const OUString& aContent)
{
switch(aSVGToken)
{
@@ -1876,7 +1875,7 @@ namespace svgio::svgreader
}
case SVGToken::Marker:
{
- if(bIsInStyleSheet)
+ if(getCssStyleParent())
{
readLocalUrl(aContent, maMarkerEndXLink);
maMarkerStartXLink = maMarkerMidXLink = maMarkerEndXLink;
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index cd8d25df09d5..346e457aa17e 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -113,7 +113,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgsymbolnode.cxx b/svgio/source/svgreader/svgsymbolnode.cxx
index b505a7500dc0..b92bde34a5fe 100644
--- a/svgio/source/svgreader/svgsymbolnode.cxx
+++ b/svgio/source/svgreader/svgsymbolnode.cxx
@@ -44,7 +44,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx
index a7c8cae8b8ce..f8c0694b8826 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -50,7 +50,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// read text position attributes
maSvgTextPositions.parseTextPositionAttributes(aSVGToken, aContent);
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index 3c5471bbd946..2c5a823566ed 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -261,7 +261,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgtrefnode.cxx b/svgio/source/svgreader/svgtrefnode.cxx
index 1e807f5199f4..00daf7a96c8a 100644
--- a/svgio/source/svgreader/svgtrefnode.cxx
+++ b/svgio/source/svgreader/svgtrefnode.cxx
@@ -45,7 +45,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)
diff --git a/svgio/source/svgreader/svgtspannode.cxx b/svgio/source/svgreader/svgtspannode.cxx
index e751237289f2..db024e2f2ff7 100644
--- a/svgio/source/svgreader/svgtspannode.cxx
+++ b/svgio/source/svgreader/svgtspannode.cxx
@@ -45,7 +45,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// read text position attributes
maSvgTextPositions.parseTextPositionAttributes(aSVGToken, aContent);
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index 903770b9522c..66f9d1a551a0 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -47,7 +47,7 @@ namespace svgio::svgreader
SvgNode::parseAttribute(rTokenName, aSVGToken, aContent);
// read style attributes
- maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent, false);
+ maSvgStyleAttributes.parseStyleAttribute(aSVGToken, aContent);
// parse own
switch(aSVGToken)