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