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 SVGTokenDisplay, // #121656# 47 SVGTokenD, 48 SVGTokenX, 49 SVGTokenY, 50 SVGTokenXmlns, 51 SVGTokenVersion, 52 SVGTokenId, 53 SVGTokenRx, 54 SVGTokenRy, 55 SVGTokenPoints, 56 SVGTokenDx, 57 SVGTokenDy, 58 SVGTokenRotate, 59 SVGTokenTextLength, 60 SVGTokenLengthAdjust, 61 SVGTokenFont, 62 SVGTokenFontFamily, 63 SVGTokenFontSize, 64 SVGTokenFontSizeAdjust, 65 SVGTokenFontStretch, 66 SVGTokenFontStyle, 67 SVGTokenFontVariant, 68 SVGTokenFontWeight, 69 SVGTokenDirection, 70 SVGTokenLetterSpacing, 71 SVGTokenTextDecoration, 72 SVGTokenUnicodeBidi, 73 SVGTokenWordSpacing, 74 SVGTokenCharacter, // not in the hash, just for simple text handling in SvgCharacterNode 75 SVGTokenTspan, 76 SVGTokenTref, 77 SVGTokenTextPath, 78 SVGTokenStartOffset, 79 SVGTokenMethod, 80 SVGTokenSpacing, 81 SVGTokenTextAlign, 82 SVGTokenPathLength, 83 SVGTokenType, 84 SVGTokenClass, 85 SVGTokenTextAnchor, 86 SVGTokenXmlSpace, 87 SVGTokenColor, 88 SVGTokenClipPathNode, 89 SVGTokenClipPathProperty, 90 SVGTokenMask, 91 SVGTokenClipPathUnits, 92 SVGTokenMaskUnits, 93 SVGTokenMaskContentUnits, 94 SVGTokenClipRule, 95 SVGTokenMarker, 96 SVGTokenMarkerStart, 97 SVGTokenMarkerMid, 98 SVGTokenMarkerEnd, 99 SVGTokenRefX, 100 SVGTokenRefY, 101 SVGTokenMarkerUnits, 102 SVGTokenMarkerWidth, 103 SVGTokenMarkerHeight, 104 SVGTokenOrient, 105 SVGTokenPattern, 106 SVGTokenPatternUnits, 107 SVGTokenPatternContentUnits, 108 SVGTokenPatternTransform, 109 SVGTokenOpacity, 110 SVGTokenTitle, 111 SVGTokenDesc, 112 113 // AspectRatio and params 114 SVGTokenPreserveAspectRatio, 115 SVGTokenDefer, 116 SVGTokenNone, 117 SVGTokenXMinYMin, 118 SVGTokenXMidYMin, 119 SVGTokenXMaxYMin, 120 SVGTokenXMinYMid, 121 SVGTokenXMidYMid, 122 SVGTokenXMaxYMid, 123 SVGTokenXMinYMax, 124 SVGTokenXMidYMax, 125 SVGTokenXMaxYMax, 126 SVGTokenMeet, 127 SVGTokenSlice, 128 129 // structural elements 130 SVGTokenDefs, 131 SVGTokenG, 132 SVGTokenSvg, 133 SVGTokenSymbol, 134 SVGTokenUse, 135 136 // shape elements 137 SVGTokenCircle, 138 SVGTokenEllipse, 139 SVGTokenLine, 140 SVGTokenPath, 141 SVGTokenPolygon, 142 SVGTokenPolyline, 143 SVGTokenRect, 144 SVGTokenImage, 145 146 // gradient elements and tokens 147 SVGTokenLinearGradient, 148 SVGTokenRadialGradient, 149 SVGTokenStop, 150 SVGTokenOffset, 151 SVGTokenX1, 152 SVGTokenY1, 153 SVGTokenX2, 154 SVGTokenY2, 155 SVGTokenCx, 156 SVGTokenCy, 157 SVGTokenFx, 158 SVGTokenFy, 159 SVGTokenR, 160 SVGTokenGradientUnits, 161 SVGTokenGradientTransform, 162 SVGTokenSpreadMethod, 163 SVGTokenXlinkHref, 164 SVGTokenStopColor, 165 SVGTokenStopOpacity, 166 167 // fill tokens 168 SVGTokenFill, 169 SVGTokenFillOpacity, 170 SVGTokenFillRule, 171 172 // stroke tokens 173 SVGTokenStroke, 174 SVGTokenStrokeDasharray, 175 SVGTokenStrokeDashoffset, 176 SVGTokenStrokeLinecap, 177 SVGTokenStrokeLinejoin, 178 SVGTokenStrokeMiterlimit, 179 SVGTokenStrokeOpacity, 180 SVGTokenStrokeWidth, 181 182 // text tokens 183 SVGTokenText, 184 SVGTokenBaselineShift, 185 186 SVGTokenLast 187 }; 188 189 SVGToken StrToSVGToken(const rtl::OUString& rStr); 190 191 const rtl::OUString& getStrTitle(); 192 const rtl::OUString& getStrDesc(); 193 } // end of namespace svgreader 194 } // end of namespace svgio 195 196 ////////////////////////////////////////////////////////////////////////////// 197 198 #endif //INCLUDED_SVGIO_SVGREADER_SVGTOKEN_HXX 199 200 // eof 201