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