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