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