ScriptForge (SF_Calc new Intersect() method
[LibreOffice.git] / xmloff / source / transform / Oasis2OOo.cxx
blobff478e9669f7908c0342276e62dc3ce5ea5e1e9e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #include <comphelper/base64.hxx>
21 #include <com/sun/star/beans/XPropertySetInfo.hpp>
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include <rtl/ustrbuf.hxx>
24 #include <sal/log.hxx>
25 #include <xmloff/namespacemap.hxx>
26 #include <xmloff/xmlnamespace.hxx>
27 #include <xmloff/xmltoken.hxx>
28 #include "DeepTContext.hxx"
29 #include "MetaTContext.hxx"
30 #include "DocumentTContext.hxx"
31 #include "NotesTContext.hxx"
32 #include "StyleOASISTContext.hxx"
33 #include "FrameOASISTContext.hxx"
34 #include "EventOASISTContext.hxx"
35 #include "DlgOASISTContext.hxx"
36 #include "ControlOASISTContext.hxx"
37 #include "FormPropOASISTContext.hxx"
38 #include "ChartOASISTContext.hxx"
39 #include "ChartPlotAreaOASISTContext.hxx"
40 #include "MutableAttrList.hxx"
41 #include "ElemTransformerAction.hxx"
42 #include "AttrTransformerAction.hxx"
43 #include "TransformerActions.hxx"
44 #include "FamilyType.hxx"
45 #include "Oasis2OOo.hxx"
46 #include <cppuhelper/supportsservice.hxx>
48 using namespace ::xmloff::token;
49 using namespace ::com::sun::star::uno;
50 using namespace ::com::sun::star::xml::sax;
51 using namespace ::com::sun::star::beans;
53 namespace {
55 enum XMLUserDefinedTransformerAction
57 XML_ETACTION_META=XML_ETACTION_USER_DEFINED,
58 XML_ETACTION_DOCUMENT,
59 XML_ETACTION_BODY,
60 XML_ETACTION_NOTES,
61 XML_ETACTION_TABLE,
62 XML_ETACTION_STYLE,
63 XML_ETACTION_STYLE_RENAME,
64 XML_ETACTION_FRAME,
65 XML_ETACTION_EVENT,
66 XML_ETACTION_DLG,
67 XML_ETACTION_TAB_STOP,
68 XML_ETACTION_FORM_CONTROL,
69 XML_ETACTION_FORM_PROPERTY,
70 XML_ETACTION_CONFIG_ITEM,
71 XML_ETACTION_TRACKED_CHANGES,
72 XML_ETACTION_CHART,
73 XML_ETACTION_CHART_PLOT_AREA
78 #define ENTRY3( n, l, a, p1, p2, p3 ) \
79 { n, l, a, p1, p2, p3 }
80 #define ENTRY3QNQ( n, l, a, n1, l1, p2, n3, l3 ) \
81 ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
82 p2, XMLTransformerActionInit::QNameParam( n3, l3 ) )
84 #define ENTRY2( n, l, a, p1, p2 ) \
85 ENTRY3( n, l, a, p1, p2, 0 )
86 #define ENTRY2QN( n, l, a, n1, l1, p2 ) \
87 ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
89 #define ENTRY1( n, l, a, p1 ) \
90 ENTRY3( n, l, a, p1, 0, 0 )
91 #define ENTRY1Q( n, l, a, p1, t1 ) \
92 ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( p1, t1 ) )
94 #define ENTRY0( n, l, a ) \
95 ENTRY3( n, l, a, 0, 0, 0 )
97 // a macro to put two tokens into one sal_Int32 for the action
98 // XML_ATACTION_RENAME_ATTRIBUTE
99 static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum f, XMLTokenEnum s )
101 return static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16);
104 XMLTransformerActionInit const aActionTable[] =
106 // add office:class from <office:document> and <office:document-content>
107 ENTRY0( XML_NAMESPACE_OFFICE, XML_DOCUMENT, XML_ETACTION_DOCUMENT ),
108 ENTRY0( XML_NAMESPACE_OFFICE, XML_DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT ),
109 ENTRY1Q( XML_NAMESPACE_OOO, XML_AUTO_TEXT_EVENTS, XML_ETACTION_RENAME_ELEM,
110 XML_NAMESPACE_OFFICE, XML_AUTO_TEXT_EVENTS),
112 // add <meta:keywords>
113 ENTRY0( XML_NAMESPACE_OFFICE, XML_META, XML_ETACTION_META ),
115 // rename <office:scripts> to <office:script>
116 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_SCRIPTS, XML_ETACTION_RENAME_ELEM,
117 XML_NAMESPACE_OFFICE, XML_SCRIPT ),
119 // rename <office:script> to <office:script-data> and process attributes
120 ENTRY2QN( XML_NAMESPACE_OFFICE, XML_SCRIPT, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
121 XML_NAMESPACE_OFFICE, XML_SCRIPT_DATA,
122 OASIS_SCRIPT_ACTIONS ),
124 // rename <ooo:libraries> to <script:libraries>
125 ENTRY1Q( XML_NAMESPACE_OOO, XML_LIBRARIES, XML_ETACTION_RENAME_ELEM,
126 XML_NAMESPACE_SCRIPT, XML_LIBRARIES ),
128 // rename <ooo:library-linked> to <script:library-linked> and process attributes
129 ENTRY2QN( XML_NAMESPACE_OOO, XML_LIBRARY_LINKED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
130 XML_NAMESPACE_SCRIPT, XML_LIBRARY_LINKED,
131 OASIS_SCRIPT_ACTIONS ),
133 // rename <ooo:library-embedded> to <script:library-embedded> and process attributes
134 ENTRY2QN( XML_NAMESPACE_OOO, XML_LIBRARY_EMBEDDED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
135 XML_NAMESPACE_SCRIPT, XML_LIBRARY_EMBEDDED,
136 OASIS_SCRIPT_ACTIONS ),
138 // rename <ooo:module> to <script:module> and process attributes
139 ENTRY2QN( XML_NAMESPACE_OOO, XML_MODULE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
140 XML_NAMESPACE_SCRIPT, XML_MODULE,
141 OASIS_SCRIPT_ACTIONS ),
143 // rename <ooo:source-code> to <script:source-code>
144 ENTRY1Q( XML_NAMESPACE_OOO, XML_SOURCE_CODE, XML_ETACTION_RENAME_ELEM,
145 XML_NAMESPACE_SCRIPT, XML_SOURCE_CODE ),
147 ENTRY0( XML_NAMESPACE_OFFICE, XML_BODY, XML_ETACTION_BODY ),
149 // rename <office:font-face-decls> to <office:font-decl>,
150 // rename <style:font-face> to <style:font-decl>, process attrs
151 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS, XML_ETACTION_RENAME_ELEM,
152 XML_NAMESPACE_OFFICE, XML_FONT_DECLS ),
153 ENTRY2QN( XML_NAMESPACE_STYLE, XML_FONT_FACE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
154 XML_NAMESPACE_STYLE, XML_FONT_DECL,
155 OASIS_FONT_FACE_ACTIONS ),
157 // remove genre element
158 ENTRY0( XML_NAMESPACE_OFFICE, XML_TEXT, XML_ETACTION_COPY_CONTENT ),
159 ENTRY0( XML_NAMESPACE_OFFICE, XML_DRAWING, XML_ETACTION_COPY_CONTENT ),
160 ENTRY0( XML_NAMESPACE_OFFICE, XML_PRESENTATION, XML_ETACTION_COPY_CONTENT ),
161 ENTRY0( XML_NAMESPACE_OFFICE, XML_SPREADSHEET, XML_ETACTION_COPY_CONTENT ),
162 ENTRY0( XML_NAMESPACE_OFFICE, XML_CHART, XML_ETACTION_COPY_CONTENT ),
163 ENTRY0( XML_NAMESPACE_OFFICE, XML_IMAGE, XML_ETACTION_COPY_CONTENT ),
165 // rename <style:page-layout> to <style:page-master>
166 // ENTRY1Q( STYLE, PAGE_LAYOUT, RENAME_ELEM,
167 // XML_NAMESPACE_STYLE, XML_PAGE_MASTER ),
168 ENTRY1( XML_NAMESPACE_STYLE, XML_MASTER_PAGE, XML_ETACTION_PROC_ATTRS,
169 OASIS_MASTER_PAGE_ACTIONS ),
171 // merge <style:*-properties> into <style:properties> and do other
172 // styles processing
173 ENTRY1( XML_NAMESPACE_STYLE, XML_STYLE, XML_ETACTION_STYLE,
174 XML_FAMILY_TYPE_END ),
175 ENTRY1( XML_NAMESPACE_STYLE, XML_DEFAULT_STYLE, XML_ETACTION_STYLE,
176 XML_FAMILY_TYPE_END ),
177 ENTRY2QN( XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT, XML_ETACTION_STYLE_RENAME,
178 XML_NAMESPACE_STYLE, XML_PAGE_MASTER,
179 XML_FAMILY_TYPE_PAGE_LAYOUT ),
180 ENTRY1( XML_NAMESPACE_NUMBER, XML_NUMBER_STYLE, XML_ETACTION_STYLE,
181 XML_FAMILY_TYPE_DATA ),
182 ENTRY1( XML_NAMESPACE_NUMBER, XML_CURRENCY_STYLE, XML_ETACTION_STYLE,
183 XML_FAMILY_TYPE_DATA ),
184 ENTRY1( XML_NAMESPACE_NUMBER, XML_PERCENTAGE_STYLE, XML_ETACTION_STYLE,
185 XML_FAMILY_TYPE_DATA ),
186 ENTRY1( XML_NAMESPACE_NUMBER, XML_DATE_STYLE, XML_ETACTION_STYLE,
187 XML_FAMILY_TYPE_DATA ),
188 ENTRY1( XML_NAMESPACE_NUMBER, XML_TIME_STYLE, XML_ETACTION_STYLE,
189 XML_FAMILY_TYPE_DATA ),
190 ENTRY1( XML_NAMESPACE_NUMBER, XML_BOOLEAN_STYLE, XML_ETACTION_STYLE,
191 XML_FAMILY_TYPE_DATA ),
192 ENTRY1( XML_NAMESPACE_NUMBER, XML_TEXT_STYLE, XML_ETACTION_STYLE,
193 XML_FAMILY_TYPE_DATA ),
194 ENTRY1( XML_NAMESPACE_TEXT, XML_LIST_STYLE, XML_ETACTION_STYLE,
195 XML_FAMILY_TYPE_LIST ),
196 // ENTRY0( XML_NAMESPACE_TEXT, XML_OUTLINE_STYLE, STYLE ),
198 ENTRY1( XML_NAMESPACE_STYLE, XML_HEADER_STYLE, XML_ETACTION_STYLE,
199 XML_FAMILY_TYPE_HEADER_FOOTER ),
200 ENTRY1( XML_NAMESPACE_STYLE, XML_FOOTER_STYLE, XML_ETACTION_STYLE,
201 XML_FAMILY_TYPE_HEADER_FOOTER ),
202 ENTRY1( XML_NAMESPACE_TEXT, XML_LIST_LEVEL_STYLE_NUMBER, XML_ETACTION_STYLE,
203 XML_FAMILY_TYPE_LIST ),
204 ENTRY1( XML_NAMESPACE_TEXT, XML_LIST_LEVEL_STYLE_BULLET, XML_ETACTION_STYLE,
205 XML_FAMILY_TYPE_LIST ),
206 ENTRY1( XML_NAMESPACE_TEXT, XML_LIST_LEVEL_STYLE_IMAGE, XML_ETACTION_STYLE,
207 XML_FAMILY_TYPE_LIST ),
208 ENTRY1( XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL_STYLE, XML_ETACTION_STYLE,
209 XML_FAMILY_TYPE_LIST ),
210 ENTRY1( XML_NAMESPACE_DRAW, XML_GRADIENT, XML_ETACTION_STYLE,
211 XML_FAMILY_TYPE_GRADIENT ),
212 ENTRY1( XML_NAMESPACE_DRAW, XML_FILL_IMAGE, XML_ETACTION_STYLE,
213 XML_FAMILY_TYPE_FILL_IMAGE ),
214 ENTRY2QN( XML_NAMESPACE_DRAW, XML_OPACITY, XML_ETACTION_STYLE_RENAME,
215 XML_NAMESPACE_DRAW, XML_TRANSPARENCY,
216 XML_FAMILY_TYPE_GRADIENT ),
217 ENTRY1( XML_NAMESPACE_DRAW, XML_MARKER, XML_ETACTION_STYLE,
218 XML_FAMILY_TYPE_MARKER ),
219 ENTRY1( XML_NAMESPACE_DRAW, XML_HATCH, XML_ETACTION_STYLE,
220 XML_FAMILY_TYPE_HATCH ),
221 ENTRY1( XML_NAMESPACE_DRAW, XML_STROKE_DASH, XML_ETACTION_STYLE,
222 XML_FAMILY_TYPE_STROKE_DASH ),
224 // process <text:h/p>: process style-name attributes,
225 // rename <text:h>'s text:outline-level to text:level,
226 ENTRY1( XML_NAMESPACE_TEXT, XML_H, XML_ETACTION_PROC_ATTRS, OASIS_PARA_ACTIONS ),
227 ENTRY1( XML_NAMESPACE_TEXT, XML_P, XML_ETACTION_PROC_ATTRS, OASIS_PARA_ACTIONS ),
229 // process <test:list>'s text:style-name attributes
230 // rename <text:list> to <text:ordered-list> or <text:unordered-list>
231 // TODO: All list currently are renamed to <text:ordered-list>
232 ENTRY2QN( XML_NAMESPACE_TEXT, XML_LIST, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
233 XML_NAMESPACE_TEXT, XML_ORDERED_LIST,
234 OASIS_LIST_STYLE_REF_ACTIONS ),
236 // rename <text:note*> to <text:footnote*> or <text:endnote*>
237 ENTRY1( XML_NAMESPACE_TEXT, XML_NOTES_CONFIGURATION, XML_ETACTION_NOTES,
238 XML_NOTES_CONFIGURATION),
239 ENTRY1( XML_NAMESPACE_TEXT, XML_NOTE, XML_ETACTION_NOTES, XML_NOTE ),
241 // rename <text:footnote> and <text:endnote> to <text:note>
242 ENTRY1( XML_NAMESPACE_TEXT, XML_NOTE_REF, XML_ETACTION_NOTES, XML_NOTE_REF ),
244 // rename <text:tab> to <text:tab-stop>
245 ENTRY1Q( XML_NAMESPACE_TEXT, XML_TAB, XML_ETACTION_RENAME_ELEM,
246 XML_NAMESPACE_TEXT, XML_TAB_STOP ),
248 // replace <table:table table:is-sub-table> with <table:sub-table>
249 ENTRY0( XML_NAMESPACE_TABLE, XML_TABLE, XML_ETACTION_TABLE ),
251 // merge frame element
252 ENTRY0( XML_NAMESPACE_DRAW, XML_FRAME, XML_ETACTION_FRAME ),
254 // process events
255 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS, XML_ETACTION_RENAME_ELEM,
256 XML_NAMESPACE_OFFICE, XML_EVENTS ),
257 ENTRY0( XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, XML_ETACTION_EVENT ),
258 ENTRY0( XML_NAMESPACE_SCRIPT, XML_EVENT, XML_ETACTION_EVENT ),
259 ENTRY0( XML_NAMESPACE_PRESENTATION, XML_EVENT_LISTENER, XML_ETACTION_EVENT ),
261 // process Basic dialogs
262 ENTRY0( XML_NAMESPACE_DLG, XML_STYLE, XML_ETACTION_DLG ),
264 // process length attributes
265 ENTRY1( XML_NAMESPACE_DRAW, XML_RECT, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
266 ENTRY1( XML_NAMESPACE_DRAW, XML_LINE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
267 ENTRY1( XML_NAMESPACE_DRAW, XML_POLYLINE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
268 ENTRY1( XML_NAMESPACE_DRAW, XML_POLYGON, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
269 ENTRY1( XML_NAMESPACE_DRAW, XML_PATH, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
270 ENTRY1( XML_NAMESPACE_DRAW, XML_CIRCLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
271 ENTRY1( XML_NAMESPACE_DRAW, XML_ELLIPSE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
272 ENTRY1( XML_NAMESPACE_DRAW, XML_CONNECTOR, XML_ETACTION_PROC_ATTRS, OASIS_CONNECTOR_ACTIONS ),
273 ENTRY1( XML_NAMESPACE_DRAW, XML_CAPTION, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
274 ENTRY1( XML_NAMESPACE_DRAW, XML_MEASURE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
275 ENTRY1( XML_NAMESPACE_DRAW, XML_CONTROL, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
276 ENTRY1( XML_NAMESPACE_DRAW, XML_PAGE_THUMBNAIL, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
277 ENTRY1( XML_NAMESPACE_DRAW, XML_G, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
278 // ENTRY1( XML_NAMESPACE_DRAW, XML_FRAME, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
279 ENTRY1( XML_NAMESPACE_DRAW, XML_TEXT_BOX, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
280 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_PLACEHOLDER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
281 ENTRY1( XML_NAMESPACE_DRAW, XML_CONTOUR_POLYGON, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
282 ENTRY1( XML_NAMESPACE_DRAW, XML_CONTOUR_PATH, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
283 ENTRY1( XML_NAMESPACE_DRAW, XML_AREA_RECTANGLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
284 ENTRY1( XML_NAMESPACE_DRAW, XML_AREA_CIRCLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
285 ENTRY1( XML_NAMESPACE_DRAW, XML_AREA_POLYGON, XML_ETACTION_PROC_ATTRS, OASIS_DRAW_AREA_POLYGON_ACTIONS ),
286 ENTRY1( XML_NAMESPACE_DRAW, XML_GLUE_POINT, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
287 ENTRY1( XML_NAMESPACE_DR3D, XML_SCENE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
288 ENTRY1( XML_NAMESPACE_DR3D, XML_CUBE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
289 ENTRY1( XML_NAMESPACE_DR3D, XML_SPHERE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
290 ENTRY1( XML_NAMESPACE_DR3D, XML_EXTRUDE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
291 ENTRY1( XML_NAMESPACE_DR3D, XML_ROTATE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
292 ENTRY1( XML_NAMESPACE_CHART, XML_TITLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
293 ENTRY1( XML_NAMESPACE_CHART, XML_SUBTITLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
294 ENTRY1( XML_NAMESPACE_CHART, XML_FOOTER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
295 ENTRY1( XML_NAMESPACE_CHART, XML_LEGEND, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
296 ENTRY1( XML_NAMESPACE_CHART, XML_WALL, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
297 ENTRY1( XML_NAMESPACE_CHART, XML_FLOOR, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
298 ENTRY1( XML_NAMESPACE_CHART, XML_AXIS, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
299 ENTRY1( XML_NAMESPACE_CHART, XML_GRID, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
300 ENTRY1( XML_NAMESPACE_CHART, XML_SERIES, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
301 ENTRY1( XML_NAMESPACE_CHART, XML_DATA_POINT, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
302 ENTRY1( XML_NAMESPACE_CHART, XML_MEAN_VALUE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
303 ENTRY1( XML_NAMESPACE_CHART, XML_ERROR_INDICATOR, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
304 ENTRY1( XML_NAMESPACE_CHART, XML_REGRESSION_CURVE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
305 ENTRY1( XML_NAMESPACE_CHART, XML_STOCK_GAIN_MARKER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
306 ENTRY1( XML_NAMESPACE_CHART, XML_STOCK_LOSS_MARKER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
307 ENTRY1( XML_NAMESPACE_CHART, XML_STOCK_RANGE_LINE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
309 ENTRY0( XML_NAMESPACE_CHART, XML_CHART, XML_ETACTION_CHART ),
310 ENTRY0( XML_NAMESPACE_CHART, XML_PLOT_AREA, XML_ETACTION_CHART_PLOT_AREA ),
312 ENTRY0( XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM, XML_ETACTION_CONFIG_ITEM ),
313 ENTRY1Q( XML_NAMESPACE_TEXT, XML_TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
314 XML_NAMESPACE_TEXT, XML_PROTECTION_KEY ),
315 ENTRY1Q( XML_NAMESPACE_TABLE, XML_TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
316 XML_NAMESPACE_TABLE, XML_PROTECTION_KEY ),
318 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_TAB_STOP, XML_ETACTION_PROC_ATTRS,
319 OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS ),
320 ENTRY0( XML_NAMESPACE_STYLE, XML_TAB_STOP, XML_ETACTION_TAB_STOP ),
321 ENTRY1( XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE, XML_ETACTION_PROC_ATTRS,
322 OASIS_BACKGROUND_IMAGE_ACTIONS ),
323 ENTRY1( XML_NAMESPACE_TEXT, XML_LINENUMBERING_CONFIGURATION, XML_ETACTION_PROC_ATTRS,
324 OASIS_LINENUMBERING_ACTIONS ),
325 ENTRY1( XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_ETACTION_PROC_ATTRS,
326 OASIS_FOOTNOTE_SEP_ACTIONS ),
327 ENTRY1( XML_NAMESPACE_STYLE, XML_DROP_CAP, XML_ETACTION_PROC_ATTRS, OASIS_DROP_CAP_ACTIONS ),
328 ENTRY1( XML_NAMESPACE_STYLE, XML_COLUMNS, XML_ETACTION_PROC_ATTRS, OASIS_COLUMNS_ACTIONS ),
329 ENTRY1( XML_NAMESPACE_STYLE, XML_COLUMN, XML_ETACTION_PROC_ATTRS, OASIS_COLUMNS_ACTIONS ),
331 // process *:style-name attributes
332 ENTRY1( XML_NAMESPACE_STYLE, XML_MAP, XML_ETACTION_PROC_ATTRS, OASIS_MAP_STYLE_REF_ACTIONS ),
333 ENTRY1( XML_NAMESPACE_TEXT, XML_SPAN, XML_ETACTION_PROC_ATTRS, OASIS_TEXT_STYLE_REF_ACTIONS ),
334 ENTRY1( XML_NAMESPACE_TEXT, XML_A, XML_ETACTION_PROC_ATTRS, OASIS_TEXT_STYLE_REF_ACTIONS ),
335 ENTRY1( XML_NAMESPACE_TEXT, XML_RUBY_TEXT, XML_ETACTION_PROC_ATTRS,
336 OASIS_TEXT_STYLE_REF_ACTIONS ),
337 ENTRY1( XML_NAMESPACE_TEXT, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
338 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
339 ENTRY1( XML_NAMESPACE_TEXT, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
340 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
341 ENTRY1( XML_NAMESPACE_TEXT, XML_TABLE_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
342 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
343 ENTRY1( XML_NAMESPACE_TEXT, XML_OBJECT_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
344 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
345 ENTRY1( XML_NAMESPACE_TEXT, XML_USER_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
346 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
347 ENTRY1( XML_NAMESPACE_TEXT, XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
348 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
349 ENTRY1( XML_NAMESPACE_TEXT, XML_BIBLIOGRAPHY_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
350 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
351 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_SOURCE_STYLE, XML_ETACTION_PROC_ATTRS,
352 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
353 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_TITLE_TEMPLATE, XML_ETACTION_PROC_ATTRS,
354 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
355 ENTRY3QNQ( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_CHAPTER,
356 XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND,
357 XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_CHAPTER_NUMBER,
358 OASIS_TEXT_STYLE_REF_ACTIONS ,
359 XML_NAMESPACE_TEXT, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE),
360 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_TEXT, XML_ETACTION_PROC_ATTRS,
361 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
362 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_PAGE_NUMBER, XML_ETACTION_PROC_ATTRS,
363 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
364 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_SPAN, XML_ETACTION_PROC_ATTRS,
365 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
366 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
367 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
368 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_LINK_START, XML_ETACTION_PROC_ATTRS,
369 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
370 ENTRY1( XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_LINK_END, XML_ETACTION_PROC_ATTRS,
371 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
372 ENTRY1( XML_NAMESPACE_DRAW, XML_PAGE, XML_ETACTION_PROC_ATTRS,
373 OASIS_MASTER_PAGE_REF_ACTIONS ), /* generated entry */
374 // Conversion of attribute <table:style-name> for <table:table-row> and
375 // <table:table-column> (#i40011#, #i40015#)
376 ENTRY1( XML_NAMESPACE_TABLE, XML_TABLE_ROW, XML_ETACTION_PROC_ATTRS,
377 OASIS_TABLE_STYLE_REF_ACTIONS ),
378 ENTRY1( XML_NAMESPACE_TABLE, XML_TABLE_COLUMN, XML_ETACTION_PROC_ATTRS,
379 OASIS_TABLE_STYLE_REF_ACTIONS ),
381 // rename office:value-* to *:value-*
382 ENTRY1( XML_NAMESPACE_TEXT, XML_VARIABLE_DECL, XML_ETACTION_PROC_ATTRS,
383 OASIS_TEXT_VALUE_TYPE_ACTIONS ), /* generated entry */
384 ENTRY1( XML_NAMESPACE_TEXT, XML_VARIABLE_SET, XML_ETACTION_PROC_ATTRS,
385 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
386 ENTRY1( XML_NAMESPACE_TEXT, XML_VARIABLE_INPUT, XML_ETACTION_PROC_ATTRS,
387 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
388 ENTRY1( XML_NAMESPACE_TEXT, XML_USER_FIELD_DECL, XML_ETACTION_PROC_ATTRS,
389 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
390 ENTRY1( XML_NAMESPACE_TEXT, XML_EXPRESSION, XML_ETACTION_PROC_ATTRS,
391 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
392 ENTRY1( XML_NAMESPACE_TEXT, XML_USER_DEFINED, XML_ETACTION_PROC_ATTRS,
393 OASIS_DATETIME_ACTIONS ), // Add OASIS_TEXT_VALUE_TYPE_ACTIONS if attrs are added to text:user-defined
394 ENTRY1( XML_NAMESPACE_TABLE, XML_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
395 OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
396 ENTRY1( XML_NAMESPACE_TABLE, XML_COVERED_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
397 OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
398 ENTRY1( XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
399 OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
400 // ENTRY1( XML_NAMESPACE_FORM, XML_PROPERTY, XML_ETACTION_PROC_ATTRS,
401 // OASIS_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
402 // ENTRY1( XML_NAMESPACE_FORM, XML_LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
403 // OASIS_VALUE_TYPE_ACTIONS), /* generated entry */
405 ENTRY1( XML_NAMESPACE_OFFICE, XML_ANNOTATION, XML_ETACTION_MOVE_ELEMS_TO_ATTRS,
406 OASIS_ANNOTATION_ACTIONS ), /* generated entry */
407 ENTRY1( XML_NAMESPACE_OFFICE, XML_CHANGE_INFO, XML_ETACTION_MOVE_ELEMS_TO_ATTRS,
408 OASIS_CHANGE_INFO_ACTIONS ), /* generated entry */
410 ENTRY1( XML_NAMESPACE_TEXT, XML_DDE_CONNECTION_DECL, XML_ETACTION_PROC_ATTRS,
411 OASIS_DDE_CONNECTION_DECL_ACTIONS ),
413 ENTRY0( XML_NAMESPACE_FORM, XML_TEXT, XML_ETACTION_FORM_CONTROL ),
414 ENTRY0( XML_NAMESPACE_FORM, XML_TEXTAREA, XML_ETACTION_FORM_CONTROL ),
415 ENTRY0( XML_NAMESPACE_FORM, XML_FIXED_TEXT, XML_ETACTION_FORM_CONTROL ),
416 ENTRY0( XML_NAMESPACE_FORM, XML_FILE, XML_ETACTION_FORM_CONTROL ),
417 ENTRY0( XML_NAMESPACE_FORM, XML_PASSWORD, XML_ETACTION_FORM_CONTROL ),
418 ENTRY0( XML_NAMESPACE_FORM, XML_FORMATTED_TEXT, XML_ETACTION_FORM_CONTROL ),
419 ENTRY0( XML_NAMESPACE_FORM, XML_BUTTON, XML_ETACTION_FORM_CONTROL ),
420 ENTRY0( XML_NAMESPACE_FORM, XML_IMAGE, XML_ETACTION_FORM_CONTROL ),
421 ENTRY0( XML_NAMESPACE_FORM, XML_CHECKBOX, XML_ETACTION_FORM_CONTROL ),
422 ENTRY0( XML_NAMESPACE_FORM, XML_RADIO, XML_ETACTION_FORM_CONTROL ),
423 ENTRY0( XML_NAMESPACE_FORM, XML_LISTBOX, XML_ETACTION_FORM_CONTROL ),
424 ENTRY0( XML_NAMESPACE_FORM, XML_COMBOBOX, XML_ETACTION_FORM_CONTROL ),
425 ENTRY0( XML_NAMESPACE_FORM, XML_FRAME, XML_ETACTION_FORM_CONTROL ),
426 ENTRY0( XML_NAMESPACE_FORM, XML_HIDDEN, XML_ETACTION_FORM_CONTROL ),
427 ENTRY0( XML_NAMESPACE_FORM, XML_IMAGE_FRAME, XML_ETACTION_FORM_CONTROL ),
428 ENTRY0( XML_NAMESPACE_FORM, XML_GRID, XML_ETACTION_FORM_CONTROL ),
429 ENTRY0( XML_NAMESPACE_FORM, XML_VALUE_RANGE, XML_ETACTION_FORM_CONTROL ),
430 ENTRY0( XML_NAMESPACE_FORM, XML_GENERIC_CONTROL, XML_ETACTION_FORM_CONTROL ),
431 ENTRY1( XML_NAMESPACE_FORM, XML_COLUMN, XML_ETACTION_PROC_ATTRS,
432 OASIS_FORM_COLUMN_ACTIONS ),
433 ENTRY1( XML_NAMESPACE_FORM, XML_PROPERTY, XML_ETACTION_FORM_PROPERTY, XML_PROPERTY ),
434 ENTRY1( XML_NAMESPACE_FORM, XML_LIST_PROPERTY, XML_ETACTION_FORM_PROPERTY,
435 XML_LIST_PROPERTY ),
436 ENTRY1( XML_NAMESPACE_FORM, XML_LIST_VALUE, XML_ETACTION_FORM_PROPERTY, XML_LIST_VALUE ),
438 // process xlink:href
439 ENTRY1( XML_NAMESPACE_META, XML_TEMPLATE, XML_ETACTION_PROC_ATTRS,
440 OASIS_XLINK_ACTIONS ), /* generated entry */
441 ENTRY1( XML_NAMESPACE_META, XML_AUTO_RELOAD, XML_ETACTION_PROC_ATTRS,
442 OASIS_XLINK_ACTIONS ), /* generated entry */
443 ENTRY1( XML_NAMESPACE_TEXT, XML_SECTION_SOURCE, XML_ETACTION_PROC_ATTRS,
444 OASIS_XLINK_ACTIONS ), /* generated entry */
445 ENTRY1( XML_NAMESPACE_TEXT, XML_SCRIPT, XML_ETACTION_PROC_ATTRS,
446 OASIS_XLINK_ACTIONS ), /* generated entry */
447 ENTRY1( XML_NAMESPACE_TEXT, XML_ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ETACTION_PROC_ATTRS,
448 OASIS_XLINK_ACTIONS ), /* generated entry */
449 ENTRY1( XML_NAMESPACE_TABLE, XML_TABLE_SOURCE, XML_ETACTION_PROC_ATTRS,
450 OASIS_XLINK_ACTIONS ), /* generated entry */
451 ENTRY1( XML_NAMESPACE_TABLE, XML_CELL_RANGE_SOURCE, XML_ETACTION_PROC_ATTRS,
452 OASIS_XLINK_ACTIONS ), /* generated entry */
453 ENTRY1( XML_NAMESPACE_DRAW, XML_A, XML_ETACTION_PROC_ATTRS,
454 OASIS_XLINK_ACTIONS ), /* generated entry */
455 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_SOUND, XML_ETACTION_PROC_ATTRS,
456 OASIS_XLINK_ACTIONS ), /* generated entry */
457 ENTRY1( XML_NAMESPACE_FORM, XML_FORM, XML_ETACTION_PROC_ATTRS,
458 OASIS_FORM_ACTIONS ), /* generated entry */
459 // ENTRY1( XML_NAMESPACE_SVG, XML_FONT_FACE_URI, XML_ETACTION_PROC_ATTRS,
460 // OASIS_XLINK_ACTIONS ), /* generated entry */
461 // ENTRY1( XML_NAMESPACE_SVG, XML_DEFINITION_SRC, XML_ETACTION_PROC_ATTRS,
462 // OASIS_XLINK_ACTIONS ), /* generated entry */
463 ENTRY2QN( XML_NAMESPACE_CHART, XML_SYMBOL_IMAGE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
464 XML_NAMESPACE_STYLE, XML_SYMBOL_IMAGE,
465 OASIS_BACKGROUND_IMAGE_ACTIONS ),
466 // OASIS_XLINK_ACTIONS ), /* generated entry */
467 // events don't have real URIs
468 // ENTRY1( XML_NAMESPACE_PRESENTATION, XML_EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
469 // OASIS_XLINK_ACTIONS ), /* generated entry */
470 // ENTRY1( XML_NAMESPACE_SCRIPT, XML_EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
471 // OASIS_XLINK_ACTIONS ), /* generated entry */
473 // add namespace prefix to name
474 ENTRY1( XML_NAMESPACE_CONFIG, XML_CONFIG_ITEM_SET, XML_ETACTION_PROC_ATTRS,
475 OASIS_CONFIG_ITEM_SET_ACTIONS ),
477 // add namespace prefix to formula and condition
478 // text:condition
479 ENTRY1( XML_NAMESPACE_TEXT, XML_SECTION, XML_ETACTION_PROC_ATTRS,
480 OASIS_FORMULA_ACTIONS ), /* generated entry */
481 // text:formula
482 ENTRY1( XML_NAMESPACE_TEXT, XML_SEQUENCE, XML_ETACTION_PROC_ATTRS,
483 OASIS_FORMULA_ACTIONS ), /* generated entry */
484 // text:condition
485 ENTRY1( XML_NAMESPACE_TEXT, XML_DATABASE_NEXT, XML_ETACTION_PROC_ATTRS,
486 OASIS_FORMULA_ACTIONS ), /* generated entry */
487 // text:condition
488 ENTRY2QN( XML_NAMESPACE_TEXT, XML_DATABASE_ROW_SELECT, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
489 XML_NAMESPACE_TEXT, XML_DATABASE_SELECT,
490 OASIS_FORMULA_ACTIONS ), /* generated entry */
491 // text:condition
492 ENTRY1( XML_NAMESPACE_TEXT, XML_CONDITIONAL_TEXT, XML_ETACTION_PROC_ATTRS,
493 OASIS_FORMULA_ACTIONS ), /* generated entry */
494 // text:condition
495 ENTRY1( XML_NAMESPACE_TEXT, XML_HIDDEN_TEXT, XML_ETACTION_PROC_ATTRS,
496 OASIS_FORMULA_ACTIONS ), /* generated entry */
497 // text:condition
498 ENTRY1( XML_NAMESPACE_TEXT, XML_HIDDEN_PARAGRAPH, XML_ETACTION_PROC_ATTRS,
499 OASIS_FORMULA_ACTIONS ), /* generated entry */
500 // text:formula
501 ENTRY1( XML_NAMESPACE_TEXT, XML_TABLE_FORMULA, XML_ETACTION_PROC_ATTRS,
502 OASIS_FORMULA_ACTIONS ), /* generated entry */
504 // process table::content-validation
505 ENTRY1( XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION, XML_ETACTION_PROC_ATTRS,
506 OASIS_CONTENT_VALIDATION_ACTIONS ),
508 // rename <table:dependencies> to <table:dependences>
509 ENTRY1Q( XML_NAMESPACE_TABLE, XML_DEPENDENCIES, XML_ETACTION_RENAME_ELEM,
510 XML_NAMESPACE_TABLE, XML_DEPENDENCES ),
511 ENTRY1Q( XML_NAMESPACE_TABLE, XML_DEPENDENCY, XML_ETACTION_RENAME_ELEM,
512 XML_NAMESPACE_TABLE, XML_DEPENDENCE ),
514 // process table::conversion-mode
515 ENTRY1( XML_NAMESPACE_TABLE, XML_CONVERSION_MODE, XML_ETACTION_PROC_ATTRS,
516 OASIS_DDE_CONV_MODE_ACTIONS ),
518 // process table::data-pilot-member
519 ENTRY1( XML_NAMESPACE_TABLE, XML_DATA_PILOT_MEMBER, XML_ETACTION_PROC_ATTRS,
520 OASIS_DATAPILOT_MEMBER_ACTIONS ),
522 // process table::data-pilot-level
523 ENTRY1( XML_NAMESPACE_TABLE, XML_DATA_PILOT_LEVEL, XML_ETACTION_PROC_ATTRS,
524 OASIS_DATAPILOT_LEVEL_ACTIONS ),
526 // process table::source-service
527 ENTRY1( XML_NAMESPACE_TABLE, XML_SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS,
528 OASIS_SOURCE_SERVICE_ACTIONS ),
530 // entries for date time change (#i36576#)
531 ENTRY1( XML_NAMESPACE_TEXT, XML_DATE, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
532 ENTRY1( XML_NAMESPACE_TEXT, XML_CREATION_DATE, XML_ETACTION_PROC_ATTRS,
533 OASIS_DATETIME_ACTIONS ),
534 ENTRY1( XML_NAMESPACE_TEXT, XML_TIME, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
535 ENTRY1( XML_NAMESPACE_TEXT, XML_CREATION_TIME, XML_ETACTION_PROC_ATTRS,
536 OASIS_DATETIME_ACTIONS ),
537 ENTRY1( XML_NAMESPACE_TEXT, XML_PRINT_TIME, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
538 ENTRY1( XML_NAMESPACE_TEXT, XML_MODIFICATION_TIME, XML_ETACTION_PROC_ATTRS,
539 OASIS_DATETIME_ACTIONS ),
540 ENTRY1( XML_NAMESPACE_TEXT, XML_EDITING_DURATION, XML_ETACTION_PROC_ATTRS,
541 OASIS_DATETIME_ACTIONS ),
542 ENTRY1( XML_NAMESPACE_FORM, XML_TIME, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
543 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_SETTINGS, XML_ETACTION_PROC_ATTRS,
544 OASIS_DATETIME_ACTIONS ),
546 // fix <text:alphabatical-index-mark text:main-etry>
547 ENTRY1( XML_NAMESPACE_TEXT, XML_ALPHABETICAL_INDEX_MARK, XML_ETACTION_PROC_ATTRS,
548 OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS ),
549 ENTRY1( XML_NAMESPACE_TEXT, XML_ALPHABETICAL_INDEX_MARK_START, XML_ETACTION_PROC_ATTRS,
550 OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS ),
552 // fix id strings in old animation elements
553 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_DIM, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
554 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_PLAY, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
555 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
556 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
557 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
558 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
560 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ETACTION_EOT )
563 // XML_ETACTION_STYLE
564 XMLTransformerActionInit const aStyleActionTable[] =
566 ENTRY0( XML_NAMESPACE_STYLE, XML_FAMILY, XML_ATACTION_STYLE_FAMILY ),
567 ENTRY1( XML_NAMESPACE_STYLE, XML_NAME, XML_ATACTION_DECODE_STYLE_NAME,
568 XML_FAMILY_TYPE_END ),
569 ENTRY1( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, XML_ATACTION_STYLE_DISPLAY_NAME,
570 XML_FAMILY_TYPE_END ),
571 ENTRY1( XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
572 XML_FAMILY_TYPE_END ),
573 ENTRY1( XML_NAMESPACE_STYLE, XML_NEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
574 XML_FAMILY_TYPE_END ),
575 ENTRY1( XML_NAMESPACE_STYLE, XML_LIST_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
576 XML_FAMILY_TYPE_LIST ),
577 ENTRY1( XML_NAMESPACE_STYLE, XML_MASTER_PAGE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
578 XML_FAMILY_TYPE_MASTER_PAGE ),
579 ENTRY0( XML_NAMESPACE_STYLE, XML_DEFAULT_OUTLINE_LEVEL, XML_ATACTION_REMOVE ),
580 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
581 XML_FAMILY_TYPE_TEXT ), // list level styles
582 ENTRY1( XML_NAMESPACE_DRAW, XML_NAME, XML_ATACTION_DECODE_STYLE_NAME,
583 XML_FAMILY_TYPE_END ),
584 ENTRY1( XML_NAMESPACE_DRAW, XML_DISPLAY_NAME, XML_ATACTION_STYLE_DISPLAY_NAME,
585 XML_FAMILY_TYPE_END ),
586 ENTRY0( XML_NAMESPACE_DRAW, XML_DISTANCE, XML_ATACTION_IN2INCH ),
587 ENTRY0( XML_NAMESPACE_DRAW, XML_DOTS1_LENGTH, XML_ATACTION_IN2INCH ),
588 ENTRY0( XML_NAMESPACE_DRAW, XML_DOTS2_LENGTH, XML_ATACTION_IN2INCH ),
589 ENTRY0( XML_NAMESPACE_SVG, XML_WIDTH, XML_ATACTION_IN2INCH ),
590 ENTRY0( XML_NAMESPACE_SVG, XML_HEIGHT, XML_ATACTION_IN2INCH ),
591 ENTRY0( XML_NAMESPACE_DRAW, XML_START, XML_ATACTION_NEG_PERCENT ),
592 ENTRY0( XML_NAMESPACE_DRAW, XML_END, XML_ATACTION_NEG_PERCENT ),
593 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
594 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
597 // OASIS_FRAME_ELEM_ACTIONS
598 XMLTransformerActionInit const aFrameActionTable[] =
600 ENTRY0( XML_NAMESPACE_DRAW, XML_TEXT_BOX, XML_ETACTION_COPY ),
601 ENTRY0( XML_NAMESPACE_DRAW, XML_IMAGE, XML_ETACTION_COPY ),
602 ENTRY0( XML_NAMESPACE_DRAW, XML_OBJECT, XML_ETACTION_COPY ),
603 ENTRY0( XML_NAMESPACE_DRAW, XML_OBJECT_OLE, XML_ETACTION_COPY ),
604 ENTRY0( XML_NAMESPACE_DRAW, XML_APPLET, XML_ETACTION_COPY ),
605 ENTRY0( XML_NAMESPACE_DRAW, XML_PLUGIN, XML_ETACTION_COPY ),
606 ENTRY0( XML_NAMESPACE_DRAW, XML_FLOATING_FRAME, XML_ETACTION_COPY ),
607 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
610 // OASIS_EVENT_ELEM_ACTIONS
611 XMLTransformerActionInit const aEventActionTable[] =
613 ENTRY0( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_HREF ),
614 ENTRY1( XML_NAMESPACE_SCRIPT, XML_LANGUAGE, XML_ATACTION_REMOVE_NAMESPACE_PREFIX, XML_NAMESPACE_OOO ),
615 ENTRY0( XML_NAMESPACE_SCRIPT, XML_EVENT_NAME, XML_ATACTION_EVENT_NAME ),
616 ENTRY0( XML_NAMESPACE_SCRIPT, XML_MACRO_NAME, XML_ATACTION_MACRO_NAME ),
617 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
620 // OASIS_EVENT_ELEM_ACTIONS
621 XMLTransformerActionInit const aDlgActionTable[] =
623 ENTRY0( XML_NAMESPACE_DLG, XML_BORDER, XML_ATACTION_DLG_BORDER )
626 // action table for OASIS_MASTER_PAGE_ACTIONS
627 XMLTransformerActionInit const aMasterPageActionTable[] =
629 ENTRY1( XML_NAMESPACE_STYLE, XML_NAME, XML_ATACTION_DECODE_STYLE_NAME, XML_FAMILY_TYPE_MASTER_PAGE ),
630 ENTRY1( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, XML_ATACTION_STYLE_DISPLAY_NAME, XML_FAMILY_TYPE_MASTER_PAGE ),
631 ENTRY1( XML_NAMESPACE_STYLE, XML_NEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_MASTER_PAGE ),
632 ENTRY1Q( XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME, XML_ATACTION_RENAME, XML_NAMESPACE_STYLE, XML_PAGE_MASTER_NAME ),
633 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
636 // action table for OASIS_TEXT_STYLE_REF_ACTIONS
637 XMLTransformerActionInit const aTextStyleRefActionTable[] =
639 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
640 ENTRY1( XML_NAMESPACE_TEXT, XML_VISITED_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
641 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
642 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
645 // action table for OASIS_PARA_STYLE_REF_ACTIONS
646 XMLTransformerActionInit const aParaStyleRefActionTable[] =
648 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PARAGRAPH ),
649 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
652 // action table for OASIS_LIST_STYLE_REF_ACTIONS
653 XMLTransformerActionInit const aListStyleRefActionTable[] =
655 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_LIST ),
656 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
659 // action table for OASIS_MASTER_PAGE_REF_ACTIONS
660 XMLTransformerActionInit const aMasterPageRefActionTable[] =
662 ENTRY1( XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_MASTER_PAGE ),
663 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
666 // action table for OASIS_MAP_STYLE_REF_ACTIONS
667 XMLTransformerActionInit const aMapStyleRefActionTable[] =
669 ENTRY1( XML_NAMESPACE_STYLE, XML_APPLY_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_END ),
670 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
673 // action table for OASIS_TABLE_STYLE_REF_ACTIONS (#i40011#, #i40015#)
674 XMLTransformerActionInit const aTableStyleRefActionTable[] =
676 ENTRY1( XML_NAMESPACE_TABLE, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_END ),
677 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
680 XMLTransformerActionInit const aFontFaceActionTable[] =
682 ENTRY1Q( XML_NAMESPACE_SVG, XML_FONT_FAMILY, XML_ATACTION_RENAME, XML_NAMESPACE_FO, XML_FONT_FAMILY ),
683 ENTRY1Q( XML_NAMESPACE_STYLE, XML_FONT_ADORNMENTS, XML_ATACTION_RENAME, XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME ),
684 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
687 // action table for OASIS_PARA_ACTIONS
688 XMLTransformerActionInit const aParaActionTable[] =
690 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PARAGRAPH ),
691 ENTRY1( XML_NAMESPACE_TEXT, XML_COND_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PARAGRAPH ),
692 ENTRY1Q( XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_LEVEL ),
693 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
696 // !!ATTENTION!! If you change something here, please also change
697 // aConnectorActionTable if appropriate
698 XMLTransformerActionInit const aShapeActionTable[] =
700 ENTRY1( XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_GRAPHIC ),
701 ENTRY1( XML_NAMESPACE_DRAW, XML_TEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PARAGRAPH ),
702 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PRESENTATION ),
703 ENTRY0( XML_NAMESPACE_SVG, XML_X, XML_ATACTION_IN2INCH ),
704 ENTRY0( XML_NAMESPACE_SVG, XML_Y, XML_ATACTION_IN2INCH ),
705 ENTRY0( XML_NAMESPACE_SVG, XML_X1, XML_ATACTION_IN2INCH ),
706 ENTRY0( XML_NAMESPACE_SVG, XML_Y1, XML_ATACTION_IN2INCH ),
707 ENTRY0( XML_NAMESPACE_SVG, XML_X2, XML_ATACTION_IN2INCH ),
708 ENTRY0( XML_NAMESPACE_SVG, XML_Y2, XML_ATACTION_IN2INCH ),
709 ENTRY0( XML_NAMESPACE_SVG, XML_CX, XML_ATACTION_IN2INCH ),
710 ENTRY0( XML_NAMESPACE_SVG, XML_CY, XML_ATACTION_IN2INCH ),
711 ENTRY0( XML_NAMESPACE_DRAW, XML_END_X, XML_ATACTION_IN2INCH ),
712 ENTRY0( XML_NAMESPACE_DRAW, XML_END_Y, XML_ATACTION_IN2INCH ),
713 ENTRY0( XML_NAMESPACE_SVG, XML_R, XML_ATACTION_IN2INCH ),
714 ENTRY0( XML_NAMESPACE_SVG, XML_RX, XML_ATACTION_IN2INCH ),
715 ENTRY0( XML_NAMESPACE_SVG, XML_RY, XML_ATACTION_IN2INCH ),
716 ENTRY0( XML_NAMESPACE_SVG, XML_WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
717 ENTRY0( XML_NAMESPACE_SVG, XML_HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
718 ENTRY0( XML_NAMESPACE_FO, XML_MIN_WIDTH, XML_ATACTION_IN2INCH ),
719 ENTRY0( XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_ATACTION_IN2INCH ),
720 ENTRY0( XML_NAMESPACE_FO, XML_MAX_WIDTH, XML_ATACTION_IN2INCH ),
721 ENTRY0( XML_NAMESPACE_FO, XML_MAX_HEIGHT, XML_ATACTION_IN2INCH ),
722 ENTRY0( XML_NAMESPACE_DRAW, XML_CORNER_RADIUS, XML_ATACTION_IN2INCH ),
723 ENTRY0( XML_NAMESPACE_DRAW, XML_LINE_SKEW, XML_ATACTION_INS2INCHS ),
724 ENTRY0( XML_NAMESPACE_DRAW, XML_CAPTION_POINT_X, XML_ATACTION_IN2INCH ),
725 ENTRY0( XML_NAMESPACE_DRAW, XML_CAPTION_POINT_Y, XML_ATACTION_IN2INCH ),
726 ENTRY0( XML_NAMESPACE_DR3D, XML_DISTANCE, XML_ATACTION_IN2INCH ),
727 ENTRY0( XML_NAMESPACE_DR3D, XML_FOCAL_LENGTH, XML_ATACTION_IN2INCH ),
728 ENTRY1Q( XML_NAMESPACE_DRAW, XML_CONTROL, XML_ATACTION_RENAME, XML_NAMESPACE_FORM, XML_ID ),
729 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
731 // needed by chart:legend. The legend needs also the draw actions. As
732 // there is no merge mechanism, all actions have to be in the same table
733 ENTRY2( XML_NAMESPACE_CHART, XML_LEGEND_POSITION, XML_ATACTION_RENAME_ATTRIBUTE,
734 RENAME_ENTRY( XML_START, XML_LEFT ),
735 RENAME_ENTRY( XML_END, XML_RIGHT )),
737 ENTRY0( XML_NAMESPACE_DRAW, XML_ID, XML_ATACTION_DECODE_ID ),
739 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
742 // OASIS_ANIMATION_ACTIONS
743 XMLTransformerActionInit const aAnimationActionTable[] =
745 ENTRY0( XML_NAMESPACE_DRAW, XML_SHAPE_ID, XML_ATACTION_DECODE_ID ),
746 ENTRY0( XML_NAMESPACE_PRESENTATION, XML_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
747 ENTRY0( XML_NAMESPACE_PRESENTATION, XML_PAUSE, XML_ATACTION_RNG2ISO_DATETIME ),
749 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
752 // OOO_CONNECTOR_ACTIONS
753 XMLTransformerActionInit const aConnectorActionTable[] =
755 ENTRY1( XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_GRAPHIC ),
756 ENTRY1( XML_NAMESPACE_DRAW, XML_TEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PARAGRAPH ),
757 ENTRY1( XML_NAMESPACE_PRESENTATION, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PRESENTATION ),
758 ENTRY0( XML_NAMESPACE_SVG, XML_X1, XML_ATACTION_IN2TWIPS ),
759 ENTRY0( XML_NAMESPACE_SVG, XML_Y1, XML_ATACTION_IN2TWIPS ),
760 ENTRY0( XML_NAMESPACE_SVG, XML_X2, XML_ATACTION_IN2TWIPS ),
761 ENTRY0( XML_NAMESPACE_SVG, XML_Y2, XML_ATACTION_IN2TWIPS ),
762 ENTRY0( XML_NAMESPACE_DRAW, XML_END_X, XML_ATACTION_IN2INCH ),
763 ENTRY0( XML_NAMESPACE_DRAW, XML_END_Y, XML_ATACTION_IN2INCH ),
764 ENTRY0( XML_NAMESPACE_SVG, XML_WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
765 ENTRY0( XML_NAMESPACE_SVG, XML_HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
766 ENTRY0( XML_NAMESPACE_FO, XML_MIN_WIDTH, XML_ATACTION_IN2INCH ),
767 ENTRY0( XML_NAMESPACE_FO, XML_MIN_HEIGHT, XML_ATACTION_IN2INCH ),
768 ENTRY0( XML_NAMESPACE_FO, XML_MAX_WIDTH, XML_ATACTION_IN2INCH ),
769 ENTRY0( XML_NAMESPACE_FO, XML_MAX_HEIGHT, XML_ATACTION_IN2INCH ),
770 ENTRY0( XML_NAMESPACE_DRAW, XML_LINE_SKEW, XML_ATACTION_INS2INCHS ),
771 ENTRY1Q( XML_NAMESPACE_DRAW, XML_CONTROL, XML_ATACTION_RENAME, XML_NAMESPACE_FORM, XML_ID ),
772 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
773 ENTRY0( XML_NAMESPACE_DRAW, XML_START_SHAPE, XML_ATACTION_DECODE_ID ),
774 ENTRY0( XML_NAMESPACE_DRAW, XML_END_SHAPE, XML_ATACTION_DECODE_ID ),
776 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
779 // OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
780 XMLTransformerActionInit const aIndexEntryTabStopActionTable[] =
782 ENTRY0( XML_NAMESPACE_STYLE, XML_POSITION, XML_ATACTION_IN2INCH ),
783 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
784 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
787 // OASIS_TAB_STOP_ACTIONS
788 XMLTransformerActionInit const aTabStopActionTable[] =
790 ENTRY0( XML_NAMESPACE_STYLE, XML_POSITION, XML_ATACTION_IN2INCH ),
791 ENTRY1Q( XML_NAMESPACE_STYLE, XML_LEADER_TEXT, XML_ATACTION_RENAME, XML_NAMESPACE_STYLE, XML_LEADER_CHAR ),
792 ENTRY0( XML_NAMESPACE_STYLE, XML_LEADER_STYLE, XML_ATACTION_REMOVE ),
793 ENTRY0( XML_NAMESPACE_STYLE, XML_LEADER_TYPE, XML_ATACTION_REMOVE ),
794 ENTRY0( XML_NAMESPACE_STYLE, XML_LEADER_WIDTH, XML_ATACTION_REMOVE ),
795 ENTRY0( XML_NAMESPACE_STYLE, XML_LEADER_COLOR, XML_ATACTION_REMOVE ),
796 ENTRY0( XML_NAMESPACE_STYLE, XML_LEADER_TEXT_STYLE, XML_ATACTION_REMOVE ),
797 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
800 // OASIS_LINENUMBERING_ACTIONS
801 XMLTransformerActionInit const aLineNumberingActionTable[] =
803 ENTRY0( XML_NAMESPACE_TEXT, XML_OFFSET, XML_ATACTION_IN2INCH ),
804 ENTRY1( XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
805 ENTRY1Q( XML_NAMESPACE_TEXT, XML_COUNT_IN_TEXT_BOXES, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_COUNT_IN_FLOATING_FRAMES ),
806 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
809 XMLTransformerActionInit const aFootnoteSepActionTable[] =
811 ENTRY0( XML_NAMESPACE_STYLE, XML_WIDTH, XML_ATACTION_IN2INCH ),
812 ENTRY0( XML_NAMESPACE_STYLE, XML_DISTANCE_BEFORE_SEP, XML_ATACTION_IN2INCH ),
813 ENTRY0( XML_NAMESPACE_STYLE, XML_DISTANCE_AFTER_SEP, XML_ATACTION_IN2INCH ),
814 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
817 // OASIS_NOTES_ACTIONS (processed by special context)
818 XMLTransformerActionInit const aNotesActionTable[] =
820 ENTRY0( XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_ATACTION_STYLE_FAMILY ),
821 ENTRY1( XML_NAMESPACE_TEXT, XML_CITATION_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
822 ENTRY1( XML_NAMESPACE_TEXT, XML_CITATION_BODY_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
823 ENTRY1( XML_NAMESPACE_TEXT, XML_DEFAULT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_PARAGRAPH ),
824 ENTRY1( XML_NAMESPACE_TEXT, XML_MASTER_PAGE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_MASTER_PAGE ),
825 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
828 // OASIS_DROP_CAP_ACTIONS
829 XMLTransformerActionInit const aDropCapActionTable[] =
831 ENTRY0( XML_NAMESPACE_STYLE, XML_DISTANCE, XML_ATACTION_IN2INCH ),
832 ENTRY1( XML_NAMESPACE_STYLE, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TEXT ),
833 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
836 XMLTransformerActionInit const aColumnsActionTable[] =
838 ENTRY0( XML_NAMESPACE_STYLE, XML_COLUMN_GAP, XML_ATACTION_IN2INCH ),
839 ENTRY0( XML_NAMESPACE_STYLE, XML_SPACE_BEFORE, XML_ATACTION_REMOVE ),
840 ENTRY0( XML_NAMESPACE_STYLE, XML_SPACE_AFTER, XML_ATACTION_REMOVE ),
841 ENTRY1Q( XML_NAMESPACE_FO, XML_START_INDENT, XML_ATACTION_RENAME_IN2INCH, XML_NAMESPACE_FO, XML_MARGIN_LEFT ),
842 ENTRY1Q( XML_NAMESPACE_FO, XML_END_INDENT, XML_ATACTION_RENAME_IN2INCH, XML_NAMESPACE_FO, XML_MARGIN_RIGHT ),
843 ENTRY0( XML_NAMESPACE_STYLE, XML_WIDTH, XML_ATACTION_IN2INCH ),
844 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
847 // OASIS_TEXT_VALUE_TYPE_ACTIONS
848 XMLTransformerActionInit const aTextValueTypeActionTable[] =
850 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_VALUE_TYPE ),
851 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_VALUE, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_VALUE ),
852 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_CURRENCY ),
853 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME, XML_NAMESPACE_TEXT, XML_DATE_VALUE ),
854 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME, XML_NAMESPACE_TEXT, XML_TIME_VALUE ),
855 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_BOOLEAN_VALUE ),
856 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_STRING_VALUE ),
857 ENTRY0( XML_NAMESPACE_TEXT, XML_FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
858 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
861 // OASIS_TABLE_VALUE_TYPE_ACTIONS
862 XMLTransformerActionInit const aTableValueTypeActionTable[] =
864 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_VALUE_TYPE ),
865 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_VALUE, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_VALUE ),
866 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_CURRENCY ),
867 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME, XML_NAMESPACE_TABLE, XML_DATE_VALUE ),
868 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME, XML_NAMESPACE_TABLE, XML_TIME_VALUE ),
869 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_BOOLEAN_VALUE ),
870 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_STRING_VALUE ),
871 ENTRY1( XML_NAMESPACE_TABLE, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_TABLE_CELL ),
872 ENTRY0( XML_NAMESPACE_TABLE, XML_FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
873 ENTRY1Q( XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION_NAME, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_VALIDATION_NAME ),
874 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
877 // action table for OASIS_ANNOTATION_ACTIONS
878 XMLTransformerActionInit const aAnnotationActionTable[] =
880 ENTRY1Q( XML_NAMESPACE_DC, XML_CREATOR, XML_ETACTION_MOVE_TO_ATTR, XML_NAMESPACE_OFFICE, XML_AUTHOR ),
881 ENTRY1Q( XML_NAMESPACE_DC, XML_DATE, XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME, XML_NAMESPACE_OFFICE, XML_CREATE_DATE ),
882 ENTRY1Q( XML_NAMESPACE_META, XML_DATE_STRING, XML_ETACTION_MOVE_TO_ATTR, XML_NAMESPACE_OFFICE, XML_CREATE_DATE_STRING ),
883 ENTRY0( XML_NAMESPACE_TEXT, XML_P, XML_ETACTION_EXTRACT_CHARACTERS ),
884 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ETACTION_EOT )
887 // action table for OASIS_CHANGE_INFO_ACTIONS
888 XMLTransformerActionInit const aChangeInfoActionTable[] =
890 ENTRY1Q( XML_NAMESPACE_DC, XML_CREATOR, XML_ETACTION_MOVE_TO_ATTR, XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR ),
891 ENTRY1Q( XML_NAMESPACE_DC, XML_DATE, XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME, XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME ),
892 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ETACTION_EOT )
895 // OASIS_BACKGROUND_IMAGE_ACTIONS
896 XMLTransformerActionInit const aBackgroundImageActionTable[] =
898 ENTRY1Q( XML_NAMESPACE_DRAW, XML_OPACITY, XML_ATACTION_RENAME_NEG_PERCENT, XML_NAMESPACE_DRAW, XML_TRANSPARENCY ),
899 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
900 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
903 // OASIS_DDE_CONNECTION_DECL
904 XMLTransformerActionInit const aDDEConnectionDeclActionTable[] =
906 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_NAME, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_NAME ),
907 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
910 // OASIS_FORM_CONTROL_ACTIONS
911 XMLTransformerActionInit const aFormControlActionTable[] =
913 ENTRY0( XML_NAMESPACE_FORM, XML_NAME, XML_ATACTION_MOVE_TO_ELEM ),
914 ENTRY2QN( XML_NAMESPACE_FORM, XML_CONTROL_IMPLEMENTATION, XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,
915 XML_NAMESPACE_FORM, XML_SERVICE_NAME, XML_NAMESPACE_OOO ),
916 ENTRY0( XML_NAMESPACE_FORM, XML_ID, XML_ATACTION_MOVE_TO_ELEM ),
917 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
918 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
921 // OASIS_FORM_COLUMN_ACTIONS
922 XMLTransformerActionInit const aFormColumnActionTable[] =
924 ENTRY1Q( XML_NAMESPACE_FORM, XML_TEXT_STYLE_NAME, XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF, XML_NAMESPACE_FORM, XML_COLUMN_STYLE_NAME ),
925 ENTRY2QN( XML_NAMESPACE_FORM, XML_CONTROL_IMPLEMENTATION, XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,
926 XML_NAMESPACE_FORM, XML_SERVICE_NAME, XML_NAMESPACE_OOO ),
927 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
930 // OASIS_FORM_PROP_ACTIONS
931 XMLTransformerActionInit const aFormPropActionTable[] =
933 ENTRY1Q( XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_ATACTION_RENAME, XML_NAMESPACE_FORM, XML_PROPERTY_TYPE ),
934 ENTRY0( XML_NAMESPACE_OFFICE, XML_VALUE, XML_ATACTION_REMOVE ),
935 ENTRY0( XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_ATACTION_REMOVE ),
936 ENTRY0( XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_ATACTION_REMOVE ),
937 ENTRY0( XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_ATACTION_REMOVE ),
938 ENTRY0( XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_ATACTION_REMOVE ),
939 ENTRY0( XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_ATACTION_REMOVE ),
940 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
943 // OASIS_XLINK_ACTIONS
944 XMLTransformerActionInit const aXLinkActionTable[] =
946 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
947 ENTRY0( XML_NAMESPACE_TABLE, XML_REFRESH_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
948 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
951 // OASIS_CONFIG_ITEM_SET_ACTIONS
952 XMLTransformerActionInit const aConfigItemSetActionTable[] =
954 ENTRY1( XML_NAMESPACE_CONFIG, XML_NAME, XML_ATACTION_REMOVE_NAMESPACE_PREFIX, XML_NAMESPACE_OOO ),
955 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
958 // OASIS_FORMULA_ACTIONS
959 XMLTransformerActionInit const aFormulaActionTable[] =
961 ENTRY0( XML_NAMESPACE_TEXT, XML_CONDITION, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
962 ENTRY0( XML_NAMESPACE_TEXT, XML_FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
963 ENTRY0( XML_NAMESPACE_TABLE, XML_CONDITION, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
964 ENTRY0( XML_NAMESPACE_TABLE, XML_FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
965 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
968 // OASIS_CONTENT_VALIDATION_ACTIONS
969 XMLTransformerActionInit const aContentValidationActionTable[] =
971 ENTRY0( XML_NAMESPACE_TABLE, XML_CONDITION, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
972 ENTRY0( XML_NAMESPACE_TABLE, XML_DISPLAY_LIST, XML_ATACTION_REMOVE ),
973 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
976 // OASIS_DDE_CONV_MODE_ACTIONS
977 XMLTransformerActionInit const aDDEConvModeActionTable[] =
979 ENTRY1Q( XML_NAMESPACE_TABLE, XML_KEEP_TEXT, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_LET_TEXT ),
980 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
983 // OASIS_DATAPILOT_MEMBER_ACTIONS
984 XMLTransformerActionInit const aDataPilotMemberActionTable[] =
986 ENTRY1Q( XML_NAMESPACE_TABLE, XML_SHOW_DETAILS, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_DISPLAY_DETAILS ),
987 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
990 // OASIS_DATAPILOT_LEVEL_ACTIONS
991 XMLTransformerActionInit const aDataPilotLevelActionTable[] =
993 ENTRY1Q( XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_DISPLAY_EMPTY ),
994 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
997 // OASIS_SOURCE_SERVICE_ACTIONS
998 XMLTransformerActionInit const aSourceServiceActionTable[] =
1000 ENTRY1Q( XML_NAMESPACE_TABLE, XML_USER_NAME, XML_ATACTION_RENAME, XML_NAMESPACE_TABLE, XML_USERNAME ),
1001 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1004 // OASIS_CHART_ACTIONS
1005 XMLTransformerActionInit const aChartActionTable[] =
1007 ENTRY0( XML_NAMESPACE_CHART, XML_CLASS, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1008 ENTRY1( XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF, XML_FAMILY_TYPE_GRAPHIC ),
1009 ENTRY0( XML_NAMESPACE_SVG, XML_WIDTH, XML_ATACTION_IN2INCH ),
1010 ENTRY0( XML_NAMESPACE_SVG, XML_HEIGHT, XML_ATACTION_IN2INCH ),
1011 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1014 // OASIS_FORM_ACTIONS
1015 XMLTransformerActionInit const aFormActionTable[] =
1017 ENTRY2QN( XML_NAMESPACE_FORM, XML_CONTROL_IMPLEMENTATION, XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,
1018 XML_NAMESPACE_FORM, XML_SERVICE_NAME, XML_NAMESPACE_OOO ),
1019 ENTRY1( XML_NAMESPACE_XLINK, XML_HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
1020 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1023 // OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
1024 XMLTransformerActionInit const aAlphabeticalIndexMarkActionTable[] =
1026 ENTRY1Q( XML_NAMESPACE_TEXT, XML_MAIN_ENTRY, XML_ATACTION_RENAME, XML_NAMESPACE_TEXT, XML_MAIN_ETRY ),
1027 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1030 // OASIS_DRAW_AREA_POLYGON_ACTIONS (to be added to OASIS_SHAPE_ACTIONS)
1031 XMLTransformerActionInit const aDrawAreaPolygonActionTable[] =
1033 ENTRY1Q( XML_NAMESPACE_DRAW, XML_POINTS, XML_ATACTION_RENAME, XML_NAMESPACE_SVG, XML_POINTS ),
1034 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1037 // OASIS_SCRIPT_ACTIONS
1038 XMLTransformerActionInit const aScriptActionTable[] =
1040 ENTRY1( XML_NAMESPACE_SCRIPT, XML_LANGUAGE, XML_ATACTION_REMOVE_NAMESPACE_PREFIX, XML_NAMESPACE_OOO ),
1041 ENTRY1Q( XML_NAMESPACE_OOO, XML_NAME, XML_ATACTION_RENAME, XML_NAMESPACE_SCRIPT, XML_NAME ),
1042 ENTRY1Q( XML_NAMESPACE_OOO, XML_READONLY, XML_ATACTION_RENAME, XML_NAMESPACE_SCRIPT, XML_READONLY ),
1043 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1046 // OASIS_DATETIME_ACTIONS
1047 XMLTransformerActionInit const aDateTimeActionTable[] =
1049 ENTRY0( XML_NAMESPACE_TEXT, XML_DATE_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1050 ENTRY0( XML_NAMESPACE_TEXT, XML_TIME_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1051 ENTRY0( XML_NAMESPACE_TEXT, XML_DATE_ADJUST, XML_ATACTION_RNG2ISO_DATETIME ),
1052 ENTRY0( XML_NAMESPACE_TEXT, XML_TIME_ADJUST, XML_ATACTION_RNG2ISO_DATETIME ),
1053 ENTRY0( XML_NAMESPACE_TEXT, XML_DURATION, XML_ATACTION_RNG2ISO_DATETIME ),
1054 ENTRY0( XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1055 ENTRY0( XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1056 ENTRY0( XML_NAMESPACE_FORM, XML_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1057 ENTRY0( XML_NAMESPACE_FORM, XML_CURRENT_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1058 ENTRY0( XML_NAMESPACE_TABLE, XML_DATE_START, XML_ATACTION_RNG2ISO_DATETIME ),
1059 ENTRY0( XML_NAMESPACE_TABLE, XML_DATE_END, XML_ATACTION_RNG2ISO_DATETIME ),
1060 ENTRY0( XML_NAMESPACE_TABLE, XML_REFRESH_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1061 ENTRY0( XML_NAMESPACE_PRESENTATION, XML_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1062 ENTRY0( XML_NAMESPACE_PRESENTATION, XML_PAUSE, XML_ATACTION_RNG2ISO_DATETIME ),
1063 ENTRY0( XML_NAMESPACE_OFFICE, XML_TOKEN_INVALID, XML_ATACTION_EOT )
1066 XMLTokenEnum const aTokenMap[] =
1068 XML_NONE, XML_SOLID, XML_DOTTED, XML_DASH, XML_LONG_DASH, XML_DOT_DASH,
1069 XML_DOT_DOT_DASH, XML_WAVE, XML_SMALL_WAVE, XML_TOKEN_END
1072 namespace {
1074 class XMLTableTransformerContext_Impl : public XMLTransformerContext
1076 OUString m_aElemQName;
1078 public:
1079 XMLTableTransformerContext_Impl( XMLTransformerBase& rTransformer,
1080 const OUString& rQName );
1082 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1083 virtual void EndElement() override;
1088 XMLTableTransformerContext_Impl::XMLTableTransformerContext_Impl(
1089 XMLTransformerBase& rImp,
1090 const OUString& rQName ) :
1091 XMLTransformerContext( rImp, rQName ),
1092 m_aElemQName( rQName )
1096 void XMLTableTransformerContext_Impl::StartElement(
1097 const Reference< XAttributeList >& rAttrList )
1099 Reference< XAttributeList > xAttrList( rAttrList );
1101 rtl::Reference<XMLMutableAttributeList> pMutableAttrList;
1103 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1104 for( sal_Int16 i=0; i < nAttrCount; i++ )
1106 const OUString aAttrName = xAttrList->getNameByIndex( i );
1107 OUString aLocalName;
1108 sal_uInt16 nPrefix =
1109 GetTransformer().GetNamespaceMap().GetKeyByAttrName( aAttrName,
1110 &aLocalName );
1111 if( XML_NAMESPACE_TABLE == nPrefix )
1113 if ( IsXMLToken( aLocalName, XML_IS_SUB_TABLE ) )
1115 const OUString aValue = xAttrList->getValueByIndex( i );
1116 if( IsXMLToken( aValue, XML_TRUE ) )
1118 m_aElemQName = GetTransformer().GetNamespaceMap().GetQNameByKey(
1119 XML_NAMESPACE_TABLE,
1120 ::xmloff::token::GetXMLToken( XML_SUB_TABLE ) );
1121 if ( !pMutableAttrList )
1123 pMutableAttrList =
1124 new XMLMutableAttributeList( xAttrList );
1125 xAttrList = pMutableAttrList;
1127 pMutableAttrList->RemoveAttributeByIndex( i );
1129 // #i50521# - no break here for safety reason.
1131 // Convert attribute table:style-name for <table:table> (#i40011#, #i40015#)
1132 else if ( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
1134 const OUString aValue = xAttrList->getValueByIndex( i );
1135 OUString aAttrValue( aValue );
1136 if( XMLTransformerBase::DecodeStyleName(aAttrValue) )
1138 if ( !pMutableAttrList )
1140 pMutableAttrList =
1141 new XMLMutableAttributeList( xAttrList );
1142 xAttrList = pMutableAttrList;
1144 pMutableAttrList->SetValueByIndex( i, aAttrValue );
1147 else if( IsXMLToken( aLocalName, XML_PRINT ) )
1149 if ( !pMutableAttrList )
1151 pMutableAttrList =
1152 new XMLMutableAttributeList( xAttrList );
1153 xAttrList = pMutableAttrList;
1155 pMutableAttrList->RemoveAttributeByIndex( i );
1160 GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1163 void XMLTableTransformerContext_Impl::EndElement()
1165 GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1168 namespace {
1170 class XMLBodyOASISTransformerContext_Impl : public XMLTransformerContext
1172 bool m_bFirstChild;
1174 public:
1175 XMLBodyOASISTransformerContext_Impl( XMLTransformerBase& rTransformer,
1176 const OUString& rQName );
1178 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1180 virtual rtl::Reference<XMLTransformerContext> CreateChildContext( sal_uInt16 nPrefix,
1181 const OUString& rLocalName,
1182 const OUString& rQName,
1183 const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1184 virtual void EndElement() override;
1189 XMLBodyOASISTransformerContext_Impl::XMLBodyOASISTransformerContext_Impl(
1190 XMLTransformerBase& rImp,
1191 const OUString& rQName ) :
1192 XMLTransformerContext( rImp, rQName ),
1193 m_bFirstChild( false )
1197 void XMLBodyOASISTransformerContext_Impl::StartElement(
1198 const Reference< XAttributeList >& )
1202 rtl::Reference<XMLTransformerContext> XMLBodyOASISTransformerContext_Impl::CreateChildContext( sal_uInt16 nPrefix,
1203 const OUString& rLocalName,
1204 const OUString& rQName,
1205 const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList )
1207 if (!m_bFirstChild)
1209 m_bFirstChild = true;
1210 XMLTransformerContext::StartElement(xAttrList);
1213 return XMLTransformerContext::CreateChildContext(nPrefix, rLocalName, rQName, xAttrList);
1216 void XMLBodyOASISTransformerContext_Impl::EndElement()
1218 if (!m_bFirstChild)
1219 XMLTransformerContext::StartElement(Reference< XAttributeList >());
1221 XMLTransformerContext::EndElement();
1224 namespace {
1226 class XMLTabStopOASISTContext_Impl : public XMLPersElemContentTContext
1228 public:
1229 XMLTabStopOASISTContext_Impl( XMLTransformerBase& rTransformer,
1230 const OUString& rQName );
1232 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1237 XMLTabStopOASISTContext_Impl::XMLTabStopOASISTContext_Impl(
1238 XMLTransformerBase& rImp,
1239 const OUString& rQName ) :
1240 XMLPersElemContentTContext( rImp, rQName )
1244 void XMLTabStopOASISTContext_Impl::StartElement(
1245 const Reference< XAttributeList >& rAttrList )
1247 XMLTransformerActions *pActions =
1248 GetTransformer().GetUserDefinedActions( OASIS_TAB_STOP_ACTIONS );
1249 SAL_WARN_IF( nullptr == pActions, "xmloff.transform", "got no actions" );
1251 sal_Unicode cStyleLeaderChar = 0;
1252 sal_Int16 nLeaderText = -1;
1253 Reference< XAttributeList > xAttrList( rAttrList );
1254 rtl::Reference<XMLMutableAttributeList> pMutableAttrList;
1255 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1256 for( sal_Int16 i=0; i < nAttrCount; i++ )
1258 const OUString aAttrName = xAttrList->getNameByIndex( i );
1259 OUString aLocalName;
1260 sal_uInt16 nPrefix =
1261 GetTransformer().GetNamespaceMap().GetKeyByAttrName( aAttrName,
1262 &aLocalName );
1263 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
1264 XMLTransformerActions::const_iterator aIter =
1265 pActions->find( aKey );
1266 if( aIter != pActions->end() )
1268 if( !pMutableAttrList )
1270 pMutableAttrList =
1271 new XMLMutableAttributeList( xAttrList );
1272 xAttrList = pMutableAttrList;
1274 const OUString aAttrValue = xAttrList->getValueByIndex( i );
1275 switch( (*aIter).second.m_nActionType )
1277 case XML_ATACTION_REMOVE:
1278 if( IsXMLToken( aLocalName, XML_LEADER_STYLE ) )
1280 if( IsXMLToken( aAttrValue, XML_NONE ) )
1281 cStyleLeaderChar = ' ';
1282 else if( IsXMLToken( aAttrValue, XML_DOTTED ) )
1283 cStyleLeaderChar = '.';
1284 else
1285 cStyleLeaderChar = 0;
1286 pMutableAttrList->RemoveAttributeByIndex( i );
1287 --i;
1288 --nAttrCount;
1290 break;
1291 case XML_ATACTION_RENAME:
1293 OUString aNewAttrQName(
1294 GetTransformer().GetNamespaceMap().GetQNameByKey(
1295 (*aIter).second.GetQNamePrefixFromParam1(),
1296 ::xmloff::token::GetXMLToken(
1297 (*aIter).second.GetQNameTokenFromParam1()) ) );
1298 pMutableAttrList->RenameAttributeByIndex( i,
1299 aNewAttrQName );
1301 if( IsXMLToken( aLocalName, XML_LEADER_TEXT ) )
1303 if( aAttrValue.getLength() > 1 )
1305 OUString aAttrValue2( aAttrValue.copy( 0, 1 ) );
1306 pMutableAttrList->SetValueByIndex( i, aAttrValue2 );
1307 nLeaderText = i;
1310 break;
1311 case XML_ATACTION_IN2INCH:
1313 OUString aAttrValue2( aAttrValue );
1314 if( XMLTransformerBase::ReplaceSingleInWithInch(
1315 aAttrValue2 ) )
1316 pMutableAttrList->SetValueByIndex( i, aAttrValue2 );
1318 break;
1319 default:
1320 SAL_WARN( "xmloff.transform", "unknown action" );
1321 break;
1326 if( cStyleLeaderChar && ' ' != cStyleLeaderChar )
1328 if( nLeaderText != -1 )
1330 OUString aNewAttrQName(
1331 GetTransformer().GetNamespaceMap().GetQNameByKey(
1332 XML_NAMESPACE_STYLE,
1333 ::xmloff::token::GetXMLToken( XML_LEADER_CHAR ) ) );
1334 pMutableAttrList->AddAttribute( aNewAttrQName,
1335 OUString( cStyleLeaderChar ) );
1338 else
1340 if( nLeaderText != -1 )
1341 pMutableAttrList->RemoveAttributeByIndex( nLeaderText );
1344 XMLPersElemContentTContext::StartElement( xAttrList );
1347 namespace {
1349 class XMLConfigItemTContext_Impl : public XMLTransformerContext
1351 OUString m_aContent;
1352 bool m_bIsRedlineProtectionKey;
1353 bool m_bIsCursorX;
1354 bool m_bIsCursorY;
1356 public:
1357 XMLConfigItemTContext_Impl( XMLTransformerBase& rTransformer,
1358 const OUString& rQName );
1360 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1361 virtual void EndElement() override;
1363 virtual void Characters( const OUString& rChars ) override;
1368 XMLConfigItemTContext_Impl::XMLConfigItemTContext_Impl(
1369 XMLTransformerBase& rImp,
1370 const OUString& rQName ) :
1371 XMLTransformerContext( rImp, rQName ),
1372 m_bIsRedlineProtectionKey( false ),
1373 m_bIsCursorX( false ),
1374 m_bIsCursorY( false )
1378 void XMLConfigItemTContext_Impl::StartElement(
1379 const Reference< XAttributeList >& rAttrList )
1381 sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0;
1382 for( sal_Int16 i=0; i < nAttrCount; i++ )
1384 const OUString aAttrName = rAttrList->getNameByIndex( i );
1385 OUString aLocalName;
1386 sal_uInt16 nPrefix =
1387 GetTransformer().GetNamespaceMap().GetKeyByAttrName( aAttrName,
1388 &aLocalName );
1389 if( XML_NAMESPACE_CONFIG == nPrefix )
1391 if ( IsXMLToken( aLocalName, XML_NAME ) )
1393 const OUString aValue = rAttrList->getValueByIndex( i );
1394 if( aValue == "RedlineProtectionKey" )
1395 m_bIsRedlineProtectionKey = true;
1396 else if( aValue == "CursorPositionX" )
1397 m_bIsCursorX = true;
1398 else if( aValue == "CursorPositionY" )
1399 m_bIsCursorY = true;
1401 break;
1406 XMLTransformerContext::StartElement( rAttrList );
1409 void XMLConfigItemTContext_Impl::Characters( const OUString& rChars )
1411 OUString sChars(rChars);
1412 if (m_bIsRedlineProtectionKey)
1413 m_aContent += rChars;
1414 else if (m_bIsCursorX || m_bIsCursorY)
1416 sal_Int32 nPos = rChars.toInt32();
1417 if (m_bIsCursorX && nPos > 255)
1418 nPos = 255;
1419 else if (m_bIsCursorY && nPos > 31999)
1420 nPos = 31999;
1422 sChars = OUString::number(nPos);
1425 XMLTransformerContext::Characters( sChars );
1428 void XMLConfigItemTContext_Impl::EndElement()
1431 if( m_bIsRedlineProtectionKey )
1433 const Reference< XPropertySet > rPropSet =
1434 GetTransformer().GetPropertySet();
1435 if( rPropSet.is() )
1437 OUString aPropName(u"RedlineProtectionKey"_ustr);
1438 Reference< XPropertySetInfo > xPropSetInfo(
1439 rPropSet->getPropertySetInfo() );
1440 if( xPropSetInfo.is() &&
1441 xPropSetInfo->hasPropertyByName( aPropName ) )
1443 Sequence < sal_Int8 > aKey;
1444 ::comphelper::Base64::decode( aKey, m_aContent );
1445 rPropSet->setPropertyValue( aPropName, Any( aKey ) );
1449 XMLTransformerContext::EndElement();
1452 namespace {
1454 class XMLTrackedChangesOASISTContext_Impl : public XMLTransformerContext
1456 OUString const m_aAttrQName;
1458 public:
1460 XMLTrackedChangesOASISTContext_Impl( XMLTransformerBase& rTransformer,
1461 const OUString& rQName,
1462 sal_uInt16 nPrefix,
1463 XMLTokenEnum eToken );
1465 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1470 XMLTrackedChangesOASISTContext_Impl::XMLTrackedChangesOASISTContext_Impl(
1471 XMLTransformerBase& rImp,
1472 const OUString& rQName,
1473 sal_uInt16 nPrefix,
1474 XMLTokenEnum eToken ) :
1475 XMLTransformerContext( rImp, rQName ),
1476 m_aAttrQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
1477 GetXMLToken(eToken)) )
1481 void XMLTrackedChangesOASISTContext_Impl::StartElement(
1482 const Reference< XAttributeList >& rAttrList )
1484 Reference< XAttributeList > xAttrList( rAttrList );
1485 const Reference< XPropertySet > rPropSet =
1486 GetTransformer().GetPropertySet();
1487 if( rPropSet.is() )
1489 OUString aPropName(u"RedlineProtectionKey"_ustr);
1490 Reference< XPropertySetInfo > xPropSetInfo(
1491 rPropSet->getPropertySetInfo() );
1492 if( xPropSetInfo.is() &&
1493 xPropSetInfo->hasPropertyByName( aPropName ) )
1495 Any aAny = rPropSet->getPropertyValue( aPropName);
1496 Sequence < sal_Int8 > aKey;
1497 aAny >>= aKey;
1498 if( aKey.hasElements() )
1500 OUStringBuffer aBuffer;
1501 ::comphelper::Base64::encode( aBuffer, aKey );
1502 rtl::Reference<XMLMutableAttributeList> pMutableAttrList =
1503 new XMLMutableAttributeList( xAttrList );
1504 xAttrList = pMutableAttrList;
1505 pMutableAttrList->AddAttribute( m_aAttrQName,
1506 aBuffer.makeStringAndClear() );
1510 XMLTransformerContext::StartElement( xAttrList );
1513 XMLTransformerContext *Oasis2OOoTransformer::CreateUserDefinedContext(
1514 const TransformerAction_Impl& rAction,
1515 const OUString& rQName,
1516 bool bPersistent )
1518 switch( rAction.m_nActionType )
1520 case XML_ETACTION_META:
1521 return new XMLMetaTransformerContext( *this, rQName );
1522 case XML_ETACTION_DOCUMENT:
1523 return new XMLDocumentTransformerContext( *this, rQName );
1524 case XML_ETACTION_BODY:
1525 return new XMLBodyOASISTransformerContext_Impl( *this, rQName );
1526 case XML_ETACTION_NOTES:
1527 return new XMLNotesTransformerContext( *this, rQName,
1528 static_cast< XMLTokenEnum>( rAction.m_nParam1 ), bPersistent );
1529 case XML_ETACTION_TABLE:
1530 return new XMLTableTransformerContext_Impl( *this, rQName );
1531 case XML_ETACTION_STYLE:
1532 return new XMLStyleOASISTContext( *this, rQName, bPersistent );
1533 case XML_ETACTION_STYLE_RENAME:
1534 return new XMLStyleOASISTContext( *this, rQName,
1535 rAction.GetQNamePrefixFromParam1(),
1536 rAction.GetQNameTokenFromParam1(), bPersistent );
1537 case XML_ETACTION_FRAME:
1538 return new XMLFrameOASISTransformerContext( *this, rQName );
1539 case XML_ETACTION_EVENT:
1540 return new XMLEventOASISTransformerContext( *this, rQName );
1541 case XML_ETACTION_DLG:
1542 return new XMLDlgOASISTransformerContext( *this, rQName );
1543 case XML_ETACTION_TAB_STOP:
1544 return new XMLTabStopOASISTContext_Impl( *this, rQName );
1545 case XML_ETACTION_FORM_CONTROL:
1547 const XMLTransformerContext *pCurrent = GetCurrentContext();
1548 return new XMLControlOASISTransformerContext( *this, rQName,
1549 pCurrent && pCurrent->HasQName( XML_NAMESPACE_FORM,
1550 XML_FORM ) );
1552 case XML_ETACTION_FORM_PROPERTY:
1553 return new XMLFormPropOASISTransformerContext( *this, rQName,
1554 static_cast< XMLTokenEnum >( rAction.m_nParam1 ) );
1555 case XML_ETACTION_CHART:
1556 return new XMLChartOASISTransformerContext( *this, rQName );
1557 case XML_ETACTION_CONFIG_ITEM:
1558 return new XMLConfigItemTContext_Impl( *this, rQName );
1559 case XML_ETACTION_TRACKED_CHANGES:
1560 return new XMLTrackedChangesOASISTContext_Impl( *this, rQName,
1561 rAction.GetQNamePrefixFromParam1(),
1562 rAction.GetQNameTokenFromParam1() );
1563 case XML_ETACTION_CHART_PLOT_AREA:
1564 return new XMLChartPlotAreaOASISTContext( *this, rQName );
1565 default:
1566 SAL_WARN( "xmloff.transform", "no user defined context found!" );
1567 break;
1570 // default is copying
1571 return new XMLTransformerContext( *this, rQName );
1574 XMLTransformerActions *Oasis2OOoTransformer::GetUserDefinedActions(
1575 sal_uInt16 n )
1577 XMLTransformerActions *pActions = nullptr;
1578 if( n < MAX_OASIS_ACTIONS )
1580 if( !m_aActions[n] )
1582 if( n<MAX_OASIS_PROP_ACTIONS )
1584 m_aActions[n].reset(
1585 XMLStyleOASISTContext::CreateTransformerActions( n ) );
1587 else switch( n )
1589 case OASIS_STYLE_ACTIONS:
1590 m_aActions[OASIS_STYLE_ACTIONS].reset(
1591 new XMLTransformerActions( aStyleActionTable ) );
1592 break;
1593 case OASIS_FONT_FACE_ACTIONS:
1594 m_aActions[OASIS_FONT_FACE_ACTIONS].reset(
1595 new XMLTransformerActions( aFontFaceActionTable ) );
1596 break;
1597 case OASIS_SHAPE_ACTIONS:
1598 m_aActions[OASIS_SHAPE_ACTIONS].reset(
1599 new XMLTransformerActions( aShapeActionTable ) );
1600 break;
1601 case OASIS_CONNECTOR_ACTIONS:
1602 m_aActions[OASIS_CONNECTOR_ACTIONS].reset(
1603 new XMLTransformerActions( aConnectorActionTable ) );
1604 break;
1605 case OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS:
1606 m_aActions[OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS].reset(
1607 new XMLTransformerActions( aIndexEntryTabStopActionTable ) );
1608 break;
1609 case OASIS_TAB_STOP_ACTIONS:
1610 m_aActions[OASIS_TAB_STOP_ACTIONS].reset(
1611 new XMLTransformerActions( aTabStopActionTable ) );
1612 break;
1613 case OASIS_LINENUMBERING_ACTIONS:
1614 m_aActions[OASIS_LINENUMBERING_ACTIONS].reset(
1615 new XMLTransformerActions( aLineNumberingActionTable ) );
1616 break;
1617 case OASIS_FOOTNOTE_SEP_ACTIONS:
1618 m_aActions[OASIS_FOOTNOTE_SEP_ACTIONS].reset(
1619 new XMLTransformerActions( aFootnoteSepActionTable ) );
1620 break;
1621 case OASIS_DROP_CAP_ACTIONS:
1622 m_aActions[OASIS_DROP_CAP_ACTIONS].reset(
1623 new XMLTransformerActions( aDropCapActionTable ) );
1624 break;
1625 case OASIS_COLUMNS_ACTIONS:
1626 m_aActions[OASIS_COLUMNS_ACTIONS].reset(
1627 new XMLTransformerActions( aColumnsActionTable ) );
1628 break;
1629 case OASIS_TEXT_VALUE_TYPE_ACTIONS:
1630 m_aActions[OASIS_TEXT_VALUE_TYPE_ACTIONS].reset(
1631 new XMLTransformerActions( aTextValueTypeActionTable ) );
1632 break;
1633 case OASIS_TABLE_VALUE_TYPE_ACTIONS:
1634 m_aActions[OASIS_TABLE_VALUE_TYPE_ACTIONS].reset(
1635 new XMLTransformerActions( aTableValueTypeActionTable ) );
1636 break;
1637 case OASIS_PARA_ACTIONS:
1638 m_aActions[OASIS_PARA_ACTIONS].reset(
1639 new XMLTransformerActions( aParaActionTable ) );
1640 break;
1641 case OASIS_LIST_STYLE_REF_ACTIONS:
1642 m_aActions[OASIS_LIST_STYLE_REF_ACTIONS].reset(
1643 new XMLTransformerActions( aListStyleRefActionTable ) );
1644 break;
1645 case OASIS_TEXT_STYLE_REF_ACTIONS:
1646 m_aActions[OASIS_TEXT_STYLE_REF_ACTIONS].reset(
1647 new XMLTransformerActions( aTextStyleRefActionTable ) );
1648 break;
1649 case OASIS_PARA_STYLE_REF_ACTIONS:
1650 m_aActions[OASIS_PARA_STYLE_REF_ACTIONS].reset(
1651 new XMLTransformerActions( aParaStyleRefActionTable ) );
1652 break;
1653 case OASIS_MASTER_PAGE_REF_ACTIONS:
1654 m_aActions[OASIS_MASTER_PAGE_REF_ACTIONS].reset(
1655 new XMLTransformerActions( aMasterPageRefActionTable ) );
1656 break;
1657 case OASIS_MAP_STYLE_REF_ACTIONS:
1658 m_aActions[OASIS_MAP_STYLE_REF_ACTIONS].reset(
1659 new XMLTransformerActions( aMapStyleRefActionTable ) );
1660 break;
1661 case OASIS_MASTER_PAGE_ACTIONS:
1662 m_aActions[OASIS_MASTER_PAGE_ACTIONS].reset(
1663 new XMLTransformerActions( aMasterPageActionTable ) );
1664 break;
1665 case OASIS_NOTES_ACTIONS:
1666 m_aActions[OASIS_NOTES_ACTIONS].reset(
1667 new XMLTransformerActions( aNotesActionTable ) );
1668 break;
1669 case OASIS_ANNOTATION_ACTIONS:
1670 m_aActions[OASIS_ANNOTATION_ACTIONS].reset(
1671 new XMLTransformerActions( aAnnotationActionTable ) );
1672 break;
1673 case OASIS_CHANGE_INFO_ACTIONS:
1674 m_aActions[OASIS_CHANGE_INFO_ACTIONS].reset(
1675 new XMLTransformerActions( aChangeInfoActionTable ) );
1676 break;
1677 case OASIS_FRAME_ELEM_ACTIONS:
1678 m_aActions[OASIS_FRAME_ELEM_ACTIONS].reset(
1679 new XMLTransformerActions( aFrameActionTable ) );
1680 break;
1681 case OASIS_BACKGROUND_IMAGE_ACTIONS:
1682 m_aActions[OASIS_BACKGROUND_IMAGE_ACTIONS].reset(
1683 new XMLTransformerActions( aBackgroundImageActionTable ) );
1684 break;
1685 case OASIS_DDE_CONNECTION_DECL_ACTIONS:
1686 m_aActions[OASIS_DDE_CONNECTION_DECL_ACTIONS].reset(
1687 new XMLTransformerActions( aDDEConnectionDeclActionTable ) );
1688 break;
1689 case OASIS_EVENT_ACTIONS:
1690 m_aActions[OASIS_EVENT_ACTIONS].reset(
1691 new XMLTransformerActions( aEventActionTable ) );
1692 break;
1693 case OASIS_DLG_ACTIONS:
1694 m_aActions[OASIS_DLG_ACTIONS].reset(
1695 new XMLTransformerActions( aDlgActionTable ) );
1696 break;
1697 case OASIS_FORM_CONTROL_ACTIONS:
1698 m_aActions[OASIS_FORM_CONTROL_ACTIONS].reset(
1699 new XMLTransformerActions( aFormControlActionTable ) );
1700 break;
1701 case OASIS_FORM_COLUMN_ACTIONS:
1702 m_aActions[OASIS_FORM_COLUMN_ACTIONS].reset(
1703 new XMLTransformerActions( aFormColumnActionTable ) );
1704 break;
1705 case OASIS_FORM_PROP_ACTIONS:
1706 m_aActions[OASIS_FORM_PROP_ACTIONS].reset(
1707 new XMLTransformerActions( aFormPropActionTable ) );
1708 break;
1709 case OASIS_XLINK_ACTIONS:
1710 m_aActions[OASIS_XLINK_ACTIONS].reset(
1711 new XMLTransformerActions( aXLinkActionTable ) );
1712 break;
1713 case OASIS_CONFIG_ITEM_SET_ACTIONS:
1714 m_aActions[OASIS_CONFIG_ITEM_SET_ACTIONS].reset(
1715 new XMLTransformerActions( aConfigItemSetActionTable ) );
1716 break;
1717 case OASIS_FORMULA_ACTIONS:
1718 m_aActions[OASIS_FORMULA_ACTIONS].reset(
1719 new XMLTransformerActions( aFormulaActionTable ) );
1720 break;
1721 case OASIS_CHART_ACTIONS:
1722 m_aActions[OASIS_CHART_ACTIONS].reset(
1723 new XMLTransformerActions( aChartActionTable ) );
1724 break;
1725 case OASIS_FORM_ACTIONS:
1726 m_aActions[OASIS_FORM_ACTIONS].reset(
1727 new XMLTransformerActions( aFormActionTable ) );
1728 break;
1729 case OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS:
1730 m_aActions[OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS].reset(
1731 new XMLTransformerActions(
1732 aAlphabeticalIndexMarkActionTable ) );
1733 break;
1734 case OASIS_CONTENT_VALIDATION_ACTIONS:
1735 m_aActions[OASIS_CONTENT_VALIDATION_ACTIONS].reset(
1736 new XMLTransformerActions( aContentValidationActionTable ) );
1737 break;
1738 case OASIS_DDE_CONV_MODE_ACTIONS:
1739 m_aActions[OASIS_DDE_CONV_MODE_ACTIONS].reset(
1740 new XMLTransformerActions( aDDEConvModeActionTable ) );
1741 break;
1742 case OASIS_DATAPILOT_MEMBER_ACTIONS:
1743 m_aActions[OASIS_DATAPILOT_MEMBER_ACTIONS].reset(
1744 new XMLTransformerActions( aDataPilotMemberActionTable ) );
1745 break;
1746 case OASIS_DATAPILOT_LEVEL_ACTIONS:
1747 m_aActions[OASIS_DATAPILOT_LEVEL_ACTIONS].reset(
1748 new XMLTransformerActions( aDataPilotLevelActionTable ) );
1749 break;
1750 case OASIS_SOURCE_SERVICE_ACTIONS:
1751 m_aActions[OASIS_SOURCE_SERVICE_ACTIONS].reset(
1752 new XMLTransformerActions( aSourceServiceActionTable ) );
1753 break;
1754 case OASIS_DRAW_AREA_POLYGON_ACTIONS:
1755 m_aActions[OASIS_DRAW_AREA_POLYGON_ACTIONS].reset(
1756 new XMLTransformerActions( aShapeActionTable ) );
1757 m_aActions[OASIS_DRAW_AREA_POLYGON_ACTIONS]
1758 ->Add( aDrawAreaPolygonActionTable );
1759 break;
1760 case OASIS_SCRIPT_ACTIONS:
1761 m_aActions[OASIS_SCRIPT_ACTIONS].reset(
1762 new XMLTransformerActions( aScriptActionTable ) );
1763 break;
1764 case OASIS_DATETIME_ACTIONS:
1765 m_aActions[OASIS_DATETIME_ACTIONS].reset(
1766 new XMLTransformerActions( aDateTimeActionTable ) );
1767 break;
1768 // Bugdoc with table won't load correctly (#i40011#, #i40015#)
1769 case OASIS_TABLE_STYLE_REF_ACTIONS:
1770 m_aActions[OASIS_TABLE_STYLE_REF_ACTIONS].reset(
1771 new XMLTransformerActions( aTableStyleRefActionTable ) );
1772 break;
1773 case OASIS_ANIMATION_ACTIONS:
1774 m_aActions[OASIS_ANIMATION_ACTIONS].reset(
1775 new XMLTransformerActions( aAnimationActionTable ) );
1776 break;
1779 pActions = m_aActions[n].get();
1782 return pActions;
1785 OUString Oasis2OOoTransformer::GetEventName( const OUString& rName,
1786 bool bForm )
1788 if( bForm && !m_pFormEventMap )
1789 m_pFormEventMap =
1790 XMLEventOASISTransformerContext::CreateFormEventMap();
1791 if( !m_pEventMap )
1792 m_pEventMap = XMLEventOASISTransformerContext::CreateEventMap();
1794 OUString aMacroName;
1795 sal_uInt16 nPrefix =
1796 GetNamespaceMap().GetKeyByAttrName( rName, &aMacroName );
1797 return XMLEventOASISTransformerContext::GetEventName(
1798 nPrefix, aMacroName, *m_pEventMap,
1799 bForm ? m_pFormEventMap : nullptr );
1802 Oasis2OOoTransformer::Oasis2OOoTransformer() noexcept :
1803 XMLTransformerBase( aActionTable, aTokenMap ),
1804 m_pEventMap( nullptr ),
1805 m_pFormEventMap( nullptr )
1807 GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
1808 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE );
1810 GetNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META), XML_NAMESPACE_META );
1811 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META_OOO), XML_NAMESPACE_META );
1813 GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
1814 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE_OOO), XML_NAMESPACE_STYLE );
1816 GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
1817 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER_OOO), XML_NAMESPACE_NUMBER );
1819 GetNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
1820 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG_OOO), XML_NAMESPACE_CONFIG );
1822 GetNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
1823 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT_OOO), XML_NAMESPACE_TEXT );
1825 GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
1826 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE_OOO), XML_NAMESPACE_TABLE );
1828 GetNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
1829 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW_OOO), XML_NAMESPACE_DRAW );
1831 GetNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
1832 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D_OOO), XML_NAMESPACE_DR3D );
1834 GetNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), GetXMLToken(XML_N_PRESENTATION), XML_NAMESPACE_PRESENTATION );
1835 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), GetXMLToken(XML_N_PRESENTATION_OOO), XML_NAMESPACE_PRESENTATION );
1837 GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
1838 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART_OOO), XML_NAMESPACE_CHART );
1840 GetNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
1841 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM_OOO), XML_NAMESPACE_FORM );
1843 GetNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
1844 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT_OOO), XML_NAMESPACE_SCRIPT );
1846 GetNamespaceMap().Add( GetXMLToken(XML_NP_DLG), GetXMLToken(XML_N_DLG), XML_NAMESPACE_DLG );
1847 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DLG), GetXMLToken(XML_N_DLG), XML_NAMESPACE_DLG );
1849 GetNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
1850 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO), XML_NAMESPACE_FO );
1852 GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
1853 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG), XML_NAMESPACE_SVG );
1855 for(auto & rp : m_aActions)
1856 rp.reset();
1859 Oasis2OOoTransformer::~Oasis2OOoTransformer() noexcept
1861 for(auto & rp : m_aActions)
1862 rp.reset();
1863 XMLEventOASISTransformerContext::FlushEventMap( m_pEventMap );
1864 XMLEventOASISTransformerContext::FlushEventMap( m_pFormEventMap );
1867 // XServiceInfo
1868 OUString SAL_CALL Oasis2OOoTransformer::getImplementationName()
1870 return u"com.sun.star.comp.Oasis2OOoTransformer"_ustr;
1873 sal_Bool SAL_CALL Oasis2OOoTransformer::supportsService( const OUString& ServiceName )
1875 return cppu::supportsService(this, ServiceName);
1878 Sequence< OUString > SAL_CALL Oasis2OOoTransformer::getSupportedServiceNames( )
1880 return { };
1883 // Service registration
1885 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
1886 xmloff_Oasis2OOoTransformer_get_implementation(
1887 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
1889 SAL_INFO("xmloff.transform", "Creating Oasis2OOoTransformer");
1890 return cppu::acquire(new Oasis2OOoTransformer);
1893 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */