Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #include <com/sun/star/beans/XPropertySetInfo.hpp>
21 : #include <rtl/ustrbuf.hxx>
22 : #include <sax/tools/converter.hxx>
23 : #include <xmloff/nmspmap.hxx>
24 : #include <xmloff/xmlnmspe.hxx>
25 : #include <xmloff/xmltoken.hxx>
26 : #include "DeepTContext.hxx"
27 : #include "MetaTContext.hxx"
28 : #include "DocumentTContext.hxx"
29 : #include "NotesTContext.hxx"
30 : #include "StyleOASISTContext.hxx"
31 : #include "FrameOASISTContext.hxx"
32 : #include "EventOASISTContext.hxx"
33 : #include "DlgOASISTContext.hxx"
34 : #include "ControlOASISTContext.hxx"
35 : #include "FormPropOASISTContext.hxx"
36 : #include "ChartOASISTContext.hxx"
37 : #include "ChartPlotAreaOASISTContext.hxx"
38 : #include "MutableAttrList.hxx"
39 : #include "ElemTransformerAction.hxx"
40 : #include "AttrTransformerAction.hxx"
41 : #include "TransformerActions.hxx"
42 : #include "FamilyType.hxx"
43 : #include "facreg.hxx"
44 : #include <comphelper/servicehelper.hxx>
45 : #include "Oasis2OOo.hxx"
46 : #include <cppuhelper/supportsservice.hxx>
47 :
48 : using namespace ::osl;
49 : using namespace ::xmloff::token;
50 : using namespace ::com::sun::star::uno;
51 : using namespace ::com::sun::star::lang;
52 : using namespace ::com::sun::star::xml::sax;
53 : using namespace ::com::sun::star::beans;
54 :
55 : enum XMLUserDefinedTransformerAction
56 : {
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
74 : };
75 :
76 : #define ENTRY3( n, l, a, p1, p2, p3 ) \
77 : { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
78 : #define ENTRY3QNQ( n, l, a, n1, l1, p2, n3, l3 ) \
79 : ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
80 : p2, XMLTransformerActionInit::QNameParam( n3, l3 ) )
81 :
82 : #define ENTRY2( n, l, a, p1, p2 ) \
83 : ENTRY3( n, l, a, p1, p2, 0 )
84 : #define ENTRY2QN( n, l, a, n1, l1, p2 ) \
85 : ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
86 :
87 : #define ENTRY1( n, l, a, p1 ) \
88 : ENTRY3( n, l, a, p1, 0, 0 )
89 : #define ENTRY1Q( n, l, a, p1, t1 ) \
90 : ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( p1, t1 ) )
91 :
92 : #define ENTRY0( n, l, a ) \
93 : ENTRY3( n, l, a, 0, 0, 0 )
94 :
95 : // BM: a macro to put two tokens into one sal_Int32 for the action
96 : // XML_ATACTION_RENAME_ATTRIBUTE
97 : #define RENAME_ENTRY( f, s ) \
98 : (static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16))
99 :
100 : static XMLTransformerActionInit aActionTable[] =
101 : {
102 : // add office:class from <office:document> and <office:document-content>
103 : ENTRY0( OFFICE, DOCUMENT, XML_ETACTION_DOCUMENT ),
104 : ENTRY0( OFFICE, DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT ),
105 16 : ENTRY1Q( OOO, AUTO_TEXT_EVENTS, XML_ETACTION_RENAME_ELEM,
106 : XML_NAMESPACE_OFFICE, XML_AUTO_TEXT_EVENTS),
107 :
108 : // add <meta:keywords>
109 : ENTRY0( OFFICE, META, XML_ETACTION_META ),
110 :
111 : // rename <office:scripts> to <office:script>
112 16 : ENTRY1Q( OFFICE, SCRIPTS, XML_ETACTION_RENAME_ELEM,
113 : XML_NAMESPACE_OFFICE, XML_SCRIPT ),
114 :
115 : // rename <office:script> to <office:script-data> and process attributes
116 16 : ENTRY2QN( OFFICE, SCRIPT, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
117 : XML_NAMESPACE_OFFICE, XML_SCRIPT_DATA,
118 : OASIS_SCRIPT_ACTIONS ),
119 :
120 : // rename <ooo:libraries> to <script:libraries>
121 16 : ENTRY1Q( OOO, LIBRARIES, XML_ETACTION_RENAME_ELEM,
122 : XML_NAMESPACE_SCRIPT, XML_LIBRARIES ),
123 :
124 : // rename <ooo:library-linked> to <script:library-linked> and process attributes
125 16 : ENTRY2QN( OOO, LIBRARY_LINKED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
126 : XML_NAMESPACE_SCRIPT, XML_LIBRARY_LINKED,
127 : OASIS_SCRIPT_ACTIONS ),
128 :
129 : // rename <ooo:library-embedded> to <script:library-embedded> and process attributes
130 16 : ENTRY2QN( OOO, LIBRARY_EMBEDDED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
131 : XML_NAMESPACE_SCRIPT, XML_LIBRARY_EMBEDDED,
132 : OASIS_SCRIPT_ACTIONS ),
133 :
134 : // rename <ooo:module> to <script:module> and process attributes
135 16 : ENTRY2QN( OOO, MODULE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
136 : XML_NAMESPACE_SCRIPT, XML_MODULE,
137 : OASIS_SCRIPT_ACTIONS ),
138 :
139 : // rename <ooo:source-code> to <script:source-code>
140 16 : ENTRY1Q( OOO, SOURCE_CODE, XML_ETACTION_RENAME_ELEM,
141 : XML_NAMESPACE_SCRIPT, XML_SOURCE_CODE ),
142 :
143 : ENTRY0( OFFICE, BODY, XML_ETACTION_BODY ),
144 :
145 : // rename <office:font-face-decls> to <office:font-decl>,
146 : // rename <style:font-face> to <style:font-decl>, process attrs
147 16 : ENTRY1Q( OFFICE, FONT_FACE_DECLS, XML_ETACTION_RENAME_ELEM,
148 : XML_NAMESPACE_OFFICE, XML_FONT_DECLS ),
149 16 : ENTRY2QN( STYLE, FONT_FACE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
150 : XML_NAMESPACE_STYLE, XML_FONT_DECL,
151 : OASIS_FONT_FACE_ACTIONS ),
152 :
153 : // remove genre element
154 : ENTRY0( OFFICE, TEXT, XML_ETACTION_COPY_CONTENT ),
155 : ENTRY0( OFFICE, DRAWING, XML_ETACTION_COPY_CONTENT ),
156 : ENTRY0( OFFICE, PRESENTATION, XML_ETACTION_COPY_CONTENT ),
157 : ENTRY0( OFFICE, SPREADSHEET, XML_ETACTION_COPY_CONTENT ),
158 : ENTRY0( OFFICE, CHART, XML_ETACTION_COPY_CONTENT ),
159 : ENTRY0( OFFICE, IMAGE, XML_ETACTION_COPY_CONTENT ),
160 :
161 : // rename <style:page-layout> to <style:page-master>
162 : // ENTRY1Q( STYLE, PAGE_LAYOUT, RENAME_ELEM,
163 : // XML_NAMESPACE_STYLE, XML_PAGE_MASTER ),
164 : ENTRY1( STYLE, MASTER_PAGE, XML_ETACTION_PROC_ATTRS,
165 : OASIS_MASTER_PAGE_ACTIONS ),
166 :
167 : // merge <style:*-properties> into <style:properties> and do other
168 : // styles processing
169 : ENTRY1( STYLE, STYLE, XML_ETACTION_STYLE,
170 : XML_FAMILY_TYPE_END ),
171 : ENTRY1( STYLE, DEFAULT_STYLE, XML_ETACTION_STYLE,
172 : XML_FAMILY_TYPE_END ),
173 16 : ENTRY2QN( STYLE, PAGE_LAYOUT, XML_ETACTION_STYLE_RENAME,
174 : XML_NAMESPACE_STYLE, XML_PAGE_MASTER,
175 : XML_FAMILY_TYPE_PAGE_LAYOUT ),
176 : ENTRY1( NUMBER, NUMBER_STYLE, XML_ETACTION_STYLE,
177 : XML_FAMILY_TYPE_DATA ),
178 : ENTRY1( NUMBER, CURRENCY_STYLE, XML_ETACTION_STYLE,
179 : XML_FAMILY_TYPE_DATA ),
180 : ENTRY1( NUMBER, PERCENTAGE_STYLE, XML_ETACTION_STYLE,
181 : XML_FAMILY_TYPE_DATA ),
182 : ENTRY1( NUMBER, DATE_STYLE, XML_ETACTION_STYLE,
183 : XML_FAMILY_TYPE_DATA ),
184 : ENTRY1( NUMBER, TIME_STYLE, XML_ETACTION_STYLE,
185 : XML_FAMILY_TYPE_DATA ),
186 : ENTRY1( NUMBER, BOOLEAN_STYLE, XML_ETACTION_STYLE,
187 : XML_FAMILY_TYPE_DATA ),
188 : ENTRY1( NUMBER, TEXT_STYLE, XML_ETACTION_STYLE,
189 : XML_FAMILY_TYPE_DATA ),
190 : ENTRY1( TEXT, LIST_STYLE, XML_ETACTION_STYLE,
191 : XML_FAMILY_TYPE_LIST ),
192 : // ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
193 :
194 : ENTRY1( STYLE, HEADER_STYLE, XML_ETACTION_STYLE,
195 : XML_FAMILY_TYPE_HEADER_FOOTER ),
196 : ENTRY1( STYLE, FOOTER_STYLE, XML_ETACTION_STYLE,
197 : XML_FAMILY_TYPE_HEADER_FOOTER ),
198 : ENTRY1( TEXT, LIST_LEVEL_STYLE_NUMBER, XML_ETACTION_STYLE,
199 : XML_FAMILY_TYPE_LIST ),
200 : ENTRY1( TEXT, LIST_LEVEL_STYLE_BULLET, XML_ETACTION_STYLE,
201 : XML_FAMILY_TYPE_LIST ),
202 : ENTRY1( TEXT, LIST_LEVEL_STYLE_IMAGE, XML_ETACTION_STYLE,
203 : XML_FAMILY_TYPE_LIST ),
204 : ENTRY1( TEXT, OUTLINE_LEVEL_STYLE, XML_ETACTION_STYLE,
205 : XML_FAMILY_TYPE_LIST ),
206 : ENTRY1( DRAW, GRADIENT, XML_ETACTION_STYLE,
207 : XML_FAMILY_TYPE_GRADIENT ),
208 : ENTRY1( DRAW, FILL_IMAGE, XML_ETACTION_STYLE,
209 : XML_FAMILY_TYPE_FILL_IMAGE ),
210 16 : ENTRY2QN( DRAW, OPACITY, XML_ETACTION_STYLE_RENAME,
211 : XML_NAMESPACE_DRAW, XML_TRANSPARENCY,
212 : XML_FAMILY_TYPE_GRADIENT ),
213 : ENTRY1( DRAW, MARKER, XML_ETACTION_STYLE,
214 : XML_FAMILY_TYPE_MARKER ),
215 : ENTRY1( DRAW, HATCH, XML_ETACTION_STYLE,
216 : XML_FAMILY_TYPE_HATCH ),
217 : ENTRY1( DRAW, STROKE_DASH, XML_ETACTION_STYLE,
218 : XML_FAMILY_TYPE_STROKE_DASH ),
219 :
220 : // process <text:h/p>: process style-name attributes,
221 : // rename <text:h>'s text:outline-level to text:level,
222 : ENTRY1( TEXT, H, XML_ETACTION_PROC_ATTRS, OASIS_PARA_ACTIONS ),
223 : ENTRY1( TEXT, P, XML_ETACTION_PROC_ATTRS, OASIS_PARA_ACTIONS ),
224 :
225 : // process <test:list>'s text:style-name attributes
226 : // rename <text:list> to <text:ordered-list> or <text:unordered-list>
227 : // TODO: All list currenty are renamed to <text:ordered-list>
228 16 : ENTRY2QN( TEXT, LIST, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
229 : XML_NAMESPACE_TEXT, XML_ORDERED_LIST,
230 : OASIS_LIST_STYLE_REF_ACTIONS ),
231 :
232 : // rename <text:note*> to <text:footnote*> or <text:endnote*>
233 : ENTRY1( TEXT, NOTES_CONFIGURATION, XML_ETACTION_NOTES,
234 : XML_NOTES_CONFIGURATION),
235 : ENTRY1( TEXT, NOTE, XML_ETACTION_NOTES, XML_NOTE ),
236 :
237 : // rename <text:footnote> and <text:endnote> to <text:note>
238 : ENTRY1( TEXT, NOTE_REF, XML_ETACTION_NOTES, XML_NOTE_REF ),
239 :
240 : // rename <text:tab> to <text:tab-stop>
241 16 : ENTRY1Q( TEXT, TAB, XML_ETACTION_RENAME_ELEM,
242 : XML_NAMESPACE_TEXT, XML_TAB_STOP ),
243 :
244 : // replace <table:table tabke:is-sub-table> with <table:sub-table>
245 : ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ),
246 :
247 : // merge frame element
248 : ENTRY0( DRAW, FRAME, XML_ETACTION_FRAME ),
249 :
250 : // process events
251 16 : ENTRY1Q( OFFICE, EVENT_LISTENERS, XML_ETACTION_RENAME_ELEM,
252 : XML_NAMESPACE_OFFICE, XML_EVENTS ),
253 : ENTRY0( SCRIPT, EVENT_LISTENER, XML_ETACTION_EVENT ),
254 : ENTRY0( SCRIPT, EVENT, XML_ETACTION_EVENT ),
255 : ENTRY0( PRESENTATION, EVENT_LISTENER, XML_ETACTION_EVENT ),
256 :
257 : // process Basic dialogs
258 : ENTRY0( DLG, STYLE, XML_ETACTION_DLG ),
259 :
260 : // process length attributes
261 : ENTRY1( DRAW, RECT, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
262 : ENTRY1( DRAW, LINE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
263 : ENTRY1( DRAW, POLYLINE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
264 : ENTRY1( DRAW, POLYGON, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
265 : ENTRY1( DRAW, PATH, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
266 : ENTRY1( DRAW, CIRCLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
267 : ENTRY1( DRAW, ELLIPSE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
268 : ENTRY1( DRAW, CONNECTOR, XML_ETACTION_PROC_ATTRS, OASIS_CONNECTOR_ACTIONS ),
269 : ENTRY1( DRAW, CAPTION, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
270 : ENTRY1( DRAW, MEASURE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
271 : ENTRY1( DRAW, CONTROL, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
272 : ENTRY1( DRAW, PAGE_THUMBNAIL, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
273 : ENTRY1( DRAW, G, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
274 : // ENTRY1( DRAW, FRAME, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
275 : ENTRY1( DRAW, TEXT_BOX, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
276 : ENTRY1( PRESENTATION, PLACEHOLDER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
277 : ENTRY1( DRAW, CONTOUR_POLYGON, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
278 : ENTRY1( DRAW, CONTOUR_PATH, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
279 : ENTRY1( DRAW, AREA_RECTANGLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
280 : ENTRY1( DRAW, AREA_CIRCLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
281 : ENTRY1( DRAW, AREA_POLYGON, XML_ETACTION_PROC_ATTRS, OASIS_DRAW_AREA_POLYGON_ACTIONS ),
282 : ENTRY1( DRAW, GLUE_POINT, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
283 : ENTRY1( DR3D, SCENE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
284 : ENTRY1( DR3D, CUBE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
285 : ENTRY1( DR3D, SPHERE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
286 : ENTRY1( DR3D, EXTRUDE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
287 : ENTRY1( DR3D, ROTATE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
288 : ENTRY1( CHART, TITLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
289 : ENTRY1( CHART, SUBTITLE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
290 : ENTRY1( CHART, FOOTER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
291 : ENTRY1( CHART, LEGEND, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
292 : ENTRY1( CHART, WALL, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
293 : ENTRY1( CHART, FLOOR, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
294 : ENTRY1( CHART, AXIS, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
295 : ENTRY1( CHART, GRID, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
296 : ENTRY1( CHART, SERIES, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
297 : ENTRY1( CHART, DATA_POINT, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
298 : ENTRY1( CHART, MEAN_VALUE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
299 : ENTRY1( CHART, ERROR_INDICATOR, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
300 : ENTRY1( CHART, REGRESSION_CURVE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
301 : ENTRY1( CHART, STOCK_GAIN_MARKER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
302 : ENTRY1( CHART, STOCK_LOSS_MARKER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
303 : ENTRY1( CHART, STOCK_RANGE_LINE, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
304 :
305 : ENTRY0( CHART, CHART, XML_ETACTION_CHART ),
306 : ENTRY0( CHART, PLOT_AREA, XML_ETACTION_CHART_PLOT_AREA ),
307 :
308 : ENTRY0( CONFIG, CONFIG_ITEM, XML_ETACTION_CONFIG_ITEM ),
309 16 : ENTRY1Q( TEXT, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
310 : XML_NAMESPACE_TEXT, XML_PROTECTION_KEY ),
311 16 : ENTRY1Q( TABLE, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
312 : XML_NAMESPACE_TABLE, XML_PROTECTION_KEY ),
313 :
314 : ENTRY1( TEXT, INDEX_ENTRY_TAB_STOP, XML_ETACTION_PROC_ATTRS,
315 : OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS ),
316 : ENTRY0( STYLE, TAB_STOP, XML_ETACTION_TAB_STOP ),
317 : ENTRY1( STYLE, BACKGROUND_IMAGE, XML_ETACTION_PROC_ATTRS,
318 : OASIS_BACKGROUND_IMAGE_ACTIONS ),
319 : ENTRY1( TEXT, LINENUMBERING_CONFIGURATION, XML_ETACTION_PROC_ATTRS,
320 : OASIS_LINENUMBERING_ACTIONS ),
321 : ENTRY1( STYLE, FOOTNOTE_SEP, XML_ETACTION_PROC_ATTRS,
322 : OASIS_FOOTNOTE_SEP_ACTIONS ),
323 : ENTRY1( STYLE, DROP_CAP, XML_ETACTION_PROC_ATTRS, OASIS_DROP_CAP_ACTIONS ),
324 : ENTRY1( STYLE, COLUMNS, XML_ETACTION_PROC_ATTRS, OASIS_COLUMNS_ACTIONS ),
325 : ENTRY1( STYLE, COLUMN, XML_ETACTION_PROC_ATTRS, OASIS_COLUMNS_ACTIONS ),
326 :
327 : // process *:style-name attributes
328 : ENTRY1( STYLE, MAP, XML_ETACTION_PROC_ATTRS, OASIS_MAP_STYLE_REF_ACTIONS ),
329 : ENTRY1( TEXT, SPAN, XML_ETACTION_PROC_ATTRS, OASIS_TEXT_STYLE_REF_ACTIONS ),
330 : ENTRY1( TEXT, A, XML_ETACTION_PROC_ATTRS, OASIS_TEXT_STYLE_REF_ACTIONS ),
331 : ENTRY1( TEXT, RUBY_TEXT, XML_ETACTION_PROC_ATTRS,
332 : OASIS_TEXT_STYLE_REF_ACTIONS ),
333 : ENTRY1( TEXT, TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
334 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
335 : ENTRY1( TEXT, ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
336 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
337 : ENTRY1( TEXT, TABLE_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
338 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
339 : ENTRY1( TEXT, OBJECT_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
340 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
341 : ENTRY1( TEXT, USER_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
342 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
343 : ENTRY1( TEXT, ALPHABETICAL_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
344 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
345 : ENTRY1( TEXT, BIBLIOGRAPHY_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
346 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
347 : ENTRY1( TEXT, INDEX_SOURCE_STYLE, XML_ETACTION_PROC_ATTRS,
348 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
349 : ENTRY1( TEXT, INDEX_TITLE_TEMPLATE, XML_ETACTION_PROC_ATTRS,
350 : OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
351 32 : ENTRY3QNQ( TEXT, INDEX_ENTRY_CHAPTER,
352 : XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND,
353 : XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_CHAPTER_NUMBER,
354 : OASIS_TEXT_STYLE_REF_ACTIONS ,
355 : XML_NAMESPACE_TEXT, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE),
356 : ENTRY1( TEXT, INDEX_ENTRY_TEXT, XML_ETACTION_PROC_ATTRS,
357 : OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
358 : ENTRY1( TEXT, INDEX_ENTRY_PAGE_NUMBER, XML_ETACTION_PROC_ATTRS,
359 : OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
360 : ENTRY1( TEXT, INDEX_ENTRY_SPAN, XML_ETACTION_PROC_ATTRS,
361 : OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
362 : ENTRY1( TEXT, INDEX_ENTRY_BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
363 : OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
364 : ENTRY1( TEXT, INDEX_ENTRY_LINK_START, XML_ETACTION_PROC_ATTRS,
365 : OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
366 : ENTRY1( TEXT, INDEX_ENTRY_LINK_END, XML_ETACTION_PROC_ATTRS,
367 : OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
368 : ENTRY1( DRAW, PAGE, XML_ETACTION_PROC_ATTRS,
369 : OASIS_MASTER_PAGE_REF_ACTIONS ), /* generated entry */
370 : /* Conversion of attribute <table:style-name> for <table:table-row> and
371 : <table:table-column> (#i40011#, #i40015#)
372 : */
373 : ENTRY1( TABLE, TABLE_ROW, XML_ETACTION_PROC_ATTRS,
374 : OASIS_TABLE_STYLE_REF_ACTIONS ),
375 : ENTRY1( TABLE, TABLE_COLUMN, XML_ETACTION_PROC_ATTRS,
376 : OASIS_TABLE_STYLE_REF_ACTIONS ),
377 :
378 : // rename office:value-* to *:value-*
379 : ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS,
380 : OASIS_TEXT_VALUE_TYPE_ACTIONS ), /* generated entry */
381 : ENTRY1( TEXT, VARIABLE_SET, XML_ETACTION_PROC_ATTRS,
382 : OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
383 : ENTRY1( TEXT, VARIABLE_INPUT, XML_ETACTION_PROC_ATTRS,
384 : OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
385 : ENTRY1( TEXT, USER_FIELD_DECL, XML_ETACTION_PROC_ATTRS,
386 : OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
387 : ENTRY1( TEXT, EXPRESSION, XML_ETACTION_PROC_ATTRS,
388 : OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
389 : ENTRY1( TEXT, USER_DEFINED, XML_ETACTION_PROC_ATTRS,
390 : OASIS_DATETIME_ACTIONS ), // Add OASIS_TEXT_VALUE_TYPE_ACTIONS if attrs are added to text:user-defined
391 : ENTRY1( TABLE, TABLE_CELL, XML_ETACTION_PROC_ATTRS,
392 : OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
393 : ENTRY1( TABLE, COVERED_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
394 : OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
395 : ENTRY1( TABLE, CHANGE_TRACK_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
396 : OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
397 : // ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
398 : // OASIS_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
399 : // ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
400 : // OASIS_VALUE_TYPE_ACTIONS), /* generated entry */
401 :
402 : ENTRY1( OFFICE, ANNOTATION, XML_ETACTION_MOVE_ELEMS_TO_ATTRS,
403 : OASIS_ANNOTATION_ACTIONS ), /* generated entry */
404 : ENTRY1( OFFICE, CHANGE_INFO, XML_ETACTION_MOVE_ELEMS_TO_ATTRS,
405 : OASIS_CHANGE_INFO_ACTIONS ), /* generated entry */
406 :
407 : ENTRY1( TEXT, DDE_CONNECTION_DECL, XML_ETACTION_PROC_ATTRS,
408 : OASIS_DDE_CONNECTION_DECL_ACTIONS ),
409 :
410 : ENTRY0( FORM, TEXT, XML_ETACTION_FORM_CONTROL ),
411 : ENTRY0( FORM, TEXTAREA, XML_ETACTION_FORM_CONTROL ),
412 : ENTRY0( FORM, FIXED_TEXT, XML_ETACTION_FORM_CONTROL ),
413 : ENTRY0( FORM, FILE, XML_ETACTION_FORM_CONTROL ),
414 : ENTRY0( FORM, PASSWORD, XML_ETACTION_FORM_CONTROL ),
415 : ENTRY0( FORM, FORMATTED_TEXT, XML_ETACTION_FORM_CONTROL ),
416 : ENTRY0( FORM, BUTTON, XML_ETACTION_FORM_CONTROL ),
417 : ENTRY0( FORM, IMAGE, XML_ETACTION_FORM_CONTROL ),
418 : ENTRY0( FORM, CHECKBOX, XML_ETACTION_FORM_CONTROL ),
419 : ENTRY0( FORM, RADIO, XML_ETACTION_FORM_CONTROL ),
420 : ENTRY0( FORM, LISTBOX, XML_ETACTION_FORM_CONTROL ),
421 : ENTRY0( FORM, COMBOBOX, XML_ETACTION_FORM_CONTROL ),
422 : ENTRY0( FORM, FRAME, XML_ETACTION_FORM_CONTROL ),
423 : ENTRY0( FORM, HIDDEN, XML_ETACTION_FORM_CONTROL ),
424 : ENTRY0( FORM, IMAGE_FRAME, XML_ETACTION_FORM_CONTROL ),
425 : ENTRY0( FORM, GRID, XML_ETACTION_FORM_CONTROL ),
426 : ENTRY0( FORM, VALUE_RANGE, XML_ETACTION_FORM_CONTROL ),
427 : ENTRY0( FORM, GENERIC_CONTROL, XML_ETACTION_FORM_CONTROL ),
428 : ENTRY1( FORM, COLUMN, XML_ETACTION_PROC_ATTRS,
429 : OASIS_FORM_COLUMN_ACTIONS ),
430 : ENTRY1( FORM, PROPERTY, XML_ETACTION_FORM_PROPERTY, XML_PROPERTY ),
431 : ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_FORM_PROPERTY,
432 : XML_LIST_PROPERTY ),
433 : ENTRY1( FORM, LIST_VALUE, XML_ETACTION_FORM_PROPERTY, XML_LIST_VALUE ),
434 :
435 : // process xlink:href
436 : ENTRY1( META, TEMPLATE, XML_ETACTION_PROC_ATTRS,
437 : OASIS_XLINK_ACTIONS ), /* generated entry */
438 : ENTRY1( META, AUTO_RELOAD, XML_ETACTION_PROC_ATTRS,
439 : OASIS_XLINK_ACTIONS ), /* generated entry */
440 : ENTRY1( TEXT, SECTION_SOURCE, XML_ETACTION_PROC_ATTRS,
441 : OASIS_XLINK_ACTIONS ), /* generated entry */
442 : ENTRY1( TEXT, SCRIPT, XML_ETACTION_PROC_ATTRS,
443 : OASIS_XLINK_ACTIONS ), /* generated entry */
444 : ENTRY1( TEXT, ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ETACTION_PROC_ATTRS,
445 : OASIS_XLINK_ACTIONS ), /* generated entry */
446 : ENTRY1( TABLE, TABLE_SOURCE, XML_ETACTION_PROC_ATTRS,
447 : OASIS_XLINK_ACTIONS ), /* generated entry */
448 : ENTRY1( TABLE, CELL_RANGE_SOURCE, XML_ETACTION_PROC_ATTRS,
449 : OASIS_XLINK_ACTIONS ), /* generated entry */
450 : ENTRY1( DRAW, A, XML_ETACTION_PROC_ATTRS,
451 : OASIS_XLINK_ACTIONS ), /* generated entry */
452 : ENTRY1( PRESENTATION, SOUND, XML_ETACTION_PROC_ATTRS,
453 : OASIS_XLINK_ACTIONS ), /* generated entry */
454 : ENTRY1( FORM, FORM, XML_ETACTION_PROC_ATTRS,
455 : OASIS_FORM_ACTIONS ), /* generated entry */
456 : // ENTRY1( SVG, FONT_FACE_URI, XML_ETACTION_PROC_ATTRS,
457 : // OASIS_XLINK_ACTIONS ), /* generated entry */
458 : // ENTRY1( SVG, DEFINITION_SRC, XML_ETACTION_PROC_ATTRS,
459 : // OASIS_XLINK_ACTIONS ), /* generated entry */
460 16 : ENTRY2QN( CHART, SYMBOL_IMAGE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
461 : XML_NAMESPACE_STYLE, XML_SYMBOL_IMAGE,
462 : OASIS_BACKGROUND_IMAGE_ACTIONS ),
463 : // OASIS_XLINK_ACTIONS ), /* generated entry */
464 : // events don't have real URIs
465 : // ENTRY1( PRESENTATION, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
466 : // OASIS_XLINK_ACTIONS ), /* generated entry */
467 : // ENTRY1( SCRIPT, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
468 : // OASIS_XLINK_ACTIONS ), /* generated entry */
469 :
470 : // add namespace prefix to name
471 : ENTRY1( CONFIG, CONFIG_ITEM_SET, XML_ETACTION_PROC_ATTRS,
472 : OASIS_CONFIG_ITEM_SET_ACTIONS ),
473 :
474 : // add namespace prefix to formula and condition
475 : // text:condition
476 : ENTRY1( TEXT, SECTION, XML_ETACTION_PROC_ATTRS,
477 : OASIS_FORMULA_ACTIONS ), /* generated entry */
478 : // text:formula
479 : ENTRY1( TEXT, SEQUENCE, XML_ETACTION_PROC_ATTRS,
480 : OASIS_FORMULA_ACTIONS ), /* generated entry */
481 : // text:condition
482 : ENTRY1( TEXT, DATABASE_NEXT, XML_ETACTION_PROC_ATTRS,
483 : OASIS_FORMULA_ACTIONS ), /* generated entry */
484 : // text:condition
485 16 : ENTRY2QN( TEXT, DATABASE_ROW_SELECT, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
486 : XML_NAMESPACE_TEXT, XML_DATABASE_SELECT,
487 : OASIS_FORMULA_ACTIONS ), /* generated entry */
488 : // text:condition
489 : ENTRY1( TEXT, CONDITIONAL_TEXT, XML_ETACTION_PROC_ATTRS,
490 : OASIS_FORMULA_ACTIONS ), /* generated entry */
491 : // text:condition
492 : ENTRY1( TEXT, HIDDEN_TEXT, XML_ETACTION_PROC_ATTRS,
493 : OASIS_FORMULA_ACTIONS ), /* generated entry */
494 : // text:condition
495 : ENTRY1( TEXT, HIDDEN_PARAGRAPH, XML_ETACTION_PROC_ATTRS,
496 : OASIS_FORMULA_ACTIONS ), /* generated entry */
497 : // text:formula
498 : ENTRY1( TEXT, TABLE_FORMULA, XML_ETACTION_PROC_ATTRS,
499 : OASIS_FORMULA_ACTIONS ), /* generated entry */
500 :
501 : // process table::content-validation
502 : ENTRY1( TABLE, CONTENT_VALIDATION, XML_ETACTION_PROC_ATTRS,
503 : OASIS_CONTENT_VALIDATION_ACTIONS ),
504 :
505 : // rename <table:dependencies> to <table:dependences>
506 16 : ENTRY1Q( TABLE, DEPENDENCIES, XML_ETACTION_RENAME_ELEM,
507 : XML_NAMESPACE_TABLE, XML_DEPENDENCES ),
508 16 : ENTRY1Q( TABLE, DEPENDENCY, XML_ETACTION_RENAME_ELEM,
509 : XML_NAMESPACE_TABLE, XML_DEPENDENCE ),
510 :
511 : // process table::conversion-mode
512 : ENTRY1( TABLE, CONVERSION_MODE, XML_ETACTION_PROC_ATTRS,
513 : OASIS_DDE_CONV_MODE_ACTIONS ),
514 :
515 : // process table::data-pilot-member
516 : ENTRY1( TABLE, DATA_PILOT_MEMBER, XML_ETACTION_PROC_ATTRS,
517 : OASIS_DATAPILOT_MEMBER_ACTIONS ),
518 :
519 : // process table::data-pilot-level
520 : ENTRY1( TABLE, DATA_PILOT_LEVEL, XML_ETACTION_PROC_ATTRS,
521 : OASIS_DATAPILOT_LEVEL_ACTIONS ),
522 :
523 : // process table::source-service
524 : ENTRY1( TABLE, SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS,
525 : OASIS_SOURCE_SERVICE_ACTIONS ),
526 :
527 : // entries for date time change (#i36576#)
528 : ENTRY1( TEXT, DATE, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
529 : ENTRY1( TEXT, CREATION_DATE, XML_ETACTION_PROC_ATTRS,
530 : OASIS_DATETIME_ACTIONS ),
531 : ENTRY1( TEXT, TIME, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
532 : ENTRY1( TEXT, CREATION_TIME, XML_ETACTION_PROC_ATTRS,
533 : OASIS_DATETIME_ACTIONS ),
534 : ENTRY1( TEXT, PRINT_TIME, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
535 : ENTRY1( TEXT, MODIFICATION_TIME, XML_ETACTION_PROC_ATTRS,
536 : OASIS_DATETIME_ACTIONS ),
537 : ENTRY1( TEXT, EDITING_DURATION, XML_ETACTION_PROC_ATTRS,
538 : OASIS_DATETIME_ACTIONS ),
539 : ENTRY1( FORM, TIME, XML_ETACTION_PROC_ATTRS, OASIS_DATETIME_ACTIONS ),
540 : ENTRY1( PRESENTATION, SETTINGS, XML_ETACTION_PROC_ATTRS,
541 : OASIS_DATETIME_ACTIONS ),
542 :
543 : // fix <text:alphabatical-index-mark text:main-etry>
544 : ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK, XML_ETACTION_PROC_ATTRS,
545 : OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS ),
546 : ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK_START, XML_ETACTION_PROC_ATTRS,
547 : OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS ),
548 :
549 : // fix id strings in old animation elements
550 : ENTRY1( PRESENTATION, DIM, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
551 : ENTRY1( PRESENTATION, PLAY, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
552 : ENTRY1( PRESENTATION, SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
553 : ENTRY1( PRESENTATION, SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
554 : ENTRY1( PRESENTATION, HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
555 : ENTRY1( PRESENTATION, HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
556 :
557 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
558 368 : };
559 :
560 : // XML_ETACTION_STYLE
561 : static XMLTransformerActionInit aStyleActionTable[] =
562 : {
563 : ENTRY0( STYLE, FAMILY, XML_ATACTION_STYLE_FAMILY ),
564 : ENTRY1( STYLE, NAME, XML_ATACTION_DECODE_STYLE_NAME,
565 : XML_FAMILY_TYPE_END ),
566 : ENTRY1( STYLE, DISPLAY_NAME, XML_ATACTION_STYLE_DISPLAY_NAME,
567 : XML_FAMILY_TYPE_END ),
568 : ENTRY1( STYLE, PARENT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
569 : XML_FAMILY_TYPE_END ),
570 : ENTRY1( STYLE, NEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
571 : XML_FAMILY_TYPE_END ),
572 : ENTRY1( STYLE, LIST_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
573 : XML_FAMILY_TYPE_LIST ),
574 : ENTRY1( STYLE, MASTER_PAGE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
575 : XML_FAMILY_TYPE_MASTER_PAGE ),
576 : ENTRY0( STYLE, DEFAULT_OUTLINE_LEVEL, XML_ATACTION_REMOVE ),
577 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
578 : XML_FAMILY_TYPE_TEXT ), // list level styles
579 : ENTRY1( DRAW, NAME, XML_ATACTION_DECODE_STYLE_NAME,
580 : XML_FAMILY_TYPE_END ),
581 : ENTRY1( DRAW, DISPLAY_NAME, XML_ATACTION_STYLE_DISPLAY_NAME,
582 : XML_FAMILY_TYPE_END ),
583 : ENTRY0( DRAW, DISTANCE, XML_ATACTION_IN2INCH ),
584 : ENTRY0( DRAW, DOTS1_LENGTH, XML_ATACTION_IN2INCH ),
585 : ENTRY0( DRAW, DOTS2_LENGTH, XML_ATACTION_IN2INCH ),
586 : ENTRY0( SVG, WIDTH, XML_ATACTION_IN2INCH ),
587 : ENTRY0( SVG, HEIGHT, XML_ATACTION_IN2INCH ),
588 : ENTRY0( DRAW, START, XML_ATACTION_NEG_PERCENT ),
589 : ENTRY0( DRAW, END, XML_ATACTION_NEG_PERCENT ),
590 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_True ),
591 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
592 : };
593 :
594 : // OASIS_FRAME_ELEM_ACTIONS
595 : static XMLTransformerActionInit aFrameActionTable[] =
596 : {
597 : ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_COPY ),
598 : ENTRY0( DRAW, IMAGE, XML_ETACTION_COPY ),
599 : ENTRY0( DRAW, OBJECT, XML_ETACTION_COPY ),
600 : ENTRY0( DRAW, OBJECT_OLE, XML_ETACTION_COPY ),
601 : ENTRY0( DRAW, APPLET, XML_ETACTION_COPY ),
602 : ENTRY0( DRAW, PLUGIN, XML_ETACTION_COPY ),
603 : ENTRY0( DRAW, FLOATING_FRAME, XML_ETACTION_COPY ),
604 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
605 : };
606 :
607 : // OASIS_EVENT_ELEM_ACTIONS
608 : static XMLTransformerActionInit aEventActionTable[] =
609 : {
610 : ENTRY0( XLINK, HREF, XML_ATACTION_HREF ),
611 : ENTRY1( SCRIPT, LANGUAGE, XML_ATACTION_REMOVE_NAMESPACE_PREFIX,
612 : XML_NAMESPACE_OOO ),
613 : ENTRY0( SCRIPT, EVENT_NAME, XML_ATACTION_EVENT_NAME ),
614 : ENTRY0( SCRIPT, MACRO_NAME, XML_ATACTION_MACRO_NAME ),
615 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
616 : };
617 :
618 : // OASIS_EVENT_ELEM_ACTIONS
619 : static XMLTransformerActionInit aDlgActionTable[] =
620 : {
621 : ENTRY0( DLG, BORDER, XML_ATACTION_DLG_BORDER )
622 : };
623 :
624 : // action table for OASIS_MASTER_PAGE_ACTIONS
625 : static XMLTransformerActionInit aMasterPageActionTable[] =
626 : {
627 : ENTRY1( STYLE, NAME, XML_ATACTION_DECODE_STYLE_NAME,
628 : XML_FAMILY_TYPE_MASTER_PAGE ),
629 : ENTRY1( STYLE, DISPLAY_NAME, XML_ATACTION_STYLE_DISPLAY_NAME,
630 : XML_FAMILY_TYPE_MASTER_PAGE ),
631 : ENTRY1( STYLE, NEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
632 : XML_FAMILY_TYPE_MASTER_PAGE ),
633 16 : ENTRY1Q( STYLE, PAGE_LAYOUT_NAME, XML_ATACTION_RENAME,
634 : XML_NAMESPACE_STYLE, XML_PAGE_MASTER_NAME ),
635 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
636 16 : };
637 :
638 : // action table for OASIS_TEXT_STYLE_REF_ACTIONS
639 : static XMLTransformerActionInit aTextStyleRefActionTable[] =
640 : {
641 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
642 : XML_FAMILY_TYPE_TEXT ),
643 : ENTRY1( TEXT, VISITED_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
644 : XML_FAMILY_TYPE_TEXT ),
645 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_False ),
646 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
647 : };
648 :
649 : // action table for OASIS_PARA_STYLE_REF_ACTIONS
650 : static XMLTransformerActionInit aParaStyleRefActionTable[] =
651 : {
652 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
653 : XML_FAMILY_TYPE_PARAGRAPH ),
654 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
655 : };
656 :
657 : // action table for OASIS_LIST_STYLE_REF_ACTIONS
658 : static XMLTransformerActionInit aListStyleRefActionTable[] =
659 : {
660 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
661 : XML_FAMILY_TYPE_LIST ),
662 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
663 : };
664 :
665 : // action table for OASIS_MASTER_PAGE_REF_ACTIONS
666 : static XMLTransformerActionInit aMasterPageRefActionTable[] =
667 : {
668 : ENTRY1( DRAW, MASTER_PAGE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
669 : XML_FAMILY_TYPE_MASTER_PAGE ),
670 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
671 : };
672 :
673 : // action table for OASIS_MAP_STYLE_REF_ACTIONS
674 : static XMLTransformerActionInit aMapStyleRefActionTable[] =
675 : {
676 : ENTRY1( STYLE, APPLY_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
677 : XML_FAMILY_TYPE_END ),
678 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
679 : };
680 :
681 : // action table for OASIS_TABLE_STYLE_REF_ACTIONS (#i40011#, #i40015#)
682 : static XMLTransformerActionInit aTableStyleRefActionTable[] =
683 : {
684 : ENTRY1( TABLE, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
685 : XML_FAMILY_TYPE_END ),
686 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
687 : };
688 :
689 : static XMLTransformerActionInit aFontFaceActionTable[] =
690 : {
691 16 : ENTRY1Q( SVG, FONT_FAMILY, XML_ATACTION_RENAME,
692 : XML_NAMESPACE_FO, XML_FONT_FAMILY ),
693 16 : ENTRY1Q( STYLE, FONT_ADORNMENTS, XML_ATACTION_RENAME,
694 : XML_NAMESPACE_STYLE, XML_FONT_STYLE_NAME ),
695 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
696 32 : };
697 :
698 : // action table for OASIS_PARA_ACTIONS
699 : static XMLTransformerActionInit aParaActionTable[] =
700 : {
701 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
702 : XML_FAMILY_TYPE_PARAGRAPH ),
703 : ENTRY1( TEXT, COND_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
704 : XML_FAMILY_TYPE_PARAGRAPH ),
705 16 : ENTRY1Q( TEXT, OUTLINE_LEVEL, XML_ATACTION_RENAME,
706 : XML_NAMESPACE_TEXT, XML_LEVEL ),
707 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
708 16 : };
709 :
710 : // !!ATTENTION!! If you change something here, please also change
711 : // aConnectorActionTable if appropriate
712 : static XMLTransformerActionInit aShapeActionTable[] =
713 : {
714 : ENTRY1( DRAW, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
715 : XML_FAMILY_TYPE_GRAPHIC ),
716 : ENTRY1( DRAW, TEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
717 : XML_FAMILY_TYPE_PARAGRAPH ),
718 : ENTRY1( PRESENTATION, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
719 : XML_FAMILY_TYPE_PRESENTATION ),
720 : ENTRY0( SVG, X, XML_ATACTION_IN2INCH ),
721 : ENTRY0( SVG, Y, XML_ATACTION_IN2INCH ),
722 : ENTRY0( SVG, X1, XML_ATACTION_IN2INCH ),
723 : ENTRY0( SVG, Y1, XML_ATACTION_IN2INCH ),
724 : ENTRY0( SVG, X2, XML_ATACTION_IN2INCH ),
725 : ENTRY0( SVG, Y2, XML_ATACTION_IN2INCH ),
726 : ENTRY0( SVG, CX, XML_ATACTION_IN2INCH ),
727 : ENTRY0( SVG, CY, XML_ATACTION_IN2INCH ),
728 : ENTRY0( DRAW, END_X, XML_ATACTION_IN2INCH ),
729 : ENTRY0( DRAW, END_Y, XML_ATACTION_IN2INCH ),
730 : ENTRY0( SVG, R, XML_ATACTION_IN2INCH ),
731 : ENTRY0( SVG, RX, XML_ATACTION_IN2INCH ),
732 : ENTRY0( SVG, RY, XML_ATACTION_IN2INCH ),
733 : ENTRY0( SVG, WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
734 : ENTRY0( SVG, HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
735 : ENTRY0( FO, MIN_WIDTH, XML_ATACTION_IN2INCH ),
736 : ENTRY0( FO, MIN_HEIGHT, XML_ATACTION_IN2INCH ),
737 : ENTRY0( FO, MAX_WIDTH, XML_ATACTION_IN2INCH ),
738 : ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_IN2INCH ),
739 : ENTRY0( DRAW, CORNER_RADIUS, XML_ATACTION_IN2INCH ),
740 : ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INS2INCHS ),
741 : ENTRY0( DRAW, CAPTION_POINT_X, XML_ATACTION_IN2INCH ),
742 : ENTRY0( DRAW, CAPTION_POINT_Y, XML_ATACTION_IN2INCH ),
743 : ENTRY0( DR3D, DISTANCE, XML_ATACTION_IN2INCH ),
744 : ENTRY0( DR3D, FOCAL_LENGTH, XML_ATACTION_IN2INCH ),
745 16 : ENTRY1Q( DRAW, CONTROL, XML_ATACTION_RENAME,
746 : XML_NAMESPACE_FORM, XML_ID ),
747 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_True ),
748 :
749 : // BM: needed by chart:legend. The legend needs also the draw actions. As
750 : // there is no merge mechanism, all actions have to be in the same table
751 : ENTRY2( CHART, LEGEND_POSITION, XML_ATACTION_RENAME_ATTRIBUTE,
752 : RENAME_ENTRY( XML_START, XML_LEFT ),
753 : RENAME_ENTRY( XML_END, XML_RIGHT )),
754 :
755 : ENTRY0( DRAW, ID, XML_ATACTION_DECODE_ID ),
756 :
757 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
758 16 : };
759 :
760 : // OASIS_ANIMATION_ACTIONS
761 : static XMLTransformerActionInit aAnimationActionTable[] =
762 : {
763 : ENTRY0( DRAW, SHAPE_ID, XML_ATACTION_DECODE_ID ),
764 : ENTRY0( PRESENTATION, DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
765 : ENTRY0( PRESENTATION, PAUSE, XML_ATACTION_RNG2ISO_DATETIME ),
766 :
767 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
768 : };
769 :
770 : // OOO_CONNECTOR_ACTIONS
771 : static XMLTransformerActionInit aConnectorActionTable[] =
772 : {
773 : ENTRY1( DRAW, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
774 : XML_FAMILY_TYPE_GRAPHIC ),
775 : ENTRY1( DRAW, TEXT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
776 : XML_FAMILY_TYPE_PARAGRAPH ),
777 : ENTRY1( PRESENTATION, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
778 : XML_FAMILY_TYPE_PRESENTATION ),
779 : ENTRY0( SVG, X1, XML_ATACTION_IN2TWIPS ),
780 : ENTRY0( SVG, Y1, XML_ATACTION_IN2TWIPS ),
781 : ENTRY0( SVG, X2, XML_ATACTION_IN2TWIPS ),
782 : ENTRY0( SVG, Y2, XML_ATACTION_IN2TWIPS ),
783 : ENTRY0( DRAW, END_X, XML_ATACTION_IN2INCH ),
784 : ENTRY0( DRAW, END_Y, XML_ATACTION_IN2INCH ),
785 : ENTRY0( SVG, WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
786 : ENTRY0( SVG, HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS ),
787 : ENTRY0( FO, MIN_WIDTH, XML_ATACTION_IN2INCH ),
788 : ENTRY0( FO, MIN_HEIGHT, XML_ATACTION_IN2INCH ),
789 : ENTRY0( FO, MAX_WIDTH, XML_ATACTION_IN2INCH ),
790 : ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_IN2INCH ),
791 : ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INS2INCHS ),
792 16 : ENTRY1Q( DRAW, CONTROL, XML_ATACTION_RENAME,
793 : XML_NAMESPACE_FORM, XML_ID ),
794 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_True ),
795 : ENTRY0( DRAW, START_SHAPE, XML_ATACTION_DECODE_ID ),
796 : ENTRY0( DRAW, END_SHAPE, XML_ATACTION_DECODE_ID ),
797 :
798 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
799 16 : };
800 :
801 : // OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
802 : static XMLTransformerActionInit aIndexEntryTabStopActionTable[] =
803 : {
804 : ENTRY0( STYLE, POSITION, XML_ATACTION_IN2INCH ),
805 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
806 : XML_FAMILY_TYPE_TEXT ),
807 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
808 : };
809 :
810 : // OASIS_TAB_STOP_ACTIONS
811 : static XMLTransformerActionInit aTabStopActionTable[] =
812 : {
813 : ENTRY0( STYLE, POSITION, XML_ATACTION_IN2INCH ),
814 16 : ENTRY1Q( STYLE, LEADER_TEXT, XML_ATACTION_RENAME,
815 : XML_NAMESPACE_STYLE, XML_LEADER_CHAR ),
816 : ENTRY0( STYLE, LEADER_STYLE, XML_ATACTION_REMOVE ),
817 : ENTRY0( STYLE, LEADER_TYPE, XML_ATACTION_REMOVE ),
818 : ENTRY0( STYLE, LEADER_WIDTH, XML_ATACTION_REMOVE ),
819 : ENTRY0( STYLE, LEADER_COLOR, XML_ATACTION_REMOVE ),
820 : ENTRY0( STYLE, LEADER_TEXT_STYLE, XML_ATACTION_REMOVE ),
821 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
822 16 : };
823 :
824 : // OASIS_LINENUMBERING_ACTIONS
825 : static XMLTransformerActionInit aLineNumberingActionTable[] =
826 : {
827 : ENTRY0( TEXT, OFFSET, XML_ATACTION_IN2INCH ),
828 : ENTRY1( TEXT, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
829 : XML_FAMILY_TYPE_TEXT ),
830 16 : ENTRY1Q( TEXT, COUNT_IN_TEXT_BOXES , XML_ATACTION_RENAME,
831 : XML_NAMESPACE_TEXT, XML_COUNT_IN_FLOATING_FRAMES),
832 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
833 16 : };
834 :
835 : static XMLTransformerActionInit aFootnoteSepActionTable[] =
836 : {
837 : ENTRY0( STYLE, WIDTH, XML_ATACTION_IN2INCH ),
838 : ENTRY0( STYLE, DISTANCE_BEFORE_SEP, XML_ATACTION_IN2INCH ),
839 : ENTRY0( STYLE, DISTANCE_AFTER_SEP, XML_ATACTION_IN2INCH ),
840 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
841 : };
842 :
843 : // OASIS_NOTES_ACTIONS (processed by special context)
844 : static XMLTransformerActionInit aNotesActionTable[] =
845 : {
846 : ENTRY0( TEXT, NOTE_CLASS, XML_ATACTION_STYLE_FAMILY ),
847 : ENTRY1( TEXT, CITATION_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
848 : XML_FAMILY_TYPE_TEXT ),
849 : ENTRY1( TEXT, CITATION_BODY_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
850 : XML_FAMILY_TYPE_TEXT ),
851 : ENTRY1( TEXT, DEFAULT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
852 : XML_FAMILY_TYPE_PARAGRAPH ),
853 : ENTRY1( TEXT, MASTER_PAGE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
854 : XML_FAMILY_TYPE_MASTER_PAGE ),
855 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
856 : };
857 :
858 : // OASIS_DROP_CAP_ACTIONS
859 : static XMLTransformerActionInit aDropCapActionTable[] =
860 : {
861 : ENTRY0( STYLE, DISTANCE, XML_ATACTION_IN2INCH ),
862 : ENTRY1( STYLE, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
863 : XML_FAMILY_TYPE_TEXT ),
864 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
865 : };
866 :
867 : static XMLTransformerActionInit aColumnsActionTable[] =
868 : {
869 : ENTRY0( STYLE, COLUMN_GAP, XML_ATACTION_IN2INCH ),
870 : ENTRY0( STYLE, SPACE_BEFORE, XML_ATACTION_REMOVE ),
871 : ENTRY0( STYLE, SPACE_AFTER, XML_ATACTION_REMOVE ),
872 16 : ENTRY1Q( FO, START_INDENT, XML_ATACTION_RENAME_IN2INCH,
873 : XML_NAMESPACE_FO, XML_MARGIN_LEFT ),
874 16 : ENTRY1Q( FO, END_INDENT, XML_ATACTION_RENAME_IN2INCH,
875 : XML_NAMESPACE_FO, XML_MARGIN_RIGHT ),
876 : ENTRY0( STYLE, WIDTH, XML_ATACTION_IN2INCH ),
877 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
878 32 : };
879 :
880 : // OASIS_TEXT_VALUE_TYPE_ACTIONS
881 : static XMLTransformerActionInit aTextValueTypeActionTable[] =
882 : {
883 16 : ENTRY1Q( OFFICE, VALUE_TYPE, XML_ATACTION_RENAME,
884 : XML_NAMESPACE_TEXT, XML_VALUE_TYPE ),
885 16 : ENTRY1Q( OFFICE, VALUE, XML_ATACTION_RENAME,
886 : XML_NAMESPACE_TEXT, XML_VALUE ),
887 16 : ENTRY1Q( OFFICE, CURRENCY, XML_ATACTION_RENAME,
888 : XML_NAMESPACE_TEXT, XML_CURRENCY ),
889 16 : ENTRY1Q( OFFICE, DATE_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME,
890 : XML_NAMESPACE_TEXT, XML_DATE_VALUE ),
891 16 : ENTRY1Q( OFFICE, TIME_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME,
892 : XML_NAMESPACE_TEXT, XML_TIME_VALUE ),
893 16 : ENTRY1Q( OFFICE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
894 : XML_NAMESPACE_TEXT, XML_BOOLEAN_VALUE ),
895 16 : ENTRY1Q( OFFICE, STRING_VALUE, XML_ATACTION_RENAME,
896 : XML_NAMESPACE_TEXT, XML_STRING_VALUE ),
897 : ENTRY0( TEXT, FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
898 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
899 112 : };
900 :
901 : // OASIS_TABLE_VALUE_TYPE_ACTIONS
902 : static XMLTransformerActionInit aTableValueTypeActionTable[] =
903 : {
904 16 : ENTRY1Q( OFFICE, VALUE_TYPE, XML_ATACTION_RENAME,
905 : XML_NAMESPACE_TABLE, XML_VALUE_TYPE ),
906 16 : ENTRY1Q( OFFICE, VALUE, XML_ATACTION_RENAME,
907 : XML_NAMESPACE_TABLE, XML_VALUE ),
908 16 : ENTRY1Q( OFFICE, CURRENCY, XML_ATACTION_RENAME,
909 : XML_NAMESPACE_TABLE, XML_CURRENCY ),
910 16 : ENTRY1Q( OFFICE, DATE_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME,
911 : XML_NAMESPACE_TABLE, XML_DATE_VALUE ),
912 16 : ENTRY1Q( OFFICE, TIME_VALUE, XML_ATACTION_RENAME_RNG2ISO_DATETIME,
913 : XML_NAMESPACE_TABLE, XML_TIME_VALUE ),
914 16 : ENTRY1Q( OFFICE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
915 : XML_NAMESPACE_TABLE, XML_BOOLEAN_VALUE ),
916 16 : ENTRY1Q( OFFICE, STRING_VALUE, XML_ATACTION_RENAME,
917 : XML_NAMESPACE_TABLE, XML_STRING_VALUE ),
918 : ENTRY1( TABLE, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
919 : XML_FAMILY_TYPE_TABLE_CELL ),
920 : ENTRY0( TABLE, FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
921 16 : ENTRY1Q( TABLE, CONTENT_VALIDATION_NAME, XML_ATACTION_RENAME,
922 : XML_NAMESPACE_TABLE, XML_VALIDATION_NAME ),
923 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
924 128 : };
925 :
926 : // action table for OASIS_ANNOTATION_ACTIONS
927 : static XMLTransformerActionInit aAnnotationActionTable[] =
928 : {
929 16 : ENTRY1Q( DC, CREATOR, XML_ATACTION_MOVE_FROM_ELEM,
930 : XML_NAMESPACE_OFFICE, XML_AUTHOR ),
931 16 : ENTRY1Q( DC, DATE, XML_ATACTION_MOVE_FROM_ELEM_RNG2ISO_DATETIME,
932 : XML_NAMESPACE_OFFICE, XML_CREATE_DATE ),
933 16 : ENTRY1Q( META, DATE_STRING, XML_ATACTION_MOVE_FROM_ELEM,
934 : XML_NAMESPACE_OFFICE, XML_CREATE_DATE_STRING ),
935 : ENTRY0( TEXT, P, XML_ETACTION_EXTRACT_CHARACTERS ),
936 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
937 48 : };
938 :
939 : // action table for OASIS_CHANGE_INFO_ACTIONS
940 : static XMLTransformerActionInit aChangeInfoActionTable[] =
941 : {
942 16 : ENTRY1Q( DC, CREATOR, XML_ATACTION_MOVE_FROM_ELEM,
943 : XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR ),
944 16 : ENTRY1Q( DC, DATE, XML_ATACTION_MOVE_FROM_ELEM_RNG2ISO_DATETIME,
945 : XML_NAMESPACE_OFFICE, XML_CHG_DATE_TIME ),
946 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
947 32 : };
948 :
949 : // OASIS_BACKGROUND_IMAGE_ACTIONS
950 : static XMLTransformerActionInit aBackgroundImageActionTable[] =
951 : {
952 16 : ENTRY1Q( DRAW, OPACITY, XML_ATACTION_RENAME_NEG_PERCENT,
953 : XML_NAMESPACE_DRAW, XML_TRANSPARENCY ),
954 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_True ),
955 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
956 16 : };
957 :
958 : // OASIS_DDE_CONNECTION_DECL
959 : static XMLTransformerActionInit aDDEConnectionDeclActionTable[] =
960 : {
961 16 : ENTRY1Q( OFFICE, NAME, XML_ATACTION_RENAME,
962 : XML_NAMESPACE_TEXT, XML_NAME ),
963 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
964 16 : };
965 :
966 : // OASIS_FORM_CONTROL_ACTIONS
967 : static XMLTransformerActionInit aFormControlActionTable[] =
968 : {
969 : ENTRY0( FORM, NAME, XML_ATACTION_MOVE_TO_ELEM ),
970 16 : ENTRY2QN( FORM, CONTROL_IMPLEMENTATION,
971 : XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,
972 : XML_NAMESPACE_FORM, XML_SERVICE_NAME,
973 : XML_NAMESPACE_OOO ),
974 : ENTRY0( FORM, ID, XML_ATACTION_MOVE_TO_ELEM ),
975 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_False ),
976 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
977 16 : };
978 :
979 : // OASIS_FORM_COLUMN_ACTIONS
980 : static XMLTransformerActionInit aFormColumnActionTable[] =
981 : {
982 16 : ENTRY1Q( FORM, TEXT_STYLE_NAME, XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF,
983 : XML_NAMESPACE_FORM, XML_COLUMN_STYLE_NAME ),
984 16 : ENTRY2QN( FORM, CONTROL_IMPLEMENTATION,
985 : XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,
986 : XML_NAMESPACE_FORM, XML_SERVICE_NAME,
987 : XML_NAMESPACE_OOO ),
988 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
989 32 : };
990 :
991 : // OASIS_FORM_PROP_ACTIONS
992 : static XMLTransformerActionInit aFormPropActionTable[] =
993 : {
994 16 : ENTRY1Q( OFFICE, VALUE_TYPE, XML_ATACTION_RENAME,
995 : XML_NAMESPACE_FORM, XML_PROPERTY_TYPE ),
996 : ENTRY0( OFFICE, VALUE, XML_ATACTION_REMOVE ),
997 : ENTRY0( OFFICE, STRING_VALUE, XML_ATACTION_REMOVE ),
998 : ENTRY0( OFFICE, BOOLEAN_VALUE, XML_ATACTION_REMOVE ),
999 : ENTRY0( OFFICE, DATE_VALUE, XML_ATACTION_REMOVE ),
1000 : ENTRY0( OFFICE, TIME_VALUE, XML_ATACTION_REMOVE ),
1001 : ENTRY0( OFFICE, CURRENCY, XML_ATACTION_REMOVE ),
1002 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1003 16 : };
1004 :
1005 : // OASIS_XLINK_ACTIONS
1006 : static XMLTransformerActionInit aXLinkActionTable[] =
1007 : {
1008 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_False ),
1009 : ENTRY0( TABLE, REFRESH_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1010 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1011 : };
1012 :
1013 : // OASIS_CONFIG_ITEM_SET_ACTIONS
1014 : static XMLTransformerActionInit aConfigItemSetActionTable[] =
1015 : {
1016 : ENTRY1( CONFIG, NAME, XML_ATACTION_REMOVE_NAMESPACE_PREFIX,
1017 : XML_NAMESPACE_OOO ),
1018 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1019 : };
1020 :
1021 : // OASIS_FORMULA_ACTIONS
1022 : static XMLTransformerActionInit aFormulaActionTable[] =
1023 : {
1024 : ENTRY0( TEXT, CONDITION, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1025 : ENTRY0( TEXT, FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1026 : ENTRY0( TABLE, CONDITION, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1027 : ENTRY0( TABLE, FORMULA, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1028 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1029 : };
1030 :
1031 : // OASIS_CONTENT_VALIDATION_ACTIONS
1032 : static XMLTransformerActionInit aContentValidationActionTable[] =
1033 : {
1034 : ENTRY0( TABLE, CONDITION, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1035 : ENTRY0( TABLE, DISPLAY_LIST, XML_ATACTION_REMOVE ),
1036 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1037 : };
1038 :
1039 : // OASIS_DDE_CONV_MODE_ACTIONS
1040 : static XMLTransformerActionInit aDDEConvModeActionTable[] =
1041 : {
1042 16 : ENTRY1Q( TABLE, KEEP_TEXT, XML_ATACTION_RENAME,
1043 : XML_NAMESPACE_TABLE, XML_LET_TEXT ),
1044 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1045 16 : };
1046 :
1047 : // OASIS_DATAPILOT_MEMBER_ACTIONS
1048 : static XMLTransformerActionInit aDataPilotMemberActionTable[] =
1049 : {
1050 16 : ENTRY1Q( TABLE, SHOW_DETAILS, XML_ATACTION_RENAME,
1051 : XML_NAMESPACE_TABLE, XML_DISPLAY_DETAILS ),
1052 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1053 16 : };
1054 :
1055 : // OASIS_DATAPILOT_LEVEL_ACTIONS
1056 : static XMLTransformerActionInit aDataPilotLevelActionTable[] =
1057 : {
1058 16 : ENTRY1Q( TABLE, SHOW_EMPTY, XML_ATACTION_RENAME,
1059 : XML_NAMESPACE_TABLE, XML_DISPLAY_EMPTY ),
1060 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1061 16 : };
1062 :
1063 : // OASIS_SOURCE_SERVICE_ACTIONS
1064 : static XMLTransformerActionInit aSourceServiceActionTable[] =
1065 : {
1066 16 : ENTRY1Q( TABLE, USER_NAME, XML_ATACTION_RENAME,
1067 : XML_NAMESPACE_TABLE, XML_USERNAME ),
1068 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1069 16 : };
1070 :
1071 : // OASIS_CHART_ACTIONS
1072 : static XMLTransformerActionInit aChartActionTable[] =
1073 : {
1074 : ENTRY0( CHART, CLASS, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX ),
1075 : ENTRY1( DRAW, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
1076 : XML_FAMILY_TYPE_GRAPHIC ),
1077 : ENTRY0( SVG, WIDTH, XML_ATACTION_IN2INCH ),
1078 : ENTRY0( SVG, HEIGHT, XML_ATACTION_IN2INCH ),
1079 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1080 : };
1081 :
1082 : // OASIS_FORM_ACTIONS
1083 : static XMLTransformerActionInit aFormActionTable[] =
1084 : {
1085 16 : ENTRY2QN( FORM, CONTROL_IMPLEMENTATION,
1086 : XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX,
1087 : XML_NAMESPACE_FORM, XML_SERVICE_NAME,
1088 : XML_NAMESPACE_OOO ),
1089 : ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_False ),
1090 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1091 16 : };
1092 :
1093 : // OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
1094 : static XMLTransformerActionInit aAlphabeticalIndexMarkActionTable[] =
1095 : {
1096 16 : ENTRY1Q( TEXT, MAIN_ENTRY, XML_ATACTION_RENAME,
1097 : XML_NAMESPACE_TEXT, XML_MAIN_ETRY ),
1098 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1099 16 : };
1100 :
1101 : // OASIS_DRAW_AREA_POLYGON_ACTIONS (to be added to OASIS_SHAPE_ACTIONS)
1102 : static XMLTransformerActionInit aDrawAreaPolygonActionTable[] =
1103 : {
1104 16 : ENTRY1Q( DRAW, POINTS, XML_ATACTION_RENAME,
1105 : XML_NAMESPACE_SVG, XML_POINTS ),
1106 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1107 16 : };
1108 :
1109 : // OASIS_SCRIPT_ACTIONS
1110 : static XMLTransformerActionInit aScriptActionTable[] =
1111 : {
1112 : ENTRY1( SCRIPT, LANGUAGE, XML_ATACTION_REMOVE_NAMESPACE_PREFIX, XML_NAMESPACE_OOO ),
1113 16 : ENTRY1Q( OOO, NAME, XML_ATACTION_RENAME, XML_NAMESPACE_SCRIPT, XML_NAME ),
1114 16 : ENTRY1Q( OOO, READONLY, XML_ATACTION_RENAME, XML_NAMESPACE_SCRIPT, XML_READONLY ),
1115 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1116 32 : };
1117 :
1118 : // OASIS_DATETIME_ACTIONS
1119 : static XMLTransformerActionInit aDateTimeActionTable[] =
1120 : {
1121 : ENTRY0( TEXT, DATE_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1122 : ENTRY0( TEXT, TIME_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1123 : ENTRY0( TEXT, DATE_ADJUST, XML_ATACTION_RNG2ISO_DATETIME ),
1124 : ENTRY0( TEXT, TIME_ADJUST, XML_ATACTION_RNG2ISO_DATETIME ),
1125 : ENTRY0( TEXT, DURATION, XML_ATACTION_RNG2ISO_DATETIME ),
1126 : ENTRY0( OFFICE, DATE_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1127 : ENTRY0( OFFICE, TIME_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1128 : ENTRY0( FORM, VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1129 : ENTRY0( FORM, CURRENT_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1130 : ENTRY0( TABLE, DATE_START, XML_ATACTION_RNG2ISO_DATETIME ),
1131 : ENTRY0( TABLE, DATE_END, XML_ATACTION_RNG2ISO_DATETIME ),
1132 : ENTRY0( TABLE, REFRESH_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1133 : ENTRY0( PRESENTATION, DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1134 : ENTRY0( PRESENTATION, PAUSE, XML_ATACTION_RNG2ISO_DATETIME ),
1135 : ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1136 : };
1137 :
1138 : static XMLTokenEnum aTokenMap[] =
1139 : {
1140 : XML_NONE, XML_SOLID, XML_DOTTED, XML_DASH, XML_LONG_DASH, XML_DOT_DASH,
1141 : XML_DOT_DOT_DASH, XML_WAVE, XML_SMALL_WAVE, XML_TOKEN_END
1142 : };
1143 :
1144 : class XMLTableTransformerContext_Impl : public XMLTransformerContext
1145 : {
1146 : OUString m_aElemQName;
1147 :
1148 : public:
1149 : TYPEINFO_OVERRIDE();
1150 :
1151 : XMLTableTransformerContext_Impl( XMLTransformerBase& rTransformer,
1152 : const OUString& rQName );
1153 :
1154 : virtual ~XMLTableTransformerContext_Impl();
1155 :
1156 : virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
1157 : virtual void EndElement() SAL_OVERRIDE;
1158 : };
1159 :
1160 0 : TYPEINIT1( XMLTableTransformerContext_Impl, XMLTransformerContext );
1161 :
1162 0 : XMLTableTransformerContext_Impl::XMLTableTransformerContext_Impl(
1163 : XMLTransformerBase& rImp,
1164 : const OUString& rQName ) :
1165 : XMLTransformerContext( rImp, rQName ),
1166 0 : m_aElemQName( rQName )
1167 : {
1168 0 : }
1169 :
1170 0 : XMLTableTransformerContext_Impl::~XMLTableTransformerContext_Impl()
1171 : {
1172 0 : }
1173 :
1174 0 : void XMLTableTransformerContext_Impl::StartElement(
1175 : const Reference< XAttributeList >& rAttrList )
1176 : {
1177 0 : Reference< XAttributeList > xAttrList( rAttrList );
1178 :
1179 0 : XMLMutableAttributeList *pMutableAttrList = 0;
1180 :
1181 0 : sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1182 0 : for( sal_Int16 i=0; i < nAttrCount; i++ )
1183 : {
1184 0 : const OUString& rAttrName = xAttrList->getNameByIndex( i );
1185 0 : OUString aLocalName;
1186 : sal_uInt16 nPrefix =
1187 0 : GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1188 0 : &aLocalName );
1189 0 : if( XML_NAMESPACE_TABLE == nPrefix )
1190 : {
1191 0 : if ( IsXMLToken( aLocalName, XML_IS_SUB_TABLE ) )
1192 : {
1193 0 : const OUString& rValue = xAttrList->getValueByIndex( i );
1194 0 : if( IsXMLToken( rValue, XML_TRUE ) )
1195 : {
1196 0 : m_aElemQName = GetTransformer().GetNamespaceMap().GetQNameByKey(
1197 : XML_NAMESPACE_TABLE,
1198 0 : ::xmloff::token::GetXMLToken( XML_SUB_TABLE ) );
1199 0 : if ( !pMutableAttrList )
1200 : {
1201 : pMutableAttrList =
1202 0 : new XMLMutableAttributeList( xAttrList );
1203 0 : xAttrList = pMutableAttrList;
1204 : }
1205 0 : pMutableAttrList->RemoveAttributeByIndex( i );
1206 0 : }
1207 : // OD 2005-07-05 #i50521# - no break here for savety reason.
1208 : }
1209 : // Convert attribute table:style-name for <table:table> (#i40011#, #i40015#)
1210 0 : else if ( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
1211 : {
1212 0 : const OUString& rValue = xAttrList->getValueByIndex( i );
1213 0 : OUString aAttrValue( rValue );
1214 0 : if( XMLTransformerBase::DecodeStyleName(aAttrValue) )
1215 : {
1216 0 : if ( !pMutableAttrList )
1217 : {
1218 : pMutableAttrList =
1219 0 : new XMLMutableAttributeList( xAttrList );
1220 0 : xAttrList = pMutableAttrList;
1221 : }
1222 0 : pMutableAttrList->SetValueByIndex( i, aAttrValue );
1223 0 : }
1224 : }
1225 0 : else if( IsXMLToken( aLocalName, XML_PRINT ) )
1226 : {
1227 0 : if ( !pMutableAttrList )
1228 : {
1229 : pMutableAttrList =
1230 0 : new XMLMutableAttributeList( xAttrList );
1231 0 : xAttrList = pMutableAttrList;
1232 : }
1233 0 : pMutableAttrList->RemoveAttributeByIndex( i );
1234 : }
1235 : }
1236 0 : }
1237 :
1238 0 : GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1239 0 : }
1240 :
1241 0 : void XMLTableTransformerContext_Impl::EndElement()
1242 : {
1243 0 : GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1244 0 : }
1245 :
1246 : class XMLBodyOASISTransformerContext_Impl : public XMLTransformerContext
1247 : {
1248 : bool m_bFirstChild;
1249 :
1250 : public:
1251 : TYPEINFO_OVERRIDE();
1252 :
1253 : XMLBodyOASISTransformerContext_Impl( XMLTransformerBase& rTransformer,
1254 : const OUString& rQName );
1255 :
1256 : virtual ~XMLBodyOASISTransformerContext_Impl();
1257 :
1258 : virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
1259 :
1260 : virtual XMLTransformerContext *CreateChildContext( sal_uInt16 nPrefix,
1261 : const OUString& rLocalName,
1262 : const OUString& rQName,
1263 : const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
1264 : virtual void EndElement() SAL_OVERRIDE;
1265 : };
1266 :
1267 0 : TYPEINIT1( XMLBodyOASISTransformerContext_Impl, XMLTransformerContext );
1268 :
1269 2 : XMLBodyOASISTransformerContext_Impl::XMLBodyOASISTransformerContext_Impl(
1270 : XMLTransformerBase& rImp,
1271 : const OUString& rQName ) :
1272 : XMLTransformerContext( rImp, rQName ),
1273 2 : m_bFirstChild( false )
1274 : {
1275 2 : }
1276 :
1277 4 : XMLBodyOASISTransformerContext_Impl::~XMLBodyOASISTransformerContext_Impl()
1278 : {
1279 4 : }
1280 :
1281 2 : void XMLBodyOASISTransformerContext_Impl::StartElement(
1282 : const Reference< XAttributeList >& )
1283 : {
1284 2 : }
1285 :
1286 2 : XMLTransformerContext* XMLBodyOASISTransformerContext_Impl::CreateChildContext( sal_uInt16 nPrefix,
1287 : const OUString& rLocalName,
1288 : const OUString& rQName,
1289 : const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList )
1290 : {
1291 2 : if (!m_bFirstChild)
1292 : {
1293 2 : m_bFirstChild = true;
1294 2 : XMLTransformerContext::StartElement(xAttrList);
1295 : }
1296 :
1297 2 : return XMLTransformerContext::CreateChildContext(nPrefix, rLocalName, rQName, xAttrList);
1298 : }
1299 :
1300 2 : void XMLBodyOASISTransformerContext_Impl::EndElement()
1301 : {
1302 2 : if (!m_bFirstChild)
1303 0 : XMLTransformerContext::StartElement(Reference< XAttributeList >());
1304 :
1305 2 : XMLTransformerContext::EndElement();
1306 2 : }
1307 :
1308 : class XMLTabStopOASISTContext_Impl : public XMLPersElemContentTContext
1309 : {
1310 : public:
1311 : TYPEINFO_OVERRIDE();
1312 :
1313 : XMLTabStopOASISTContext_Impl( XMLTransformerBase& rTransformer,
1314 : const OUString& rQName );
1315 :
1316 : virtual ~XMLTabStopOASISTContext_Impl();
1317 :
1318 : virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
1319 : };
1320 :
1321 0 : TYPEINIT1( XMLTabStopOASISTContext_Impl, XMLPersElemContentTContext );
1322 :
1323 0 : XMLTabStopOASISTContext_Impl::XMLTabStopOASISTContext_Impl(
1324 : XMLTransformerBase& rImp,
1325 : const OUString& rQName ) :
1326 0 : XMLPersElemContentTContext( rImp, rQName )
1327 : {
1328 0 : }
1329 :
1330 0 : XMLTabStopOASISTContext_Impl::~XMLTabStopOASISTContext_Impl()
1331 : {
1332 0 : }
1333 :
1334 0 : void XMLTabStopOASISTContext_Impl::StartElement(
1335 : const Reference< XAttributeList >& rAttrList )
1336 : {
1337 : XMLTransformerActions *pActions =
1338 0 : GetTransformer().GetUserDefinedActions( OASIS_TAB_STOP_ACTIONS );
1339 : SAL_WARN_IF( NULL == pActions, "xmloff.transform", "got no actions" );
1340 :
1341 0 : sal_Unicode cStyleLeaderChar = 0;
1342 0 : sal_Int16 nLeaderText = -1;
1343 0 : Reference< XAttributeList > xAttrList( rAttrList );
1344 0 : XMLMutableAttributeList *pMutableAttrList = 0;
1345 0 : sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1346 0 : for( sal_Int16 i=0; i < nAttrCount; i++ )
1347 : {
1348 0 : const OUString& rAttrName = xAttrList->getNameByIndex( i );
1349 0 : OUString aLocalName;
1350 : sal_uInt16 nPrefix =
1351 0 : GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1352 0 : &aLocalName );
1353 0 : XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
1354 : XMLTransformerActions::const_iterator aIter =
1355 0 : pActions->find( aKey );
1356 0 : if( !(aIter == pActions->end() ) )
1357 : {
1358 0 : if( !pMutableAttrList )
1359 : {
1360 : pMutableAttrList =
1361 0 : new XMLMutableAttributeList( xAttrList );
1362 0 : xAttrList = pMutableAttrList;
1363 : }
1364 0 : const OUString& rAttrValue = xAttrList->getValueByIndex( i );
1365 0 : switch( (*aIter).second.m_nActionType )
1366 : {
1367 : case XML_ATACTION_REMOVE:
1368 0 : if( IsXMLToken( aLocalName, XML_LEADER_STYLE ) )
1369 : {
1370 0 : if( IsXMLToken( rAttrValue, XML_NONE ) )
1371 0 : cStyleLeaderChar = ' ';
1372 0 : else if( IsXMLToken( rAttrValue, XML_DOTTED ) )
1373 0 : cStyleLeaderChar = '.';
1374 : else
1375 0 : cStyleLeaderChar = 0;
1376 0 : pMutableAttrList->RemoveAttributeByIndex( i );
1377 0 : --i;
1378 0 : --nAttrCount;
1379 : }
1380 0 : break;
1381 : case XML_ATACTION_RENAME:
1382 : {
1383 : OUString aNewAttrQName(
1384 0 : GetTransformer().GetNamespaceMap().GetQNameByKey(
1385 0 : (*aIter).second.GetQNamePrefixFromParam1(),
1386 : ::xmloff::token::GetXMLToken(
1387 0 : (*aIter).second.GetQNameTokenFromParam1()) ) );
1388 : pMutableAttrList->RenameAttributeByIndex( i,
1389 0 : aNewAttrQName );
1390 : }
1391 0 : if( IsXMLToken( aLocalName, XML_LEADER_TEXT ) )
1392 : {
1393 0 : if( rAttrValue.getLength() > 1 )
1394 : {
1395 0 : OUString aAttrValue( rAttrValue.copy( 0, 1 ) );
1396 0 : pMutableAttrList->SetValueByIndex( i, aAttrValue );
1397 0 : nLeaderText = i;
1398 : }
1399 : }
1400 0 : break;
1401 : case XML_ATACTION_IN2INCH:
1402 : {
1403 0 : OUString aAttrValue( rAttrValue );
1404 0 : if( XMLTransformerBase::ReplaceSingleInWithInch(
1405 : aAttrValue ) )
1406 0 : pMutableAttrList->SetValueByIndex( i, aAttrValue );
1407 : }
1408 0 : break;
1409 : default:
1410 : SAL_WARN( "xmloff.transform", "unknown action" );
1411 0 : break;
1412 0 : }
1413 : }
1414 0 : }
1415 :
1416 0 : if( cStyleLeaderChar && ' ' != cStyleLeaderChar )
1417 : {
1418 0 : if( nLeaderText != -1 )
1419 : {
1420 : OUString aNewAttrQName(
1421 0 : GetTransformer().GetNamespaceMap().GetQNameByKey(
1422 : XML_NAMESPACE_STYLE,
1423 0 : ::xmloff::token::GetXMLToken( XML_LEADER_CHAR ) ) );
1424 : pMutableAttrList->AddAttribute( aNewAttrQName,
1425 0 : OUString( cStyleLeaderChar ) );
1426 0 : }
1427 : }
1428 : else
1429 : {
1430 0 : if( nLeaderText != -1 )
1431 0 : pMutableAttrList->RemoveAttributeByIndex( nLeaderText );
1432 : }
1433 :
1434 0 : XMLPersElemContentTContext::StartElement( xAttrList );
1435 0 : }
1436 :
1437 : class XMLConfigItemTContext_Impl : public XMLTransformerContext
1438 : {
1439 : OUString m_aContent;
1440 : bool m_bIsRedlineProtectionKey;
1441 : bool m_bIsCursorX;
1442 : bool m_bIsCursorY;
1443 :
1444 : public:
1445 :
1446 : TYPEINFO_OVERRIDE();
1447 :
1448 : XMLConfigItemTContext_Impl( XMLTransformerBase& rTransformer,
1449 : const OUString& rQName );
1450 :
1451 : virtual ~XMLConfigItemTContext_Impl();
1452 :
1453 : virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
1454 : virtual void EndElement() SAL_OVERRIDE;
1455 :
1456 : virtual void Characters( const OUString& rChars ) SAL_OVERRIDE;
1457 : };
1458 :
1459 0 : TYPEINIT1( XMLConfigItemTContext_Impl, XMLTransformerContext );
1460 :
1461 156 : XMLConfigItemTContext_Impl::XMLConfigItemTContext_Impl(
1462 : XMLTransformerBase& rImp,
1463 : const OUString& rQName ) :
1464 : XMLTransformerContext( rImp, rQName ),
1465 : m_bIsRedlineProtectionKey( false ),
1466 : m_bIsCursorX( false ),
1467 156 : m_bIsCursorY( false )
1468 : {
1469 156 : }
1470 :
1471 312 : XMLConfigItemTContext_Impl::~XMLConfigItemTContext_Impl()
1472 : {
1473 312 : }
1474 :
1475 156 : void XMLConfigItemTContext_Impl::StartElement(
1476 : const Reference< XAttributeList >& rAttrList )
1477 : {
1478 156 : Reference< XAttributeList > xAttrList( rAttrList );
1479 :
1480 156 : sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1481 156 : for( sal_Int16 i=0; i < nAttrCount; i++ )
1482 : {
1483 156 : const OUString& rAttrName = xAttrList->getNameByIndex( i );
1484 156 : OUString aLocalName;
1485 : sal_uInt16 nPrefix =
1486 156 : GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1487 156 : &aLocalName );
1488 156 : if( XML_NAMESPACE_CONFIG == nPrefix )
1489 : {
1490 156 : if ( IsXMLToken( aLocalName, XML_NAME ) )
1491 : {
1492 156 : const OUString& rValue = xAttrList->getValueByIndex( i );
1493 156 : const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
1494 156 : const sal_Char sCursorX[] = "CursorPositionX";
1495 156 : const sal_Char sCursorY[] = "CursorPositionY";
1496 156 : if( rValue.equalsAsciiL( sRedlineProtectionKey, sizeof(sRedlineProtectionKey)-1 ) )
1497 0 : m_bIsRedlineProtectionKey = true;
1498 156 : else if( rValue.equalsAsciiL( sCursorX, sizeof(sCursorX)-1 ) )
1499 0 : m_bIsCursorX = true;
1500 156 : else if( rValue.equalsAsciiL( sCursorY, sizeof(sCursorY)-1 ) )
1501 0 : m_bIsCursorY = true;
1502 :
1503 156 : break;
1504 : }
1505 : }
1506 0 : }
1507 :
1508 156 : XMLTransformerContext::StartElement( xAttrList );
1509 156 : }
1510 :
1511 150 : void XMLConfigItemTContext_Impl::Characters( const OUString& rChars )
1512 : {
1513 150 : OUString sChars(rChars);
1514 150 : if (m_bIsRedlineProtectionKey)
1515 0 : m_aContent += rChars;
1516 150 : else if (m_bIsCursorX || m_bIsCursorY)
1517 : {
1518 0 : sal_Int32 nPos = rChars.toInt32();
1519 0 : if (m_bIsCursorX && nPos > 255)
1520 0 : nPos = 255;
1521 0 : else if (m_bIsCursorY && nPos > 31999)
1522 0 : nPos = 31999;
1523 :
1524 0 : sChars = OUString::number(nPos);
1525 : }
1526 :
1527 150 : XMLTransformerContext::Characters( sChars );
1528 150 : }
1529 :
1530 156 : void XMLConfigItemTContext_Impl::EndElement()
1531 : {
1532 :
1533 156 : if( m_bIsRedlineProtectionKey )
1534 : {
1535 : const Reference< XPropertySet > rPropSet =
1536 0 : GetTransformer().GetPropertySet();
1537 0 : if( rPropSet.is() )
1538 : {
1539 0 : const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
1540 0 : OUString aPropName(sRedlineProtectionKey);
1541 : Reference< XPropertySetInfo > xPropSetInfo(
1542 0 : rPropSet->getPropertySetInfo() );
1543 0 : if( xPropSetInfo.is() &&
1544 0 : xPropSetInfo->hasPropertyByName( aPropName ) )
1545 : {
1546 0 : Sequence < sal_Int8 > aKey;
1547 0 : ::sax::Converter::decodeBase64( aKey, m_aContent );
1548 0 : rPropSet->setPropertyValue( aPropName, makeAny( aKey ) );
1549 0 : }
1550 0 : }
1551 : }
1552 156 : XMLTransformerContext::EndElement();
1553 156 : }
1554 :
1555 : class XMLTrackedChangesOASISTContext_Impl : public XMLTransformerContext
1556 : {
1557 : OUString m_aAttrQName;
1558 :
1559 : public:
1560 :
1561 : TYPEINFO_OVERRIDE();
1562 :
1563 : XMLTrackedChangesOASISTContext_Impl( XMLTransformerBase& rTransformer,
1564 : const OUString& rQName,
1565 : sal_uInt16 nPrefix,
1566 : XMLTokenEnum eToken );
1567 :
1568 : virtual ~XMLTrackedChangesOASISTContext_Impl();
1569 :
1570 : virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
1571 : };
1572 :
1573 0 : TYPEINIT1( XMLTrackedChangesOASISTContext_Impl, XMLTransformerContext );
1574 :
1575 0 : XMLTrackedChangesOASISTContext_Impl::XMLTrackedChangesOASISTContext_Impl(
1576 : XMLTransformerBase& rImp,
1577 : const OUString& rQName,
1578 : sal_uInt16 nPrefix,
1579 : XMLTokenEnum eToken ) :
1580 : XMLTransformerContext( rImp, rQName ),
1581 0 : m_aAttrQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
1582 0 : GetXMLToken(eToken)) )
1583 : {
1584 0 : }
1585 :
1586 0 : XMLTrackedChangesOASISTContext_Impl::~XMLTrackedChangesOASISTContext_Impl()
1587 : {
1588 0 : }
1589 :
1590 0 : void XMLTrackedChangesOASISTContext_Impl::StartElement(
1591 : const Reference< XAttributeList >& rAttrList )
1592 : {
1593 0 : Reference< XAttributeList > xAttrList( rAttrList );
1594 : const Reference< XPropertySet > rPropSet =
1595 0 : GetTransformer().GetPropertySet();
1596 0 : if( rPropSet.is() )
1597 : {
1598 0 : const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
1599 0 : OUString aPropName(sRedlineProtectionKey);
1600 : Reference< XPropertySetInfo > xPropSetInfo(
1601 0 : rPropSet->getPropertySetInfo() );
1602 0 : if( xPropSetInfo.is() &&
1603 0 : xPropSetInfo->hasPropertyByName( aPropName ) )
1604 : {
1605 0 : Any aAny = rPropSet->getPropertyValue( aPropName);
1606 0 : Sequence < sal_Int8 > aKey;
1607 0 : aAny >>= aKey;
1608 0 : if( aKey.getLength() )
1609 : {
1610 0 : OUStringBuffer aBuffer;
1611 0 : ::sax::Converter::encodeBase64( aBuffer, aKey );
1612 : XMLMutableAttributeList *pMutableAttrList =
1613 0 : new XMLMutableAttributeList( xAttrList );
1614 0 : xAttrList = pMutableAttrList;
1615 : pMutableAttrList->AddAttribute( m_aAttrQName,
1616 0 : aBuffer.makeStringAndClear() );
1617 0 : }
1618 0 : }
1619 : }
1620 0 : XMLTransformerContext::StartElement( xAttrList );
1621 0 : }
1622 :
1623 226 : XMLTransformerContext *Oasis2OOoTransformer::CreateUserDefinedContext(
1624 : const TransformerAction_Impl& rAction,
1625 : const OUString& rQName,
1626 : bool bPersistent )
1627 : {
1628 226 : switch( rAction.m_nActionType )
1629 : {
1630 : case XML_ETACTION_META:
1631 2 : return new XMLMetaTransformerContext( *this, rQName );
1632 : case XML_ETACTION_DOCUMENT:
1633 2 : return new XMLDocumentTransformerContext( *this, rQName );
1634 : case XML_ETACTION_BODY:
1635 2 : return new XMLBodyOASISTransformerContext_Impl( *this, rQName );
1636 : case XML_ETACTION_NOTES:
1637 : return new XMLNotesTransformerContext( *this, rQName,
1638 0 : static_cast< XMLTokenEnum>( rAction.m_nParam1 ), bPersistent );
1639 : case XML_ETACTION_TABLE:
1640 0 : return new XMLTableTransformerContext_Impl( *this, rQName );
1641 : case XML_ETACTION_STYLE:
1642 62 : return new XMLStyleOASISTContext( *this, rQName, bPersistent );
1643 : case XML_ETACTION_STYLE_RENAME:
1644 : return new XMLStyleOASISTContext( *this, rQName,
1645 2 : rAction.GetQNamePrefixFromParam1(),
1646 2 : rAction.GetQNameTokenFromParam1(), bPersistent );
1647 : case XML_ETACTION_FRAME:
1648 0 : return new XMLFrameOASISTransformerContext( *this, rQName );
1649 : case XML_ETACTION_EVENT:
1650 0 : return new XMLEventOASISTransformerContext( *this, rQName );
1651 : case XML_ETACTION_DLG:
1652 0 : return new XMLDlgOASISTransformerContext( *this, rQName );
1653 : case XML_ETACTION_TAB_STOP:
1654 0 : return new XMLTabStopOASISTContext_Impl( *this, rQName );
1655 : case XML_ETACTION_FORM_CONTROL:
1656 : {
1657 0 : const XMLTransformerContext *pCurrent = GetCurrentContext();
1658 : return new XMLControlOASISTransformerContext( *this, rQName,
1659 : pCurrent ? pCurrent->HasQName( XML_NAMESPACE_FORM,
1660 0 : XML_FORM ) : sal_False );
1661 : }
1662 : case XML_ETACTION_FORM_PROPERTY:
1663 : return new XMLFormPropOASISTransformerContext( *this, rQName,
1664 0 : static_cast< XMLTokenEnum >( rAction.m_nParam1 ) );
1665 : case XML_ETACTION_CHART:
1666 0 : return new XMLChartOASISTransformerContext( *this, rQName );
1667 : case XML_ETACTION_CONFIG_ITEM:
1668 156 : return new XMLConfigItemTContext_Impl( *this, rQName );
1669 : case XML_ETACTION_TRACKED_CHANGES:
1670 : return new XMLTrackedChangesOASISTContext_Impl( *this, rQName,
1671 0 : rAction.GetQNamePrefixFromParam1(),
1672 0 : rAction.GetQNameTokenFromParam1() );
1673 : case XML_ETACTION_CHART_PLOT_AREA:
1674 0 : return new XMLChartPlotAreaOASISTContext( *this, rQName );
1675 : default:
1676 : SAL_WARN( "xmloff.transform", "no user defined context found!" );
1677 0 : break;
1678 : }
1679 :
1680 : // default is copying
1681 0 : return new XMLTransformerContext( *this, rQName );
1682 : }
1683 :
1684 198 : XMLTransformerActions *Oasis2OOoTransformer::GetUserDefinedActions(
1685 : sal_uInt16 n )
1686 : {
1687 198 : XMLTransformerActions *pActions = 0;
1688 198 : if( n < MAX_OASIS_ACTIONS )
1689 : {
1690 198 : if( !m_aActions[n] )
1691 : {
1692 24 : if( n<MAX_OASIS_PROP_ACTIONS )
1693 : {
1694 12 : m_aActions[n] =
1695 12 : XMLStyleOASISTContext::CreateTransformerActions( n );
1696 : }
1697 12 : else switch( n )
1698 : {
1699 : case OASIS_STYLE_ACTIONS:
1700 : m_aActions[OASIS_STYLE_ACTIONS] =
1701 2 : new XMLTransformerActions( aStyleActionTable );
1702 2 : break;
1703 : case OASIS_FONT_FACE_ACTIONS:
1704 : m_aActions[OASIS_FONT_FACE_ACTIONS] =
1705 2 : new XMLTransformerActions( aFontFaceActionTable );
1706 2 : break;
1707 : case OASIS_SHAPE_ACTIONS:
1708 : m_aActions[OASIS_SHAPE_ACTIONS] =
1709 0 : new XMLTransformerActions( aShapeActionTable );
1710 0 : break;
1711 : case OASIS_CONNECTOR_ACTIONS:
1712 : m_aActions[OASIS_CONNECTOR_ACTIONS] =
1713 0 : new XMLTransformerActions( aConnectorActionTable );
1714 0 : break;
1715 : case OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS:
1716 : m_aActions[OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS] =
1717 0 : new XMLTransformerActions( aIndexEntryTabStopActionTable );
1718 0 : break;
1719 : case OASIS_TAB_STOP_ACTIONS:
1720 : m_aActions[OASIS_TAB_STOP_ACTIONS] =
1721 0 : new XMLTransformerActions( aTabStopActionTable );
1722 0 : break;
1723 : case OASIS_LINENUMBERING_ACTIONS:
1724 : m_aActions[OASIS_LINENUMBERING_ACTIONS] =
1725 0 : new XMLTransformerActions( aLineNumberingActionTable );
1726 0 : break;
1727 : case OASIS_FOOTNOTE_SEP_ACTIONS:
1728 : m_aActions[OASIS_FOOTNOTE_SEP_ACTIONS] =
1729 0 : new XMLTransformerActions( aFootnoteSepActionTable );
1730 0 : break;
1731 : case OASIS_DROP_CAP_ACTIONS:
1732 : m_aActions[OASIS_DROP_CAP_ACTIONS] =
1733 0 : new XMLTransformerActions( aDropCapActionTable );
1734 0 : break;
1735 : case OASIS_COLUMNS_ACTIONS:
1736 : m_aActions[OASIS_COLUMNS_ACTIONS] =
1737 0 : new XMLTransformerActions( aColumnsActionTable );
1738 0 : break;
1739 : case OASIS_TEXT_VALUE_TYPE_ACTIONS:
1740 : m_aActions[OASIS_TEXT_VALUE_TYPE_ACTIONS] =
1741 0 : new XMLTransformerActions( aTextValueTypeActionTable );
1742 0 : break;
1743 : case OASIS_TABLE_VALUE_TYPE_ACTIONS:
1744 : m_aActions[OASIS_TABLE_VALUE_TYPE_ACTIONS] =
1745 0 : new XMLTransformerActions( aTableValueTypeActionTable );
1746 0 : break;
1747 : case OASIS_PARA_ACTIONS:
1748 : m_aActions[OASIS_PARA_ACTIONS] =
1749 0 : new XMLTransformerActions( aParaActionTable );
1750 0 : break;
1751 : case OASIS_LIST_STYLE_REF_ACTIONS:
1752 : m_aActions[OASIS_LIST_STYLE_REF_ACTIONS] =
1753 0 : new XMLTransformerActions( aListStyleRefActionTable );
1754 0 : break;
1755 : case OASIS_TEXT_STYLE_REF_ACTIONS:
1756 : m_aActions[OASIS_TEXT_STYLE_REF_ACTIONS] =
1757 0 : new XMLTransformerActions( aTextStyleRefActionTable );
1758 0 : break;
1759 : case OASIS_PARA_STYLE_REF_ACTIONS:
1760 : m_aActions[OASIS_PARA_STYLE_REF_ACTIONS] =
1761 0 : new XMLTransformerActions( aParaStyleRefActionTable );
1762 0 : break;
1763 : case OASIS_MASTER_PAGE_REF_ACTIONS:
1764 : m_aActions[OASIS_MASTER_PAGE_REF_ACTIONS] =
1765 2 : new XMLTransformerActions( aMasterPageRefActionTable );
1766 2 : break;
1767 : case OASIS_MAP_STYLE_REF_ACTIONS:
1768 : m_aActions[OASIS_MAP_STYLE_REF_ACTIONS] =
1769 0 : new XMLTransformerActions( aMapStyleRefActionTable );
1770 0 : break;
1771 : case OASIS_MASTER_PAGE_ACTIONS:
1772 : m_aActions[OASIS_MASTER_PAGE_ACTIONS] =
1773 2 : new XMLTransformerActions( aMasterPageActionTable );
1774 2 : break;
1775 : case OASIS_NOTES_ACTIONS:
1776 : m_aActions[OASIS_NOTES_ACTIONS] =
1777 0 : new XMLTransformerActions( aNotesActionTable );
1778 0 : break;
1779 : case OASIS_ANNOTATION_ACTIONS:
1780 : m_aActions[OASIS_ANNOTATION_ACTIONS] =
1781 0 : new XMLTransformerActions( aAnnotationActionTable );
1782 0 : break;
1783 : case OASIS_CHANGE_INFO_ACTIONS:
1784 : m_aActions[OASIS_CHANGE_INFO_ACTIONS] =
1785 0 : new XMLTransformerActions( aChangeInfoActionTable );
1786 0 : break;
1787 : case OASIS_FRAME_ELEM_ACTIONS:
1788 : m_aActions[OASIS_FRAME_ELEM_ACTIONS] =
1789 0 : new XMLTransformerActions( aFrameActionTable );
1790 0 : break;
1791 : case OASIS_BACKGROUND_IMAGE_ACTIONS:
1792 : m_aActions[OASIS_BACKGROUND_IMAGE_ACTIONS] =
1793 0 : new XMLTransformerActions( aBackgroundImageActionTable );
1794 0 : break;
1795 : case OASIS_DDE_CONNECTION_DECL_ACTIONS:
1796 : m_aActions[OASIS_DDE_CONNECTION_DECL_ACTIONS] =
1797 0 : new XMLTransformerActions( aDDEConnectionDeclActionTable );
1798 0 : break;
1799 : case OASIS_EVENT_ACTIONS:
1800 : m_aActions[OASIS_EVENT_ACTIONS] =
1801 0 : new XMLTransformerActions( aEventActionTable );
1802 0 : break;
1803 : case OASIS_DLG_ACTIONS:
1804 : m_aActions[OASIS_DLG_ACTIONS] =
1805 0 : new XMLTransformerActions( aDlgActionTable );
1806 0 : break;
1807 : case OASIS_FORM_CONTROL_ACTIONS:
1808 : m_aActions[OASIS_FORM_CONTROL_ACTIONS] =
1809 0 : new XMLTransformerActions( aFormControlActionTable );
1810 0 : break;
1811 : case OASIS_FORM_COLUMN_ACTIONS:
1812 : m_aActions[OASIS_FORM_COLUMN_ACTIONS] =
1813 0 : new XMLTransformerActions( aFormColumnActionTable );
1814 0 : break;
1815 : case OASIS_FORM_PROP_ACTIONS:
1816 : m_aActions[OASIS_FORM_PROP_ACTIONS] =
1817 0 : new XMLTransformerActions( aFormPropActionTable );
1818 0 : break;
1819 : case OASIS_XLINK_ACTIONS:
1820 : m_aActions[OASIS_XLINK_ACTIONS] =
1821 0 : new XMLTransformerActions( aXLinkActionTable );
1822 0 : break;
1823 : case OASIS_CONFIG_ITEM_SET_ACTIONS:
1824 : m_aActions[OASIS_CONFIG_ITEM_SET_ACTIONS] =
1825 2 : new XMLTransformerActions( aConfigItemSetActionTable );
1826 2 : break;
1827 : case OASIS_FORMULA_ACTIONS:
1828 : m_aActions[OASIS_FORMULA_ACTIONS] =
1829 0 : new XMLTransformerActions( aFormulaActionTable );
1830 0 : break;
1831 : case OASIS_CHART_ACTIONS:
1832 : m_aActions[OASIS_CHART_ACTIONS] =
1833 0 : new XMLTransformerActions( aChartActionTable );
1834 0 : break;
1835 : case OASIS_FORM_ACTIONS:
1836 : m_aActions[OASIS_FORM_ACTIONS] =
1837 0 : new XMLTransformerActions( aFormActionTable );
1838 0 : break;
1839 : case OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS:
1840 : m_aActions[OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS] =
1841 : new XMLTransformerActions(
1842 0 : aAlphabeticalIndexMarkActionTable );
1843 0 : break;
1844 : case OASIS_CONTENT_VALIDATION_ACTIONS:
1845 : m_aActions[OASIS_CONTENT_VALIDATION_ACTIONS] =
1846 0 : new XMLTransformerActions( aContentValidationActionTable );
1847 0 : break;
1848 : case OASIS_DDE_CONV_MODE_ACTIONS:
1849 : m_aActions[OASIS_DDE_CONV_MODE_ACTIONS] =
1850 0 : new XMLTransformerActions( aDDEConvModeActionTable );
1851 0 : break;
1852 : case OASIS_DATAPILOT_MEMBER_ACTIONS:
1853 : m_aActions[OASIS_DATAPILOT_MEMBER_ACTIONS] =
1854 0 : new XMLTransformerActions( aDataPilotMemberActionTable );
1855 0 : break;
1856 : case OASIS_DATAPILOT_LEVEL_ACTIONS:
1857 : m_aActions[OASIS_DATAPILOT_LEVEL_ACTIONS] =
1858 0 : new XMLTransformerActions( aDataPilotLevelActionTable );
1859 0 : break;
1860 : case OASIS_SOURCE_SERVICE_ACTIONS:
1861 : m_aActions[OASIS_SOURCE_SERVICE_ACTIONS] =
1862 0 : new XMLTransformerActions( aSourceServiceActionTable );
1863 0 : break;
1864 : case OASIS_DRAW_AREA_POLYGON_ACTIONS:
1865 : m_aActions[OASIS_DRAW_AREA_POLYGON_ACTIONS] =
1866 0 : new XMLTransformerActions( aShapeActionTable );
1867 0 : m_aActions[OASIS_DRAW_AREA_POLYGON_ACTIONS]
1868 0 : ->Add( aDrawAreaPolygonActionTable );
1869 0 : break;
1870 : case OASIS_SCRIPT_ACTIONS:
1871 : m_aActions[OASIS_SCRIPT_ACTIONS] =
1872 2 : new XMLTransformerActions( aScriptActionTable );
1873 2 : break;
1874 : case OASIS_DATETIME_ACTIONS:
1875 : m_aActions[OASIS_DATETIME_ACTIONS] =
1876 0 : new XMLTransformerActions( aDateTimeActionTable );
1877 0 : break;
1878 : // Bugdoc with table won't load correctly (#i40011#, #i40015#)
1879 : case OASIS_TABLE_STYLE_REF_ACTIONS:
1880 : m_aActions[OASIS_TABLE_STYLE_REF_ACTIONS] =
1881 0 : new XMLTransformerActions( aTableStyleRefActionTable );
1882 0 : break;
1883 : case OASIS_ANIMATION_ACTIONS:
1884 : m_aActions[OASIS_ANIMATION_ACTIONS] =
1885 0 : new XMLTransformerActions( aAnimationActionTable );
1886 0 : break;
1887 : }
1888 : }
1889 198 : pActions = m_aActions[n];
1890 : }
1891 :
1892 198 : return pActions;
1893 : }
1894 :
1895 0 : OUString Oasis2OOoTransformer::GetEventName( const OUString& rName,
1896 : bool bForm )
1897 : {
1898 0 : if( bForm && !m_pFormEventMap )
1899 : m_pFormEventMap =
1900 0 : XMLEventOASISTransformerContext::CreateFormEventMap();
1901 0 : if( !m_pEventMap )
1902 0 : m_pEventMap = XMLEventOASISTransformerContext::CreateEventMap();
1903 :
1904 0 : OUString aMacroName;
1905 : sal_uInt16 nPrefix =
1906 0 : GetNamespaceMap().GetKeyByAttrName( rName, &aMacroName );
1907 : return XMLEventOASISTransformerContext::GetEventName(
1908 : nPrefix, aMacroName, *m_pEventMap,
1909 0 : bForm ? m_pFormEventMap : 0 );
1910 : }
1911 :
1912 4 : Oasis2OOoTransformer::Oasis2OOoTransformer() throw() :
1913 : XMLTransformerBase( aActionTable, aTokenMap ),
1914 : m_pEventMap( 0 ),
1915 4 : m_pFormEventMap( 0 )
1916 : {
1917 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
1918 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE );
1919 :
1920 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META), XML_NAMESPACE_META );
1921 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META_OOO), XML_NAMESPACE_META );
1922 :
1923 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
1924 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE_OOO), XML_NAMESPACE_STYLE );
1925 :
1926 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
1927 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER_OOO), XML_NAMESPACE_NUMBER );
1928 :
1929 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
1930 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG_OOO), XML_NAMESPACE_CONFIG );
1931 :
1932 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
1933 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT_OOO), XML_NAMESPACE_TEXT );
1934 :
1935 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
1936 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE_OOO), XML_NAMESPACE_TABLE );
1937 :
1938 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
1939 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW_OOO), XML_NAMESPACE_DRAW );
1940 :
1941 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
1942 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D_OOO), XML_NAMESPACE_DR3D );
1943 :
1944 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), GetXMLToken(XML_N_PRESENTATION), XML_NAMESPACE_PRESENTATION );
1945 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), GetXMLToken(XML_N_PRESENTATION_OOO), XML_NAMESPACE_PRESENTATION );
1946 :
1947 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
1948 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART_OOO), XML_NAMESPACE_CHART );
1949 :
1950 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
1951 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM_OOO), XML_NAMESPACE_FORM );
1952 :
1953 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
1954 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT_OOO), XML_NAMESPACE_SCRIPT );
1955 :
1956 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_DLG), GetXMLToken(XML_N_DLG), XML_NAMESPACE_DLG );
1957 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DLG), GetXMLToken(XML_N_DLG), XML_NAMESPACE_DLG );
1958 :
1959 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
1960 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO), XML_NAMESPACE_FO );
1961 :
1962 4 : GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
1963 4 : GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG), XML_NAMESPACE_SVG );
1964 :
1965 240 : for( sal_uInt16 i=0; i<MAX_OASIS_ACTIONS; ++i )
1966 236 : m_aActions[i] = 0;
1967 4 : }
1968 :
1969 12 : Oasis2OOoTransformer::~Oasis2OOoTransformer() throw()
1970 : {
1971 240 : for( sal_uInt16 i=0; i<MAX_OASIS_ACTIONS; ++i )
1972 236 : delete m_aActions[i];
1973 4 : XMLEventOASISTransformerContext::FlushEventMap( m_pEventMap );
1974 4 : XMLEventOASISTransformerContext::FlushEventMap( m_pFormEventMap );
1975 8 : }
1976 :
1977 : namespace
1978 : {
1979 : class theOasis2OOoTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOasis2OOoTransformerUnoTunnelId> {};
1980 : }
1981 :
1982 0 : const Sequence< sal_Int8 > & Oasis2OOoTransformer::getUnoTunnelId() throw()
1983 : {
1984 0 : return theOasis2OOoTransformerUnoTunnelId::get().getSeq();
1985 : }
1986 :
1987 : // XUnoTunnel
1988 0 : sal_Int64 SAL_CALL Oasis2OOoTransformer::getSomething( const Sequence< sal_Int8 >& rId )
1989 : throw(RuntimeException, std::exception)
1990 : {
1991 0 : if( rId.getLength() == 16
1992 0 : && 0 == memcmp( getUnoTunnelId().getConstArray(),
1993 0 : rId.getConstArray(), 16 ) )
1994 : {
1995 0 : return reinterpret_cast< sal_Int64 >( this );
1996 : }
1997 : else
1998 : {
1999 0 : return (sal_Int64)0;
2000 : }
2001 : }
2002 :
2003 : // XServiceInfo
2004 0 : OUString SAL_CALL Oasis2OOoTransformer::getImplementationName()
2005 : throw(RuntimeException, std::exception)
2006 : {
2007 0 : return Oasis2OOoTransformer_getImplementationName();
2008 : }
2009 :
2010 0 : sal_Bool SAL_CALL Oasis2OOoTransformer::supportsService( const OUString& ServiceName )
2011 : throw(RuntimeException, std::exception)
2012 : {
2013 0 : return cppu::supportsService(this, ServiceName);
2014 : }
2015 :
2016 0 : Sequence< OUString > SAL_CALL Oasis2OOoTransformer::getSupportedServiceNames( )
2017 : throw(RuntimeException, std::exception)
2018 : {
2019 0 : Sequence<OUString> aSeq(0);
2020 0 : return aSeq;
2021 : }
2022 :
2023 : // Service registration
2024 :
2025 56 : OUString SAL_CALL Oasis2OOoTransformer_getImplementationName() throw()
2026 : {
2027 56 : return OUString( "com.sun.star.comp.Oasis2OOoTransformer" );
2028 : }
2029 :
2030 2 : Sequence< OUString > SAL_CALL Oasis2OOoTransformer_getSupportedServiceNames()
2031 : throw()
2032 : {
2033 2 : const OUString aServiceName( Oasis2OOoTransformer_getImplementationName() );
2034 2 : const Sequence< OUString > aSeq( &aServiceName, 1 );
2035 2 : return aSeq;
2036 : }
2037 :
2038 4 : Reference< XInterface > SAL_CALL Oasis2OOoTransformer_createInstance(
2039 : const Reference< XMultiServiceFactory > &)
2040 : throw( Exception )
2041 : {
2042 : SAL_INFO("xmloff.transform", "Creating Oasis2OOoTransformer");
2043 4 : return (cppu::OWeakObject*)new Oasis2OOoTransformer;
2044 48 : }
2045 :
2046 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|