LCOV - code coverage report
Current view: top level - svgio/source/svgreader - svgtoken.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 264 268 98.5 %
Date: 2014-04-11 Functions: 3 5 60.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10