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