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