1*ecfe53c5SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*ecfe53c5SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*ecfe53c5SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*ecfe53c5SAndrew Rist * distributed with this work for additional information 6*ecfe53c5SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*ecfe53c5SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*ecfe53c5SAndrew Rist * "License"); you may not use this file except in compliance 9*ecfe53c5SAndrew Rist * with the License. You may obtain a copy of the License at 10*ecfe53c5SAndrew Rist * 11*ecfe53c5SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*ecfe53c5SAndrew Rist * 13*ecfe53c5SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*ecfe53c5SAndrew Rist * software distributed under the License is distributed on an 15*ecfe53c5SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*ecfe53c5SAndrew Rist * KIND, either express or implied. See the License for the 17*ecfe53c5SAndrew Rist * specific language governing permissions and limitations 18*ecfe53c5SAndrew Rist * under the License. 19*ecfe53c5SAndrew Rist * 20*ecfe53c5SAndrew Rist *************************************************************/ 21*ecfe53c5SAndrew Rist 22*ecfe53c5SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _XMLOFF_ATTRTRANSFORMERACTION_HXX 25cdf0e10cSrcweir #define _XMLOFF_ATTRTRANSFORMERACTION_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "TransformerAction.hxx" 28cdf0e10cSrcweir 29cdf0e10cSrcweir enum XMLAttrTransformerAction 30cdf0e10cSrcweir { 31cdf0e10cSrcweir XML_ATACTION_EOT=XML_TACTION_EOT, // uses for initialization only 32cdf0e10cSrcweir XML_ATACTION_COPY, // copy attr 33cdf0e10cSrcweir XML_ATACTION_RENAME, // rename attr: 34cdf0e10cSrcweir // - param1: namespace + 35cdf0e10cSrcweir // token of local name 36cdf0e10cSrcweir XML_ATACTION_REMOVE, // remove attr 37cdf0e10cSrcweir XML_ATACTION_IN2INCH, // replace "in" with "inch" 38cdf0e10cSrcweir XML_ATACTION_INS2INCHS, // replace "in" with "inch" 39cdf0e10cSrcweir // multiple times 40cdf0e10cSrcweir XML_ATACTION_IN2TWIPS, // replace "in" with "inch" and 41cdf0e10cSrcweir // convert value from inch to twips 42cdf0e10cSrcweir // but only for writer documents 43cdf0e10cSrcweir XML_ATACTION_RENAME_IN2INCH, // replace "in" with "inch" and rename 44cdf0e10cSrcweir // attr: 45cdf0e10cSrcweir // - param1: namespace + 46cdf0e10cSrcweir // token of local name 47cdf0e10cSrcweir XML_ATACTION_INCH2IN, // replace "inch" with "in" 48cdf0e10cSrcweir XML_ATACTION_INCHS2INS, // replace "inch" with "in" 49cdf0e10cSrcweir // multiple times 50cdf0e10cSrcweir XML_ATACTION_TWIPS2IN, // replace "inch" with "in" and for writer 51cdf0e10cSrcweir // documents convert measure value from twips 52cdf0e10cSrcweir // to inch 53cdf0e10cSrcweir XML_ATACTION_RENAME_INCH2IN, // replace "inch" with "in" and rename 54cdf0e10cSrcweir // attr: 55cdf0e10cSrcweir // - param1: namespace + 56cdf0e10cSrcweir // token of local name 57cdf0e10cSrcweir XML_ATACTION_STYLE_FAMILY, // NOP, used for style:family 58cdf0e10cSrcweir XML_ATACTION_DECODE_STYLE_NAME, // NOP, used for style:name 59cdf0e10cSrcweir // - param1: style family 60cdf0e10cSrcweir XML_ATACTION_STYLE_DISPLAY_NAME, // NOP, used for style:display_name 61cdf0e10cSrcweir // - param1: style family 62cdf0e10cSrcweir XML_ATACTION_DECODE_STYLE_NAME_REF, // NOP, used for style:name reference 63cdf0e10cSrcweir // - param1: style family 64cdf0e10cSrcweir XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF, // NOP, used for style:name 65cdf0e10cSrcweir // - param1: namespace + 66cdf0e10cSrcweir // token of local name 67cdf0e10cSrcweir XML_ATACTION_ENCODE_STYLE_NAME, // NOP, used for style:name 68cdf0e10cSrcweir XML_ATACTION_ENCODE_STYLE_NAME_REF, // NOP, used for style:name 69cdf0e10cSrcweir XML_ATACTION_RENAME_ENCODE_STYLE_NAME_REF, // NOP, used for style:name 70cdf0e10cSrcweir // - param1: namespace + 71cdf0e10cSrcweir // token of local name 72cdf0e10cSrcweir // - param2: style family 73cdf0e10cSrcweir XML_ATACTION_MOVE_TO_ELEM, // turn attr into an elem 74cdf0e10cSrcweir // - param1: namespace + 75cdf0e10cSrcweir // token of local name 76cdf0e10cSrcweir XML_ATACTION_MOVE_FROM_ELEM, // turn elem into an attr: 77cdf0e10cSrcweir // - param1: namespace + 78cdf0e10cSrcweir // token of local name 79cdf0e10cSrcweir XML_ATACTION_NEG_PERCENT, // replace % val with 100-% 80cdf0e10cSrcweir XML_ATACTION_RENAME_NEG_PERCENT, // replace % val with 100-%, rename attr 81cdf0e10cSrcweir // - param1: namespace + 82cdf0e10cSrcweir // token of local name 83cdf0e10cSrcweir XML_ATACTION_HREF, // xmlink:href 84cdf0e10cSrcweir XML_ATACTION_ADD_NAMESPACE_PREFIX, // add a namespace prefix 85cdf0e10cSrcweir // - param1: prefix 86cdf0e10cSrcweir XML_ATACTION_ADD_APP_NAMESPACE_PREFIX, // add a namespace prefix 87cdf0e10cSrcweir // - param1: default prefix 88cdf0e10cSrcweir XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX, // add a namespace prefix 89cdf0e10cSrcweir // - param1: namespace + 90cdf0e10cSrcweir // token of local name 91cdf0e10cSrcweir // - param2: prefix 92cdf0e10cSrcweir XML_ATACTION_REMOVE_NAMESPACE_PREFIX,// remove a namespace prefix 93cdf0e10cSrcweir // - param1: prefix 94cdf0e10cSrcweir XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX,// remove any namespace prefix 95cdf0e10cSrcweir XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,// remove a namespace prefix 96cdf0e10cSrcweir // - param1: namespace + 97cdf0e10cSrcweir // token of local name 98cdf0e10cSrcweir // - param2: prefix 99cdf0e10cSrcweir XML_ATACTION_EVENT_NAME, 100cdf0e10cSrcweir XML_ATACTION_MACRO_NAME, 101cdf0e10cSrcweir XML_ATACTION_MACRO_LOCATION, 102cdf0e10cSrcweir XML_ATACTION_DLG_BORDER, 103cdf0e10cSrcweir XML_ATACTION_URI_OOO, // an URI in OOo notation 104cdf0e10cSrcweir // - param1: pacakage URI are supported 105cdf0e10cSrcweir XML_ATACTION_URI_OASIS, // an URI in OASIS notation 106cdf0e10cSrcweir // - param1: pacakage URI are supported 107cdf0e10cSrcweir XML_ATACTION_RENAME_ATTRIBUTE, // rename up to 3 different possible values of an attrbiute 108cdf0e10cSrcweir // - param1: token of old attribute value (lower 16 bit) 109cdf0e10cSrcweir // + token of new attribute value (upper 16 bit) 110cdf0e10cSrcweir // - param2: token of old attribute value 111cdf0e10cSrcweir // + token of new attribute value 112cdf0e10cSrcweir // - param3: token of old attribute value 113cdf0e10cSrcweir // + token of new attribute value 114cdf0e10cSrcweir // if param2 or param3 are unused they must contain 115cdf0e10cSrcweir // XML_TOKEN_INVALID 116cdf0e10cSrcweir XML_ATACTION_RNG2ISO_DATETIME, // converts . into , in datetimes 117cdf0e10cSrcweir XML_ATACTION_RENAME_RNG2ISO_DATETIME,// converts . into , in datetimes and renames the attribute 118cdf0e10cSrcweir // - param1: namespace + 119cdf0e10cSrcweir // token of local name 120cdf0e10cSrcweir XML_ATACTION_MOVE_FROM_ELEM_RNG2ISO_DATETIME, // turn elem into an attr and convert . to , in datetimes 121cdf0e10cSrcweir // - param1: namespace + 122cdf0e10cSrcweir // token of local name 123cdf0e10cSrcweir XML_ATACTION_SVG_WIDTH_HEIGHT_OOO, // replace "inch" with "in" and subtracts 1/100th mm 124cdf0e10cSrcweir XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS, // replace "in" with "inch" and adds 1/100th mm 125cdf0e10cSrcweir XML_ATACTION_DRAW_MIRROR_OOO, // renames draw:mirror to style:mirror and adapts values 126cdf0e10cSrcweir // --> OD 2005-05-12 #i49139# 127cdf0e10cSrcweir XML_ATACTION_STYLE_MIRROR_OOO, // adapts style:mirror values 128cdf0e10cSrcweir // <-- 129cdf0e10cSrcweir XML_ATACTION_DRAW_MIRROR_OASIS, // renames style:mirror to draw:mirror and adapts values 130cdf0e10cSrcweir XML_ATACTION_GAMMA_OASIS, // converts percentage to double value 131cdf0e10cSrcweir XML_ATACTION_GAMMA_OOO, // converts double value to percentage 132cdf0e10cSrcweir XML_ATACTION_DECODE_ID, // converts strings with non numeric characters to only numeric character ids 133cdf0e10cSrcweir XML_ATACTION_OPACITY_FIX, // converts transparency to opacity and back 134cdf0e10cSrcweir XML_ATACTION_SHAPEID, // convert shape id 135cdf0e10cSrcweir XML_ATACTION_USER_DEFINED=0x40000000,// user defined actions start here 136cdf0e10cSrcweir XML_ATACTION_END=XML_TACTION_END 137cdf0e10cSrcweir }; 138cdf0e10cSrcweir 139cdf0e10cSrcweir #endif // _XMLOFF_ATTRTRANSFORMERACTION_HXX 140