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