1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #ifndef INCLUDED_SVGIO_SVGREADER_SVGTOKEN_HXX 23 #define INCLUDED_SVGIO_SVGREADER_SVGTOKEN_HXX 24 25 #include <svgio/svgiodllapi.h> 26 #include <rtl/ustring.hxx> 27 #include <hash_map> 28 29 ////////////////////////////////////////////////////////////////////////////// 30 31 namespace svgio 32 { 33 namespace svgreader 34 { 35 // SVG token mapper with hashing 36 enum SVGToken 37 { 38 SVGTokenUnknown = 0, 39 40 // diverse attribute tokens 41 SVGTokenWidth, 42 SVGTokenHeight, 43 SVGTokenViewBox, 44 SVGTokenTransform, 45 SVGTokenStyle, 46 SVGTokenD, 47 SVGTokenX, 48 SVGTokenY, 49 SVGTokenXmlns, 50 SVGTokenVersion, 51 SVGTokenId, 52 SVGTokenRx, 53 SVGTokenRy, 54 SVGTokenPoints, 55 SVGTokenDx, 56 SVGTokenDy, 57 SVGTokenRotate, 58 SVGTokenTextLength, 59 SVGTokenLengthAdjust, 60 SVGTokenFont, 61 SVGTokenFontFamily, 62 SVGTokenFontSize, 63 SVGTokenFontSizeAdjust, 64 SVGTokenFontStretch, 65 SVGTokenFontStyle, 66 SVGTokenFontVariant, 67 SVGTokenFontWeight, 68 SVGTokenDirection, 69 SVGTokenLetterSpacing, 70 SVGTokenTextDecoration, 71 SVGTokenUnicodeBidi, 72 SVGTokenWordSpacing, 73 SVGTokenCharacter, // not in the hash, just for simple text handling in SvgCharacterNode 74 SVGTokenTspan, 75 SVGTokenTref, 76 SVGTokenTextPath, 77 SVGTokenStartOffset, 78 SVGTokenMethod, 79 SVGTokenSpacing, 80 SVGTokenTextAlign, 81 SVGTokenPathLength, 82 SVGTokenType, 83 SVGTokenClass, 84 SVGTokenTextAnchor, 85 SVGTokenXmlSpace, 86 SVGTokenColor, 87 SVGTokenClipPathNode, 88 SVGTokenClipPathProperty, 89 SVGTokenMask, 90 SVGTokenClipPathUnits, 91 SVGTokenMaskUnits, 92 SVGTokenMaskContentUnits, 93 SVGTokenClipRule, 94 SVGTokenMarker, 95 SVGTokenMarkerStart, 96 SVGTokenMarkerMid, 97 SVGTokenMarkerEnd, 98 SVGTokenRefX, 99 SVGTokenRefY, 100 SVGTokenMarkerUnits, 101 SVGTokenMarkerWidth, 102 SVGTokenMarkerHeight, 103 SVGTokenOrient, 104 SVGTokenPattern, 105 SVGTokenPatternUnits, 106 SVGTokenPatternContentUnits, 107 SVGTokenPatternTransform, 108 SVGTokenOpacity, 109 110 // AspectRatio and params 111 SVGTokenPreserveAspectRatio, 112 SVGTokenDefer, 113 SVGTokenNone, 114 SVGTokenXMinYMin, 115 SVGTokenXMidYMin, 116 SVGTokenXMaxYMin, 117 SVGTokenXMinYMid, 118 SVGTokenXMidYMid, 119 SVGTokenXMaxYMid, 120 SVGTokenXMinYMax, 121 SVGTokenXMidYMax, 122 SVGTokenXMaxYMax, 123 SVGTokenMeet, 124 SVGTokenSlice, 125 126 // structural elements 127 SVGTokenDefs, 128 SVGTokenG, 129 SVGTokenSvg, 130 SVGTokenSymbol, 131 SVGTokenUse, 132 133 // shape elements 134 SVGTokenCircle, 135 SVGTokenEllipse, 136 SVGTokenLine, 137 SVGTokenPath, 138 SVGTokenPolygon, 139 SVGTokenPolyline, 140 SVGTokenRect, 141 SVGTokenImage, 142 143 // gradient elements and tokens 144 SVGTokenLinearGradient, 145 SVGTokenRadialGradient, 146 SVGTokenStop, 147 SVGTokenOffset, 148 SVGTokenX1, 149 SVGTokenY1, 150 SVGTokenX2, 151 SVGTokenY2, 152 SVGTokenCx, 153 SVGTokenCy, 154 SVGTokenFx, 155 SVGTokenFy, 156 SVGTokenR, 157 SVGTokenGradientUnits, 158 SVGTokenGradientTransform, 159 SVGTokenSpreadMethod, 160 SVGTokenXlinkHref, 161 SVGTokenStopColor, 162 SVGTokenStopOpacity, 163 164 // fill tokens 165 SVGTokenFill, 166 SVGTokenFillOpacity, 167 SVGTokenFillRule, 168 169 // stroke tokens 170 SVGTokenStroke, 171 SVGTokenStrokeDasharray, 172 SVGTokenStrokeDashoffset, 173 SVGTokenStrokeLinecap, 174 SVGTokenStrokeLinejoin, 175 SVGTokenStrokeMiterlimit, 176 SVGTokenStrokeOpacity, 177 SVGTokenStrokeWidth, 178 179 // text tokens 180 SVGTokenText, 181 182 SVGTokenLast 183 }; 184 185 SVGToken StrToSVGToken(const rtl::OUString& rStr); 186 187 } // end of namespace svgreader 188 } // end of namespace svgio 189 190 ////////////////////////////////////////////////////////////////////////////// 191 192 #endif //INCLUDED_SVGIO_SVGREADER_SVGTOKEN_HXX 193 194 // eof 195