1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 // MARKER(update_precomp.py): autogen include statement, do not remove
23 #include "precompiled_svgio.hxx"
24 
25 #include <svgio/svgreader/svgtoken.hxx>
26 
27 //////////////////////////////////////////////////////////////////////////////
28 
29 namespace svgio
30 {
31     namespace svgreader
32     {
33         static rtl::OUString aSVGStrWidth(rtl::OUString::createFromAscii("width"));
34         static rtl::OUString aSVGStrHeight(rtl::OUString::createFromAscii("height"));
35         static rtl::OUString aSVGStrViewBox(rtl::OUString::createFromAscii("viewBox"));
36         static rtl::OUString aSVGStrTransform(rtl::OUString::createFromAscii("transform"));
37         static rtl::OUString aSVGStrStyle(rtl::OUString::createFromAscii("style"));
38         static rtl::OUString aSVGStrD(rtl::OUString::createFromAscii("d"));
39         static rtl::OUString aSVGStrX(rtl::OUString::createFromAscii("x"));
40         static rtl::OUString aSVGStrY(rtl::OUString::createFromAscii("y"));
41         static rtl::OUString aSVGStrXmlns(rtl::OUString::createFromAscii("xmlns"));
42         static rtl::OUString aSVGStrVersion(rtl::OUString::createFromAscii("version"));
43         static rtl::OUString aSVGStrId(rtl::OUString::createFromAscii("id"));
44         static rtl::OUString aSVGStrRx(rtl::OUString::createFromAscii("rx"));
45         static rtl::OUString aSVGStrRy(rtl::OUString::createFromAscii("ry"));
46         static rtl::OUString aSVGStrPoints(rtl::OUString::createFromAscii("points"));
47         static rtl::OUString aSVGStrDx(rtl::OUString::createFromAscii("dx"));
48         static rtl::OUString aSVGStrDy(rtl::OUString::createFromAscii("dy"));
49         static rtl::OUString aSVGStrRotate(rtl::OUString::createFromAscii("rotate"));
50         static rtl::OUString aSVGStrTextLength(rtl::OUString::createFromAscii("textLength"));
51         static rtl::OUString aSVGStrLengthAdjust(rtl::OUString::createFromAscii("lengthAdjust"));
52         static rtl::OUString aSVGStrFont(rtl::OUString::createFromAscii("font"));
53         static rtl::OUString aSVGStrFontFamily(rtl::OUString::createFromAscii("font-family"));
54         static rtl::OUString aSVGStrFontSize(rtl::OUString::createFromAscii("font-size"));
55         static rtl::OUString aSVGStrFontSizeAdjust(rtl::OUString::createFromAscii("font-size-adjust"));
56         static rtl::OUString aSVGStrFontStretch(rtl::OUString::createFromAscii("font-stretch"));
57         static rtl::OUString aSVGStrFontStyle(rtl::OUString::createFromAscii("font-style"));
58         static rtl::OUString aSVGStrFontVariant(rtl::OUString::createFromAscii("font-variant"));
59         static rtl::OUString aSVGStrFontWeight(rtl::OUString::createFromAscii("font-weight"));
60         static rtl::OUString aSVGStrDirection(rtl::OUString::createFromAscii("direction"));
61         static rtl::OUString aSVGStrLetterSpacing(rtl::OUString::createFromAscii("letter-spacing"));
62         static rtl::OUString aSVGStrTextDecoration(rtl::OUString::createFromAscii("text-decoration"));
63         static rtl::OUString aSVGStrUnicodeBidi(rtl::OUString::createFromAscii("unicode-bidi"));
64         static rtl::OUString aSVGStrWordSpacing(rtl::OUString::createFromAscii("word-spacing"));
65         static rtl::OUString aSVGStrTspan(rtl::OUString::createFromAscii("tspan"));
66         static rtl::OUString aSVGStrTref(rtl::OUString::createFromAscii("tref"));
67         static rtl::OUString aSVGStrTextPath(rtl::OUString::createFromAscii("textPath"));
68         static rtl::OUString aSVGStrStartOffset(rtl::OUString::createFromAscii("startOffset"));
69         static rtl::OUString aSVGStrMethod(rtl::OUString::createFromAscii("method"));
70         static rtl::OUString aSVGStrSpacing(rtl::OUString::createFromAscii("spacing"));
71         static rtl::OUString aSVGStrTextAlign(rtl::OUString::createFromAscii("text-align"));
72         static rtl::OUString aSVGStrPathLength(rtl::OUString::createFromAscii("pathLength"));
73         static rtl::OUString aSVGStrType(rtl::OUString::createFromAscii("type"));
74         static rtl::OUString aSVGStrClass(rtl::OUString::createFromAscii("class"));
75         static rtl::OUString aSVGStrTextAnchor(rtl::OUString::createFromAscii("text-anchor"));
76         static rtl::OUString aSVGStrXmlSpace(rtl::OUString::createFromAscii("xml:space"));
77         static rtl::OUString aSVGStrColor(rtl::OUString::createFromAscii("color"));
78         static rtl::OUString aSVGStrClipPathNode(rtl::OUString::createFromAscii("clipPath"));
79         static rtl::OUString aSVGStrClipPathProperty(rtl::OUString::createFromAscii("clip-path"));
80         static rtl::OUString aSVGStrMask(rtl::OUString::createFromAscii("mask"));
81         static rtl::OUString aSVGStrClipPathUnits(rtl::OUString::createFromAscii("clipPathUnits"));
82         static rtl::OUString aSVGStrMaskUnits(rtl::OUString::createFromAscii("maskUnits"));
83         static rtl::OUString aSVGStrMaskContentUnits(rtl::OUString::createFromAscii("maskContentUnits"));
84         static rtl::OUString aSVGStrClipRule(rtl::OUString::createFromAscii("clip-rule"));
85         static rtl::OUString aSVGStrMarker(rtl::OUString::createFromAscii("marker"));
86         static rtl::OUString aSVGStrMarkerStart(rtl::OUString::createFromAscii("marker-start"));
87         static rtl::OUString aSVGStrMarkerMid(rtl::OUString::createFromAscii("marker-mid"));
88         static rtl::OUString aSVGStrMarkerEnd(rtl::OUString::createFromAscii("marker-end"));
89         static rtl::OUString aSVGStrRefX(rtl::OUString::createFromAscii("refX"));
90         static rtl::OUString aSVGStrRefY(rtl::OUString::createFromAscii("refY"));
91         static rtl::OUString aSVGStrMarkerUnits(rtl::OUString::createFromAscii("markerUnits"));
92         static rtl::OUString aSVGStrMarkerWidth(rtl::OUString::createFromAscii("markerWidth"));
93         static rtl::OUString aSVGStrMarkerHeight(rtl::OUString::createFromAscii("markerHeight"));
94         static rtl::OUString aSVGStrOrient(rtl::OUString::createFromAscii("orient"));
95         static rtl::OUString aSVGStrPattern(rtl::OUString::createFromAscii("pattern"));
96         static rtl::OUString aSVGStrPatternUnits(rtl::OUString::createFromAscii("patternUnits"));
97         static rtl::OUString aSVGStrPatternContentUnits(rtl::OUString::createFromAscii("patternContentUnits"));
98         static rtl::OUString aSVGStrPatternTransform(rtl::OUString::createFromAscii("patternTransform"));
99         static rtl::OUString aSVGStrOpacity(rtl::OUString::createFromAscii("opacity"));
100 
101         static rtl::OUString aSVGStrPreserveAspectRatio(rtl::OUString::createFromAscii("preserveAspectRatio"));
102         static rtl::OUString aSVGStrDefer(rtl::OUString::createFromAscii("defer"));
103         static rtl::OUString aSVGStrNone(rtl::OUString::createFromAscii("none"));
104         static rtl::OUString aSVGStrXMinYMin(rtl::OUString::createFromAscii("xMinYMin"));
105         static rtl::OUString aSVGStrXMidYMin(rtl::OUString::createFromAscii("xMidYMin"));
106         static rtl::OUString aSVGStrXMaxYMin(rtl::OUString::createFromAscii("xMaxYMin"));
107         static rtl::OUString aSVGStrXMinYMid(rtl::OUString::createFromAscii("xMinYMid"));
108         static rtl::OUString aSVGStrXMidYMid(rtl::OUString::createFromAscii("xMidYMid"));
109         static rtl::OUString aSVGStrXMaxYMid(rtl::OUString::createFromAscii("xMaxYMid"));
110         static rtl::OUString aSVGStrXMinYMax(rtl::OUString::createFromAscii("xMinYMax"));
111         static rtl::OUString aSVGStrXMidYMax(rtl::OUString::createFromAscii("xMidYMax"));
112         static rtl::OUString aSVGStrXMaxYMax(rtl::OUString::createFromAscii("xMaxYMax"));
113         static rtl::OUString aSVGStrMeet(rtl::OUString::createFromAscii("meet"));
114         static rtl::OUString aSVGStrSlice(rtl::OUString::createFromAscii("slice"));
115 
116         static rtl::OUString aSVGStrDefs(rtl::OUString::createFromAscii("defs"));
117         static rtl::OUString aSVGStrG(rtl::OUString::createFromAscii("g"));
118         static rtl::OUString aSVGStrSvg(rtl::OUString::createFromAscii("svg"));
119         static rtl::OUString aSVGStrSymbol(rtl::OUString::createFromAscii("symbol"));
120         static rtl::OUString aSVGStrUse(rtl::OUString::createFromAscii("use"));
121 
122         static rtl::OUString aSVGStrCircle(rtl::OUString::createFromAscii("circle"));
123         static rtl::OUString aSVGStrEllipse(rtl::OUString::createFromAscii("ellipse"));
124         static rtl::OUString aSVGStrLine(rtl::OUString::createFromAscii("line"));
125         static rtl::OUString aSVGStrPath(rtl::OUString::createFromAscii("path"));
126         static rtl::OUString aSVGStrPolygon(rtl::OUString::createFromAscii("polygon"));
127         static rtl::OUString aSVGStrPolyline(rtl::OUString::createFromAscii("polyline"));
128         static rtl::OUString aSVGStrRect(rtl::OUString::createFromAscii("rect"));
129         static rtl::OUString aSVGStrImage(rtl::OUString::createFromAscii("image"));
130 
131         static rtl::OUString aSVGStrLinearGradient(rtl::OUString::createFromAscii("linearGradient"));
132         static rtl::OUString aSVGStrRadialGradient(rtl::OUString::createFromAscii("radialGradient"));
133         static rtl::OUString aSVGStrStop(rtl::OUString::createFromAscii("stop"));
134         static rtl::OUString aSVGStrOffset(rtl::OUString::createFromAscii("offset"));
135         static rtl::OUString aSVGStrX1(rtl::OUString::createFromAscii("x1"));
136         static rtl::OUString aSVGStrY1(rtl::OUString::createFromAscii("y1"));
137         static rtl::OUString aSVGStrX2(rtl::OUString::createFromAscii("x2"));
138         static rtl::OUString aSVGStrY2(rtl::OUString::createFromAscii("y2"));
139         static rtl::OUString aSVGStrCx(rtl::OUString::createFromAscii("cx"));
140         static rtl::OUString aSVGStrCy(rtl::OUString::createFromAscii("cy"));
141         static rtl::OUString aSVGStrFx(rtl::OUString::createFromAscii("fx"));
142         static rtl::OUString aSVGStrFy(rtl::OUString::createFromAscii("fy"));
143         static rtl::OUString aSVGStrR(rtl::OUString::createFromAscii("r"));
144         static rtl::OUString aSVGStrGradientUnits(rtl::OUString::createFromAscii("gradientUnits"));
145         static rtl::OUString aSVGStrGradientTransform(rtl::OUString::createFromAscii("gradientTransform"));
146         static rtl::OUString aSVGStrSpreadMethod(rtl::OUString::createFromAscii("spreadMethod"));
147         static rtl::OUString aSVGStrXlinkHref(rtl::OUString::createFromAscii("xlink:href"));
148         static rtl::OUString aSVGStrStopColor(rtl::OUString::createFromAscii("stop-color"));
149         static rtl::OUString aSVGStrStopOpacity(rtl::OUString::createFromAscii("stop-opacity"));
150 
151         static rtl::OUString aSVGStrFill(rtl::OUString::createFromAscii("fill"));
152         static rtl::OUString aSVGStrFillOpacity(rtl::OUString::createFromAscii("fill-opacity"));
153         static rtl::OUString aSVGStrFillRule(rtl::OUString::createFromAscii("fill-rule"));
154 
155         static rtl::OUString aSVGStrStroke(rtl::OUString::createFromAscii("stroke"));
156         static rtl::OUString aSVGStrStrokeDasharray(rtl::OUString::createFromAscii("stroke-dasharray"));
157         static rtl::OUString aSVGStrStrokeDashoffset(rtl::OUString::createFromAscii("stroke-dashoffset"));
158         static rtl::OUString aSVGStrStrokeLinecap(rtl::OUString::createFromAscii("stroke-linecap"));
159         static rtl::OUString aSVGStrStrokeLinejoin(rtl::OUString::createFromAscii("stroke-linejoin"));
160         static rtl::OUString aSVGStrStrokeMiterlimit(rtl::OUString::createFromAscii("stroke-miterlimit"));
161         static rtl::OUString aSVGStrStrokeOpacity(rtl::OUString::createFromAscii("stroke-opacity"));
162         static rtl::OUString aSVGStrStrokeWidth(rtl::OUString::createFromAscii("stroke-width"));
163 
164         static rtl::OUString aSVGStrText(rtl::OUString::createFromAscii("text"));
165 
166         SVGToken StrToSVGToken(const rtl::OUString& rStr)
167         {
168             typedef std::hash_map< rtl::OUString, SVGToken, rtl::OUStringHash > SVGTokenMapper;
169             typedef std::pair< rtl::OUString, SVGToken > SVGTokenValueType;
170             static SVGTokenMapper aSVGTokenMapperList;
171 
172             if(aSVGTokenMapperList.empty())
173             {
174                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrWidth, SVGTokenWidth));
175                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrHeight, SVGTokenHeight));
176                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrViewBox, SVGTokenViewBox));
177                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTransform, SVGTokenTransform));
178                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStyle, SVGTokenStyle));
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 
240                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPreserveAspectRatio, SVGTokenPreserveAspectRatio));
241                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDefer, SVGTokenDefer));
242                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrNone, SVGTokenNone));
243                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMin, SVGTokenXMinYMin));
244                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMin, SVGTokenXMidYMin));
245                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMin, SVGTokenXMaxYMin));
246                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMid, SVGTokenXMinYMid));
247                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMid, SVGTokenXMidYMid));
248                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMid, SVGTokenXMaxYMid));
249                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMax, SVGTokenXMinYMax));
250                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMax, SVGTokenXMidYMax));
251                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMax, SVGTokenXMaxYMax));
252                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMeet, SVGTokenMeet));
253                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSlice, SVGTokenSlice));
254 
255                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDefs, SVGTokenDefs));
256                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrG, SVGTokenG));
257                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSvg, SVGTokenSvg));
258                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSymbol, SVGTokenSymbol));
259                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrUse, SVGTokenUse));
260 
261                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCircle, SVGTokenCircle));
262                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrEllipse, SVGTokenEllipse));
263                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLine, SVGTokenLine));
264                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPath, SVGTokenPath));
265                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPolygon, SVGTokenPolygon));
266                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPolyline, SVGTokenPolyline));
267                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRect, SVGTokenRect));
268                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrImage, SVGTokenImage));
269 
270                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLinearGradient, SVGTokenLinearGradient));
271                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRadialGradient, SVGTokenRadialGradient));
272                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStop, SVGTokenStop));
273                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOffset, SVGTokenOffset));
274                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX1, SVGTokenX1));
275                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY1, SVGTokenY1));
276                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX2, SVGTokenX2));
277                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY2, SVGTokenY2));
278                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCx, SVGTokenCx));
279                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCy, SVGTokenCy));
280                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFx, SVGTokenFx));
281                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFy, SVGTokenFy));
282                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrR, SVGTokenR));
283                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrGradientUnits, SVGTokenGradientUnits));
284                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrGradientTransform, SVGTokenGradientTransform));
285                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSpreadMethod, SVGTokenSpreadMethod));
286                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXlinkHref, SVGTokenXlinkHref));
287                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStopColor, SVGTokenStopColor));
288                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStopOpacity, SVGTokenStopOpacity));
289 
290                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFill, SVGTokenFill));
291                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFillOpacity, SVGTokenFillOpacity));
292                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFillRule, SVGTokenFillRule));
293 
294                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStroke, SVGTokenStroke));
295                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDasharray, SVGTokenStrokeDasharray));
296                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDashoffset, SVGTokenStrokeDashoffset));
297                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinecap, SVGTokenStrokeLinecap));
298                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinejoin, SVGTokenStrokeLinejoin));
299                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit, SVGTokenStrokeMiterlimit));
300                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeOpacity, SVGTokenStrokeOpacity));
301                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeWidth, SVGTokenStrokeWidth));
302 
303                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrText, SVGTokenText));
304             }
305 
306             const SVGTokenMapper::const_iterator aResult(aSVGTokenMapperList.find(rStr));
307 
308             if(aResult == aSVGTokenMapperList.end())
309             {
310                 return SVGTokenUnknown;
311             }
312             else
313             {
314                 return aResult->second;
315             }
316         }
317     } // end of namespace svgreader
318 } // end of namespace svgio
319 
320 //////////////////////////////////////////////////////////////////////////////
321 // eof
322