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 INCLUDED_XMLOFF_SOURCE_TRANSFORM_ATTRTRANSFORMERACTION_HXX
21 #define INCLUDED_XMLOFF_SOURCE_TRANSFORM_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_NEG_PERCENT
, // replace % val with 100-%
73 XML_ATACTION_RENAME_NEG_PERCENT
, // replace % val with 100-%, rename attr
74 // - param1: namespace +
75 // token of local name
76 XML_ATACTION_HREF
, // xmlink:href
77 XML_ATACTION_ADD_NAMESPACE_PREFIX
, // add a namespace prefix
79 XML_ATACTION_ADD_APP_NAMESPACE_PREFIX
, // add a namespace prefix
80 // - param1: default prefix
81 XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX
, // add a namespace prefix
82 // - param1: namespace +
83 // token of local name
85 XML_ATACTION_REMOVE_NAMESPACE_PREFIX
,// remove a namespace prefix
87 XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
,// remove any namespace prefix
88 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,// remove a namespace prefix
89 // - param1: namespace +
90 // token of local name
92 XML_ATACTION_EVENT_NAME
,
93 XML_ATACTION_MACRO_NAME
,
94 XML_ATACTION_MACRO_LOCATION
,
95 XML_ATACTION_DLG_BORDER
,
96 XML_ATACTION_URI_OOO
, // an URI in OOo notation
97 // - param1: pacakage URI are supported
98 XML_ATACTION_URI_OASIS
, // an URI in OASIS notation
99 // - param1: pacakage URI are supported
100 XML_ATACTION_RENAME_ATTRIBUTE
, // rename up to 3 different possible values of an attrbiute
101 // - param1: token of old attribute value (lower 16 bit)
102 // + token of new attribute value (upper 16 bit)
103 // - param2: token of old attribute value
104 // + token of new attribute value
105 // - param3: token of old attribute value
106 // + token of new attribute value
107 // if param2 or param3 are unused they must contain
109 XML_ATACTION_RNG2ISO_DATETIME
, // converts . into , in datetimes
110 XML_ATACTION_RENAME_RNG2ISO_DATETIME
,// converts . into , in datetimes and renames the attribute
111 // - param1: namespace +
112 // token of local name
113 XML_ATACTION_SVG_WIDTH_HEIGHT_OOO
, // replace "inch" with "in" and subtracts 1/100th mm
114 XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
, // replace "in" with "inch" and adds 1/100th mm
115 XML_ATACTION_DRAW_MIRROR_OOO
, // renames draw:mirror to style:mirror and adapts values
116 // OpenDocument file format: attribute value of <style:mirror> wrong (#i49139#)
117 XML_ATACTION_STYLE_MIRROR_OOO
, // adapts style:mirror values
118 XML_ATACTION_DRAW_MIRROR_OASIS
, // renames style:mirror to draw:mirror and adapts values
119 XML_ATACTION_GAMMA_OASIS
, // converts percentage to double value
120 XML_ATACTION_GAMMA_OOO
, // converts double value to percentage
121 XML_ATACTION_DECODE_ID
, // converts strings with non numeric characters to only numeric character ids
122 XML_ATACTION_OPACITY_FIX
, // converts transparency to opacity and back
123 XML_ATACTION_SHAPEID
, // convert shape id
124 XML_ATACTION_USER_DEFINED
=0x40000000,// user defined actions start here
125 XML_ATACTION_END
=XML_TACTION_END
128 #endif // INCLUDED_XMLOFF_SOURCE_TRANSFORM_ATTRTRANSFORMERACTION_HXX
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */