1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _XMLOFF_ATTRTRANSFORMERACTION_HXX
30 #define _XMLOFF_ATTRTRANSFORMERACTION_HXX
32 #include "TransformerAction.hxx"
34 enum XMLAttrTransformerAction
36 XML_ATACTION_EOT
=XML_TACTION_EOT
, // uses for initialization only
37 XML_ATACTION_COPY
, // copy attr
38 XML_ATACTION_RENAME
, // rename attr:
39 // - param1: namespace +
40 // token of local name
41 XML_ATACTION_REMOVE
, // remove attr
42 XML_ATACTION_IN2INCH
, // replace "in" with "inch"
43 XML_ATACTION_INS2INCHS
, // replace "in" with "inch"
45 XML_ATACTION_IN2TWIPS
, // replace "in" with "inch" and
46 // convert value from inch to twips
47 // but only for writer documents
48 XML_ATACTION_RENAME_IN2INCH
, // replace "in" with "inch" and rename
50 // - param1: namespace +
51 // token of local name
52 XML_ATACTION_INCH2IN
, // replace "inch" with "in"
53 XML_ATACTION_INCHS2INS
, // replace "inch" with "in"
55 XML_ATACTION_TWIPS2IN
, // replace "inch" with "in" and for writer
56 // documents convert measure value from twips
58 XML_ATACTION_RENAME_INCH2IN
, // replace "inch" with "in" and rename
60 // - param1: namespace +
61 // token of local name
62 XML_ATACTION_STYLE_FAMILY
, // NOP, used for style:family
63 XML_ATACTION_DECODE_STYLE_NAME
, // NOP, used for style:name
64 // - param1: style family
65 XML_ATACTION_STYLE_DISPLAY_NAME
, // NOP, used for style:display_name
66 // - param1: style family
67 XML_ATACTION_DECODE_STYLE_NAME_REF
, // NOP, used for style:name reference
68 // - param1: style family
69 XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF
, // NOP, used for style:name
70 // - param1: namespace +
71 // token of local name
72 XML_ATACTION_ENCODE_STYLE_NAME
, // NOP, used for style:name
73 XML_ATACTION_ENCODE_STYLE_NAME_REF
, // NOP, used for style:name
74 XML_ATACTION_RENAME_ENCODE_STYLE_NAME_REF
, // NOP, used for style:name
75 // - param1: namespace +
76 // token of local name
77 // - param2: style family
78 XML_ATACTION_MOVE_TO_ELEM
, // turn attr into an elem
79 // - param1: namespace +
80 // token of local name
81 XML_ATACTION_MOVE_FROM_ELEM
, // turn elem into an attr:
82 // - param1: namespace +
83 // token of local name
84 XML_ATACTION_NEG_PERCENT
, // replace % val with 100-%
85 XML_ATACTION_RENAME_NEG_PERCENT
, // replace % val with 100-%, rename attr
86 // - param1: namespace +
87 // token of local name
88 XML_ATACTION_HREF
, // xmlink:href
89 XML_ATACTION_ADD_NAMESPACE_PREFIX
, // add a namespace prefix
91 XML_ATACTION_ADD_APP_NAMESPACE_PREFIX
, // add a namespace prefix
92 // - param1: default prefix
93 XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX
, // add a namespace prefix
94 // - param1: namespace +
95 // token of local name
97 XML_ATACTION_REMOVE_NAMESPACE_PREFIX
,// remove a namespace prefix
99 XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
,// remove any namespace prefix
100 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,// remove a namespace prefix
101 // - param1: namespace +
102 // token of local name
104 XML_ATACTION_EVENT_NAME
,
105 XML_ATACTION_MACRO_NAME
,
106 XML_ATACTION_MACRO_LOCATION
,
107 XML_ATACTION_DLG_BORDER
,
108 XML_ATACTION_URI_OOO
, // an URI in OOo notation
109 // - param1: pacakage URI are supported
110 XML_ATACTION_URI_OASIS
, // an URI in OASIS notation
111 // - param1: pacakage URI are supported
112 XML_ATACTION_RENAME_ATTRIBUTE
, // rename up to 3 different possible values of an attrbiute
113 // - param1: token of old attribute value (lower 16 bit)
114 // + token of new attribute value (upper 16 bit)
115 // - param2: token of old attribute value
116 // + token of new attribute value
117 // - param3: token of old attribute value
118 // + token of new attribute value
119 // if param2 or param3 are unused they must contain
121 XML_ATACTION_RNG2ISO_DATETIME
, // converts . into , in datetimes
122 XML_ATACTION_RENAME_RNG2ISO_DATETIME
,// converts . into , in datetimes and renames the attribute
123 // - param1: namespace +
124 // token of local name
125 XML_ATACTION_MOVE_FROM_ELEM_RNG2ISO_DATETIME
, // turn elem into an attr and convert . to , in datetimes
126 // - param1: namespace +
127 // token of local name
128 XML_ATACTION_SVG_WIDTH_HEIGHT_OOO
, // replace "inch" with "in" and subtracts 1/100th mm
129 XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
, // replace "in" with "inch" and adds 1/100th mm
130 XML_ATACTION_DRAW_MIRROR_OOO
, // renames draw:mirror to style:mirror and adapts values
131 // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
132 XML_ATACTION_STYLE_MIRROR_OOO
, // adapts style:mirror values
133 XML_ATACTION_DRAW_MIRROR_OASIS
, // renames style:mirror to draw:mirror and adapts values
134 XML_ATACTION_GAMMA_OASIS
, // converts percentage to double value
135 XML_ATACTION_GAMMA_OOO
, // converts double value to percentage
136 XML_ATACTION_DECODE_ID
, // converts strings with non numeric characters to only numeric character ids
137 XML_ATACTION_OPACITY_FIX
, // converts transparency to opacity and back
138 XML_ATACTION_SHAPEID
, // convert shape id
139 XML_ATACTION_USER_DEFINED
=0x40000000,// user defined actions start here
140 XML_ATACTION_END
=XML_TACTION_END
143 #endif // _XMLOFF_ATTRTRANSFORMERACTION_HXX
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */