1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <svgio/svgreader/svgtoken.hxx>
22 //////////////////////////////////////////////////////////////////////////////
28 static OUString
aSVGStrWidth(OUString::createFromAscii("width"));
29 static OUString
aSVGStrHeight(OUString::createFromAscii("height"));
30 static OUString
aSVGStrViewBox(OUString::createFromAscii("viewBox"));
31 static OUString
aSVGStrTransform(OUString::createFromAscii("transform"));
32 static OUString
aSVGStrStyle(OUString::createFromAscii("style"));
33 static OUString
aSVGStrDisplay(OUString::createFromAscii("display")); // #i121656#
34 static OUString
aSVGStrD(OUString::createFromAscii("d"));
35 static OUString
aSVGStrX(OUString::createFromAscii("x"));
36 static OUString
aSVGStrY(OUString::createFromAscii("y"));
37 static OUString
aSVGStrXmlns(OUString::createFromAscii("xmlns"));
38 static OUString
aSVGStrVersion(OUString::createFromAscii("version"));
39 static OUString
aSVGStrId(OUString::createFromAscii("id"));
40 static OUString
aSVGStrRx(OUString::createFromAscii("rx"));
41 static OUString
aSVGStrRy(OUString::createFromAscii("ry"));
42 static OUString
aSVGStrPoints(OUString::createFromAscii("points"));
43 static OUString
aSVGStrDx(OUString::createFromAscii("dx"));
44 static OUString
aSVGStrDy(OUString::createFromAscii("dy"));
45 static OUString
aSVGStrRotate(OUString::createFromAscii("rotate"));
46 static OUString
aSVGStrTextLength(OUString::createFromAscii("textLength"));
47 static OUString
aSVGStrLengthAdjust(OUString::createFromAscii("lengthAdjust"));
48 static OUString
aSVGStrFont(OUString::createFromAscii("font"));
49 static OUString
aSVGStrFontFamily(OUString::createFromAscii("font-family"));
50 static OUString
aSVGStrFontSize(OUString::createFromAscii("font-size"));
51 static OUString
aSVGStrFontSizeAdjust(OUString::createFromAscii("font-size-adjust"));
52 static OUString
aSVGStrFontStretch(OUString::createFromAscii("font-stretch"));
53 static OUString
aSVGStrFontStyle(OUString::createFromAscii("font-style"));
54 static OUString
aSVGStrFontVariant(OUString::createFromAscii("font-variant"));
55 static OUString
aSVGStrFontWeight(OUString::createFromAscii("font-weight"));
56 static OUString
aSVGStrDirection(OUString::createFromAscii("direction"));
57 static OUString
aSVGStrLetterSpacing(OUString::createFromAscii("letter-spacing"));
58 static OUString
aSVGStrTextDecoration(OUString::createFromAscii("text-decoration"));
59 static OUString
aSVGStrUnicodeBidi(OUString::createFromAscii("unicode-bidi"));
60 static OUString
aSVGStrWordSpacing(OUString::createFromAscii("word-spacing"));
61 static OUString
aSVGStrTspan(OUString::createFromAscii("tspan"));
62 static OUString
aSVGStrTref(OUString::createFromAscii("tref"));
63 static OUString
aSVGStrTextPath(OUString::createFromAscii("textPath"));
64 static OUString
aSVGStrStartOffset(OUString::createFromAscii("startOffset"));
65 static OUString
aSVGStrMethod(OUString::createFromAscii("method"));
66 static OUString
aSVGStrSpacing(OUString::createFromAscii("spacing"));
67 static OUString
aSVGStrTextAlign(OUString::createFromAscii("text-align"));
68 static OUString
aSVGStrPathLength(OUString::createFromAscii("pathLength"));
69 static OUString
aSVGStrType(OUString::createFromAscii("type"));
70 static OUString
aSVGStrClass(OUString::createFromAscii("class"));
71 static OUString
aSVGStrTextAnchor(OUString::createFromAscii("text-anchor"));
72 static OUString
aSVGStrXmlSpace(OUString::createFromAscii("xml:space"));
73 static OUString
aSVGStrColor(OUString::createFromAscii("color"));
74 static OUString
aSVGStrClipPathNode(OUString::createFromAscii("clipPath"));
75 static OUString
aSVGStrClipPathProperty(OUString::createFromAscii("clip-path"));
76 static OUString
aSVGStrMask(OUString::createFromAscii("mask"));
77 static OUString
aSVGStrClipPathUnits(OUString::createFromAscii("clipPathUnits"));
78 static OUString
aSVGStrMaskUnits(OUString::createFromAscii("maskUnits"));
79 static OUString
aSVGStrMaskContentUnits(OUString::createFromAscii("maskContentUnits"));
80 static OUString
aSVGStrClipRule(OUString::createFromAscii("clip-rule"));
81 static OUString
aSVGStrMarker(OUString::createFromAscii("marker"));
82 static OUString
aSVGStrMarkerStart(OUString::createFromAscii("marker-start"));
83 static OUString
aSVGStrMarkerMid(OUString::createFromAscii("marker-mid"));
84 static OUString
aSVGStrMarkerEnd(OUString::createFromAscii("marker-end"));
85 static OUString
aSVGStrRefX(OUString::createFromAscii("refX"));
86 static OUString
aSVGStrRefY(OUString::createFromAscii("refY"));
87 static OUString
aSVGStrMarkerUnits(OUString::createFromAscii("markerUnits"));
88 static OUString
aSVGStrMarkerWidth(OUString::createFromAscii("markerWidth"));
89 static OUString
aSVGStrMarkerHeight(OUString::createFromAscii("markerHeight"));
90 static OUString
aSVGStrOrient(OUString::createFromAscii("orient"));
91 static OUString
aSVGStrPattern(OUString::createFromAscii("pattern"));
92 static OUString
aSVGStrPatternUnits(OUString::createFromAscii("patternUnits"));
93 static OUString
aSVGStrPatternContentUnits(OUString::createFromAscii("patternContentUnits"));
94 static OUString
aSVGStrPatternTransform(OUString::createFromAscii("patternTransform"));
95 static OUString
aSVGStrOpacity(OUString::createFromAscii("opacity"));
96 static OUString
aSVGStrTitle(OUString::createFromAscii("title"));
97 static OUString
aSVGStrDesc(OUString::createFromAscii("desc"));
99 static OUString
aSVGStrPreserveAspectRatio(OUString::createFromAscii("preserveAspectRatio"));
100 static OUString
aSVGStrDefer(OUString::createFromAscii("defer"));
101 static OUString
aSVGStrNone(OUString::createFromAscii("none"));
102 static OUString
aSVGStrXMinYMin(OUString::createFromAscii("xMinYMin"));
103 static OUString
aSVGStrXMidYMin(OUString::createFromAscii("xMidYMin"));
104 static OUString
aSVGStrXMaxYMin(OUString::createFromAscii("xMaxYMin"));
105 static OUString
aSVGStrXMinYMid(OUString::createFromAscii("xMinYMid"));
106 static OUString
aSVGStrXMidYMid(OUString::createFromAscii("xMidYMid"));
107 static OUString
aSVGStrXMaxYMid(OUString::createFromAscii("xMaxYMid"));
108 static OUString
aSVGStrXMinYMax(OUString::createFromAscii("xMinYMax"));
109 static OUString
aSVGStrXMidYMax(OUString::createFromAscii("xMidYMax"));
110 static OUString
aSVGStrXMaxYMax(OUString::createFromAscii("xMaxYMax"));
111 static OUString
aSVGStrMeet(OUString::createFromAscii("meet"));
112 static OUString
aSVGStrSlice(OUString::createFromAscii("slice"));
114 static OUString
aSVGStrDefs(OUString::createFromAscii("defs"));
115 static OUString
aSVGStrG(OUString::createFromAscii("g"));
116 static OUString
aSVGStrSvg(OUString::createFromAscii("svg"));
117 static OUString
aSVGStrSymbol(OUString::createFromAscii("symbol"));
118 static OUString
aSVGStrUse(OUString::createFromAscii("use"));
120 static OUString
aSVGStrCircle(OUString::createFromAscii("circle"));
121 static OUString
aSVGStrEllipse(OUString::createFromAscii("ellipse"));
122 static OUString
aSVGStrLine(OUString::createFromAscii("line"));
123 static OUString
aSVGStrPath(OUString::createFromAscii("path"));
124 static OUString
aSVGStrPolygon(OUString::createFromAscii("polygon"));
125 static OUString
aSVGStrPolyline(OUString::createFromAscii("polyline"));
126 static OUString
aSVGStrRect(OUString::createFromAscii("rect"));
127 static OUString
aSVGStrImage(OUString::createFromAscii("image"));
129 static OUString
aSVGStrLinearGradient(OUString::createFromAscii("linearGradient"));
130 static OUString
aSVGStrRadialGradient(OUString::createFromAscii("radialGradient"));
131 static OUString
aSVGStrStop(OUString::createFromAscii("stop"));
132 static OUString
aSVGStrOffset(OUString::createFromAscii("offset"));
133 static OUString
aSVGStrX1(OUString::createFromAscii("x1"));
134 static OUString
aSVGStrY1(OUString::createFromAscii("y1"));
135 static OUString
aSVGStrX2(OUString::createFromAscii("x2"));
136 static OUString
aSVGStrY2(OUString::createFromAscii("y2"));
137 static OUString
aSVGStrCx(OUString::createFromAscii("cx"));
138 static OUString
aSVGStrCy(OUString::createFromAscii("cy"));
139 static OUString
aSVGStrFx(OUString::createFromAscii("fx"));
140 static OUString
aSVGStrFy(OUString::createFromAscii("fy"));
141 static OUString
aSVGStrR(OUString::createFromAscii("r"));
142 static OUString
aSVGStrGradientUnits(OUString::createFromAscii("gradientUnits"));
143 static OUString
aSVGStrGradientTransform(OUString::createFromAscii("gradientTransform"));
144 static OUString
aSVGStrSpreadMethod(OUString::createFromAscii("spreadMethod"));
145 static OUString
aSVGStrXlinkHref(OUString::createFromAscii("xlink:href"));
146 static OUString
aSVGStrStopColor(OUString::createFromAscii("stop-color"));
147 static OUString
aSVGStrStopOpacity(OUString::createFromAscii("stop-opacity"));
149 static OUString
aSVGStrFill(OUString::createFromAscii("fill"));
150 static OUString
aSVGStrFillOpacity(OUString::createFromAscii("fill-opacity"));
151 static OUString
aSVGStrFillRule(OUString::createFromAscii("fill-rule"));
153 static OUString
aSVGStrStroke(OUString::createFromAscii("stroke"));
154 static OUString
aSVGStrStrokeDasharray(OUString::createFromAscii("stroke-dasharray"));
155 static OUString
aSVGStrStrokeDashoffset(OUString::createFromAscii("stroke-dashoffset"));
156 static OUString
aSVGStrStrokeLinecap(OUString::createFromAscii("stroke-linecap"));
157 static OUString
aSVGStrStrokeLinejoin(OUString::createFromAscii("stroke-linejoin"));
158 static OUString
aSVGStrStrokeMiterlimit(OUString::createFromAscii("stroke-miterlimit"));
159 static OUString
aSVGStrStrokeOpacity(OUString::createFromAscii("stroke-opacity"));
160 static OUString
aSVGStrStrokeWidth(OUString::createFromAscii("stroke-width"));
162 static OUString
aSVGStrText(OUString::createFromAscii("text"));
163 static OUString
aSVGStrBaselineShift(OUString::createFromAscii("baseline-shift"));
165 SVGToken
StrToSVGToken(const OUString
& rStr
)
167 typedef boost::unordered_map
< OUString
, SVGToken
, OUStringHash
,::std::equal_to
< OUString
> > SVGTokenMapper
;
168 typedef std::pair
< OUString
, SVGToken
> SVGTokenValueType
;
169 static SVGTokenMapper aSVGTokenMapperList
;
171 if(aSVGTokenMapperList
.empty())
173 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrWidth
, SVGTokenWidth
));
174 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrHeight
, SVGTokenHeight
));
175 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrViewBox
, SVGTokenViewBox
));
176 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTransform
, SVGTokenTransform
));
177 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStyle
, SVGTokenStyle
));
178 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDisplay
, SVGTokenDisplay
)); // #i121656#
179 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrD
, SVGTokenD
));
180 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrX
, SVGTokenX
));
181 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrY
, SVGTokenY
));
182 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXmlns
, SVGTokenXmlns
));
183 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrVersion
, SVGTokenVersion
));
184 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrId
, SVGTokenId
));
185 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRx
, SVGTokenRx
));
186 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRy
, SVGTokenRy
));
187 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPoints
, SVGTokenPoints
));
188 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDx
, SVGTokenDx
));
189 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDy
, SVGTokenDy
));
190 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRotate
, SVGTokenRotate
));
191 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFont
, SVGTokenFont
));
192 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontFamily
, SVGTokenFontFamily
));
193 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontSize
, SVGTokenFontSize
));
194 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontSizeAdjust
, SVGTokenFontSizeAdjust
));
195 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontStretch
, SVGTokenFontStretch
));
196 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontStyle
, SVGTokenFontStyle
));
197 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontVariant
, SVGTokenFontVariant
));
198 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFontWeight
, SVGTokenFontWeight
));
199 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDirection
, SVGTokenDirection
));
200 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrLetterSpacing
, SVGTokenLetterSpacing
));
201 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTextDecoration
, SVGTokenTextDecoration
));
202 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrUnicodeBidi
, SVGTokenUnicodeBidi
));
203 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrWordSpacing
, SVGTokenWordSpacing
));
204 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTspan
, SVGTokenTspan
));
205 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTref
, SVGTokenTref
));
206 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTextPath
, SVGTokenTextPath
));
207 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStartOffset
, SVGTokenStartOffset
));
208 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMethod
, SVGTokenMethod
));
209 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSpacing
, SVGTokenSpacing
));
210 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTextAlign
, SVGTokenTextAlign
));
211 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPathLength
, SVGTokenPathLength
));
212 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrType
, SVGTokenType
));
213 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrClass
, SVGTokenClass
));
214 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTextAnchor
, SVGTokenTextAnchor
));
215 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXmlSpace
, SVGTokenXmlSpace
));
216 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrColor
, SVGTokenColor
));
217 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrClipPathNode
, SVGTokenClipPathNode
));
218 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrClipPathProperty
, SVGTokenClipPathProperty
));
219 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMask
, SVGTokenMask
));
220 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrClipPathUnits
, SVGTokenClipPathUnits
));
221 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMaskUnits
, SVGTokenMaskUnits
));
222 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMaskContentUnits
, SVGTokenMaskContentUnits
));
223 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrClipRule
, SVGTokenClipRule
));
224 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarker
, SVGTokenMarker
));
225 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarkerStart
, SVGTokenMarkerStart
));
226 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarkerMid
, SVGTokenMarkerMid
));
227 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarkerEnd
, SVGTokenMarkerEnd
));
228 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRefX
, SVGTokenRefX
));
229 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRefY
, SVGTokenRefY
));
230 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarkerUnits
, SVGTokenMarkerUnits
));
231 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarkerWidth
, SVGTokenMarkerWidth
));
232 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMarkerHeight
, SVGTokenMarkerHeight
));
233 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrOrient
, SVGTokenOrient
));
234 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPattern
, SVGTokenPattern
));
235 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPatternUnits
, SVGTokenPatternUnits
));
236 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPatternContentUnits
, SVGTokenPatternContentUnits
));
237 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPatternTransform
, SVGTokenPatternTransform
));
238 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrOpacity
, SVGTokenOpacity
));
239 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTitle
, SVGTokenTitle
));
240 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDesc
, SVGTokenDesc
));
242 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPreserveAspectRatio
, SVGTokenPreserveAspectRatio
));
243 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDefer
, SVGTokenDefer
));
244 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrNone
, SVGTokenNone
));
245 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMinYMin
, SVGTokenXMinYMin
));
246 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMidYMin
, SVGTokenXMidYMin
));
247 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMaxYMin
, SVGTokenXMaxYMin
));
248 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMinYMid
, SVGTokenXMinYMid
));
249 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMidYMid
, SVGTokenXMidYMid
));
250 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMaxYMid
, SVGTokenXMaxYMid
));
251 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMinYMax
, SVGTokenXMinYMax
));
252 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMidYMax
, SVGTokenXMidYMax
));
253 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMaxYMax
, SVGTokenXMaxYMax
));
254 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMeet
, SVGTokenMeet
));
255 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSlice
, SVGTokenSlice
));
257 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDefs
, SVGTokenDefs
));
258 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrG
, SVGTokenG
));
259 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSvg
, SVGTokenSvg
));
260 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSymbol
, SVGTokenSymbol
));
261 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrUse
, SVGTokenUse
));
263 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrCircle
, SVGTokenCircle
));
264 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrEllipse
, SVGTokenEllipse
));
265 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrLine
, SVGTokenLine
));
266 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPath
, SVGTokenPath
));
267 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPolygon
, SVGTokenPolygon
));
268 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPolyline
, SVGTokenPolyline
));
269 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRect
, SVGTokenRect
));
270 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrImage
, SVGTokenImage
));
272 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrLinearGradient
, SVGTokenLinearGradient
));
273 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRadialGradient
, SVGTokenRadialGradient
));
274 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStop
, SVGTokenStop
));
275 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrOffset
, SVGTokenOffset
));
276 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrX1
, SVGTokenX1
));
277 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrY1
, SVGTokenY1
));
278 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrX2
, SVGTokenX2
));
279 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrY2
, SVGTokenY2
));
280 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrCx
, SVGTokenCx
));
281 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrCy
, SVGTokenCy
));
282 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFx
, SVGTokenFx
));
283 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFy
, SVGTokenFy
));
284 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrR
, SVGTokenR
));
285 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrGradientUnits
, SVGTokenGradientUnits
));
286 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrGradientTransform
, SVGTokenGradientTransform
));
287 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSpreadMethod
, SVGTokenSpreadMethod
));
288 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXlinkHref
, SVGTokenXlinkHref
));
289 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStopColor
, SVGTokenStopColor
));
290 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStopOpacity
, SVGTokenStopOpacity
));
292 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFill
, SVGTokenFill
));
293 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFillOpacity
, SVGTokenFillOpacity
));
294 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFillRule
, SVGTokenFillRule
));
296 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStroke
, SVGTokenStroke
));
297 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeDasharray
, SVGTokenStrokeDasharray
));
298 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeDashoffset
, SVGTokenStrokeDashoffset
));
299 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeLinecap
, SVGTokenStrokeLinecap
));
300 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeLinejoin
, SVGTokenStrokeLinejoin
));
301 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit
, SVGTokenStrokeMiterlimit
));
302 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeOpacity
, SVGTokenStrokeOpacity
));
303 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeWidth
, SVGTokenStrokeWidth
));
305 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrText
, SVGTokenText
));
306 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrBaselineShift
, SVGTokenBaselineShift
));
309 const SVGTokenMapper::const_iterator
aResult(aSVGTokenMapperList
.find(rStr
.startsWith("svg:") ? rStr
.copy(4) : rStr
));
311 if(aResult
== aSVGTokenMapperList
.end())
313 return SVGTokenUnknown
;
317 return aResult
->second
;
321 const OUString
& getStrTitle()
326 const OUString
& getStrDesc()
330 } // end of namespace svgreader
331 } // end of namespace svgio
333 //////////////////////////////////////////////////////////////////////////////
336 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */