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 SVGTokenTitle, 110 SVGTokenDesc, 111 112 // AspectRatio and params 113 SVGTokenPreserveAspectRatio, 114 SVGTokenDefer, 115 SVGTokenNone, 116 SVGTokenXMinYMin, 117 SVGTokenXMidYMin, 118 SVGTokenXMaxYMin, 119 SVGTokenXMinYMid, 120 SVGTokenXMidYMid, 121 SVGTokenXMaxYMid, 122 SVGTokenXMinYMax, 123 SVGTokenXMidYMax, 124 SVGTokenXMaxYMax, 125 SVGTokenMeet, 126 SVGTokenSlice, 127 128 // structural elements 129 SVGTokenDefs, 130 SVGTokenG, 131 SVGTokenSvg, 132 SVGTokenSymbol, 133 SVGTokenUse, 134 135 // shape elements 136 SVGTokenCircle, 137 SVGTokenEllipse, 138 SVGTokenLine, 139 SVGTokenPath, 140 SVGTokenPolygon, 141 SVGTokenPolyline, 142 SVGTokenRect, 143 SVGTokenImage, 144 145 // gradient elements and tokens 146 SVGTokenLinearGradient, 147 SVGTokenRadialGradient, 148 SVGTokenStop, 149 SVGTokenOffset, 150 SVGTokenX1, 151 SVGTokenY1, 152 SVGTokenX2, 153 SVGTokenY2, 154 SVGTokenCx, 155 SVGTokenCy, 156 SVGTokenFx, 157 SVGTokenFy, 158 SVGTokenR, 159 SVGTokenGradientUnits, 160 SVGTokenGradientTransform, 161 SVGTokenSpreadMethod, 162 SVGTokenXlinkHref, 163 SVGTokenStopColor, 164 SVGTokenStopOpacity, 165 166 // fill tokens 167 SVGTokenFill, 168 SVGTokenFillOpacity, 169 SVGTokenFillRule, 170 171 // stroke tokens 172 SVGTokenStroke, 173 SVGTokenStrokeDasharray, 174 SVGTokenStrokeDashoffset, 175 SVGTokenStrokeLinecap, 176 SVGTokenStrokeLinejoin, 177 SVGTokenStrokeMiterlimit, 178 SVGTokenStrokeOpacity, 179 SVGTokenStrokeWidth, 180 181 // text tokens 182 SVGTokenText, 183 184 SVGTokenLast 185 }; 186 187 SVGToken StrToSVGToken(const rtl::OUString& rStr); 188 189 const rtl::OUString& getStrTitle(); 190 const rtl::OUString& getStrDesc(); 191 } // end of namespace svgreader 192 } // end of namespace svgio 193 194 ////////////////////////////////////////////////////////////////////////////// 195 196 #endif //INCLUDED_SVGIO_SVGREADER_SVGTOKEN_HXX 197 198 // eof 199