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