LCOV - code coverage report
Current view: top level - svgio/source/svgreader - svgtoken.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 147 152 96.7 %
Date: 2015-06-13 12:38:46 Functions: 1 3 33.3 %
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             : #include <unordered_map>
      22             : 
      23             : namespace svgio
      24             : {
      25             :     namespace svgreader
      26             :     {
      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";
      98             : 
      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";
     113             : 
     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             : 
     120             :         static const char aSVGStrCircle[] = "circle";
     121             :         static const char aSVGStrEllipse[] = "ellipse";
     122             :         static const char aSVGStrLine[] = "line";
     123             :         static const char aSVGStrPath[] = "path";
     124             :         static const char aSVGStrPolygon[] = "polygon";
     125             :         static const char aSVGStrPolyline[] = "polyline";
     126             :         static const char aSVGStrRect[] = "rect";
     127             :         static const char aSVGStrImage[] = "image";
     128             : 
     129             :         static const char aSVGStrLinearGradient[] = "linearGradient";
     130             :         static const char aSVGStrRadialGradient[] = "radialGradient";
     131             :         static const char aSVGStrStop[] = "stop";
     132             :         static const char aSVGStrOffset[] = "offset";
     133             :         static const char aSVGStrX1[] = "x1";
     134             :         static const char aSVGStrY1[] = "y1";
     135             :         static const char aSVGStrX2[] = "x2";
     136             :         static const char aSVGStrY2[] = "y2";
     137             :         static const char aSVGStrCx[] = "cx";
     138             :         static const char aSVGStrCy[] = "cy";
     139             :         static const char aSVGStrFx[] = "fx";
     140             :         static const char aSVGStrFy[] = "fy";
     141             :         static const char aSVGStrR[] = "r";
     142             :         static const char aSVGStrGradientUnits[] = "gradientUnits";
     143             :         static const char aSVGStrGradientTransform[] = "gradientTransform";
     144             :         static const char aSVGStrSpreadMethod[] = "spreadMethod";
     145             :         static const char aSVGStrXlinkHref[] = "xlink:href";
     146             :         static const char aSVGStrStopColor[] = "stop-color";
     147             :         static const char aSVGStrStopOpacity[] = "stop-opacity";
     148             : 
     149             :         static const char aSVGStrFill[] = "fill";
     150             :         static const char aSVGStrFillOpacity[] = "fill-opacity";
     151             :         static const char aSVGStrFillRule[] = "fill-rule";
     152             : 
     153             :         static const char aSVGStrStroke[] = "stroke";
     154             :         static const char aSVGStrStrokeDasharray[] = "stroke-dasharray";
     155             :         static const char aSVGStrStrokeDashoffset[] = "stroke-dashoffset";
     156             :         static const char aSVGStrStrokeLinecap[] = "stroke-linecap";
     157             :         static const char aSVGStrStrokeLinejoin[] = "stroke-linejoin";
     158             :         static const char aSVGStrStrokeMiterlimit[] = "stroke-miterlimit";
     159             :         static const char aSVGStrStrokeOpacity[] = "stroke-opacity";
     160             :         static const char aSVGStrStrokeWidth[] = "stroke-width";
     161             : 
     162             :         static const char aSVGStrText[] = "text";
     163             :         static const char aSVGStrBaselineShift[] = "baseline-shift";
     164             : 
     165             :         static const char aSVGStrFlowRoot[] = "flowRoot";
     166             : 
     167       55500 :         SVGToken StrToSVGToken(const OUString& rStr, bool bCaseIndependent)
     168             :         {
     169             :             typedef std::unordered_map< OUString, SVGToken, OUStringHash, std::equal_to< OUString >  > SVGTokenMapper;
     170             :             typedef std::pair< OUString, SVGToken > SVGTokenValueType;
     171       55500 :             static SVGTokenMapper aSVGTokenMapperList;
     172             : 
     173       55500 :             if(aSVGTokenMapperList.empty())
     174             :             {
     175           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrWidth, SVGTokenWidth));
     176           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrHeight, SVGTokenHeight));
     177           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrViewBox, SVGTokenViewBox));
     178           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTransform, SVGTokenTransform));
     179           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStyle, SVGTokenStyle));
     180           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDisplay, SVGTokenDisplay)); // #i121656#
     181           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrD, SVGTokenD));
     182           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX, SVGTokenX));
     183           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY, SVGTokenY));
     184           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXmlns, SVGTokenXmlns));
     185           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrVersion, SVGTokenVersion));
     186           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrId, SVGTokenId));
     187           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRx, SVGTokenRx));
     188           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRy, SVGTokenRy));
     189           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPoints, SVGTokenPoints));
     190           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDx, SVGTokenDx));
     191           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDy, SVGTokenDy));
     192           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRotate, SVGTokenRotate));
     193           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextLength, SVGTokenTextLength));
     194           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLengthAdjust, SVGTokenLengthAdjust));
     195           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFont, SVGTokenFont));
     196           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontFamily, SVGTokenFontFamily));
     197           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontSize, SVGTokenFontSize));
     198           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontSizeAdjust, SVGTokenFontSizeAdjust));
     199           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontStretch, SVGTokenFontStretch));
     200           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontStyle, SVGTokenFontStyle));
     201           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontVariant, SVGTokenFontVariant));
     202           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFontWeight, SVGTokenFontWeight));
     203           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDirection, SVGTokenDirection));
     204           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLetterSpacing, SVGTokenLetterSpacing));
     205           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextDecoration, SVGTokenTextDecoration));
     206           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrUnicodeBidi, SVGTokenUnicodeBidi));
     207           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrWordSpacing, SVGTokenWordSpacing));
     208           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTspan, SVGTokenTspan));
     209           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTref, SVGTokenTref));
     210           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextPath, SVGTokenTextPath));
     211           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStartOffset, SVGTokenStartOffset));
     212           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMethod, SVGTokenMethod));
     213           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSpacing, SVGTokenSpacing));
     214           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextAlign, SVGTokenTextAlign));
     215           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPathLength, SVGTokenPathLength));
     216           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrType, SVGTokenType));
     217           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClass, SVGTokenClass));
     218           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTextAnchor, SVGTokenTextAnchor));
     219           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXmlSpace, SVGTokenXmlSpace));
     220           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrColor, SVGTokenColor));
     221           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipPathNode, SVGTokenClipPathNode));
     222           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipPathProperty, SVGTokenClipPathProperty));
     223           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMask, SVGTokenMask));
     224           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipPathUnits, SVGTokenClipPathUnits));
     225           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMaskUnits, SVGTokenMaskUnits));
     226           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMaskContentUnits, SVGTokenMaskContentUnits));
     227           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrClipRule, SVGTokenClipRule));
     228           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarker, SVGTokenMarker));
     229           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerStart, SVGTokenMarkerStart));
     230           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerMid, SVGTokenMarkerMid));
     231           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerEnd, SVGTokenMarkerEnd));
     232           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRefX, SVGTokenRefX));
     233           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRefY, SVGTokenRefY));
     234           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerUnits, SVGTokenMarkerUnits));
     235           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerWidth, SVGTokenMarkerWidth));
     236           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMarkerHeight, SVGTokenMarkerHeight));
     237           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOrient, SVGTokenOrient));
     238           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPattern, SVGTokenPattern));
     239           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPatternUnits, SVGTokenPatternUnits));
     240           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPatternContentUnits, SVGTokenPatternContentUnits));
     241           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPatternTransform, SVGTokenPatternTransform));
     242           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOpacity, SVGTokenOpacity));
     243           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrVisibility, SVGTokenVisibility));
     244           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrTitle, SVGTokenTitle));
     245           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDesc, SVGTokenDesc));
     246             : 
     247           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPreserveAspectRatio, SVGTokenPreserveAspectRatio));
     248           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDefer, SVGTokenDefer));
     249           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrNone, SVGTokenNone));
     250           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMin, SVGTokenXMinYMin));
     251           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMin, SVGTokenXMidYMin));
     252           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMin, SVGTokenXMaxYMin));
     253           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMid, SVGTokenXMinYMid));
     254           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMid, SVGTokenXMidYMid));
     255           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMid, SVGTokenXMaxYMid));
     256           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMinYMax, SVGTokenXMinYMax));
     257           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMidYMax, SVGTokenXMidYMax));
     258           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXMaxYMax, SVGTokenXMaxYMax));
     259           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrMeet, SVGTokenMeet));
     260           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSlice, SVGTokenSlice));
     261             : 
     262           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrDefs, SVGTokenDefs));
     263           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrG, SVGTokenG));
     264           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSvg, SVGTokenSvg));
     265           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSymbol, SVGTokenSymbol));
     266           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrUse, SVGTokenUse));
     267             : 
     268           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCircle, SVGTokenCircle));
     269           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrEllipse, SVGTokenEllipse));
     270           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLine, SVGTokenLine));
     271           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPath, SVGTokenPath));
     272           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPolygon, SVGTokenPolygon));
     273           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrPolyline, SVGTokenPolyline));
     274           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRect, SVGTokenRect));
     275           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrImage, SVGTokenImage));
     276             : 
     277           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrLinearGradient, SVGTokenLinearGradient));
     278           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrRadialGradient, SVGTokenRadialGradient));
     279           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStop, SVGTokenStop));
     280           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrOffset, SVGTokenOffset));
     281           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX1, SVGTokenX1));
     282           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY1, SVGTokenY1));
     283           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrX2, SVGTokenX2));
     284           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrY2, SVGTokenY2));
     285           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCx, SVGTokenCx));
     286           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrCy, SVGTokenCy));
     287           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFx, SVGTokenFx));
     288           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFy, SVGTokenFy));
     289           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrR, SVGTokenR));
     290           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrGradientUnits, SVGTokenGradientUnits));
     291           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrGradientTransform, SVGTokenGradientTransform));
     292           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrSpreadMethod, SVGTokenSpreadMethod));
     293           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrXlinkHref, SVGTokenXlinkHref));
     294           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStopColor, SVGTokenStopColor));
     295           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStopOpacity, SVGTokenStopOpacity));
     296             : 
     297           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFill, SVGTokenFill));
     298           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFillOpacity, SVGTokenFillOpacity));
     299           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFillRule, SVGTokenFillRule));
     300             : 
     301           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStroke, SVGTokenStroke));
     302           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDasharray, SVGTokenStrokeDasharray));
     303           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDashoffset, SVGTokenStrokeDashoffset));
     304           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinecap, SVGTokenStrokeLinecap));
     305           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinejoin, SVGTokenStrokeLinejoin));
     306           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit, SVGTokenStrokeMiterlimit));
     307           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeOpacity, SVGTokenStrokeOpacity));
     308           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeWidth, SVGTokenStrokeWidth));
     309             : 
     310           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrText, SVGTokenText));
     311           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrBaselineShift, SVGTokenBaselineShift));
     312           7 :                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrFlowRoot, SVGTokenFlowRoot));
     313             :             }
     314             : 
     315       55500 :             const SVGTokenMapper::const_iterator aResult(aSVGTokenMapperList.find(rStr.startsWith("svg:") ? rStr.copy(4) : rStr));
     316             : 
     317       55500 :             if(aResult == aSVGTokenMapperList.end())
     318             :             {
     319        2227 :                 if(bCaseIndependent)
     320             :                 {
     321          15 :                     static SVGTokenMapper aCaseLindependentSVGTokenMapperList;
     322             : 
     323          15 :                     if(aCaseLindependentSVGTokenMapperList.empty())
     324             :                     {
     325         396 :                         for(SVGTokenMapper::const_iterator aCurrent(aSVGTokenMapperList.begin()); aCurrent != aSVGTokenMapperList.end(); ++aCurrent)
     326             :                         {
     327             :                             aCaseLindependentSVGTokenMapperList.insert(
     328             :                                 SVGTokenValueType(
     329         393 :                                     aCurrent->first.toAsciiLowerCase(),
     330         786 :                                     aCurrent->second));
     331             :                         }
     332             :                     }
     333             : 
     334          15 :                     const SVGTokenMapper::const_iterator aResult2(aCaseLindependentSVGTokenMapperList.find(rStr.toAsciiLowerCase()));
     335             : 
     336          15 :                     if(aResult2 == aCaseLindependentSVGTokenMapperList.end())
     337             :                     {
     338          15 :                         return SVGTokenUnknown;
     339             :                     }
     340             :                     else
     341             :                     {
     342           0 :                         return aResult2->second;
     343             :                     }
     344             :                 }
     345             : 
     346        2212 :                 return SVGTokenUnknown;
     347             :             }
     348             :             else
     349             :             {
     350       53273 :                 return aResult->second;
     351             :             }
     352             :         }
     353             : 
     354           0 :         const OUString getStrTitle()
     355             :         {
     356           0 :             return OUString(aSVGStrTitle);
     357             :         }
     358             : 
     359           0 :         const OUString getStrDesc()
     360             :         {
     361           0 :             return OUString(aSVGStrDesc);
     362             :         }
     363             :     } // end of namespace svgreader
     364             : } // end of namespace svgio
     365             : 
     366             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11