| 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 |
#pragma once |
| 21 |
|
| 22 |
#include "TransformerAction.hxx" |
| 23 |
|
| 24 |
enum XMLAttrTransformerAction |
| 25 |
{ |
| 26 |
XML_ATACTION_EOT=XML_TACTION_EOT, // uses for initialization only |
| 27 |
XML_ATACTION_COPY, // copy attr |
| 28 |
XML_ATACTION_RENAME, // rename attr: |
| 29 |
// - param1: namespace + |
| 30 |
// token of local name |
| 31 |
XML_ATACTION_REMOVE, // remove attr |
| 32 |
XML_ATACTION_IN2INCH, // replace "in" with "inch" |
| 33 |
XML_ATACTION_INS2INCHS, // replace "in" with "inch" |
| 34 |
// multiple times |
| 35 |
XML_ATACTION_IN2TWIPS, // replace "in" with "inch" and |
| 36 |
// convert value from inch to twips |
| 37 |
// but only for writer documents |
| 38 |
XML_ATACTION_RENAME_IN2INCH, // replace "in" with "inch" and rename |
| 39 |
// attr: |
| 40 |
// - param1: namespace + |
| 41 |
// token of local name |
| 42 |
XML_ATACTION_INCH2IN, // replace "inch" with "in" |
| 43 |
XML_ATACTION_INCHS2INS, // replace "inch" with "in" |
| 44 |
// multiple times |
| 45 |
XML_ATACTION_TWIPS2IN, // replace "inch" with "in" and for writer |
| 46 |
// documents convert measure value from twips |
| 47 |
// to inch |
| 48 |
XML_ATACTION_RENAME_INCH2IN, // replace "inch" with "in" and rename |
| 49 |
// attr: |
| 50 |
// - param1: namespace + |
| 51 |
// token of local name |
| 52 |
XML_ATACTION_STYLE_FAMILY, // NOP, used for style:family |
| 53 |
XML_ATACTION_DECODE_STYLE_NAME, // NOP, used for style:name |
| 54 |
// - param1: style family |
| 55 |
XML_ATACTION_STYLE_DISPLAY_NAME, // NOP, used for style:display_name |
| 56 |
// - param1: style family |
| 57 |
XML_ATACTION_DECODE_STYLE_NAME_REF, // NOP, used for style:name reference |
| 58 |
// - param1: style family |
| 59 |
XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF, // NOP, used for style:name |
| 60 |
// - param1: namespace + |
| 61 |
// token of local name |
| 62 |
XML_ATACTION_ENCODE_STYLE_NAME, // NOP, used for style:name |
| 63 |
XML_ATACTION_ENCODE_STYLE_NAME_REF, // NOP, used for style:name |
| 64 |
XML_ATACTION_RENAME_ENCODE_STYLE_NAME_REF, // NOP, used for style:name |
| 65 |
// - param1: namespace + |
| 66 |
// token of local name |
| 67 |
// - param2: style family |
| 68 |
XML_ATACTION_MOVE_TO_ELEM, // turn attr into an elem |
| 69 |
// - param1: namespace + |
| 70 |
// token of local name |
| 71 |
XML_ATACTION_NEG_PERCENT, // replace % val with 100-% |
| 72 |
XML_ATACTION_RENAME_NEG_PERCENT, // replace % val with 100-%, rename attr |
| 73 |
// - param1: namespace + |
| 74 |
// token of local name |
| 75 |
XML_ATACTION_HREF, // xmlink:href |
| 76 |
XML_ATACTION_ADD_NAMESPACE_PREFIX, // add a namespace prefix |
| 77 |
// - param1: prefix |
| 78 |
XML_ATACTION_ADD_APP_NAMESPACE_PREFIX, // add a namespace prefix |
| 79 |
// - param1: default prefix |
| 80 |
XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX, // add a namespace prefix |
| 81 |
// - param1: namespace + |
| 82 |
// token of local name |
| 83 |
// - param2: prefix |
| 84 |
XML_ATACTION_REMOVE_NAMESPACE_PREFIX,// remove a namespace prefix |
| 85 |
// - param1: prefix |
| 86 |
XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX,// remove any namespace prefix |
| 87 |
XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,// remove a namespace prefix |
| 88 |
// - param1: namespace + |
| 89 |
// token of local name |
| 90 |
// - param2: prefix |
| 91 |
XML_ATACTION_EVENT_NAME, |
| 92 |
XML_ATACTION_MACRO_NAME, |
| 93 |
XML_ATACTION_MACRO_LOCATION, |
| 94 |
XML_ATACTION_DLG_BORDER, |
| 95 |
XML_ATACTION_URI_OOO, // a URI in OOo notation |
| 96 |
// - param1: package URI are supported |
| 97 |
XML_ATACTION_URI_OASIS, // a URI in OASIS notation |
| 98 |
// - param1: package URI are supported |
| 99 |
XML_ATACTION_RENAME_ATTRIBUTE, // rename up to 3 different possible values of an attribute |
| 100 |
// - param1: token of old attribute value (lower 16 bit) |
| 101 |
// + token of new attribute value (upper 16 bit) |
| 102 |
// - param2: token of old attribute value |
| 103 |
// + token of new attribute value |
| 104 |
// - param3: token of old attribute value |
| 105 |
// + token of new attribute value |
| 106 |
// if param2 or param3 are unused they must contain |
| 107 |
// XML_TOKEN_INVALID |
| 108 |
XML_ATACTION_RNG2ISO_DATETIME, // converts . into , in datetimes |
| 109 |
XML_ATACTION_RENAME_RNG2ISO_DATETIME,// converts . into , in datetimes and renames the attribute |
| 110 |
// - param1: namespace + |
| 111 |
// token of local name |
| 112 |
XML_ATACTION_SVG_WIDTH_HEIGHT_OOO, // replace "inch" with "in" and subtracts 1/100th mm |
| 113 |
XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS, // replace "in" with "inch" and adds 1/100th mm |
| 114 |
XML_ATACTION_DRAW_MIRROR_OOO, // renames draw:mirror to style:mirror and adapts values |
| 115 |
// OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#) |
| 116 |
XML_ATACTION_STYLE_MIRROR_OOO, // adapts style:mirror values |
| 117 |
XML_ATACTION_DRAW_MIRROR_OASIS, // renames style:mirror to draw:mirror and adapts values |
| 118 |
XML_ATACTION_GAMMA_OASIS, // converts percentage to double value |
| 119 |
XML_ATACTION_GAMMA_OOO, // converts double value to percentage |
| 120 |
XML_ATACTION_DECODE_ID, // converts strings with non numeric characters to only numeric character ids |
| 121 |
XML_ATACTION_OPACITY_FIX, // converts transparency to opacity and back |
| 122 |
XML_ATACTION_SHAPEID, // convert shape id |
| 123 |
XML_ATACTION_USER_DEFINED=0x40000000,// user defined actions start here |
| 124 |
}; |
| 125 |
|
| 126 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |