summaryrefslogtreecommitdiff
path: root/svgio/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-20 16:21:34 +0200
committerNoel Grandin <noel@peralex.com>2013-11-21 13:29:29 +0200
commit89633c6da1cde46983926dcc2e0f8e08de0e9378 (patch)
tree243f049b51b9f404e8697781dfada6c20ff0fee1 /svgio/source
parent2a46a01902bccd1f025cce92ce6d32efbabf6825 (diff)
remove unnecessary use of OUString::createFromAscii
Convert code like this: OUString aStrSpacing(OUString::createFromAscii("spacing")); to: OUString aStrSpacing("spacing"); Change-Id: Ia2b7d6b42f35d33cfe587a0d6668030f3537fa6d
Diffstat (limited to 'svgio/source')
-rw-r--r--svgio/source/svgreader/svgcharacternode.cxx7
-rw-r--r--svgio/source/svgreader/svgcirclenode.cxx3
-rw-r--r--svgio/source/svgreader/svgdocumenthandler.cxx4
-rw-r--r--svgio/source/svgreader/svgellipsenode.cxx3
-rw-r--r--svgio/source/svgreader/svggnode.cxx3
-rw-r--r--svgio/source/svgreader/svggradientnode.cxx10
-rw-r--r--svgio/source/svgreader/svgimagenode.cxx3
-rw-r--r--svgio/source/svgreader/svglinenode.cxx3
-rw-r--r--svgio/source/svgreader/svgmarkernode.cxx11
-rw-r--r--svgio/source/svgreader/svgnode.cxx66
-rw-r--r--svgio/source/svgreader/svgpathnode.cxx3
-rw-r--r--svgio/source/svgreader/svgpatternnode.cxx3
-rw-r--r--svgio/source/svgreader/svgpolynode.cxx4
-rw-r--r--svgio/source/svgreader/svgrectnode.cxx3
-rw-r--r--svgio/source/svgreader/svgstyleattributes.cxx155
-rw-r--r--svgio/source/svgreader/svgstylenode.cxx4
-rw-r--r--svgio/source/svgreader/svgtextnode.cxx3
-rw-r--r--svgio/source/svgreader/svgtextpathnode.cxx14
-rw-r--r--svgio/source/svgreader/svgtoken.cxx258
-rw-r--r--svgio/source/svgreader/svgtools.cxx339
-rw-r--r--svgio/source/svgreader/svgusenode.cxx3
21 files changed, 393 insertions, 509 deletions
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index 392f886435f8..1e9fc1e9c5ca 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -130,14 +130,11 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrSpacing(OUString::createFromAscii("spacing"));
- static OUString aStrSpacingAndGlyphs(OUString::createFromAscii("spacingAndGlyphs"));
-
- if(aContent.match(aStrSpacing))
+ if(aContent.startsWith("spacing"))
{
setLengthAdjust(true);
}
- else if(aContent.match(aStrSpacingAndGlyphs))
+ else if(aContent.startsWith("spacingAndGlyphs"))
{
setLengthAdjust(false);
}
diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx
index f462a07e3284..0d4910daa4ab 100644
--- a/svgio/source/svgreader/svgcirclenode.cxx
+++ b/svgio/source/svgreader/svgcirclenode.cxx
@@ -46,8 +46,7 @@ namespace svgio
const SvgStyleAttributes* SvgCircleNode::getSvgStyleAttributes() const
{
- static OUString aClassStr(OUString::createFromAscii("circle"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("circle"), maSvgStyleAttributes);
}
void SvgCircleNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index f8637ea8b9e4..7e03217cc3ec 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -373,9 +373,9 @@ namespace svgio
/// invalid token, ignore
#ifdef DBG_UTIL
myAssert(
- OUString::createFromAscii("Unknown Base SvgToken <") +
+ OUString("Unknown Base SvgToken <") +
aName +
- OUString::createFromAscii("> (!)"));
+ OUString("> (!)") );
#endif
break;
}
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx
index 283e9da9826b..75e3e28def00 100644
--- a/svgio/source/svgreader/svgellipsenode.cxx
+++ b/svgio/source/svgreader/svgellipsenode.cxx
@@ -47,8 +47,7 @@ namespace svgio
const SvgStyleAttributes* SvgEllipseNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("ellipse"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("ellipse"), maSvgStyleAttributes);
}
void SvgEllipseNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx
index bd4136509254..b2c87b3f32ab 100644
--- a/svgio/source/svgreader/svggnode.cxx
+++ b/svgio/source/svgreader/svggnode.cxx
@@ -45,8 +45,7 @@ namespace svgio
const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("g"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("g"), maSvgStyleAttributes);
}
void SvgGNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx
index eab2d1274643..d8c5b276ae11 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -197,19 +197,15 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrPad(OUString::createFromAscii("pad"));
- static OUString aStrReflect(OUString::createFromAscii("reflect"));
- static OUString aStrRepeat(OUString::createFromAscii("repeat"));
-
- if(aContent.match(aStrPad, 0))
+ if(aContent.startsWith("pad"))
{
setSpreadMethod(drawinglayer::primitive2d::Spread_pad);
}
- else if(aContent.match(aStrReflect, 0))
+ else if(aContent.startsWith("reflect"))
{
setSpreadMethod(drawinglayer::primitive2d::Spread_reflect);
}
- else if(aContent.match(aStrRepeat, 0))
+ else if(aContent.startsWith("repeat"))
{
setSpreadMethod(drawinglayer::primitive2d::Spread_repeat);
}
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 30300e0e0513..533d1beea3f1 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -64,8 +64,7 @@ namespace svgio
const SvgStyleAttributes* SvgImageNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("image"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("image"), maSvgStyleAttributes);
}
void SvgImageNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx
index aebefe7fdd9c..84aaa4beefa4 100644
--- a/svgio/source/svgreader/svglinenode.cxx
+++ b/svgio/source/svgreader/svglinenode.cxx
@@ -47,8 +47,7 @@ namespace svgio
const SvgStyleAttributes* SvgLineNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("line"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("line"), maSvgStyleAttributes);
}
void SvgLineNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx
index dd900e4e7a0c..1f75ef604f01 100644
--- a/svgio/source/svgreader/svgmarkernode.cxx
+++ b/svgio/source/svgreader/svgmarkernode.cxx
@@ -50,8 +50,7 @@ namespace svgio
const SvgStyleAttributes* SvgMarkerNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("marker"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("marker"), maSvgStyleAttributes);
}
void SvgMarkerNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
@@ -109,9 +108,7 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrStrokeWidth(OUString::createFromAscii("strokeWidth"));
-
- if(aContent.match(aStrStrokeWidth, 0))
+ if(aContent.startsWith("strokeWidth"))
{
setMarkerUnits(strokeWidth);
}
@@ -154,9 +151,7 @@ namespace svgio
if(nLen)
{
- static OUString aStrAuto(OUString::createFromAscii("auto"));
-
- if(aContent.match(aStrAuto, 0))
+ if(aContent.startsWith("auto"))
{
setOrientAuto(true);
}
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index 728905b5710f..293834cdf5e9 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -59,11 +59,11 @@ namespace svgio
copyToLimiter(*pClassList, ' ', nPos, aTokenValue, nLen);
skip_char(*pClassList, ' ', nPos, nLen);
- rtl::OUString aId(rtl::OUString::createFromAscii("."));
+ rtl::OUString aId(".");
const rtl::OUString aOUTokenValue(aTokenValue.makeStringAndClear());
// look for CSS style common to token
- aId = aId + aOUTokenValue;
+ aId += aOUTokenValue;
pNew = rDocument.findSvgStyleAttributesById(aId);
if(!pNew && !rClassStr.isEmpty())
@@ -221,94 +221,75 @@ namespace svgio
{
if(aContent.getLength())
{
- static rtl::OUString aStrInline(rtl::OUString::createFromAscii("inline"));
- static rtl::OUString aStrBlock(rtl::OUString::createFromAscii("block"));
- static rtl::OUString aStrList_item(rtl::OUString::createFromAscii("list-item"));
- static rtl::OUString aStrRun_in(rtl::OUString::createFromAscii("run-in"));
- static rtl::OUString aStrCompact(rtl::OUString::createFromAscii("compact"));
- static rtl::OUString aStrMarker(rtl::OUString::createFromAscii("marker"));
- static rtl::OUString aStrTable(rtl::OUString::createFromAscii("table"));
- static rtl::OUString aStrInline_table(rtl::OUString::createFromAscii("inline-table"));
- static rtl::OUString aStrTable_row_group(rtl::OUString::createFromAscii("table-row-group"));
- static rtl::OUString aStrTable_header_group(rtl::OUString::createFromAscii("table-header-group"));
- static rtl::OUString aStrTable_footer_group(rtl::OUString::createFromAscii("table-footer-group"));
- static rtl::OUString aStrTable_row(rtl::OUString::createFromAscii("table-row"));
- static rtl::OUString aStrTable_column_group(rtl::OUString::createFromAscii("table-column-group"));
- static rtl::OUString aStrTable_column(rtl::OUString::createFromAscii("table-column"));
- static rtl::OUString aStrTable_cell(rtl::OUString::createFromAscii("table-cell"));
- static rtl::OUString aStrTable_caption(rtl::OUString::createFromAscii("table-caption"));
- static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none"));
- static rtl::OUString aStrInherit(rtl::OUString::createFromAscii("inherit"));
-
- if(aContent.match(aStrInline))
+ if(aContent.startsWith("inline"))
{
return Display_inline;
}
- else if(aContent.match(aStrNone))
+ else if(aContent.startsWith("none"))
{
return Display_none;
}
- else if(aContent.match(aStrInherit))
+ else if(aContent.startsWith("inherit"))
{
return Display_inherit;
}
- else if(aContent.match(aStrBlock))
+ else if(aContent.startsWith("block"))
{
return Display_block;
}
- else if(aContent.match(aStrList_item))
+ else if(aContent.startsWith("list-item"))
{
return Display_list_item;
}
- else if(aContent.match(aStrRun_in))
+ else if(aContent.startsWith("run-in"))
{
return Display_run_in;
}
- else if(aContent.match(aStrCompact))
+ else if(aContent.startsWith("compact"))
{
return Display_compact;
}
- else if(aContent.match(aStrMarker))
+ else if(aContent.startsWith("marker"))
{
return Display_marker;
}
- else if(aContent.match(aStrTable))
+ else if(aContent.startsWith("table"))
{
return Display_table;
}
- else if(aContent.match(aStrInline_table))
+ else if(aContent.startsWith("inline-table"))
{
return Display_inline_table;
}
- else if(aContent.match(aStrTable_row_group))
+ else if(aContent.startsWith("table-row-group"))
{
return Display_table_row_group;
}
- else if(aContent.match(aStrTable_header_group))
+ else if(aContent.startsWith("table-header-group"))
{
return Display_table_header_group;
}
- else if(aContent.match(aStrTable_footer_group))
+ else if(aContent.startsWith("table-footer-group"))
{
return Display_table_footer_group;
}
- else if(aContent.match(aStrTable_row))
+ else if(aContent.startsWith("table-row"))
{
return Display_table_row;
}
- else if(aContent.match(aStrTable_column_group))
+ else if(aContent.startsWith("table-column-group"))
{
return Display_table_column_group;
}
- else if(aContent.match(aStrTable_column))
+ else if(aContent.startsWith("table-column"))
{
return Display_table_column;
}
- else if(aContent.match(aStrTable_cell))
+ else if(aContent.startsWith("table-cell"))
{
return Display_table_cell;
}
- else if(aContent.match(aStrTable_caption))
+ else if(aContent.startsWith("table-caption"))
{
return Display_table_caption;
}
@@ -342,14 +323,11 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrDefault(OUString::createFromAscii("default"));
- static OUString aStrPreserve(OUString::createFromAscii("preserve"));
-
- if(aContent.match(aStrDefault))
+ if(aContent.startsWith("default"))
{
setXmlSpace(XmlSpace_default);
}
- else if(aContent.match(aStrPreserve))
+ else if(aContent.startsWith("preserve"))
{
setXmlSpace(XmlSpace_preserve);
}
diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx
index e745711e786d..7a96b5a1ae9a 100644
--- a/svgio/source/svgreader/svgpathnode.cxx
+++ b/svgio/source/svgreader/svgpathnode.cxx
@@ -45,8 +45,7 @@ namespace svgio
const SvgStyleAttributes* SvgPathNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("path"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("path"), maSvgStyleAttributes);
}
void SvgPathNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index f4c7342aefbb..24793d72a3d1 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -64,8 +64,7 @@ namespace svgio
const SvgStyleAttributes* SvgPatternNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("pattern"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("pattern"), maSvgStyleAttributes);
}
void SvgPatternNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx
index c475c79f7206..737ee3834030 100644
--- a/svgio/source/svgreader/svgpolynode.cxx
+++ b/svgio/source/svgreader/svgpolynode.cxx
@@ -48,9 +48,7 @@ namespace svgio
const SvgStyleAttributes* SvgPolyNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStrA(rtl::OUString::createFromAscii("polygon"));
- static rtl::OUString aClassStrB(rtl::OUString::createFromAscii("polyline"));
- return checkForCssStyle(mbIsPolyline? aClassStrB : aClassStrA, maSvgStyleAttributes);
+ return checkForCssStyle(mbIsPolyline? OUString("polyline") : OUString("polygon"), maSvgStyleAttributes);
}
void SvgPolyNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx
index 8348ed76ae14..47c3edad20b0 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -49,8 +49,7 @@ namespace svgio
const SvgStyleAttributes* SvgRectNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("rect"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("rect"), maSvgStyleAttributes);
}
void SvgRectNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index ecddfbf3a5e9..eec0798d6b9e 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1299,10 +1299,9 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static rtl::OUString aStrNone(rtl::OUString::createFromAscii("none"));
SvgNumberVector aVector;
- if(aContent.match(aStrNone))
+ if(aContent.startsWith("none"))
{
// #121221# The special value 'none' needs to be handled
// in the sense that *when* it is set, the parent shall not
@@ -1334,19 +1333,15 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrButt(OUString::createFromAscii("butt"));
- static OUString aStrRound(OUString::createFromAscii("round"));
- static OUString aStrSquare(OUString::createFromAscii("square"));
-
- if(aContent.match(aStrButt))
+ if(aContent.startsWith("butt"))
{
setStrokeLinecap(StrokeLinecap_butt);
}
- else if(aContent.match(aStrRound))
+ else if(aContent.startsWith("round"))
{
setStrokeLinecap(StrokeLinecap_round);
}
- else if(aContent.match(aStrSquare))
+ else if(aContent.startsWith("square"))
{
setStrokeLinecap(StrokeLinecap_square);
}
@@ -1357,19 +1352,15 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrMiter(OUString::createFromAscii("miter"));
- static OUString aStrRound(OUString::createFromAscii("round"));
- static OUString aStrBevel(OUString::createFromAscii("bevel"));
-
- if(aContent.match(aStrMiter))
+ if(aContent.startsWith("miter"))
{
setStrokeLinejoin(StrokeLinejoin_miter);
}
- else if(aContent.match(aStrRound))
+ else if(aContent.startsWith("round"))
{
setStrokeLinejoin(StrokeLinejoin_round);
}
- else if(aContent.match(aStrBevel))
+ else if(aContent.startsWith("bevel"))
{
setStrokeLinejoin(StrokeLinejoin_bevel);
}
@@ -1471,59 +1462,47 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrNormal(OUString::createFromAscii("normal"));
- static OUString aStrWider(OUString::createFromAscii("wider"));
- static OUString aStrNarrower(OUString::createFromAscii("narrower"));
- static OUString aStrUltra_condensed(OUString::createFromAscii("ultra-condensed"));
- static OUString aStrExtra_condensed(OUString::createFromAscii("extra-condensed"));
- static OUString aStrCondensed(OUString::createFromAscii("condensed"));
- static OUString aStrSemi_condensed(OUString::createFromAscii("semi-condensed"));
- static OUString aStrSemi_expanded(OUString::createFromAscii("semi-expanded"));
- static OUString aStrExpanded(OUString::createFromAscii("expanded"));
- static OUString aStrExtra_expanded(OUString::createFromAscii("extra-expanded"));
- static OUString aStrUltra_expanded(OUString::createFromAscii("ultra-expanded"));
-
- if(aContent.match(aStrNormal))
+ if(aContent.startsWith("normal"))
{
setFontStretch(FontStretch_normal);
}
- else if(aContent.match(aStrWider))
+ else if(aContent.startsWith("wider"))
{
setFontStretch(FontStretch_wider);
}
- else if(aContent.match(aStrNarrower))
+ else if(aContent.startsWith("narrower"))
{
setFontStretch(FontStretch_narrower);
}
- else if(aContent.match(aStrUltra_condensed))
+ else if(aContent.startsWith("ultra-condensed"))
{
setFontStretch(FontStretch_ultra_condensed);
}
- else if(aContent.match(aStrExtra_condensed))
+ else if(aContent.startsWith("extra-condensed"))
{
setFontStretch(FontStretch_extra_condensed);
}
- else if(aContent.match(aStrCondensed))
+ else if(aContent.startsWith("condensed"))
{
setFontStretch(FontStretch_condensed);
}
- else if(aContent.match(aStrSemi_condensed))
+ else if(aContent.startsWith("semi-condensed"))
{
setFontStretch(FontStretch_semi_condensed);
}
- else if(aContent.match(aStrSemi_expanded))
+ else if(aContent.startsWith("semi-expanded"))
{
setFontStretch(FontStretch_semi_expanded);
}
- else if(aContent.match(aStrExpanded))
+ else if(aContent.startsWith("expanded"))
{
setFontStretch(FontStretch_expanded);
}
- else if(aContent.match(aStrExtra_expanded))
+ else if(aContent.startsWith("extra-expanded"))
{
setFontStretch(FontStretch_extra_expanded);
}
- else if(aContent.match(aStrUltra_expanded))
+ else if(aContent.startsWith("ultra-expanded"))
{
setFontStretch(FontStretch_ultra_expanded);
}
@@ -1534,19 +1513,15 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrNormal(OUString::createFromAscii("normal"));
- static OUString aStrItalic(OUString::createFromAscii("italic"));
- static OUString aStrOblique(OUString::createFromAscii("oblique"));
-
- if(aContent.match(aStrNormal))
+ if(aContent.startsWith("normal"))
{
setFontStyle(FontStyle_normal);
}
- else if(aContent.match(aStrItalic))
+ else if(aContent.startsWith("italic"))
{
setFontStyle(FontStyle_italic);
}
- else if(aContent.match(aStrOblique))
+ else if(aContent.startsWith("oblique"))
{
setFontStyle(FontStyle_oblique);
}
@@ -1557,14 +1532,11 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrNormal(OUString::createFromAscii("normal"));
- static OUString aStrSmallCaps(OUString::createFromAscii("small-caps"));
-
- if(aContent.match(aStrNormal))
+ if(aContent.startsWith("normal"))
{
setFontVariant(FontVariant_normal);
}
- else if(aContent.match(aStrSmallCaps))
+ else if(aContent.startsWith("small-caps"))
{
setFontVariant(FontVariant_small_caps);
}
@@ -1575,61 +1547,47 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrNormal(OUString::createFromAscii("normal"));
- static OUString aStrBold(OUString::createFromAscii("bold"));
- static OUString aStrBolder(OUString::createFromAscii("bolder"));
- static OUString aStrLighter(OUString::createFromAscii("lighter"));
- static OUString aStr100(OUString::createFromAscii("100"));
- static OUString aStr200(OUString::createFromAscii("200"));
- static OUString aStr300(OUString::createFromAscii("300"));
- static OUString aStr400(OUString::createFromAscii("400"));
- static OUString aStr500(OUString::createFromAscii("500"));
- static OUString aStr600(OUString::createFromAscii("600"));
- static OUString aStr700(OUString::createFromAscii("700"));
- static OUString aStr800(OUString::createFromAscii("800"));
- static OUString aStr900(OUString::createFromAscii("900"));
-
- if(aContent.match(aStr100))
+ if(aContent.startsWith("100"))
{
setFontWeight(FontWeight_100);
}
- else if(aContent.match(aStr200))
+ else if(aContent.startsWith("200"))
{
setFontWeight(FontWeight_200);
}
- else if(aContent.match(aStr300))
+ else if(aContent.startsWith("300"))
{
setFontWeight(FontWeight_300);
}
- else if(aContent.match(aStr400) || aContent.match(aStrNormal))
+ else if(aContent.startsWith("400") || aContent.startsWith("normal"))
{
setFontWeight(FontWeight_400);
}
- else if(aContent.match(aStr500))
+ else if(aContent.startsWith("500"))
{
setFontWeight(FontWeight_500);
}
- else if(aContent.match(aStr600))
+ else if(aContent.startsWith("600"))
{
setFontWeight(FontWeight_600);
}
- else if(aContent.match(aStr700) || aContent.match(aStrBold))
+ else if(aContent.startsWith("700") || aContent.startsWith("bold"))
{
setFontWeight(FontWeight_700);
}
- else if(aContent.match(aStr800))
+ else if(aContent.startsWith("800"))
{
setFontWeight(FontWeight_800);
}
- else if(aContent.match(aStr900))
+ else if(aContent.startsWith("900"))
{
setFontWeight(FontWeight_900);
}
- else if(aContent.match(aStrBolder))
+ else if(aContent.startsWith("bolder"))
{
setFontWeight(FontWeight_bolder);
}
- else if(aContent.match(aStrLighter))
+ else if(aContent.startsWith("lighter"))
{
setFontWeight(FontWeight_lighter);
}
@@ -1648,29 +1606,23 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrNone(OUString::createFromAscii("none"));
- static OUString aStrUnderline(OUString::createFromAscii("underline"));
- static OUString aStrOverline(OUString::createFromAscii("overline"));
- static OUString aStrLineThrough(OUString::createFromAscii("line-through"));
- static OUString aStrBlink(OUString::createFromAscii("blink"));
-
- if(aContent.match(aStrNone))
+ if(aContent.startsWith("none"))
{
setTextDecoration(TextDecoration_none);
}
- else if(aContent.match(aStrUnderline))
+ else if(aContent.startsWith("underline"))
{
setTextDecoration(TextDecoration_underline);
}
- else if(aContent.match(aStrOverline))
+ else if(aContent.startsWith("overline"))
{
setTextDecoration(TextDecoration_overline);
}
- else if(aContent.match(aStrLineThrough))
+ else if(aContent.startsWith("line-through"))
{
setTextDecoration(TextDecoration_line_through);
}
- else if(aContent.match(aStrBlink))
+ else if(aContent.startsWith("blink"))
{
setTextDecoration(TextDecoration_blink);
}
@@ -1689,19 +1641,15 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrStart(OUString::createFromAscii("start"));
- static OUString aStrMiddle(OUString::createFromAscii("middle"));
- static OUString aStrEnd(OUString::createFromAscii("end"));
-
- if(aContent.match(aStrStart))
+ if(aContent.startsWith("start"))
{
setTextAnchor(TextAnchor_start);
}
- else if(aContent.match(aStrMiddle))
+ else if(aContent.startsWith("middle"))
{
setTextAnchor(TextAnchor_middle);
}
- else if(aContent.match(aStrEnd))
+ else if(aContent.startsWith("end"))
{
setTextAnchor(TextAnchor_end);
}
@@ -1712,24 +1660,19 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrLeft(OUString::createFromAscii("left"));
- static OUString aStrRight(OUString::createFromAscii("right"));
- static OUString aStrCenter(OUString::createFromAscii("center"));
- static OUString aStrJustify(OUString::createFromAscii("justify"));
-
- if(aContent.match(aStrLeft))
+ if(aContent.startsWith("left"))
{
setTextAlign(TextAlign_left);
}
- else if(aContent.match(aStrRight))
+ else if(aContent.startsWith("right"))
{
setTextAlign(TextAlign_right);
}
- else if(aContent.match(aStrCenter))
+ else if(aContent.startsWith("center"))
{
setTextAlign(TextAlign_center);
}
- else if(aContent.match(aStrJustify))
+ else if(aContent.startsWith("justify"))
{
setTextAlign(TextAlign_justify);
}
@@ -1829,15 +1772,13 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static rtl::OUString aStrSub(rtl::OUString::createFromAscii("sub"));
- static rtl::OUString aStrSuper(rtl::OUString::createFromAscii("super"));
SvgNumber aNum;
- if(aContent.match(aStrSub))
+ if(aContent.startsWith("sub"))
{
setBaselineShift(BaselineShift_Sub);
}
- else if(aContent.match(aStrSuper))
+ else if(aContent.startsWith("super"))
{
setBaselineShift(BaselineShift_Super);
}
diff --git a/svgio/source/svgreader/svgstylenode.cxx b/svgio/source/svgreader/svgstylenode.cxx
index 6c20df941fcb..352e02d97a50 100644
--- a/svgio/source/svgreader/svgstylenode.cxx
+++ b/svgio/source/svgreader/svgstylenode.cxx
@@ -56,9 +56,7 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrTextCss(OUString::createFromAscii("text/css"));
-
- if(aContent.match(aStrTextCss))
+ if(aContent.startsWith("text/css"))
{
setTextCss(true);
}
diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx
index 77adedea0eb3..ab1eb69d7e8e 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -49,8 +49,7 @@ namespace svgio
const SvgStyleAttributes* SvgTextNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("text"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("text"), maSvgStyleAttributes);
}
void SvgTextNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)
diff --git a/svgio/source/svgreader/svgtextpathnode.cxx b/svgio/source/svgreader/svgtextpathnode.cxx
index 8e09a84c3c96..0bdea3887ebb 100644
--- a/svgio/source/svgreader/svgtextpathnode.cxx
+++ b/svgio/source/svgreader/svgtextpathnode.cxx
@@ -302,14 +302,11 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrAlign(OUString::createFromAscii("align"));
- static OUString aStrStretch(OUString::createFromAscii("stretch"));
-
- if(aContent.match(aStrAlign))
+ if(aContent.startsWith("align"))
{
setMethod(true);
}
- else if(aContent.match(aStrStretch))
+ else if(aContent.startsWith("stretch"))
{
setMethod(false);
}
@@ -320,14 +317,11 @@ namespace svgio
{
if(!aContent.isEmpty())
{
- static OUString aStrAuto(OUString::createFromAscii("auto"));
- static OUString aStrExact(OUString::createFromAscii("exact"));
-
- if(aContent.match(aStrAuto))
+ if(aContent.startsWith("auto"))
{
setSpacing(true);
}
- else if(aContent.match(aStrExact))
+ else if(aContent.startsWith("exact"))
{
setSpacing(false);
}
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index ab64e7d8425f..c8937046372f 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -25,142 +25,142 @@ namespace svgio
{
namespace svgreader
{
- static OUString aSVGStrWidth(OUString::createFromAscii("width"));
- static OUString aSVGStrHeight(OUString::createFromAscii("height"));
- static OUString aSVGStrViewBox(OUString::createFromAscii("viewBox"));
- static OUString aSVGStrTransform(OUString::createFromAscii("transform"));
- static OUString aSVGStrStyle(OUString::createFromAscii("style"));
- static OUString aSVGStrDisplay(OUString::createFromAscii("display")); // #i121656#
- static OUString aSVGStrD(OUString::createFromAscii("d"));
- static OUString aSVGStrX(OUString::createFromAscii("x"));
- static OUString aSVGStrY(OUString::createFromAscii("y"));
- static OUString aSVGStrXmlns(OUString::createFromAscii("xmlns"));
- static OUString aSVGStrVersion(OUString::createFromAscii("version"));
- static OUString aSVGStrId(OUString::createFromAscii("id"));
- static OUString aSVGStrRx(OUString::createFromAscii("rx"));
- static OUString aSVGStrRy(OUString::createFromAscii("ry"));
- static OUString aSVGStrPoints(OUString::createFromAscii("points"));
- static OUString aSVGStrDx(OUString::createFromAscii("dx"));
- static OUString aSVGStrDy(OUString::createFromAscii("dy"));
- static OUString aSVGStrRotate(OUString::createFromAscii("rotate"));
- static OUString aSVGStrTextLength(OUString::createFromAscii("textLength"));
- static OUString aSVGStrLengthAdjust(OUString::createFromAscii("lengthAdjust"));
- static OUString aSVGStrFont(OUString::createFromAscii("font"));
- static OUString aSVGStrFontFamily(OUString::createFromAscii("font-family"));
- static OUString aSVGStrFontSize(OUString::createFromAscii("font-size"));
- static OUString aSVGStrFontSizeAdjust(OUString::createFromAscii("font-size-adjust"));
- static OUString aSVGStrFontStretch(OUString::createFromAscii("font-stretch"));
- static OUString aSVGStrFontStyle(OUString::createFromAscii("font-style"));
- static OUString aSVGStrFontVariant(OUString::createFromAscii("font-variant"));
- static OUString aSVGStrFontWeight(OUString::createFromAscii("font-weight"));
- static OUString aSVGStrDirection(OUString::createFromAscii("direction"));
- static OUString aSVGStrLetterSpacing(OUString::createFromAscii("letter-spacing"));
- static OUString aSVGStrTextDecoration(OUString::createFromAscii("text-decoration"));
- static OUString aSVGStrUnicodeBidi(OUString::createFromAscii("unicode-bidi"));
- static OUString aSVGStrWordSpacing(OUString::createFromAscii("word-spacing"));
- static OUString aSVGStrTspan(OUString::createFromAscii("tspan"));
- static OUString aSVGStrTref(OUString::createFromAscii("tref"));
- static OUString aSVGStrTextPath(OUString::createFromAscii("textPath"));
- static OUString aSVGStrStartOffset(OUString::createFromAscii("startOffset"));
- static OUString aSVGStrMethod(OUString::createFromAscii("method"));
- static OUString aSVGStrSpacing(OUString::createFromAscii("spacing"));
- static OUString aSVGStrTextAlign(OUString::createFromAscii("text-align"));
- static OUString aSVGStrPathLength(OUString::createFromAscii("pathLength"));
- static OUString aSVGStrType(OUString::createFromAscii("type"));
- static OUString aSVGStrClass(OUString::createFromAscii("class"));
- static OUString aSVGStrTextAnchor(OUString::createFromAscii("text-anchor"));
- static OUString aSVGStrXmlSpace(OUString::createFromAscii("xml:space"));
- static OUString aSVGStrColor(OUString::createFromAscii("color"));
- static OUString aSVGStrClipPathNode(OUString::createFromAscii("clipPath"));
- static OUString aSVGStrClipPathProperty(OUString::createFromAscii("clip-path"));
- static OUString aSVGStrMask(OUString::createFromAscii("mask"));
- static OUString aSVGStrClipPathUnits(OUString::createFromAscii("clipPathUnits"));
- static OUString aSVGStrMaskUnits(OUString::createFromAscii("maskUnits"));
- static OUString aSVGStrMaskContentUnits(OUString::createFromAscii("maskContentUnits"));
- static OUString aSVGStrClipRule(OUString::createFromAscii("clip-rule"));
- static OUString aSVGStrMarker(OUString::createFromAscii("marker"));
- static OUString aSVGStrMarkerStart(OUString::createFromAscii("marker-start"));
- static OUString aSVGStrMarkerMid(OUString::createFromAscii("marker-mid"));
- static OUString aSVGStrMarkerEnd(OUString::createFromAscii("marker-end"));
- static OUString aSVGStrRefX(OUString::createFromAscii("refX"));
- static OUString aSVGStrRefY(OUString::createFromAscii("refY"));
- static OUString aSVGStrMarkerUnits(OUString::createFromAscii("markerUnits"));
- static OUString aSVGStrMarkerWidth(OUString::createFromAscii("markerWidth"));
- static OUString aSVGStrMarkerHeight(OUString::createFromAscii("markerHeight"));
- static OUString aSVGStrOrient(OUString::createFromAscii("orient"));
- static OUString aSVGStrPattern(OUString::createFromAscii("pattern"));
- static OUString aSVGStrPatternUnits(OUString::createFromAscii("patternUnits"));
- static OUString aSVGStrPatternContentUnits(OUString::createFromAscii("patternContentUnits"));
- static OUString aSVGStrPatternTransform(OUString::createFromAscii("patternTransform"));
- static OUString aSVGStrOpacity(OUString::createFromAscii("opacity"));
- static OUString aSVGStrTitle(OUString::createFromAscii("title"));
- static OUString aSVGStrDesc(OUString::createFromAscii("desc"));
+ static OUString aSVGStrWidth("width");
+ static OUString aSVGStrHeight("height");
+ static OUString aSVGStrViewBox("viewBox");
+ static OUString aSVGStrTransform("transform");
+ static OUString aSVGStrStyle("style");
+ static OUString aSVGStrDisplay("display"); // #i121656#
+ static OUString aSVGStrD("d");
+ static OUString aSVGStrX("x");
+ static OUString aSVGStrY("y");
+ static OUString aSVGStrXmlns("xmlns");
+ static OUString aSVGStrVersion("version");
+ static OUString aSVGStrId("id");
+ static OUString aSVGStrRx("rx");
+ static OUString aSVGStrRy("ry");
+ static OUString aSVGStrPoints("points");
+ static OUString aSVGStrDx("dx");
+ static OUString aSVGStrDy("dy");
+ static OUString aSVGStrRotate("rotate");
+ static OUString aSVGStrTextLength("textLength");
+ static OUString aSVGStrLengthAdjust("lengthAdjust");
+ static OUString aSVGStrFont("font");
+ static OUString aSVGStrFontFamily("font-family");
+ static OUString aSVGStrFontSize("font-size");
+ static OUString aSVGStrFontSizeAdjust("font-size-adjust");
+ static OUString aSVGStrFontStretch("font-stretch");
+ static OUString aSVGStrFontStyle("font-style");
+ static OUString aSVGStrFontVariant("font-variant");
+ static OUString aSVGStrFontWeight("font-weight");
+ static OUString aSVGStrDirection("direction");
+ static OUString aSVGStrLetterSpacing("letter-spacing");
+ static OUString aSVGStrTextDecoration("text-decoration");
+ static OUString aSVGStrUnicodeBidi("unicode-bidi");
+ static OUString aSVGStrWordSpacing("word-spacing");
+ static OUString aSVGStrTspan("tspan");
+ static OUString aSVGStrTref("tref");
+ static OUString aSVGStrTextPath("textPath");
+ static OUString aSVGStrStartOffset("startOffset");
+ static OUString aSVGStrMethod("method");
+ static OUString aSVGStrSpacing("spacing");
+ static OUString aSVGStrTextAlign("text-align");
+ static OUString aSVGStrPathLength("pathLength");
+ static OUString aSVGStrType("type");
+ static OUString aSVGStrClass("class");
+ static OUString aSVGStrTextAnchor("text-anchor");
+ static OUString aSVGStrXmlSpace("xml:space");
+ static OUString aSVGStrColor("color");
+ static OUString aSVGStrClipPathNode("clipPath");
+ static OUString aSVGStrClipPathProperty("clip-path");
+ static OUString aSVGStrMask("mask");
+ static OUString aSVGStrClipPathUnits("clipPathUnits");
+ static OUString aSVGStrMaskUnits("maskUnits");
+ static OUString aSVGStrMaskContentUnits("maskContentUnits");
+ static OUString aSVGStrClipRule("clip-rule");
+ static OUString aSVGStrMarker("marker");
+ static OUString aSVGStrMarkerStart("marker-start");
+ static OUString aSVGStrMarkerMid("marker-mid");
+ static OUString aSVGStrMarkerEnd("marker-end");
+ static OUString aSVGStrRefX("refX");
+ static OUString aSVGStrRefY("refY");
+ static OUString aSVGStrMarkerUnits("markerUnits");
+ static OUString aSVGStrMarkerWidth("markerWidth");
+ static OUString aSVGStrMarkerHeight("markerHeight");
+ static OUString aSVGStrOrient("orient");
+ static OUString aSVGStrPattern("pattern");
+ static OUString aSVGStrPatternUnits("patternUnits");
+ static OUString aSVGStrPatternContentUnits("patternContentUnits");
+ static OUString aSVGStrPatternTransform("patternTransform");
+ static OUString aSVGStrOpacity("opacity");
+ static OUString aSVGStrTitle("title");
+ static OUString aSVGStrDesc("desc");
- static OUString aSVGStrPreserveAspectRatio(OUString::createFromAscii("preserveAspectRatio"));
- static OUString aSVGStrDefer(OUString::createFromAscii("defer"));
- static OUString aSVGStrNone(OUString::createFromAscii("none"));
- static OUString aSVGStrXMinYMin(OUString::createFromAscii("xMinYMin"));
- static OUString aSVGStrXMidYMin(OUString::createFromAscii("xMidYMin"));
- static OUString aSVGStrXMaxYMin(OUString::createFromAscii("xMaxYMin"));
- static OUString aSVGStrXMinYMid(OUString::createFromAscii("xMinYMid"));
- static OUString aSVGStrXMidYMid(OUString::createFromAscii("xMidYMid"));
- static OUString aSVGStrXMaxYMid(OUString::createFromAscii("xMaxYMid"));
- static OUString aSVGStrXMinYMax(OUString::createFromAscii("xMinYMax"));
- static OUString aSVGStrXMidYMax(OUString::createFromAscii("xMidYMax"));
- static OUString aSVGStrXMaxYMax(OUString::createFromAscii("xMaxYMax"));
- static OUString aSVGStrMeet(OUString::createFromAscii("meet"));
- static OUString aSVGStrSlice(OUString::createFromAscii("slice"));
+ static OUString aSVGStrPreserveAspectRatio("preserveAspectRatio");
+ static OUString aSVGStrDefer("defer");
+ static OUString aSVGStrNone("none");
+ static OUString aSVGStrXMinYMin("xMinYMin");
+ static OUString aSVGStrXMidYMin("xMidYMin");
+ static OUString aSVGStrXMaxYMin("xMaxYMin");
+ static OUString aSVGStrXMinYMid("xMinYMid");
+ static OUString aSVGStrXMidYMid("xMidYMid");
+ static OUString aSVGStrXMaxYMid("xMaxYMid");
+ static OUString aSVGStrXMinYMax("xMinYMax");
+ static OUString aSVGStrXMidYMax("xMidYMax");
+ static OUString aSVGStrXMaxYMax("xMaxYMax");
+ static OUString aSVGStrMeet("meet");
+ static OUString aSVGStrSlice("slice");
- static OUString aSVGStrDefs(OUString::createFromAscii("defs"));
- static OUString aSVGStrG(OUString::createFromAscii("g"));
- static OUString aSVGStrSvg(OUString::createFromAscii("svg"));
- static OUString aSVGStrSymbol(OUString::createFromAscii("symbol"));
- static OUString aSVGStrUse(OUString::createFromAscii("use"));
+ static OUString aSVGStrDefs("defs");
+ static OUString aSVGStrG("g");
+ static OUString aSVGStrSvg("svg");
+ static OUString aSVGStrSymbol("symbol");
+ static OUString aSVGStrUse("use");
- static OUString aSVGStrCircle(OUString::createFromAscii("circle"));
- static OUString aSVGStrEllipse(OUString::createFromAscii("ellipse"));
- static OUString aSVGStrLine(OUString::createFromAscii("line"));
- static OUString aSVGStrPath(OUString::createFromAscii("path"));
- static OUString aSVGStrPolygon(OUString::createFromAscii("polygon"));
- static OUString aSVGStrPolyline(OUString::createFromAscii("polyline"));
- static OUString aSVGStrRect(OUString::createFromAscii("rect"));
- static OUString aSVGStrImage(OUString::createFromAscii("image"));
+ static OUString aSVGStrCircle("circle");
+ static OUString aSVGStrEllipse("ellipse");
+ static OUString aSVGStrLine("line");
+ static OUString aSVGStrPath("path");
+ static OUString aSVGStrPolygon("polygon");
+ static OUString aSVGStrPolyline("polyline");
+ static OUString aSVGStrRect("rect");
+ static OUString aSVGStrImage("image");
- static OUString aSVGStrLinearGradient(OUString::createFromAscii("linearGradient"));
- static OUString aSVGStrRadialGradient(OUString::createFromAscii("radialGradient"));
- static OUString aSVGStrStop(OUString::createFromAscii("stop"));
- static OUString aSVGStrOffset(OUString::createFromAscii("offset"));
- static OUString aSVGStrX1(OUString::createFromAscii("x1"));
- static OUString aSVGStrY1(OUString::createFromAscii("y1"));
- static OUString aSVGStrX2(OUString::createFromAscii("x2"));
- static OUString aSVGStrY2(OUString::createFromAscii("y2"));
- static OUString aSVGStrCx(OUString::createFromAscii("cx"));
- static OUString aSVGStrCy(OUString::createFromAscii("cy"));
- static OUString aSVGStrFx(OUString::createFromAscii("fx"));
- static OUString aSVGStrFy(OUString::createFromAscii("fy"));
- static OUString aSVGStrR(OUString::createFromAscii("r"));
- static OUString aSVGStrGradientUnits(OUString::createFromAscii("gradientUnits"));
- static OUString aSVGStrGradientTransform(OUString::createFromAscii("gradientTransform"));
- static OUString aSVGStrSpreadMethod(OUString::createFromAscii("spreadMethod"));
- static OUString aSVGStrXlinkHref(OUString::createFromAscii("xlink:href"));
- static OUString aSVGStrStopColor(OUString::createFromAscii("stop-color"));
- static OUString aSVGStrStopOpacity(OUString::createFromAscii("stop-opacity"));
+ static OUString aSVGStrLinearGradient("linearGradient");
+ static OUString aSVGStrRadialGradient("radialGradient");
+ static OUString aSVGStrStop("stop");
+ static OUString aSVGStrOffset("offset");
+ static OUString aSVGStrX1("x1");
+ static OUString aSVGStrY1("y1");
+ static OUString aSVGStrX2("x2");
+ static OUString aSVGStrY2("y2");
+ static OUString aSVGStrCx("cx");
+ static OUString aSVGStrCy("cy");
+ static OUString aSVGStrFx("fx");
+ static OUString aSVGStrFy("fy");
+ static OUString aSVGStrR("r");
+ static OUString aSVGStrGradientUnits("gradientUnits");
+ static OUString aSVGStrGradientTransform("gradientTransform");
+ static OUString aSVGStrSpreadMethod("spreadMethod");
+ static OUString aSVGStrXlinkHref("xlink:href");
+ static OUString aSVGStrStopColor("stop-color");
+ static OUString aSVGStrStopOpacity("stop-opacity");
- static OUString aSVGStrFill(OUString::createFromAscii("fill"));
- static OUString aSVGStrFillOpacity(OUString::createFromAscii("fill-opacity"));
- static OUString aSVGStrFillRule(OUString::createFromAscii("fill-rule"));
+ static OUString aSVGStrFill("fill");
+ static OUString aSVGStrFillOpacity("fill-opacity");
+ static OUString aSVGStrFillRule("fill-rule");
- static OUString aSVGStrStroke(OUString::createFromAscii("stroke"));
- static OUString aSVGStrStrokeDasharray(OUString::createFromAscii("stroke-dasharray"));
- static OUString aSVGStrStrokeDashoffset(OUString::createFromAscii("stroke-dashoffset"));
- static OUString aSVGStrStrokeLinecap(OUString::createFromAscii("stroke-linecap"));
- static OUString aSVGStrStrokeLinejoin(OUString::createFromAscii("stroke-linejoin"));
- static OUString aSVGStrStrokeMiterlimit(OUString::createFromAscii("stroke-miterlimit"));
- static OUString aSVGStrStrokeOpacity(OUString::createFromAscii("stroke-opacity"));
- static OUString aSVGStrStrokeWidth(OUString::createFromAscii("stroke-width"));
+ static OUString aSVGStrStroke("stroke");
+ static OUString aSVGStrStrokeDasharray("stroke-dasharray");
+ static OUString aSVGStrStrokeDashoffset("stroke-dashoffset");
+ static OUString aSVGStrStrokeLinecap("stroke-linecap");
+ static OUString aSVGStrStrokeLinejoin("stroke-linejoin");
+ static OUString aSVGStrStrokeMiterlimit("stroke-miterlimit");
+ static OUString aSVGStrStrokeOpacity("stroke-opacity");
+ static OUString aSVGStrStrokeWidth("stroke-width");
- static OUString aSVGStrText(OUString::createFromAscii("text"));
- static OUString aSVGStrBaselineShift(OUString::createFromAscii("baseline-shift"));
+ static OUString aSVGStrText("text");
+ static OUString aSVGStrBaselineShift("baseline-shift");
SVGToken StrToSVGToken(const OUString& rStr)
{
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index a24599a7559f..77de836476db 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -42,10 +42,10 @@ namespace svgio
#endif
// common non-token strings
- const OUString commonStrings::aStrUserSpaceOnUse(OUString::createFromAscii("userSpaceOnUse"));
- const OUString commonStrings::aStrObjectBoundingBox(OUString::createFromAscii("objectBoundingBox"));
- const OUString commonStrings::aStrNonzero(OUString::createFromAscii("nonzero"));
- const OUString commonStrings::aStrEvenOdd(OUString::createFromAscii("evenodd"));
+ const OUString commonStrings::aStrUserSpaceOnUse("userSpaceOnUse");
+ const OUString commonStrings::aStrObjectBoundingBox("objectBoundingBox");
+ const OUString commonStrings::aStrNonzero("nonzero");
+ const OUString commonStrings::aStrEvenOdd("evenodd");
basegfx::B2DHomMatrix SvgAspectRatio::createLinearMapping(const basegfx::B2DRange& rTarget, const basegfx::B2DRange& rSource)
{
@@ -231,7 +231,7 @@ namespace svgio
if ( aViewPort.isEmpty() )
{
#ifdef DBG_UTIL
- myAssert(rtl::OUString::createFromAscii("Design error, this case should have been handled in the caller"));
+ myAssert(OUString("Design error, this case should have been handled in the caller"));
#endif
// no viewPort, assume a normal page size (A4)
aViewPort = basegfx::B2DRange(
@@ -568,8 +568,8 @@ namespace svgio
if(nPos < nLen)
{
const sal_Unicode aChar(rCandidate[nPos]);
- static OUString aStrGrad(OUString::createFromAscii("grad"));
- static OUString aStrRad(OUString::createFromAscii("rad"));
+ static OUString aStrGrad("grad");
+ static OUString aStrRad("rad");
switch(aChar)
{
@@ -647,153 +647,153 @@ namespace svgio
if(aColorTokenMapperList.empty())
{
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("aliceblue"), Color(240, 248, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("antiquewhite"), Color(250, 235, 215)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("aqua"), Color( 0, 255, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("aquamarine"), Color(127, 255, 212)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("azure"), Color(240, 255, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("beige"), Color(245, 245, 220)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("bisque"), Color(255, 228, 196)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("black"), Color( 0, 0, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("blanchedalmond"), Color(255, 235, 205)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("blue"), Color( 0, 0, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("blueviolet"), Color(138, 43, 226)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("brown"), Color(165, 42, 42)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("burlywood"), Color(222, 184, 135)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("cadetblue"), Color( 95, 158, 160)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("chartreuse"), Color(127, 255, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("chocolate"), Color(210, 105, 30)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("coral"), Color(255, 127, 80)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("cornflowerblue"), Color(100, 149, 237)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("cornsilk"), Color(255, 248, 220)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("crimson"), Color(220, 20, 60)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("cyan"), Color( 0, 255, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkblue"), Color( 0, 0, 139)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkcyan"), Color( 0, 139, 139)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkgoldenrod"), Color(184, 134, 11)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkgray"), Color(169, 169, 169)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkgreen"), Color( 0, 100, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkgrey"), Color(169, 169, 169)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkkhaki"), Color(189, 183, 107)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkmagenta"), Color(139, 0, 139)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkolivegreen"), Color( 85, 107, 47)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkorange"), Color(255, 140, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkorchid"), Color(153, 50, 204)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkred"), Color(139, 0, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darksalmon"), Color(233, 150, 122)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkseagreen"), Color(143, 188, 143)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkslateblue"), Color( 72, 61, 139)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkslategray"), Color( 47, 79, 79)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkslategrey"), Color( 47, 79, 79)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkturquoise"), Color( 0, 206, 209)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("darkviolet"), Color(148, 0, 211)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("deeppink"), Color(255, 20, 147)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("deepskyblue"), Color( 0, 191, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("dimgray"), Color(105, 105, 105)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("dimgrey"), Color(105, 105, 105)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("dodgerblue"), Color( 30, 144, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("firebrick"), Color(178, 34, 34)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("floralwhite"), Color(255, 250, 240)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("forestgreen"), Color( 34, 139, 34)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("fuchsia"), Color(255, 0, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("gainsboro"), Color(220, 220, 220)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("ghostwhite"), Color(248, 248, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("gold"), Color(255, 215, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("goldenrod"), Color(218, 165, 32)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("gray"), Color(128, 128, 128)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("grey"), Color(128, 128, 128)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("green"), Color(0, 128, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("greenyellow"), Color(173, 255, 47)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("honeydew"), Color(240, 255, 240)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("hotpink"), Color(255, 105, 180)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("indianred"), Color(205, 92, 92)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("indigo"), Color( 75, 0, 130)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("ivory"), Color(255, 255, 240)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("khaki"), Color(240, 230, 140)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lavender"), Color(230, 230, 250)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lavenderblush"), Color(255, 240, 245)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lawngreen"), Color(124, 252, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lemonchiffon"), Color(255, 250, 205)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightblue"), Color(173, 216, 230)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightcoral"), Color(240, 128, 128)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightcyan"), Color(224, 255, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightgoldenrodyellow"), Color(250, 250, 210)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightgray"), Color(211, 211, 211)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightgreen"), Color(144, 238, 144)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightgrey"), Color(211, 211, 211)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightpink"), Color(255, 182, 193)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightsalmon"), Color(255, 160, 122)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightseagreen"), Color( 32, 178, 170)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightskyblue"), Color(135, 206, 250)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightslategray"), Color(119, 136, 153)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightslategrey"), Color(119, 136, 153)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightsteelblue"), Color(176, 196, 222)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lightyellow"), Color(255, 255, 224)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("lime"), Color( 0, 255, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("limegreen"), Color( 50, 205, 50)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("linen"), Color(250, 240, 230)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("magenta"), Color(255, 0, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("maroon"), Color(128, 0, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumaquamarine"), Color(102, 205, 170)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumblue"), Color( 0, 0, 205)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumorchid"), Color(186, 85, 211)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumpurple"), Color(147, 112, 219)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumseagreen"), Color( 60, 179, 113)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumslateblue"), Color(123, 104, 238)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumspringgreen"), Color( 0, 250, 154)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumturquoise"), Color( 72, 209, 204)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mediumvioletred"), Color(199, 21, 133)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("midnightblue"), Color( 25, 25, 112)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mintcream"), Color(245, 255, 250)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("mistyrose"), Color(255, 228, 225)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("moccasin"), Color(255, 228, 181)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("navajowhite"), Color(255, 222, 173)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("navy"), Color( 0, 0, 128)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("oldlace"), Color(253, 245, 230)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("olive"), Color(128, 128, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("olivedrab"), Color(107, 142, 35)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("orange"), Color(255, 165, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("orangered"), Color(255, 69, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("orchid"), Color(218, 112, 214)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("palegoldenrod"), Color(238, 232, 170)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("palegreen"), Color(152, 251, 152)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("paleturquoise"), Color(175, 238, 238)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("palevioletred"), Color(219, 112, 147)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("papayawhip"), Color(255, 239, 213)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("peachpuff"), Color(255, 218, 185)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("peru"), Color(205, 133, 63)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("pink"), Color(255, 192, 203)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("plum"), Color(221, 160, 221)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("powderblue"), Color(176, 224, 230)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("purple"), Color(128, 0, 128)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("red"), Color(255, 0, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("rosybrown"), Color(188, 143, 143)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("royalblue"), Color( 65, 105, 225)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("saddlebrown"), Color(139, 69, 19)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("salmon"), Color(250, 128, 114)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("sandybrown"), Color(244, 164, 96)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("seagreen"), Color( 46, 139, 87)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("seashell"), Color(255, 245, 238)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("sienna"), Color(160, 82, 45)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("silver"), Color(192, 192, 192)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("skyblue"), Color(135, 206, 235)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("slateblue"), Color(106, 90, 205)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("slategray"), Color(112, 128, 144)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("slategrey"), Color(112, 128, 144)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("snow"), Color(255, 250, 250)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("springgreen"), Color( 0, 255, 127)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("steelblue"), Color( 70, 130, 180)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("tan"), Color(210, 180, 140)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("teal"), Color( 0, 128, 128)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("thistle"), Color(216, 191, 216)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("tomato"), Color(255, 99, 71)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("turquoise"), Color( 64, 224, 208)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("violet"), Color(238, 130, 238)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("wheat"), Color(245, 222, 179)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("white"), Color(255, 255, 255)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("whitesmoke"), Color(245, 245, 245)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("yellow"), Color(255, 255, 0)));
- aColorTokenMapperList.insert(ColorTokenValueType(OUString::createFromAscii("yellowgreen"), Color(154, 205, 50)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("aliceblue"), Color(240, 248, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("antiquewhite"), Color(250, 235, 215)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("aqua"), Color( 0, 255, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("aquamarine"), Color(127, 255, 212)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("azure"), Color(240, 255, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("beige"), Color(245, 245, 220)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("bisque"), Color(255, 228, 196)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("black"), Color( 0, 0, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("blanchedalmond"), Color(255, 235, 205)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("blue"), Color( 0, 0, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("blueviolet"), Color(138, 43, 226)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("brown"), Color(165, 42, 42)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("burlywood"), Color(222, 184, 135)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("cadetblue"), Color( 95, 158, 160)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("chartreuse"), Color(127, 255, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("chocolate"), Color(210, 105, 30)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("coral"), Color(255, 127, 80)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("cornflowerblue"), Color(100, 149, 237)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("cornsilk"), Color(255, 248, 220)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("crimson"), Color(220, 20, 60)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("cyan"), Color( 0, 255, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkblue"), Color( 0, 0, 139)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkcyan"), Color( 0, 139, 139)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkgoldenrod"), Color(184, 134, 11)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkgray"), Color(169, 169, 169)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkgreen"), Color( 0, 100, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkgrey"), Color(169, 169, 169)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkkhaki"), Color(189, 183, 107)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkmagenta"), Color(139, 0, 139)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkolivegreen"), Color( 85, 107, 47)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkorange"), Color(255, 140, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkorchid"), Color(153, 50, 204)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkred"), Color(139, 0, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darksalmon"), Color(233, 150, 122)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkseagreen"), Color(143, 188, 143)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkslateblue"), Color( 72, 61, 139)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkslategray"), Color( 47, 79, 79)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkslategrey"), Color( 47, 79, 79)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkturquoise"), Color( 0, 206, 209)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("darkviolet"), Color(148, 0, 211)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("deeppink"), Color(255, 20, 147)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("deepskyblue"), Color( 0, 191, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("dimgray"), Color(105, 105, 105)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("dimgrey"), Color(105, 105, 105)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("dodgerblue"), Color( 30, 144, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("firebrick"), Color(178, 34, 34)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("floralwhite"), Color(255, 250, 240)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("forestgreen"), Color( 34, 139, 34)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("fuchsia"), Color(255, 0, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("gainsboro"), Color(220, 220, 220)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("ghostwhite"), Color(248, 248, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("gold"), Color(255, 215, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("goldenrod"), Color(218, 165, 32)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("gray"), Color(128, 128, 128)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("grey"), Color(128, 128, 128)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("green"), Color(0, 128, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("greenyellow"), Color(173, 255, 47)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("honeydew"), Color(240, 255, 240)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("hotpink"), Color(255, 105, 180)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("indianred"), Color(205, 92, 92)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("indigo"), Color( 75, 0, 130)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("ivory"), Color(255, 255, 240)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("khaki"), Color(240, 230, 140)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lavender"), Color(230, 230, 250)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lavenderblush"), Color(255, 240, 245)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lawngreen"), Color(124, 252, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lemonchiffon"), Color(255, 250, 205)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightblue"), Color(173, 216, 230)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightcoral"), Color(240, 128, 128)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightcyan"), Color(224, 255, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightgoldenrodyellow"), Color(250, 250, 210)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightgray"), Color(211, 211, 211)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightgreen"), Color(144, 238, 144)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightgrey"), Color(211, 211, 211)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightpink"), Color(255, 182, 193)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightsalmon"), Color(255, 160, 122)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightseagreen"), Color( 32, 178, 170)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightskyblue"), Color(135, 206, 250)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightslategray"), Color(119, 136, 153)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightslategrey"), Color(119, 136, 153)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightsteelblue"), Color(176, 196, 222)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lightyellow"), Color(255, 255, 224)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("lime"), Color( 0, 255, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("limegreen"), Color( 50, 205, 50)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("linen"), Color(250, 240, 230)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("magenta"), Color(255, 0, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("maroon"), Color(128, 0, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumaquamarine"), Color(102, 205, 170)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumblue"), Color( 0, 0, 205)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumorchid"), Color(186, 85, 211)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumpurple"), Color(147, 112, 219)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumseagreen"), Color( 60, 179, 113)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumslateblue"), Color(123, 104, 238)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumspringgreen"), Color( 0, 250, 154)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumturquoise"), Color( 72, 209, 204)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mediumvioletred"), Color(199, 21, 133)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("midnightblue"), Color( 25, 25, 112)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mintcream"), Color(245, 255, 250)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("mistyrose"), Color(255, 228, 225)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("moccasin"), Color(255, 228, 181)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("navajowhite"), Color(255, 222, 173)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("navy"), Color( 0, 0, 128)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("oldlace"), Color(253, 245, 230)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("olive"), Color(128, 128, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("olivedrab"), Color(107, 142, 35)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("orange"), Color(255, 165, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("orangered"), Color(255, 69, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("orchid"), Color(218, 112, 214)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("palegoldenrod"), Color(238, 232, 170)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("palegreen"), Color(152, 251, 152)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("paleturquoise"), Color(175, 238, 238)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("palevioletred"), Color(219, 112, 147)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("papayawhip"), Color(255, 239, 213)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("peachpuff"), Color(255, 218, 185)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("peru"), Color(205, 133, 63)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("pink"), Color(255, 192, 203)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("plum"), Color(221, 160, 221)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("powderblue"), Color(176, 224, 230)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("purple"), Color(128, 0, 128)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("red"), Color(255, 0, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("rosybrown"), Color(188, 143, 143)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("royalblue"), Color( 65, 105, 225)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("saddlebrown"), Color(139, 69, 19)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("salmon"), Color(250, 128, 114)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("sandybrown"), Color(244, 164, 96)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("seagreen"), Color( 46, 139, 87)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("seashell"), Color(255, 245, 238)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("sienna"), Color(160, 82, 45)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("silver"), Color(192, 192, 192)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("skyblue"), Color(135, 206, 235)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("slateblue"), Color(106, 90, 205)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("slategray"), Color(112, 128, 144)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("slategrey"), Color(112, 128, 144)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("snow"), Color(255, 250, 250)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("springgreen"), Color( 0, 255, 127)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("steelblue"), Color( 70, 130, 180)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("tan"), Color(210, 180, 140)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("teal"), Color( 0, 128, 128)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("thistle"), Color(216, 191, 216)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("tomato"), Color(255, 99, 71)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("turquoise"), Color( 64, 224, 208)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("violet"), Color(238, 130, 238)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("wheat"), Color(245, 222, 179)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("white"), Color(255, 255, 255)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("whitesmoke"), Color(245, 245, 245)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("yellow"), Color(255, 255, 0)));
+ aColorTokenMapperList.insert(ColorTokenValueType(OUString("yellowgreen"), Color(154, 205, 50)));
}
const ColorTokenMapper::const_iterator aResult(aColorTokenMapperList.find(rName));
@@ -857,7 +857,7 @@ namespace svgio
}
else
{
- static OUString aStrRgb(OUString::createFromAscii("rgb"));
+ static OUString aStrRgb("rgb");
if(rCandidate.matchIgnoreAsciiCase(aStrRgb, 0))
{
@@ -983,12 +983,12 @@ namespace svgio
{
const sal_Unicode aChar(rCandidate[nPos]);
const sal_Int32 nInitPos(nPos);
- static OUString aStrMatrix(OUString::createFromAscii("matrix"));
- static OUString aStrTranslate(OUString::createFromAscii("translate"));
- static OUString aStrScale(OUString::createFromAscii("scale"));
- static OUString aStrRotate(OUString::createFromAscii("rotate"));
- static OUString aStrSkewX(OUString::createFromAscii("skewX"));
- static OUString aStrSkewY(OUString::createFromAscii("skewY"));
+ static OUString aStrMatrix("matrix");
+ static OUString aStrTranslate("translate");
+ static OUString aStrScale("scale");
+ static OUString aStrRotate("rotate");
+ static OUString aStrSkewX("skewX");
+ static OUString aStrSkewY("skewY");
switch(aChar)
{
@@ -1184,9 +1184,9 @@ namespace svgio
bool readLocalUrl(const OUString& rCandidate, OUString& rURL)
{
- static OUString aStrUrl(OUString::createFromAscii("url"));
+ static OUString aStrUrl("url");
- if(rCandidate.match(aStrUrl, 0))
+ if(rCandidate.startsWith(aStrUrl))
{
const sal_Int32 nLen(rCandidate.getLength());
sal_Int32 nPos(aStrUrl.getLength());
@@ -1215,10 +1215,7 @@ namespace svgio
}
else
{
- static OUString aStrNone(OUString::createFromAscii("none"));
- static OUString aStrCurrentColor(OUString::createFromAscii("currentColor"));
-
- if(rCandidate.match(aStrNone, 0))
+ if(rCandidate.startsWith("none"))
{
rSvgPaint = SvgPaint(aColor, true, false, false);
return true;
@@ -1228,7 +1225,7 @@ namespace svgio
/// Url is copied to rURL, but needs to be solved outside this helper
return false;
}
- else if(rCandidate.match(aStrCurrentColor, 0))
+ else if(rCandidate.startsWith("currentColor"))
{
rSvgPaint = SvgPaint(aColor, true, true, true);
return true;
@@ -1424,7 +1421,7 @@ namespace svgio
}
else
{
- static OUString aStrData(OUString::createFromAscii("data:"));
+ static OUString aStrData("data:");
if(rCandidate.match(aStrData, 0))
{
@@ -1441,13 +1438,13 @@ namespace svgio
if(!rMimeType.isEmpty() && nPos < nLen)
{
- static OUString aStrImage(OUString::createFromAscii("image"));
+ static OUString aStrImage("image");
if(rMimeType.match(aStrImage, 0))
{
// image data
OUString aData(rCandidate.copy(nPos));
- static OUString aStrBase64(OUString::createFromAscii("base64"));
+ static OUString aStrBase64("base64");
if(aData.match(aStrBase64, 0))
{
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index ef8e417eef92..b07e6b498f41 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -48,8 +48,7 @@ namespace svgio
const SvgStyleAttributes* SvgUseNode::getSvgStyleAttributes() const
{
- static rtl::OUString aClassStr(rtl::OUString::createFromAscii("use"));
- return checkForCssStyle(aClassStr, maSvgStyleAttributes);
+ return checkForCssStyle(OUString("use"), maSvgStyleAttributes);
}
void SvgUseNode::parseAttribute(const OUString& rTokenName, SVGToken aSVGToken, const OUString& aContent)