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 static rtl::OUString aSVGStrTitle(rtl::OUString::createFromAscii("title")); 101 static rtl::OUString aSVGStrDesc(rtl::OUString::createFromAscii("desc")); 102 103 static rtl::OUString aSVGStrPreserveAspectRatio(rtl::OUString::createFromAscii("preserveAspectRatio")); 104 static rtl::OUString aSVGStrDefer(rtl::OUString::createFromAscii("defer")); 105 static rtl::OUString aSVGStrNone(rtl::OUString::createFromAscii("none")); 106 static rtl::OUString aSVGStrXMinYMin(rtl::OUString::createFromAscii("xMinYMin")); 107 static rtl::OUString aSVGStrXMidYMin(rtl::OUString::createFromAscii("xMidYMin")); 108 static rtl::OUString aSVGStrXMaxYMin(rtl::OUString::createFromAscii("xMaxYMin")); 109 static rtl::OUString aSVGStrXMinYMid(rtl::OUString::createFromAscii("xMinYMid")); 110 static rtl::OUString aSVGStrXMidYMid(rtl::OUString::createFromAscii("xMidYMid")); 111 static rtl::OUString aSVGStrXMaxYMid(rtl::OUString::createFromAscii("xMaxYMid")); 112 static rtl::OUString aSVGStrXMinYMax(rtl::OUString::createFromAscii("xMinYMax")); 113 static rtl::OUString aSVGStrXMidYMax(rtl::OUString::createFromAscii("xMidYMax")); 114 static rtl::OUString aSVGStrXMaxYMax(rtl::OUString::createFromAscii("xMaxYMax")); 115 static rtl::OUString aSVGStrMeet(rtl::OUString::createFromAscii("meet")); 116 static rtl::OUString aSVGStrSlice(rtl::OUString::createFromAscii("slice")); 117 118 static rtl::OUString aSVGStrDefs(rtl::OUString::createFromAscii("defs")); 119 static rtl::OUString aSVGStrG(rtl::OUString::createFromAscii("g")); 120 static rtl::OUString aSVGStrSvg(rtl::OUString::createFromAscii("svg")); 121 static rtl::OUString aSVGStrSymbol(rtl::OUString::createFromAscii("symbol")); 122 static rtl::OUString aSVGStrUse(rtl::OUString::createFromAscii("use")); 123 124 static rtl::OUString aSVGStrCircle(rtl::OUString::createFromAscii("circle")); 125 static rtl::OUString aSVGStrEllipse(rtl::OUString::createFromAscii("ellipse")); 126 static rtl::OUString aSVGStrLine(rtl::OUString::createFromAscii("line")); 127 static rtl::OUString aSVGStrPath(rtl::OUString::createFromAscii("path")); 128 static rtl::OUString aSVGStrPolygon(rtl::OUString::createFromAscii("polygon")); 129 static rtl::OUString aSVGStrPolyline(rtl::OUString::createFromAscii("polyline")); 130 static rtl::OUString aSVGStrRect(rtl::OUString::createFromAscii("rect")); 131 static rtl::OUString aSVGStrImage(rtl::OUString::createFromAscii("image")); 132 133 static rtl::OUString aSVGStrLinearGradient(rtl::OUString::createFromAscii("linearGradient")); 134 static rtl::OUString aSVGStrRadialGradient(rtl::OUString::createFromAscii("radialGradient")); 135 static rtl::OUString aSVGStrStop(rtl::OUString::createFromAscii("stop")); 136 static rtl::OUString aSVGStrOffset(rtl::OUString::createFromAscii("offset")); 137 static rtl::OUString aSVGStrX1(rtl::OUString::createFromAscii("x1")); 138 static rtl::OUString aSVGStrY1(rtl::OUString::createFromAscii("y1")); 139 static rtl::OUString aSVGStrX2(rtl::OUString::createFromAscii("x2")); 140 static rtl::OUString aSVGStrY2(rtl::OUString::createFromAscii("y2")); 141 static rtl::OUString aSVGStrCx(rtl::OUString::createFromAscii("cx")); 142 static rtl::OUString aSVGStrCy(rtl::OUString::createFromAscii("cy")); 143 static rtl::OUString aSVGStrFx(rtl::OUString::createFromAscii("fx")); 144 static rtl::OUString aSVGStrFy(rtl::OUString::createFromAscii("fy")); 145 static rtl::OUString aSVGStrR(rtl::OUString::createFromAscii("r")); 146 static rtl::OUString aSVGStrGradientUnits(rtl::OUString::createFromAscii("gradientUnits")); 147 static rtl::OUString aSVGStrGradientTransform(rtl::OUString::createFromAscii("gradientTransform")); 148 static rtl::OUString aSVGStrSpreadMethod(rtl::OUString::createFromAscii("spreadMethod")); 149 static rtl::OUString aSVGStrXlinkHref(rtl::OUString::createFromAscii("xlink:href")); 150 static rtl::OUString aSVGStrStopColor(rtl::OUString::createFromAscii("stop-color")); 151 static rtl::OUString aSVGStrStopOpacity(rtl::OUString::createFromAscii("stop-opacity")); 152 153 static rtl::OUString aSVGStrFill(rtl::OUString::createFromAscii("fill")); 154 static rtl::OUString aSVGStrFillOpacity(rtl::OUString::createFromAscii("fill-opacity")); 155 static rtl::OUString aSVGStrFillRule(rtl::OUString::createFromAscii("fill-rule")); 156 157 static rtl::OUString aSVGStrStroke(rtl::OUString::createFromAscii("stroke")); 158 static rtl::OUString aSVGStrStrokeDasharray(rtl::OUString::createFromAscii("stroke-dasharray")); 159 static rtl::OUString aSVGStrStrokeDashoffset(rtl::OUString::createFromAscii("stroke-dashoffset")); 160 static rtl::OUString aSVGStrStrokeLinecap(rtl::OUString::createFromAscii("stroke-linecap")); 161 static rtl::OUString aSVGStrStrokeLinejoin(rtl::OUString::createFromAscii("stroke-linejoin")); 162 static rtl::OUString aSVGStrStrokeMiterlimit(rtl::OUString::createFromAscii("stroke-miterlimit")); 163 static rtl::OUString aSVGStrStrokeOpacity(rtl::OUString::createFromAscii("stroke-opacity")); 164 static rtl::OUString aSVGStrStrokeWidth(rtl::OUString::createFromAscii("stroke-width")); 165 166 static rtl::OUString aSVGStrText(rtl::OUString::createFromAscii("text")); 167 168 SVGToken StrToSVGToken(const rtl::OUString& rStr) 169 { 170 typedef std::hash_map< rtl::OUString, SVGToken, rtl::OUStringHash > SVGTokenMapper; 171 typedef std::pair< rtl::OUString, SVGToken > SVGTokenValueType; 172 static SVGTokenMapper aSVGTokenMapperList; 173 174 if(aSVGTokenMapperList.empty()) 175 { 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(aSVGStrD, SVGTokenD)); 182 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX, SVGTokenX)); 183 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY, SVGTokenY)); 184 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXmlns, SVGTokenXmlns)); 185 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrVersion, SVGTokenVersion)); 186 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrId, SVGTokenId)); 187 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRx, SVGTokenRx)); 188 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRy, SVGTokenRy)); 189 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPoints, SVGTokenPoints)); 190 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDx, SVGTokenDx)); 191 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDy, SVGTokenDy)); 192 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRotate, SVGTokenRotate)); 193 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFont, SVGTokenFont)); 194 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontFamily, SVGTokenFontFamily)); 195 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontSize, SVGTokenFontSize)); 196 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontSizeAdjust, SVGTokenFontSizeAdjust)); 197 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontStretch, SVGTokenFontStretch)); 198 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontStyle, SVGTokenFontStyle)); 199 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontVariant, SVGTokenFontVariant)); 200 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontWeight, SVGTokenFontWeight)); 201 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDirection, SVGTokenDirection)); 202 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLetterSpacing, SVGTokenLetterSpacing)); 203 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextDecoration, SVGTokenTextDecoration)); 204 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrUnicodeBidi, SVGTokenUnicodeBidi)); 205 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrWordSpacing, SVGTokenWordSpacing)); 206 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTspan, SVGTokenTspan)); 207 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTref, SVGTokenTref)); 208 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextPath, SVGTokenTextPath)); 209 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStartOffset, SVGTokenStartOffset)); 210 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMethod, SVGTokenMethod)); 211 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSpacing, SVGTokenSpacing)); 212 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextAlign, SVGTokenTextAlign)); 213 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPathLength, SVGTokenPathLength)); 214 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrType, SVGTokenType)); 215 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClass, SVGTokenClass)); 216 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextAnchor, SVGTokenTextAnchor)); 217 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXmlSpace, SVGTokenXmlSpace)); 218 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrColor, SVGTokenColor)); 219 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipPathNode, SVGTokenClipPathNode)); 220 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipPathProperty, SVGTokenClipPathProperty)); 221 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMask, SVGTokenMask)); 222 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipPathUnits, SVGTokenClipPathUnits)); 223 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMaskUnits, SVGTokenMaskUnits)); 224 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMaskContentUnits, SVGTokenMaskContentUnits)); 225 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipRule, SVGTokenClipRule)); 226 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarker, SVGTokenMarker)); 227 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerStart, SVGTokenMarkerStart)); 228 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerMid, SVGTokenMarkerMid)); 229 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerEnd, SVGTokenMarkerEnd)); 230 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRefX, SVGTokenRefX)); 231 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRefY, SVGTokenRefY)); 232 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerUnits, SVGTokenMarkerUnits)); 233 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerWidth, SVGTokenMarkerWidth)); 234 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerHeight, SVGTokenMarkerHeight)); 235 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOrient, SVGTokenOrient)); 236 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPattern, SVGTokenPattern)); 237 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPatternUnits, SVGTokenPatternUnits)); 238 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPatternContentUnits, SVGTokenPatternContentUnits)); 239 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPatternTransform, SVGTokenPatternTransform)); 240 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOpacity, SVGTokenOpacity)); 241 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTitle, SVGTokenTitle)); 242 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDesc, SVGTokenDesc)); 243 244 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPreserveAspectRatio, SVGTokenPreserveAspectRatio)); 245 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDefer, SVGTokenDefer)); 246 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrNone, SVGTokenNone)); 247 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMin, SVGTokenXMinYMin)); 248 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMin, SVGTokenXMidYMin)); 249 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMin, SVGTokenXMaxYMin)); 250 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMid, SVGTokenXMinYMid)); 251 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMid, SVGTokenXMidYMid)); 252 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMid, SVGTokenXMaxYMid)); 253 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMax, SVGTokenXMinYMax)); 254 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMax, SVGTokenXMidYMax)); 255 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMax, SVGTokenXMaxYMax)); 256 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMeet, SVGTokenMeet)); 257 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSlice, SVGTokenSlice)); 258 259 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDefs, SVGTokenDefs)); 260 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrG, SVGTokenG)); 261 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSvg, SVGTokenSvg)); 262 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSymbol, SVGTokenSymbol)); 263 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrUse, SVGTokenUse)); 264 265 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCircle, SVGTokenCircle)); 266 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrEllipse, SVGTokenEllipse)); 267 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLine, SVGTokenLine)); 268 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPath, SVGTokenPath)); 269 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPolygon, SVGTokenPolygon)); 270 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPolyline, SVGTokenPolyline)); 271 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRect, SVGTokenRect)); 272 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrImage, SVGTokenImage)); 273 274 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLinearGradient, SVGTokenLinearGradient)); 275 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRadialGradient, SVGTokenRadialGradient)); 276 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStop, SVGTokenStop)); 277 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOffset, SVGTokenOffset)); 278 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX1, SVGTokenX1)); 279 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY1, SVGTokenY1)); 280 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX2, SVGTokenX2)); 281 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY2, SVGTokenY2)); 282 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCx, SVGTokenCx)); 283 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCy, SVGTokenCy)); 284 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFx, SVGTokenFx)); 285 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFy, SVGTokenFy)); 286 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrR, SVGTokenR)); 287 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrGradientUnits, SVGTokenGradientUnits)); 288 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrGradientTransform, SVGTokenGradientTransform)); 289 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSpreadMethod, SVGTokenSpreadMethod)); 290 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXlinkHref, SVGTokenXlinkHref)); 291 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStopColor, SVGTokenStopColor)); 292 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStopOpacity, SVGTokenStopOpacity)); 293 294 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFill, SVGTokenFill)); 295 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFillOpacity, SVGTokenFillOpacity)); 296 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFillRule, SVGTokenFillRule)); 297 298 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStroke, SVGTokenStroke)); 299 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDasharray, SVGTokenStrokeDasharray)); 300 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDashoffset, SVGTokenStrokeDashoffset)); 301 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinecap, SVGTokenStrokeLinecap)); 302 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinejoin, SVGTokenStrokeLinejoin)); 303 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit, SVGTokenStrokeMiterlimit)); 304 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeOpacity, SVGTokenStrokeOpacity)); 305 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeWidth, SVGTokenStrokeWidth)); 306 307 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrText, SVGTokenText)); 308 } 309 310 const SVGTokenMapper::const_iterator aResult(aSVGTokenMapperList.find(rStr)); 311 312 if(aResult == aSVGTokenMapperList.end()) 313 { 314 return SVGTokenUnknown; 315 } 316 else 317 { 318 return aResult->second; 319 } 320 } 321 322 const rtl::OUString& getStrTitle() 323 { 324 return aSVGStrTitle; 325 } 326 327 const rtl::OUString& getStrDesc() 328 { 329 return aSVGStrDesc; 330 } 331 } // end of namespace svgreader 332 } // end of namespace svgio 333 334 ////////////////////////////////////////////////////////////////////////////// 335 // eof 336