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 <svgtoken.hxx>
21 #include <unordered_map>
27 static const char aSVGStrWidth
[] = "width";
28 static const char aSVGStrHeight
[] = "height";
29 static const char aSVGStrViewBox
[] = "viewBox";
30 static const char aSVGStrTransform
[] = "transform";
31 static const char aSVGStrStyle
[] = "style";
32 static const char aSVGStrDisplay
[] = "display"; // #i121656#
33 static const char aSVGStrD
[] = "d";
34 static const char aSVGStrX
[] = "x";
35 static const char aSVGStrY
[] = "y";
36 static const char aSVGStrXmlns
[] = "xmlns";
37 static const char aSVGStrVersion
[] = "version";
38 static const char aSVGStrId
[] = "id";
39 static const char aSVGStrRx
[] = "rx";
40 static const char aSVGStrRy
[] = "ry";
41 static const char aSVGStrPoints
[] = "points";
42 static const char aSVGStrDx
[] = "dx";
43 static const char aSVGStrDy
[] = "dy";
44 static const char aSVGStrRotate
[] = "rotate";
45 static const char aSVGStrTextLength
[] = "textLength";
46 static const char aSVGStrLengthAdjust
[] = "lengthAdjust";
47 static const char aSVGStrFont
[] = "font";
48 static const char aSVGStrFontFamily
[] = "font-family";
49 static const char aSVGStrFontSize
[] = "font-size";
50 static const char aSVGStrFontSizeAdjust
[] = "font-size-adjust";
51 static const char aSVGStrFontStretch
[] = "font-stretch";
52 static const char aSVGStrFontStyle
[] = "font-style";
53 static const char aSVGStrFontVariant
[] = "font-variant";
54 static const char aSVGStrFontWeight
[] = "font-weight";
55 static const char aSVGStrDirection
[] = "direction";
56 static const char aSVGStrLetterSpacing
[] = "letter-spacing";
57 static const char aSVGStrTextDecoration
[] = "text-decoration";
58 static const char aSVGStrUnicodeBidi
[] = "unicode-bidi";
59 static const char aSVGStrWordSpacing
[] = "word-spacing";
60 static const char aSVGStrTspan
[] = "tspan";
61 static const char aSVGStrTref
[] = "tref";
62 static const char aSVGStrTextPath
[] = "textPath";
63 static const char aSVGStrStartOffset
[] = "startOffset";
64 static const char aSVGStrMethod
[] = "method";
65 static const char aSVGStrSpacing
[] = "spacing";
66 static const char aSVGStrTextAlign
[] = "text-align";
67 static const char aSVGStrPathLength
[] = "pathLength";
68 static const char aSVGStrType
[] = "type";
69 static const char aSVGStrClass
[] = "class";
70 static const char aSVGStrTextAnchor
[] = "text-anchor";
71 static const char aSVGStrXmlSpace
[] = "xml:space";
72 static const char aSVGStrColor
[] = "color";
73 static const char aSVGStrClipPathNode
[] = "clipPath";
74 static const char aSVGStrClipPathProperty
[] = "clip-path";
75 static const char aSVGStrMask
[] = "mask";
76 static const char aSVGStrClipPathUnits
[] = "clipPathUnits";
77 static const char aSVGStrMaskUnits
[] = "maskUnits";
78 static const char aSVGStrMaskContentUnits
[] = "maskContentUnits";
79 static const char aSVGStrClipRule
[] = "clip-rule";
80 static const char aSVGStrMarker
[] = "marker";
81 static const char aSVGStrMarkerStart
[] = "marker-start";
82 static const char aSVGStrMarkerMid
[] = "marker-mid";
83 static const char aSVGStrMarkerEnd
[] = "marker-end";
84 static const char aSVGStrRefX
[] = "refX";
85 static const char aSVGStrRefY
[] = "refY";
86 static const char aSVGStrMarkerUnits
[] = "markerUnits";
87 static const char aSVGStrMarkerWidth
[] = "markerWidth";
88 static const char aSVGStrMarkerHeight
[] = "markerHeight";
89 static const char aSVGStrOrient
[] = "orient";
90 static const char aSVGStrPattern
[] = "pattern";
91 static const char aSVGStrPatternUnits
[] = "patternUnits";
92 static const char aSVGStrPatternContentUnits
[] = "patternContentUnits";
93 static const char aSVGStrPatternTransform
[] = "patternTransform";
94 static const char aSVGStrOpacity
[] = "opacity";
95 static const char aSVGStrVisibility
[] = "visibility";
96 static const char aSVGStrTitle
[] = "title";
97 static const char aSVGStrDesc
[] = "desc";
99 static const char aSVGStrPreserveAspectRatio
[] = "preserveAspectRatio";
100 static const char aSVGStrDefer
[] = "defer";
101 static const char aSVGStrNone
[] = "none";
102 static const char aSVGStrXMinYMin
[] = "xMinYMin";
103 static const char aSVGStrXMidYMin
[] = "xMidYMin";
104 static const char aSVGStrXMaxYMin
[] = "xMaxYMin";
105 static const char aSVGStrXMinYMid
[] = "xMinYMid";
106 static const char aSVGStrXMidYMid
[] = "xMidYMid";
107 static const char aSVGStrXMaxYMid
[] = "xMaxYMid";
108 static const char aSVGStrXMinYMax
[] = "xMinYMax";
109 static const char aSVGStrXMidYMax
[] = "xMidYMax";
110 static const char aSVGStrXMaxYMax
[] = "xMaxYMax";
111 static const char aSVGStrMeet
[] = "meet";
112 static const char aSVGStrSlice
[] = "slice";
114 static const char aSVGStrDefs
[] = "defs";
115 static const char aSVGStrG
[] = "g";
116 static const char aSVGStrSvg
[] = "svg";
117 static const char aSVGStrSymbol
[] = "symbol";
118 static const char aSVGStrUse
[] = "use";
119 static const char aSVGStrA
[] = "a";
121 static const char aSVGStrCircle
[] = "circle";
122 static const char aSVGStrEllipse
[] = "ellipse";
123 static const char aSVGStrLine
[] = "line";
124 static const char aSVGStrPath
[] = "path";
125 static const char aSVGStrPolygon
[] = "polygon";
126 static const char aSVGStrPolyline
[] = "polyline";
127 static const char aSVGStrRect
[] = "rect";
128 static const char aSVGStrImage
[] = "image";
130 static const char aSVGStrLinearGradient
[] = "linearGradient";
131 static const char aSVGStrRadialGradient
[] = "radialGradient";
132 static const char aSVGStrStop
[] = "stop";
133 static const char aSVGStrOffset
[] = "offset";
134 static const char aSVGStrX1
[] = "x1";
135 static const char aSVGStrY1
[] = "y1";
136 static const char aSVGStrX2
[] = "x2";
137 static const char aSVGStrY2
[] = "y2";
138 static const char aSVGStrCx
[] = "cx";
139 static const char aSVGStrCy
[] = "cy";
140 static const char aSVGStrFx
[] = "fx";
141 static const char aSVGStrFy
[] = "fy";
142 static const char aSVGStrR
[] = "r";
143 static const char aSVGStrGradientUnits
[] = "gradientUnits";
144 static const char aSVGStrGradientTransform
[] = "gradientTransform";
145 static const char aSVGStrSpreadMethod
[] = "spreadMethod";
146 static const char aSVGStrXlinkHref
[] = "xlink:href";
147 static const char aSVGStrStopColor
[] = "stop-color";
148 static const char aSVGStrStopOpacity
[] = "stop-opacity";
150 static const char aSVGStrFill
[] = "fill";
151 static const char aSVGStrFillOpacity
[] = "fill-opacity";
152 static const char aSVGStrFillRule
[] = "fill-rule";
154 static const char aSVGStrStroke
[] = "stroke";
155 static const char aSVGStrStrokeDasharray
[] = "stroke-dasharray";
156 static const char aSVGStrStrokeDashoffset
[] = "stroke-dashoffset";
157 static const char aSVGStrStrokeLinecap
[] = "stroke-linecap";
158 static const char aSVGStrStrokeLinejoin
[] = "stroke-linejoin";
159 static const char aSVGStrStrokeMiterlimit
[] = "stroke-miterlimit";
160 static const char aSVGStrStrokeOpacity
[] = "stroke-opacity";
161 static const char aSVGStrStrokeWidth
[] = "stroke-width";
163 static const char aSVGStrText
[] = "text";
164 static const char aSVGStrBaselineShift
[] = "baseline-shift";
166 static const char aSVGStrFlowRoot
[] = "flowRoot";
168 SVGToken
StrToSVGToken(const OUString
& rStr
, bool bCaseIndependent
)
170 typedef std::unordered_map
< OUString
, SVGToken
> SVGTokenMapper
;
171 typedef std::pair
< OUString
, SVGToken
> SVGTokenValueType
;
172 static SVGTokenMapper aSVGTokenMapperList
;
174 if(aSVGTokenMapperList
.empty())
176 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrWidth
, SVGTokenWidth
));
177 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrHeight
, SVGTokenHeight
));
178 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrViewBox
, SVGTokenViewBox
));
179 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTransform
, SVGTokenTransform
));
180 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStyle
, SVGTokenStyle
));
181 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDisplay
, SVGTokenDisplay
)); // #i121656#
182 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrD
, SVGTokenD
));
183 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrX
, SVGTokenX
));
184 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrY
, SVGTokenY
));
185 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXmlns
, SVGTokenXmlns
));
186 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrVersion
, SVGTokenVersion
));
187 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrId
, SVGTokenId
));
188 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRx
, SVGTokenRx
));
189 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRy
, SVGTokenRy
));
190 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPoints
, SVGTokenPoints
));
191 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDx
, SVGTokenDx
));
192 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDy
, SVGTokenDy
));
193 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRotate
, SVGTokenRotate
));
194 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTextLength
, SVGTokenTextLength
));
195 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrLengthAdjust
, SVGTokenLengthAdjust
));
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(aSVGStrVisibility
, SVGTokenVisibility
));
245 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrTitle
, SVGTokenTitle
));
246 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDesc
, SVGTokenDesc
));
248 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPreserveAspectRatio
, SVGTokenPreserveAspectRatio
));
249 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDefer
, SVGTokenDefer
));
250 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrNone
, SVGTokenNone
));
251 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMinYMin
, SVGTokenXMinYMin
));
252 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMidYMin
, SVGTokenXMidYMin
));
253 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMaxYMin
, SVGTokenXMaxYMin
));
254 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMinYMid
, SVGTokenXMinYMid
));
255 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMidYMid
, SVGTokenXMidYMid
));
256 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMaxYMid
, SVGTokenXMaxYMid
));
257 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMinYMax
, SVGTokenXMinYMax
));
258 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMidYMax
, SVGTokenXMidYMax
));
259 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXMaxYMax
, SVGTokenXMaxYMax
));
260 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrMeet
, SVGTokenMeet
));
261 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSlice
, SVGTokenSlice
));
263 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrDefs
, SVGTokenDefs
));
264 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrG
, SVGTokenG
));
265 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSvg
, SVGTokenSvg
));
266 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSymbol
, SVGTokenSymbol
));
267 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrUse
, SVGTokenUse
));
268 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrA
, SVGTokenA
));
270 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrCircle
, SVGTokenCircle
));
271 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrEllipse
, SVGTokenEllipse
));
272 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrLine
, SVGTokenLine
));
273 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPath
, SVGTokenPath
));
274 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPolygon
, SVGTokenPolygon
));
275 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrPolyline
, SVGTokenPolyline
));
276 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRect
, SVGTokenRect
));
277 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrImage
, SVGTokenImage
));
279 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrLinearGradient
, SVGTokenLinearGradient
));
280 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrRadialGradient
, SVGTokenRadialGradient
));
281 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStop
, SVGTokenStop
));
282 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrOffset
, SVGTokenOffset
));
283 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrX1
, SVGTokenX1
));
284 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrY1
, SVGTokenY1
));
285 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrX2
, SVGTokenX2
));
286 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrY2
, SVGTokenY2
));
287 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrCx
, SVGTokenCx
));
288 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrCy
, SVGTokenCy
));
289 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFx
, SVGTokenFx
));
290 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFy
, SVGTokenFy
));
291 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrR
, SVGTokenR
));
292 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrGradientUnits
, SVGTokenGradientUnits
));
293 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrGradientTransform
, SVGTokenGradientTransform
));
294 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrSpreadMethod
, SVGTokenSpreadMethod
));
295 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrXlinkHref
, SVGTokenXlinkHref
));
296 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStopColor
, SVGTokenStopColor
));
297 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStopOpacity
, SVGTokenStopOpacity
));
299 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFill
, SVGTokenFill
));
300 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFillOpacity
, SVGTokenFillOpacity
));
301 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFillRule
, SVGTokenFillRule
));
303 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStroke
, SVGTokenStroke
));
304 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeDasharray
, SVGTokenStrokeDasharray
));
305 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeDashoffset
, SVGTokenStrokeDashoffset
));
306 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeLinecap
, SVGTokenStrokeLinecap
));
307 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeLinejoin
, SVGTokenStrokeLinejoin
));
308 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit
, SVGTokenStrokeMiterlimit
));
309 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeOpacity
, SVGTokenStrokeOpacity
));
310 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrStrokeWidth
, SVGTokenStrokeWidth
));
312 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrText
, SVGTokenText
));
313 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrBaselineShift
, SVGTokenBaselineShift
));
314 aSVGTokenMapperList
.insert(SVGTokenValueType(aSVGStrFlowRoot
, SVGTokenFlowRoot
));
317 const SVGTokenMapper::const_iterator
aResult(aSVGTokenMapperList
.find(rStr
.startsWith("svg:") ? rStr
.copy(4) : rStr
));
319 if(aResult
== aSVGTokenMapperList
.end())
323 static SVGTokenMapper aCaseLindependentSVGTokenMapperList
;
325 if(aCaseLindependentSVGTokenMapperList
.empty())
327 for(SVGTokenMapper::const_iterator
aCurrent(aSVGTokenMapperList
.begin()); aCurrent
!= aSVGTokenMapperList
.end(); ++aCurrent
)
329 aCaseLindependentSVGTokenMapperList
.insert(
331 aCurrent
->first
.toAsciiLowerCase(),
336 const SVGTokenMapper::const_iterator
aResult2(aCaseLindependentSVGTokenMapperList
.find(rStr
.toAsciiLowerCase()));
338 if(aResult2
== aCaseLindependentSVGTokenMapperList
.end())
340 return SVGTokenUnknown
;
344 return aResult2
->second
;
348 return SVGTokenUnknown
;
352 return aResult
->second
;
356 const OUString
getStrTitle()
358 return OUString(aSVGStrTitle
);
361 const OUString
getStrDesc()
363 return OUString(aSVGStrDesc
);
365 } // end of namespace svgreader
366 } // end of namespace svgio
368 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */