LibreOffice Module xmloff (master)  1
OOo2Oasis.cxx
Go to the documentation of this file.
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 <osl/diagnose.h>
21 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
22 #include <com/sun/star/uno/XComponentContext.hpp>
23 #include <comphelper/base64.hxx>
26 #include <xmloff/namespacemap.hxx>
27 #include <xmloff/xmlnamespace.hxx>
28 #include <xmloff/xmltoken.hxx>
29 #include "MutableAttrList.hxx"
30 #include "DeepTContext.hxx"
31 #include "StyleOOoTContext.hxx"
32 #include "FrameOOoTContext.hxx"
33 #include "EventOOoTContext.hxx"
34 #include "ControlOOoTContext.hxx"
35 #include "FormPropOOoTContext.hxx"
36 #include "ChartOOoTContext.hxx"
40 #include "PropertyActionsOOo.hxx"
41 #include "TransformerActions.hxx"
42 #include "OOo2Oasis.hxx"
45 
46 using namespace ::xmloff::token;
47 using namespace ::com::sun::star::uno;
48 using namespace ::com::sun::star::lang;
49 using namespace ::com::sun::star::xml::sax;
50 using namespace ::com::sun::star::beans;
51 
52 namespace {
53 
55 {
56  XML_ETACTION_DOCUMENT=XML_ETACTION_USER_DEFINED,
57  XML_ETACTION_BODY,
58  XML_ETACTION_STYLE,
59  XML_ETACTION_STYLE_RENAME,
60  XML_ETACTION_FRAME,
61  XML_ETACTION_EVENT,
62  XML_ETACTION_TAB_STOP,
63  XML_ETACTION_FORM_CONTROL,
64  XML_ETACTION_FORM_PROPERTY,
65  XML_ETACTION_CHART,
66  XML_ETACTION_TRACKED_CHANGES,
67  XML_ETACTION_CHART_PLOT_AREA,
68  XML_ETACTION_DOCUMENT_RENAME,
69  XML_ETACTION_TABLE
70 };
71 
72 }
73 
74 #define ENTRY3( n, l, a, p1, p2, p3 ) \
75  { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
76 #define ENTRY3QQN( n, l, a, n1, l1, n2, l2, p3 ) \
77  ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
78  XMLTransformerActionInit::QNameParam( n2, l2 ), p3 )
79 
80 #define ENTRY2( n, l, a, p1, p2 ) \
81  ENTRY3( n, l, a, p1, p2, 0 )
82 #define ENTRY2QN( n, l, a, n1, l1, p2 ) \
83  ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
84 
85 #define ENTRY1( n, l, a, p1 ) \
86  ENTRY3( n, l, a, p1, 0, 0 )
87 #define ENTRY1Q( n, l, a, n1, l1 ) \
88  ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ) )
89 
90 #define ENTRY0( n, l, a ) \
91  ENTRY3( n, l, a, 0, 0, 0 )
92 
93 // BM: a macro to put two tokens into one sal_Int32 for the action
94 // XML_ATACTION_RENAME_ATTRIBUTE
95 static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum f, XMLTokenEnum s )
96 {
97  return static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16);
98 }
99 
101 {
102  // remove 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  ENTRY0( OFFICE, DOCUMENT_STYLES, XML_ETACTION_DOCUMENT ),
106  ENTRY0( OFFICE, DOCUMENT_SETTINGS, XML_ETACTION_DOCUMENT ),
107  ENTRY1Q( OFFICE, AUTO_TEXT_EVENTS, XML_ETACTION_DOCUMENT_RENAME,
109 
110  // remove <meta:keywords>
112 
113  // rename <office:script> to <office:scripts>
116 
117  // rename <office:script-data> to <office:script> and process attributes
121 
122  // rename <script:libraries> to <ooo:libraries>
125 
126  // rename <script:library-linked> to <ooo:library-linked> and process attributes
130 
131  // rename <script:library-embedded> to <ooo:library-embedded> and process attributes
135 
136  // rename <script:module> to <ooo:module> and process attributes
140 
141  // rename <script:source-code> to <ooo:source-code>
142  ENTRY1Q( SCRIPT, SOURCE_CODE, XML_ETACTION_RENAME_ELEM,
144 
145  // rename <office:font-decls> to <office:font-face-decl>,
146  // rename <style:font-decl> to <style:font-face>, process attrs
152 
153  // add genre element
154  ENTRY0( OFFICE, BODY, XML_ETACTION_BODY ),
155 
156  // rename <style:page-master> to <style:page-layout>
157  ENTRY2QN( STYLE, PAGE_MASTER, XML_ETACTION_STYLE_RENAME,
162 
163  // split <style:properties> into <style:*-properties> and do other
164  // styles processing
165  ENTRY1( STYLE, STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_END ),
166  ENTRY1( STYLE, DEFAULT_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_END ),
167  ENTRY1( NUMBER, NUMBER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
168  ENTRY1( NUMBER, CURRENCY_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
169  ENTRY1( NUMBER, PERCENTAGE_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
170  ENTRY1( NUMBER, DATE_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
171  ENTRY1( NUMBER, TIME_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
172  ENTRY1( NUMBER, BOOLEAN_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
173  ENTRY1( NUMBER, TEXT_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
174  ENTRY1( TEXT, LIST_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
175 // ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
176  ENTRY1( STYLE, HEADER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_HEADER_FOOTER ),
177  ENTRY1( STYLE, FOOTER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_HEADER_FOOTER ),
178  ENTRY1( TEXT, LIST_LEVEL_STYLE_NUMBER, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
179  ENTRY1( TEXT, LIST_LEVEL_STYLE_BULLET, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
180  ENTRY1( TEXT, LIST_LEVEL_STYLE_IMAGE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
181  ENTRY1( TEXT, OUTLINE_LEVEL_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
182  ENTRY1( DRAW, GRADIENT, XML_ETACTION_STYLE,
184  ENTRY1( DRAW, FILL_IMAGE, XML_ETACTION_STYLE,
186  ENTRY2QN( DRAW, TRANSPARENCY, XML_ETACTION_STYLE_RENAME,
189  ENTRY1( DRAW, MARKER, XML_ETACTION_STYLE,
191  ENTRY1( DRAW, HATCH, XML_ETACTION_STYLE,
193  ENTRY1( DRAW, STROKE_DASH, XML_ETACTION_STYLE,
195 
196  // rename <text:h>'s text:level to text:outline-level
197  // process <text:h/p>: process style-name attributes,
200 
201  // rename <text:ordered-list> and <text:unordered-list> to <text:list>
208 
209  // rename <text:footnote*> to <text:note*>
213  ENTRY1Q( TEXT, FOOTNOTE_BODY, XML_ETACTION_RENAME_ELEM,
215  ENTRY1Q( TEXT, FOOTNOTE_CITATION, XML_ETACTION_RENAME_ELEM,
217  ENTRY3QQN( TEXT, FOOTNOTES_CONFIGURATION,
222 
223  // rename <text:endnote*> to <text:endnote*>
227  ENTRY1Q( TEXT, ENDNOTE_BODY, XML_ETACTION_RENAME_ELEM,
229  ENTRY1Q( TEXT, ENDNOTE_CITATION, XML_ETACTION_RENAME_ELEM,
231  ENTRY3QQN( TEXT, ENDNOTES_CONFIGURATION,
236 
237  // rename <text:footnote> and <text:endnote> to <text:note>
244 
245  // rename <text:tab-stop> to <text:tab>
248 
249  // replace <table:sub-table> with <table:table table:is-sub-table>
253 
254  // process *:style-name attributes
256  OOO_STYLE_REF_ACTIONS ), /* generated entry */
258  OOO_STYLE_REF_ACTIONS ), /* generated entry */
260  OOO_STYLE_REF_ACTIONS ), /* generated entry */
262  OOO_STYLE_REF_ACTIONS ), /* generated entry */
263  ENTRY1( TEXT, RUBY_TEXT, XML_ETACTION_PROC_ATTRS,
264  OOO_STYLE_REF_ACTIONS ), /* generated entry */
266  OOO_STYLE_REF_ACTIONS ), /* generated entry */
268  OOO_STYLE_REF_ACTIONS ), /* generated entry */
269  ENTRY1( TEXT, VARIABLE_GET, XML_ETACTION_PROC_ATTRS,
270  OOO_STYLE_REF_ACTIONS ), /* generated entry */
271  ENTRY1( TEXT, USER_FIELD_GET, XML_ETACTION_PROC_ATTRS,
272  OOO_STYLE_REF_ACTIONS ), /* generated entry */
273  ENTRY1( TEXT, USER_FIELD_INPUT, XML_ETACTION_PROC_ATTRS,
274  OOO_STYLE_REF_ACTIONS ), /* generated entry */
275  ENTRY1( TEXT, CREATION_DATE, XML_ETACTION_PROC_ATTRS,
276  OOO_STYLE_REF_ACTIONS ), /* generated entry */
277  ENTRY1( TEXT, CREATION_TIME, XML_ETACTION_PROC_ATTRS,
278  OOO_STYLE_REF_ACTIONS ), /* generated entry */
279  ENTRY1( TEXT, PRINT_TIME, XML_ETACTION_PROC_ATTRS,
280  OOO_STYLE_REF_ACTIONS ), /* generated entry */
281  ENTRY1( TEXT, PRINT_DATE, XML_ETACTION_PROC_ATTRS,
282  OOO_STYLE_REF_ACTIONS ), /* generated entry */
283  ENTRY1( TEXT, EDITING_DURATION, XML_ETACTION_PROC_ATTRS,
284  OOO_STYLE_REF_ACTIONS ), /* generated entry */
285  ENTRY1( TEXT, MODIFICATION_TIME, XML_ETACTION_PROC_ATTRS,
286  OOO_STYLE_REF_ACTIONS ), /* generated entry */
287  ENTRY1( TEXT, MODIFICATION_DATE, XML_ETACTION_PROC_ATTRS,
288  OOO_STYLE_REF_ACTIONS ), /* generated entry */
289  ENTRY1( TEXT, DATABASE_DISPLAY, XML_ETACTION_PROC_ATTRS,
290  OOO_STYLE_REF_ACTIONS ), /* generated entry */
291  ENTRY1( TEXT, TABLE_FORMULA, XML_ETACTION_PROC_ATTRS,
292  OOO_STYLE_REF_ACTIONS ), /* generated entry */
294  OOO_STYLE_REF_ACTIONS ), /* generated entry */
295  ENTRY1( TEXT, TABLE_OF_CONTENT, XML_ETACTION_PROC_ATTRS,
296  OOO_STYLE_REF_ACTIONS ), /* generated entry */
297  ENTRY1( TEXT, TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
298  OOO_STYLE_REF_ACTIONS ), /* generated entry */
299  ENTRY1( TEXT, ILLUSTRATION_INDEX, XML_ETACTION_PROC_ATTRS,
300  OOO_STYLE_REF_ACTIONS ), /* generated entry */
301  ENTRY1( TEXT, ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
302  OOO_STYLE_REF_ACTIONS ), /* generated entry */
303  ENTRY1( TEXT, TABLE_INDEX, XML_ETACTION_PROC_ATTRS,
304  OOO_STYLE_REF_ACTIONS ), /* generated entry */
305  ENTRY1( TEXT, TABLE_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
306  OOO_STYLE_REF_ACTIONS ), /* generated entry */
307  ENTRY1( TEXT, OBJECT_INDEX, XML_ETACTION_PROC_ATTRS,
308  OOO_STYLE_REF_ACTIONS ), /* generated entry */
309  ENTRY1( TEXT, OBJECT_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
310  OOO_STYLE_REF_ACTIONS ), /* generated entry */
311  ENTRY1( TEXT, USER_INDEX, XML_ETACTION_PROC_ATTRS,
312  OOO_STYLE_REF_ACTIONS ), /* generated entry */
313  ENTRY1( TEXT, USER_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
314  OOO_STYLE_REF_ACTIONS ), /* generated entry */
315  ENTRY1( TEXT, ALPHABETICAL_INDEX, XML_ETACTION_PROC_ATTRS,
316  OOO_STYLE_REF_ACTIONS ), /* generated entry */
317  ENTRY1( TEXT, ALPHABETICAL_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
318  OOO_STYLE_REF_ACTIONS ), /* generated entry */
319  ENTRY1( TEXT, BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
320  OOO_STYLE_REF_ACTIONS ), /* generated entry */
321  ENTRY1( TEXT, BIBLIOGRAPHY_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
322  OOO_STYLE_REF_ACTIONS ), /* generated entry */
323  ENTRY1( TEXT, INDEX_SOURCE_STYLE, XML_ETACTION_PROC_ATTRS,
324  OOO_STYLE_REF_ACTIONS ), /* generated entry */
325  ENTRY1( TEXT, INDEX_TITLE_TEMPLATE, XML_ETACTION_PROC_ATTRS,
326  OOO_STYLE_REF_ACTIONS ), /* generated entry */
327  ENTRY1( TEXT, INDEX_ENTRY_CHAPTER, XML_ETACTION_PROC_ATTRS,
328  OOO_STYLE_REF_ACTIONS ), /* generated entry */
329  ENTRY2QN( TEXT, INDEX_ENTRY_CHAPTER_NUMBER,
332  OOO_STYLE_REF_ACTIONS ), /* generated entry */
333  ENTRY1( TEXT, INDEX_ENTRY_TEXT, XML_ETACTION_PROC_ATTRS,
334  OOO_STYLE_REF_ACTIONS ), /* generated entry */
335  ENTRY1( TEXT, INDEX_ENTRY_PAGE_NUMBER, XML_ETACTION_PROC_ATTRS,
336  OOO_STYLE_REF_ACTIONS ), /* generated entry */
337  ENTRY1( TEXT, INDEX_ENTRY_SPAN, XML_ETACTION_PROC_ATTRS,
338  OOO_STYLE_REF_ACTIONS ), /* generated entry */
339  ENTRY1( TEXT, INDEX_ENTRY_BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
340  OOO_STYLE_REF_ACTIONS ), /* generated entry */
341  ENTRY1( TEXT, INDEX_ENTRY_LINK_START, XML_ETACTION_PROC_ATTRS,
342  OOO_STYLE_REF_ACTIONS ), /* generated entry */
343  ENTRY1( TEXT, INDEX_ENTRY_LINK_END, XML_ETACTION_PROC_ATTRS,
344  OOO_STYLE_REF_ACTIONS ), /* generated entry */
345  ENTRY1( STYLE, HANDOUT_MASTER, XML_ETACTION_PROC_ATTRS,
346  OOO_STYLE_REF_ACTIONS ), /* generated entry */
348  OOO_STYLE_REF_ACTIONS ), /* generated entry */
350  OOO_STYLE_REF_ACTIONS ), /* generated entry */
351  ENTRY1( PRESENTATION, NOTES, XML_ETACTION_PROC_ATTRS,
352  OOO_STYLE_REF_ACTIONS ), /* generated entry */
353  ENTRY1( STYLE, PRESENTATION_PAGE_LAYOUT, XML_ETACTION_PROC_ATTRS,
355  /* Consider also attribute table:style-name for <table:table>,
356  <table:table-row> and <table:table-column>. (#i40011#, #i40015#)
357  */
358  ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ),
361 
362  // split frame elements
363  ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_FRAME ),
364  ENTRY0( DRAW, IMAGE, XML_ETACTION_FRAME ),
365  ENTRY0( DRAW, OBJECT, XML_ETACTION_FRAME ),
366  ENTRY0( DRAW, OBJECT_OLE, XML_ETACTION_FRAME ),
367  ENTRY0( DRAW, APPLET, XML_ETACTION_FRAME ),
368  ENTRY0( DRAW, PLUGIN, XML_ETACTION_FRAME ),
369  ENTRY0( DRAW, FLOATING_FRAME, XML_ETACTION_FRAME ),
371 
372  // process events
375  ENTRY0( SCRIPT, EVENT, XML_ETACTION_EVENT ),
376  ENTRY0( PRESENTATION, EVENT, XML_ETACTION_EVENT ),
377 
378  // process length attributes
392 // ENTRY1( DRAW, TEXT_BOX, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
393  ENTRY1( PRESENTATION, PLACEHOLDER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
417  ENTRY1( CHART, REGRESSION_CURVE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
418  ENTRY1( CHART, STOCK_GAIN_MARKER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
419  ENTRY1( CHART, STOCK_LOSS_MARKER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
420  ENTRY1( CHART, STOCK_RANGE_LINE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
421 
422  ENTRY0( CHART, CHART, XML_ETACTION_CHART ),
423  ENTRY0( CHART, PLOT_AREA, XML_ETACTION_CHART_PLOT_AREA ),
424 
425  ENTRY1Q( TEXT, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
427  ENTRY1Q( TABLE, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
429 
430  ENTRY1( TEXT, INDEX_ENTRY_TAB_STOP, XML_ETACTION_PROC_ATTRS,
432  ENTRY0( STYLE, TAB_STOP, XML_ETACTION_TAB_STOP ),
433  ENTRY1( STYLE, BACKGROUND_IMAGE, XML_ETACTION_PROC_ATTRS,
435  ENTRY1( TEXT, LINENUMBERING_CONFIGURATION, XML_ETACTION_PROC_ATTRS,
437  ENTRY1( STYLE, FOOTNOTE_SEP, XML_ETACTION_PROC_ATTRS,
442 
443  // rename office:value-* to *:value-*
444  ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS,
445  OOO_TEXT_VALUE_TYPE_ACTIONS ), /* generated entry */
446  ENTRY1( TEXT, VARIABLE_SET, XML_ETACTION_PROC_ATTRS,
447  OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
448  ENTRY1( TEXT, VARIABLE_INPUT, XML_ETACTION_PROC_ATTRS,
449  OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
450  ENTRY1( TEXT, USER_FIELD_DECL, XML_ETACTION_PROC_ATTRS,
451  OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
452  ENTRY1( TEXT, EXPRESSION, XML_ETACTION_PROC_ATTRS,
453  OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
454 // ENTRY1( TEXT, USER_DEFINED, XML_ETACTION_PROC_ATTRS,
455 // OOO_TEXT_VALUE_TYPE_ACTIONS), /* text:user-defined has no attrs so far */
457  OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
458  ENTRY1( TABLE, COVERED_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
459  OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
460  ENTRY1( TABLE, CHANGE_TRACK_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
461  OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
462 // ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
463 // OOO_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
464 // ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
465 // OOO_VALUE_TYPE_ACTIONS), /* generated entry */
466 
468  OOO_ANNOTATION_ACTIONS ), /* generated entry */
470  OOO_CHANGE_INFO_ACTIONS ), /* generated entry */
471 
472  ENTRY1( TEXT, DDE_CONNECTION_DECL, XML_ETACTION_PROC_ATTRS,
474 
475  ENTRY0( FORM, CONTROL, XML_ETACTION_FORM_CONTROL ),
478  ENTRY0( FORM, PROPERTY, XML_ETACTION_FORM_PROPERTY ),
479 
480  // process xlink:href
482  OOO_XLINK_ACTIONS ), /* generated entry */
483  ENTRY1( META, AUTO_RELOAD, XML_ETACTION_PROC_ATTRS,
484  OOO_XLINK_ACTIONS ), /* generated entry */
485  ENTRY1( TEXT, SECTION_SOURCE, XML_ETACTION_PROC_ATTRS,
486  OOO_XLINK_ACTIONS ), /* generated entry */
488  OOO_XLINK_ACTIONS ), /* generated entry */
489  ENTRY1( TEXT, ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ETACTION_PROC_ATTRS,
490  OOO_XLINK_ACTIONS ), /* generated entry */
491  ENTRY1( TABLE, TABLE_SOURCE, XML_ETACTION_PROC_ATTRS,
492  OOO_XLINK_ACTIONS ), /* generated entry */
493  ENTRY1( TABLE, CELL_RANGE_SOURCE, XML_ETACTION_PROC_ATTRS,
494  OOO_XLINK_ACTIONS ), /* generated entry */
496  OOO_XLINK_ACTIONS ), /* generated entry */
497  ENTRY1( PRESENTATION, SOUND, XML_ETACTION_PROC_ATTRS,
498  OOO_XLINK_ACTIONS ), /* generated entry */
504 
505  ENTRY2QN( CONFIG, CONFIG_ITEM_SET, XML_ETACTION_PROC_ATTRS_COND,
508 
509  // add namespace prefix
510  // text:formula
511  ENTRY1( TEXT, SEQUENCE, XML_ETACTION_PROC_ATTRS,
512  OOO_FORMULA_ACTIONS ), /* generated entry */
513  // text:condition
514  ENTRY1( TEXT, DATABASE_NEXT, XML_ETACTION_PROC_ATTRS,
515  OOO_FORMULA_ACTIONS ), /* generated entry */
516  // text:condition
520  // text:condition
521  ENTRY1( TEXT, CONDITIONAL_TEXT, XML_ETACTION_PROC_ATTRS,
522  OOO_FORMULA_ACTIONS ), /* generated entry */
523  // text:condition
524  ENTRY1( TEXT, HIDDEN_TEXT, XML_ETACTION_PROC_ATTRS,
525  OOO_FORMULA_ACTIONS ), /* generated entry */
526  // text:condition
527  ENTRY1( TEXT, HIDDEN_PARAGRAPH, XML_ETACTION_PROC_ATTRS,
528  OOO_FORMULA_ACTIONS ), /* generated entry */
529  // table:condition
530  ENTRY1( TABLE, CONTENT_VALIDATION, XML_ETACTION_PROC_ATTRS,
531  OOO_FORMULA_ACTIONS ), /* generated entry */
532 
533  // rename <table:dependences> to <table:dependencies>
534  ENTRY1Q( TABLE, DEPENDENCES, XML_ETACTION_RENAME_ELEM,
536  ENTRY1Q( TABLE, DEPENDENCE, XML_ETACTION_RENAME_ELEM,
538 
539  // process table::error-macro
540  ENTRY1( TABLE, ERROR_MACRO, XML_ETACTION_PROC_ATTRS,
542 
543  // process table::conversion-mode
544  ENTRY1( TABLE, CONVERSION_MODE, XML_ETACTION_PROC_ATTRS,
546 
547  // fix <text:alphabatical-index-mark text:main-etry>
548  ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK, XML_ETACTION_PROC_ATTRS,
550  ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK_START, XML_ETACTION_PROC_ATTRS,
552 
553  // process table::data-pilot-member
554  ENTRY1( TABLE, DATA_PILOT_MEMBER, XML_ETACTION_PROC_ATTRS,
556 
557  // process table::data-pilot-level
558  ENTRY1( TABLE, DATA_PILOT_LEVEL, XML_ETACTION_PROC_ATTRS,
560 
561  // process table::source-service
562  ENTRY1( TABLE, SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS,
564 
565  // fix id strings in old animation elements
568  ENTRY1( PRESENTATION, SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
569  ENTRY1( PRESENTATION, SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
570  ENTRY1( PRESENTATION, HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
571  ENTRY1( PRESENTATION, HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
572 
573  ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
574 };
575 
576 // XML_ETACTION_STYLE
578 {
581  ENTRY0( STYLE, PARENT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
582  ENTRY0( STYLE, NEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
583  ENTRY0( STYLE, LIST_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
584  ENTRY0( STYLE, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
585  ENTRY0( STYLE, DATA_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
588  ENTRY0( DRAW, DOTS1_LENGTH, XML_ATACTION_INCH2IN ),
589  ENTRY0( DRAW, DOTS2_LENGTH, XML_ATACTION_INCH2IN ),
594  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
595  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
596 };
597 
598 // OOO_FRAME_ELEM_ACTIONS
600 {
603  ENTRY0( DRAW, GLUE_POINT, XML_ETACTION_COPY ),
604  ENTRY0( DRAW, IMAGE_MAP, XML_ETACTION_COPY ),
606  ENTRY0( DRAW, CONTOUR_POLYGON, XML_ETACTION_COPY ),
607  ENTRY0( DRAW, CONTOUR_PATH, XML_ETACTION_COPY ),
608  ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
609 };
610 
611 // OOO_FRAME_ATTR_ACTIONS
613 {
614  ENTRY0( DRAW, ZINDEX, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
615  ENTRY0( DRAW, ID, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
616  ENTRY0( DRAW, LAYER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
617  ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
618  ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
619  ENTRY0( DRAW, TRANSFORM, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
620  ENTRY0( DRAW, NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
621  ENTRY0( TABLE, END_CELL_ADDRESS, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
622  ENTRY0( TABLE, END_X, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
623  ENTRY0( TABLE, END_Y, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
624  ENTRY0( TABLE, TABLE_BACKGROUND, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
625  ENTRY0( TEXT, ANCHOR_TYPE, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
626  ENTRY0( TEXT, ANCHOR_PAGE_NUMBER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
627  ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
628  ENTRY0( SVG, X, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
629  ENTRY0( SVG, Y, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
630  ENTRY0( SVG, WIDTH, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
631  ENTRY0( SVG, HEIGHT, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
632  ENTRY0( STYLE, REL_WIDTH, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
633  ENTRY0( STYLE, REL_HEIGHT, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
634  ENTRY0( PRESENTATION, CLASS, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
635  ENTRY0( PRESENTATION, PLACEHOLDER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
636  ENTRY0( PRESENTATION, USER_TRANSFORMED, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
637  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
638 };
639 
640 // OOO_EVENT_ELEM_ACTIONS
642 {
643  ENTRY0( XLINK, HREF, XML_ATACTION_HREF ),
646  ENTRY0( SCRIPT, EVENT_NAME, XML_ATACTION_EVENT_NAME ),
647  ENTRY0( SCRIPT, MACRO_NAME, XML_ATACTION_MACRO_NAME ),
649  ENTRY0( SCRIPT, LIBRARY, XML_ATACTION_MACRO_LOCATION ), // bug in draw
650  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
651 };
652 
653 // action table for OOO_MASTER_PAGE_ACTIONS
655 {
657  ENTRY0( STYLE, NEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
661  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
662 };
663 
665 {
666  ENTRY1Q( FO, FONT_FAMILY, XML_ATACTION_RENAME,
668  ENTRY1Q( STYLE, FONT_STYLE_NAME, XML_ATACTION_RENAME,
670  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
671 };
672 
673 // action table for OOO_PARA_ACTIONS
675 {
677  ENTRY0( TEXT, COND_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
678 // ENTRY0( TEXT, CLASS_NAMES, XML_ATACTION_REMOVE ),
681  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
682 };
683 
684 // action table for OOO_STYLE_REF_ACTIONS
686 {
688  ENTRY0( TEXT, VISITED_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
689  ENTRY0( TEXT, MAIN_ENTRY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
690  ENTRY0( TEXT, CITATION_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
691  ENTRY0( TEXT, CITATION_BODY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
692  ENTRY0( TEXT, DEFAULT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
693  ENTRY0( TEXT, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
694  ENTRY0( STYLE, DATA_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
695  ENTRY0( STYLE, APPLY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
696  ENTRY0( STYLE, PAGE_LAYOUT_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
698  ENTRY0( TABLE, DEFAULT_CELL_STYLE_NAME,
701  ENTRY0( DRAW, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
702  ENTRY0( PRESENTATION, PRESENTATION_PAGE_LAYOUT_NAME,
704  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(false) ),
709  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
710 };
711 
712 // OOO_SHAPE_ACTIONS
713 // !!ATTENTION!! If you change something here, please also change
714 // aConnectorActionTable if appropriate
716 {
732  ENTRY0( FO, MAX_WIDTH, XML_ATACTION_INCH2IN ),
733  ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_INCH2IN ),
734  ENTRY0( DRAW, CORNER_RADIUS, XML_ATACTION_INCH2IN ),
735  ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INCHS2INS ),
736  ENTRY0( DRAW, CAPTION_POINT_X, XML_ATACTION_INCH2IN ),
737  ENTRY0( DRAW, CAPTION_POINT_Y, XML_ATACTION_INCH2IN ),
739  ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
740  ENTRY0( DRAW, END_X, XML_ATACTION_INCH2IN ),
741  ENTRY0( DRAW, END_Y, XML_ATACTION_INCH2IN ),
742  ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
744  ENTRY0( DR3D, FOCAL_LENGTH, XML_ATACTION_INCH2IN ),
747  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(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,
755  ENTRY0( DRAW, START_SHAPE, XML_ATACTION_SHAPEID ),
756  ENTRY0( DRAW, END_SHAPE, XML_ATACTION_SHAPEID ),
757  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
758 };
759 
761 {
770  ENTRY0( FO, MAX_WIDTH, XML_ATACTION_INCH2IN ),
771  ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_INCH2IN ),
773  ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
774  ENTRY0( DRAW, END_X, XML_ATACTION_INCH2IN ),
775  ENTRY0( DRAW, END_Y, XML_ATACTION_INCH2IN ),
776  ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
779  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
781  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
782 };
783 
784 // OOO_INDEX_ENTRY_TAB_STOP_ACTIONS
786 {
789  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
790 };
791 
792 // OOO_TAB_STOP_ACTIONS
794 {
796  ENTRY1Q( STYLE, LEADER_CHAR, XML_ATACTION_RENAME,
798  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
799 };
800 
801 // OOO_LINENUMBERING_ACTIONS
803 {
806  ENTRY1Q( TEXT, COUNT_IN_FLOATING_FRAMES, XML_ATACTION_RENAME,
808  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
809 };
810 
812 {
814  ENTRY0( STYLE, DISTANCE_BEFORE_SEP, XML_ATACTION_INCH2IN ),
815  ENTRY0( STYLE, DISTANCE_AFTER_SEP, XML_ATACTION_INCH2IN ),
816  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
817 };
818 
819 // OOO_DROP_CAP_ACTIONS
821 {
824  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
825 };
826 
828 {
829  ENTRY0( STYLE, COLUMN_GAP, XML_ATACTION_INCH2IN ),
830 // ENTRY0( STYLE, SPACE_BEFORE, XML_ATACTION_INCH2IN ),
831 // ENTRY0( STYLE, SPACE_AFTER, XML_ATACTION_INCH2IN ),
837  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
838 };
839 
840 // OOO_TEXT_VALUE_TYPE_ACTIONS
842 {
843  ENTRY1Q( TEXT, VALUE_TYPE, XML_ATACTION_RENAME,
849  ENTRY1Q( TEXT, DATE_VALUE, XML_ATACTION_RENAME,
851  ENTRY1Q( TEXT, TIME_VALUE, XML_ATACTION_RENAME,
853  ENTRY1Q( TEXT, BOOLEAN_VALUE, XML_ATACTION_RENAME,
855  ENTRY1Q( TEXT, STRING_VALUE, XML_ATACTION_RENAME,
857  ENTRY0( STYLE, DATA_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
860  ENTRY0( TEXT, TOKEN_INVALID, XML_ATACTION_EOT )
861 };
862 
863 // OOO_TABLE_VALUE_TYPE_ACTIONS
865 {
866  ENTRY1Q( TABLE, VALUE_TYPE, XML_ATACTION_RENAME,
872  ENTRY1Q( TABLE, DATE_VALUE, XML_ATACTION_RENAME,
874  ENTRY1Q( TABLE, TIME_VALUE, XML_ATACTION_RENAME,
876  ENTRY1Q( TABLE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
878  ENTRY1Q( TABLE, STRING_VALUE, XML_ATACTION_RENAME,
883  ENTRY1Q( TABLE, VALIDATION_NAME, XML_ATACTION_RENAME,
885  ENTRY0( TABLE, TOKEN_INVALID, XML_ATACTION_EOT )
886 };
887 
888 // action table for OOO_ANNOTATION_ACTIONS
890 {
895  ENTRY1Q( OFFICE, CREATE_DATE_STRING, XML_ATACTION_MOVE_TO_ELEM,
897  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
898 };
899 
900 // action table for OOO_CHANGE_INFO_ACTIONS
902 {
905  ENTRY1Q( OFFICE, CHG_DATE_TIME, XML_ATACTION_MOVE_TO_ELEM,
907  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
908 };
909 
910 // OOO_BACKGROUND_IMAGE_ACTIONS
912 {
915  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
916  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
917 };
918 
919 /* OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents
920  OpenOffice.org text documents, written by OpenOffice.org, contain
921  wrong value for the transparency of the background graphic (#i50322#)
922 */
924 {
926  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
927  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
928 };
929 
930 // OOO_DDE_CONNECTION_DECL
932 {
935  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
936 };
937 
938 // OOO_FORM_CONTROL_ACTIONS
940 {
945  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(false) ),
946  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
947 };
948 
949 // OOO_FORM_COLUMN_ACTIONS
951 {
958  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
959 };
960 
961 // OOO_FORM_PROP_ACTIONS
963 {
966  ENTRY0( FORM, PROPERTY_IS_LIST, XML_ATACTION_REMOVE ),
967  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
968 };
969 
970 // OOO_XLINK_ACTIONS
972 {
973  ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(false) ),
974  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
975 };
976 
977 // OOO_CONFIG_ITEM_SET_ACTIONS
979 {
982  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
983 };
984 
985 // OASIS_FORMULA_ACTIONS
987 {
996  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
997 };
998 
999 // OOO_ERROR_MACRO_ACTIONS
1001 {
1003  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1004 };
1005 
1006 // OOO_DDE_CONV_MODE_ACTIONS
1008 {
1009  ENTRY1Q( TABLE, LET_TEXT, XML_ATACTION_RENAME,
1011  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1012 };
1013 
1014 // OOO_DATAPILOT_MEMBER_ACTIONS
1016 {
1017  ENTRY1Q( TABLE, DISPLAY_DETAILS, XML_ATACTION_RENAME,
1019  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1020 };
1021 
1022 // OOO_DATAPILOT_LEVEL_ACTIONS
1024 {
1025  ENTRY1Q( TABLE, DISPLAY_EMPTY, XML_ATACTION_RENAME,
1027  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1028 };
1029 
1030 // OOO_SOURCE_SERVICE_ACTIONS
1032 {
1033  ENTRY1Q( TABLE, USERNAME, XML_ATACTION_RENAME,
1035  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1036 };
1037 
1038 // OOO_ANIMATION_ACTIONS
1040 {
1041  ENTRY0( DRAW, SHAPE_ID, XML_ATACTION_SHAPEID ),
1042  ENTRY0( PRESENTATION, PATH_ID, XML_ATACTION_SHAPEID ),
1043  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1044 };
1045 
1046 // OOO_DRAW_AREA_POLYGON_ACTIONS (to be added to OOO_SHAPE_ACTIONS)
1048 {
1051  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1052 };
1053 
1054 // OOO_CHART_ACTIONS
1056 {
1059  ENTRY0( CHART, ADD_IN_NAME, XML_ATACTION_REMOVE ),
1063  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1064 };
1065 
1066 // OOO_ALPHABETICAL_INDEX_MARK_ACTIONS
1068 {
1069  ENTRY1Q( TEXT, MAIN_ETRY, XML_ATACTION_RENAME,
1071  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1072 };
1073 
1074 // OOO_SCRIPT_ACTIONS
1076 {
1080  ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1081 };
1082 
1084 {
1090 };
1091 
1092 namespace {
1093 
1094 class XMLDocumentTransformerContext_Impl : public XMLTransformerContext
1095 {
1096  OUString const m_aElemQName;
1097  OUString m_aOldClass;
1098 
1099 public:
1100  XMLDocumentTransformerContext_Impl( XMLTransformerBase& rTransformer,
1101  const OUString& rQName );
1102  XMLDocumentTransformerContext_Impl( XMLTransformerBase& rTransformer,
1103  const OUString& rQName,
1104  sal_uInt16 nPrefix,
1106 
1107  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1108  virtual void EndElement() override;
1109 };
1110 
1111 }
1112 
1113 XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl(
1114  XMLTransformerBase& rImp,
1115  const OUString& rQName ) :
1116  XMLTransformerContext( rImp, rQName ),
1117  m_aElemQName( rQName )
1118 {
1119 }
1120 XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl(
1121  XMLTransformerBase& rImp,
1122  const OUString& rQName ,
1123  sal_uInt16 nPrefix,
1125  XMLTransformerContext( rImp, rQName ),
1126  m_aElemQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
1127  ::xmloff::token::GetXMLToken( eToken ) ) )
1128 {
1129 }
1130 
1131 void XMLDocumentTransformerContext_Impl::StartElement(
1132  const Reference< XAttributeList >& rAttrList )
1133 {
1134  Reference< XAttributeList > xAttrList( rAttrList );
1135 
1136  m_aOldClass = GetTransformer().GetClass();
1137 
1138  XMLMutableAttributeList *pMutableAttrList = nullptr;
1139  bool bOOo = false, bOOoW = false, bOOoC = false,
1140  bDOM=false, bDC = false, bSVG = false;
1141  sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1142  for( sal_Int16 i=0; i < nAttrCount; i++ )
1143  {
1144  const OUString& rAttrName = xAttrList->getNameByIndex( i );
1145  OUString aLocalName;
1146  sal_uInt16 nPrefix =
1147  GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1148  &aLocalName );
1149  if( XML_NAMESPACE_OFFICE == nPrefix &&
1150  IsXMLToken( aLocalName, XML_CLASS ) )
1151  {
1152  const OUString& rValue = xAttrList->getValueByIndex( i );
1153  GetTransformer().SetClass( rValue );
1154 
1155  pMutableAttrList = new XMLMutableAttributeList( xAttrList );
1156  xAttrList = pMutableAttrList;
1157  OUString sMime = "application/vnd.oasis.opendocument." + rValue;
1158  pMutableAttrList->SetValueByIndex( i, sMime );
1159  OUString aNewAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, ::xmloff::token::GetXMLToken( XML_MIMETYPE ) ) );
1160  pMutableAttrList->RenameAttributeByIndex(i, aNewAttrQName );
1161  break;
1162  }
1163  else if( XML_NAMESPACE_XMLNS == nPrefix )
1164  {
1165  const OUString& rAttrValue = xAttrList->getValueByIndex( i );
1166  if( IsXMLToken( rAttrValue, XML_N_OOO ) )
1167  bOOo = true;
1168  else if( IsXMLToken( rAttrValue, XML_N_OOOW ) )
1169  bOOoW = true;
1170  else if( IsXMLToken( rAttrValue, XML_N_OOOC ) )
1171  bOOoC = true;
1172  else if( IsXMLToken( rAttrValue, XML_N_DOM ) )
1173  bDOM = true;
1174  else if( IsXMLToken( rAttrValue, XML_N_DC ) )
1175  bDC = true;
1176  else if( IsXMLToken( rAttrValue, XML_N_SVG ) )
1177  bSVG = true;
1178  }
1179  }
1180  if( !(bOOo && bOOoW && bOOoC && bDOM && bDC && bSVG) )
1181  {
1182  if( !pMutableAttrList )
1183  {
1184  pMutableAttrList = new XMLMutableAttributeList( xAttrList );
1185  xAttrList = pMutableAttrList;
1186  }
1187  if( !bOOo )
1188  pMutableAttrList->AddAttribute(
1189  GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1191  GetTransformer().GetNamespaceMap().GetNameByKey(
1192  XML_NAMESPACE_OOO ) );
1193  if( !bOOoW )
1194  pMutableAttrList->AddAttribute(
1195  GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1197  GetTransformer().GetNamespaceMap().GetNameByKey(
1198  XML_NAMESPACE_OOOW ) );
1199  if( !bOOoC )
1200  pMutableAttrList->AddAttribute(
1201  GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1203  GetTransformer().GetNamespaceMap().GetNameByKey(
1204  XML_NAMESPACE_OOOC ) );
1205  if( !bDOM )
1206  pMutableAttrList->AddAttribute(
1207  GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1209  GetTransformer().GetNamespaceMap().GetNameByKey(
1210  XML_NAMESPACE_DOM ) );
1211  if( !bDC )
1212  pMutableAttrList->AddAttribute(
1213  GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1214  XML_NAMESPACE_DC ),
1215  GetTransformer().GetNamespaceMap().GetNameByKey(
1216  XML_NAMESPACE_DC ) );
1217  if( !bSVG )
1218  pMutableAttrList->AddAttribute(
1219  GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1221  GetTransformer().GetNamespaceMap().GetNameByKey(
1222  XML_NAMESPACE_SVG ) );
1223  }
1224 
1225  GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1226 }
1227 
1228 void XMLDocumentTransformerContext_Impl::EndElement()
1229 {
1230  GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1231 
1232  GetTransformer().SetClass( m_aOldClass );
1233 }
1234 
1235 namespace {
1236 
1237 class XMLBodyTransformerContext_Impl : public XMLTransformerContext
1238 {
1239  OUString m_aClassQName;
1240 
1241 public:
1242  XMLBodyTransformerContext_Impl( XMLTransformerBase& rTransformer,
1243  const OUString& rQName );
1244 
1245  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1246  virtual void EndElement() override;
1247 };
1248 
1249 }
1250 
1251 XMLBodyTransformerContext_Impl::XMLBodyTransformerContext_Impl(
1252  XMLTransformerBase& rImp,
1253  const OUString& rQName ) :
1254  XMLTransformerContext( rImp, rQName )
1255 {
1256 }
1257 
1258 void XMLBodyTransformerContext_Impl::StartElement(
1259  const Reference< XAttributeList >& rAttrList )
1260 {
1262 
1263  XMLMutableAttributeList *pMutableAttrList =
1264  new XMLMutableAttributeList( rAttrList );
1265  Reference< XAttributeList > xAttrList = pMutableAttrList;
1266  OUString aClass( GetTransformer().GetClass() );
1267  if( aClass.isEmpty() )
1268  {
1269  aClass = GetXMLToken( XML_TEXT );
1270  }
1271  else if( IsXMLToken( aClass, XML_TEXT_GLOBAL ) )
1272  {
1273  OUString aGlobalQName(
1274  GetTransformer().GetNamespaceMap().GetQNameByKey(
1276  pMutableAttrList->AddAttribute( aGlobalQName, GetXMLToken(XML_TRUE) );
1277 
1278  aClass = GetXMLToken( XML_TEXT );
1279  }
1280 
1281  m_aClassQName = GetTransformer().GetNamespaceMap().GetQNameByKey(
1282  XML_NAMESPACE_OFFICE, aClass );
1283  GetTransformer().GetDocHandler()->startElement( m_aClassQName,
1284  xAttrList );
1285 }
1286 
1287 void XMLBodyTransformerContext_Impl::EndElement()
1288 {
1289  GetTransformer().GetDocHandler()->endElement( m_aClassQName );
1291 }
1292 
1293 namespace {
1294 
1295 class XMLTabStopOOoTContext_Impl : public XMLPersElemContentTContext
1296 {
1297 public:
1298  XMLTabStopOOoTContext_Impl( XMLTransformerBase& rTransformer,
1299  const OUString& rQName );
1300 
1301  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1302 };
1303 
1304 }
1305 
1306 XMLTabStopOOoTContext_Impl::XMLTabStopOOoTContext_Impl(
1307  XMLTransformerBase& rImp,
1308  const OUString& rQName ) :
1309  XMLPersElemContentTContext( rImp, rQName )
1310 {
1311 }
1312 
1313 void XMLTabStopOOoTContext_Impl::StartElement(
1314  const Reference< XAttributeList >& rAttrList )
1315 {
1316  XMLTransformerActions *pActions =
1317  GetTransformer().GetUserDefinedActions( OOO_TAB_STOP_ACTIONS );
1318  OSL_ENSURE( pActions, "go no actions" );
1319 
1320  Reference< XAttributeList > xAttrList( rAttrList );
1321  XMLMutableAttributeList *pMutableAttrList = nullptr;
1322  sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1323  for( sal_Int16 i=0; i < nAttrCount; i++ )
1324  {
1325  const OUString& rAttrName = xAttrList->getNameByIndex( i );
1326  OUString aLocalName;
1327  sal_uInt16 nPrefix =
1328  GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1329  &aLocalName );
1330  XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
1331  XMLTransformerActions::const_iterator aIter =
1332  pActions->find( aKey );
1333  if( aIter != pActions->end() )
1334  {
1335  if( !pMutableAttrList )
1336  {
1337  pMutableAttrList =
1338  new XMLMutableAttributeList( xAttrList );
1339  xAttrList = pMutableAttrList;
1340  }
1341  const OUString& rAttrValue = xAttrList->getValueByIndex( i );
1342  switch( (*aIter).second.m_nActionType )
1343  {
1344  case XML_ATACTION_RENAME:
1345  {
1346  OUString aNewAttrQName(
1347  GetTransformer().GetNamespaceMap().GetQNameByKey(
1348  (*aIter).second.GetQNamePrefixFromParam1(),
1350  (*aIter).second.GetQNameTokenFromParam1()) ) );
1351  pMutableAttrList->RenameAttributeByIndex( i,
1352  aNewAttrQName );
1353  }
1354  if( IsXMLToken( aLocalName, XML_LEADER_CHAR ) &&
1355  !rAttrValue.isEmpty() &&
1356  rAttrValue[0] != ' ' )
1357  {
1358  OUString aNewAttrQName(
1359  GetTransformer().GetNamespaceMap().GetQNameByKey(
1362  pMutableAttrList->AddAttribute( aNewAttrQName,
1363  GetXMLToken( XML_SOLID ) );
1364  }
1365  break;
1366  case XML_ATACTION_INCH2IN:
1367  {
1368  OUString aAttrValue( rAttrValue );
1370  aAttrValue ) )
1371  pMutableAttrList->SetValueByIndex( i, aAttrValue );
1372  }
1373  break;
1374  default:
1375  OSL_ENSURE( false, "unknown action" );
1376  break;
1377  }
1378  }
1379  }
1380 
1382 }
1383 
1384 namespace {
1385 
1386 class XMLTrackedChangesOOoTContext_Impl : public XMLTransformerContext
1387 {
1388  sal_uInt16 const m_nPrefix;
1389  XMLTokenEnum const m_eToken;
1390 
1391 public:
1392  XMLTrackedChangesOOoTContext_Impl( XMLTransformerBase& rTransformer,
1393  const OUString& rQName,
1394  sal_uInt16 nPrefix,
1395  XMLTokenEnum eToken );
1396 
1397  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1398 };
1399 
1400 }
1401 
1402 XMLTrackedChangesOOoTContext_Impl::XMLTrackedChangesOOoTContext_Impl(
1403  XMLTransformerBase& rImp,
1404  const OUString& rQName,
1405  sal_uInt16 nPrefix,
1406  XMLTokenEnum eToken ) :
1407  XMLTransformerContext( rImp, rQName ),
1408  m_nPrefix( nPrefix ),
1409  m_eToken( eToken )
1410 {
1411 }
1412 
1413 void XMLTrackedChangesOOoTContext_Impl::StartElement(
1414  const Reference< XAttributeList >& rAttrList )
1415 {
1416  sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0;
1417  for( sal_Int16 i=0; i < nAttrCount; i++ )
1418  {
1419  const OUString& rAttrName = rAttrList->getNameByIndex( i );
1420  OUString aLocalName;
1421  sal_uInt16 nPrefix =
1422  GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1423  &aLocalName );
1424  if( m_nPrefix == nPrefix && IsXMLToken( aLocalName, m_eToken ) )
1425  {
1426  const Reference< XPropertySet > rPropSet =
1427  GetTransformer().GetPropertySet();
1428  OSL_ENSURE( rPropSet.is(), "no info property set" );
1429  if( rPropSet.is() )
1430  {
1431  OUString aPropName("RedlineProtectionKey");
1432  Reference< XPropertySetInfo > xPropSetInfo(
1433  rPropSet->getPropertySetInfo() );
1434  if( xPropSetInfo.is() &&
1435  xPropSetInfo->hasPropertyByName( aPropName ) )
1436  {
1437  Sequence < sal_Int8 > aKey;
1439  rAttrList->getValueByIndex( i ) );
1440  rPropSet->setPropertyValue( aPropName, makeAny( aKey ) );
1441  }
1442  else
1443  {
1444  OSL_ENSURE( false, "RedineProtectionKey is missing" );
1445  }
1446  }
1447  break;
1448  }
1449  }
1451 }
1452 
1453 namespace {
1454 
1455 class XMLTableOOoTransformerContext_Impl : public XMLTransformerContext
1456 {
1457  OUString const m_aElemQName;
1458 
1459 public:
1460  XMLTableOOoTransformerContext_Impl( XMLTransformerBase& rTransformer,
1461  const OUString& rQName );
1462 
1463  virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1464  virtual void EndElement() override;
1465 };
1466 
1467 }
1468 
1469 XMLTableOOoTransformerContext_Impl::XMLTableOOoTransformerContext_Impl(
1470  XMLTransformerBase& rImp,
1471  const OUString& rQName ) :
1472  XMLTransformerContext( rImp, rQName ),
1473  m_aElemQName( rQName )
1474 {
1475 }
1476 
1477 void XMLTableOOoTransformerContext_Impl::StartElement(
1478  const Reference< XAttributeList >& rAttrList )
1479 {
1480  // Perform OOO_STYLE_REF_ACTIONS for all applications (#i50521#)
1481  Reference< XAttributeList > xAttrList( rAttrList );
1482  XMLMutableAttributeList* pMutableAttrList =
1483  GetTransformer().ProcessAttrList( xAttrList, OOO_STYLE_REF_ACTIONS, false );
1484  if( rAttrList->getLength() && IsXMLToken( GetTransformer().GetClass(), XML_SPREADSHEET ) )
1485  {
1486  bool bPrintRanges(false);
1487 
1488  sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1489  for( sal_Int16 i=0; i < nAttrCount; i++ )
1490  {
1491  const OUString& rAttrName = xAttrList->getNameByIndex( i );
1492  OUString aLocalName;
1493  sal_uInt16 nPrefix =
1494  GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1495  &aLocalName );
1496  if( XML_NAMESPACE_TABLE == nPrefix &&
1497  IsXMLToken( aLocalName, XML_PRINT_RANGES ) )
1498  {
1499  bPrintRanges = true;
1500  }
1501  }
1502  if (!bPrintRanges && pMutableAttrList)
1503  {
1504  xAttrList = pMutableAttrList;
1505  pMutableAttrList->AddAttribute(GetTransformer().GetNamespaceMap().GetQNameByKey(
1508  }
1509  }
1510 
1511  GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1512 }
1513 
1514 void XMLTableOOoTransformerContext_Impl::EndElement()
1515 {
1516  GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1517 }
1518 
1520  const TransformerAction_Impl& rAction,
1521  const OUString& rQName,
1522  bool bPersistent )
1523 {
1524  switch( rAction.m_nActionType )
1525  {
1526  case XML_ETACTION_DOCUMENT:
1527  return new XMLDocumentTransformerContext_Impl( *this, rQName );
1528  case XML_ETACTION_DOCUMENT_RENAME:
1529  return new XMLDocumentTransformerContext_Impl( *this, rQName,
1530  rAction.GetQNamePrefixFromParam1(),
1531  rAction.GetQNameTokenFromParam1() );
1532  case XML_ETACTION_BODY:
1533  return new XMLBodyTransformerContext_Impl( *this, rQName );
1534  case XML_ETACTION_STYLE:
1535  return new XMLStyleOOoTContext( *this, rQName,
1536  static_cast< XMLFamilyType >( rAction.m_nParam1 ),
1537  bPersistent );
1538  case XML_ETACTION_STYLE_RENAME:
1539  return new XMLStyleOOoTContext( *this, rQName,
1540  static_cast< XMLFamilyType >( rAction.m_nParam2 ),
1541  rAction.GetQNamePrefixFromParam1(),
1542  rAction.GetQNameTokenFromParam1(),
1543  bPersistent );
1544  case XML_ETACTION_FRAME:
1545  return new XMLFrameOOoTransformerContext( *this, rQName );
1546  case XML_ETACTION_EVENT:
1547  return new XMLEventOOoTransformerContext( *this, rQName, bPersistent );
1548  case XML_ETACTION_TAB_STOP:
1549  return new XMLTabStopOOoTContext_Impl( *this, rQName );
1550  case XML_ETACTION_FORM_CONTROL:
1551  return new XMLControlOOoTransformerContext( *this, rQName );
1552  case XML_ETACTION_FORM_PROPERTY:
1553  return new XMLFormPropOOoTransformerContext( *this, rQName );
1554  case XML_ETACTION_CHART:
1555  return new XMLChartOOoTransformerContext( *this, rQName );
1556  case XML_ETACTION_TRACKED_CHANGES:
1557  return new XMLTrackedChangesOOoTContext_Impl( *this, rQName,
1558  rAction.GetQNamePrefixFromParam1(),
1559  rAction.GetQNameTokenFromParam1() );
1560  case XML_ETACTION_CHART_PLOT_AREA:
1561  return new XMLChartPlotAreaOOoTContext( *this, rQName );
1562  case XML_ETACTION_TABLE:
1563  return new XMLTableOOoTransformerContext_Impl( *this, rQName );
1564  default:
1565  OSL_ENSURE( false, "no user defined context found!" );
1566  }
1567 
1568  // default is copying
1569  return new XMLTransformerContext( *this, rQName );
1570 }
1571 
1573  sal_uInt16 n )
1574 {
1575  XMLTransformerActions *pActions = nullptr;
1576  if( n < MAX_OOO_ACTIONS )
1577  {
1578  if( !m_aActions[n] )
1579  {
1580  if( n<MAX_OOO_PROP_ACTIONS )
1581  {
1582  m_aActions[n].reset(
1584  }
1585  else switch( n )
1586  {
1587  case OOO_STYLE_ACTIONS:
1589  new XMLTransformerActions( aStyleActionTable ) );
1590  break;
1591  case OOO_FONT_DECL_ACTIONS:
1593  new XMLTransformerActions( aFontDeclActionTable ) );
1594  break;
1595  case OOO_SHAPE_ACTIONS:
1597  new XMLTransformerActions( aShapeActionTable ) );
1598  break;
1599  case OOO_CONNECTOR_ACTIONS:
1601  new XMLTransformerActions( aConnectorActionTable ) );
1602  break;
1603  case OOO_TAB_STOP_ACTIONS:
1605  new XMLTransformerActions( aTabStopActionTable ) );
1606  break;
1609  new XMLTransformerActions( aIndexEntryTabStopActionTable ) );
1610  break;
1613  new XMLTransformerActions( aLineNumberingActionTable ) );
1614  break;
1617  new XMLTransformerActions( aFootnoteSepActionTable ) );
1618  break;
1619  case OOO_DROP_CAP_ACTIONS:
1621  new XMLTransformerActions( aDropCapActionTable ) );
1622  break;
1623  case OOO_COLUMNS_ACTIONS:
1625  new XMLTransformerActions( aColumnsActionTable ) );
1626  break;
1629  new XMLTransformerActions( aTextValueTypeActionTable ) );
1630  break;
1633  new XMLTransformerActions( aTableValueTypeActionTable ) );
1634  break;
1635  case OOO_PARA_ACTIONS:
1637  new XMLTransformerActions( aParaActionTable ) );
1638  break;
1639  case OOO_STYLE_REF_ACTIONS:
1641  new XMLTransformerActions( aStyleRefActionTable ) );
1642  break;
1645  new XMLTransformerActions( aMasterPageActionTable ) );
1646  break;
1649  new XMLTransformerActions( aAnnotationActionTable ) );
1650  break;
1653  new XMLTransformerActions( aChangeInfoActionTable ) );
1654  break;
1657  new XMLTransformerActions( aFrameElemActionTable ) );
1658  break;
1661  new XMLTransformerActions( aFrameAttrActionTable ) );
1662  break;
1664  // Use special actions for Writer documents. (#i50322#)
1666  isWriter()
1667  ? new XMLTransformerActions( aWriterBackgroundImageActionTable )
1668  : new XMLTransformerActions( aBackgroundImageActionTable ) );
1669  break;
1672  new XMLTransformerActions( aDDEConnectionDeclActionTable ) );
1673  break;
1674  case OOO_EVENT_ACTIONS:
1676  new XMLTransformerActions( aEventActionTable ) );
1677  break;
1680  new XMLTransformerActions( aFormControlActionTable ) );
1681  break;
1684  new XMLTransformerActions( aFormColumnActionTable ) );
1685  break;
1686  case OOO_FORM_PROP_ACTIONS:
1688  new XMLTransformerActions( aFormPropActionTable ) );
1689  break;
1690  case OOO_XLINK_ACTIONS:
1692  new XMLTransformerActions( aXLinkActionTable ) );
1693  break;
1696  new XMLTransformerActions( aConfigItemSetActionTable ) );
1697  break;
1698  case OOO_FORMULA_ACTIONS:
1700  new XMLTransformerActions( aFormulaActionTable ) );
1701  break;
1702  case OOO_CHART_ACTIONS:
1704  new XMLTransformerActions( aChartActionTable ) );
1705  break;
1708  new XMLTransformerActions( aErrorMacroActionTable ) );
1709  break;
1712  new XMLTransformerActions( aDDEConvModeActionTable ) );
1713  break;
1716  new XMLTransformerActions( aAlphabeticalIndexMarkActionTable ) );
1717  break;
1720  new XMLTransformerActions( aDataPilotMemberActionTable ) );
1721  break;
1724  new XMLTransformerActions( aDataPilotLevelActionTable ) );
1725  break;
1728  new XMLTransformerActions( aSourceServiceActionTable ) );
1729  break;
1732  new XMLTransformerActions( aShapeActionTable ) );
1734  ->Add( aDrawAreaPolygonActionTable );
1735  break;
1736  case OOO_SCRIPT_ACTIONS:
1738  new XMLTransformerActions( aScriptActionTable ) );
1739  break;
1740  case OOO_ANIMATION_ACTIONS:
1742  new XMLTransformerActions( aAnimationsActionTable ) );
1743  break;
1744  }
1745  }
1746  pActions = m_aActions[n].get();
1747  }
1748 
1749  return pActions;
1750 }
1751 
1752 OUString OOo2OasisTransformer::GetEventName( const OUString& rName, bool )
1753 {
1754  if( !m_pEventMap )
1756 
1757  OUString aNewName;
1758  sal_uInt16 nPrefix = XMLEventOOoTransformerContext::GetEventName( rName,
1759  aNewName, *m_pEventMap );
1760  if( XML_NAMESPACE_UNKNOWN != nPrefix )
1761  aNewName = GetNamespaceMap().GetQNameByKey( nPrefix, aNewName );
1762  else
1763  aNewName = rName;
1764 
1765  return aNewName;
1766 }
1767 
1769  OUString const & rSubServiceName )
1770  throw() :
1771  XMLTransformerBase( aActionTable, aTokenMap ),
1772  m_aImplName(rImplName),
1773  m_aSubServiceName(rSubServiceName),
1774  m_pEventMap( nullptr )
1775 {
1777  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
1778 
1780  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META), XML_NAMESPACE_META );
1781 
1783  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
1784 
1786  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
1787 
1789  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
1790 
1792  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
1793 
1795  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
1796 
1798  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
1799 
1801  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
1802 
1805 
1807  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
1808 
1810  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
1811 
1813  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
1814 
1815  GetNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO), XML_NAMESPACE_FO );
1816  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
1817 
1818  GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG), XML_NAMESPACE_SVG );
1819  GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
1820 
1821  for(auto & rp : m_aActions)
1822  rp.reset();
1823 }
1824 
1826 {
1827  for(auto & rp : m_aActions)
1828  rp.reset();
1830 }
1831 
1833 {
1834  Any aRet;
1835  if ( rType == cppu::UnoType<XImporter>::get())
1836  {
1837  Reference<XImporter> xThis( this );
1838  aRet <<= xThis;
1839  }
1840  else if ( rType == cppu::UnoType<XFilter>::get())
1841  {
1842  Reference<XFilter> xThis( this );
1843  aRet <<= xThis;
1844  }
1845  else
1846  {
1847  aRet = XMLTransformerBase::queryInterface(rType);
1848  }
1849 
1850  return aRet;
1851 }
1852 
1853 // XImporter
1855  const Reference< XComponent >& xDoc )
1856 {
1857  if( !GetDocHandler().is() )
1858  {
1859  // if initialize hasn't been called, then we have to call it now
1860  // to get the sub component initialized.
1861  Sequence<Any> aArgs( 0 );
1862  Initialize( aArgs );
1863  }
1864 
1865  mxModel.set( xDoc, UNO_QUERY );
1866 
1867  Reference< XImporter > xImp( GetDocHandler(), UNO_QUERY );
1868  OSL_ENSURE( xImp.is(), "doc handler is not an importer" );
1869  if( xImp.is() )
1870  xImp->setTargetDocument( xDoc );
1871 }
1872 
1873 // XFilter
1875  const Sequence< PropertyValue >& aDescriptor )
1876 {
1877  Reference< XFilter> xFilter( GetDocHandler(), UNO_QUERY );
1878  OSL_ENSURE( xFilter.is(), "doc handler is not a filter" );
1879  if( xFilter.is() )
1880  return xFilter->filter( aDescriptor );
1881 
1882  return false;
1883 }
1884 
1886 {
1887  Reference< XFilter> xFilter( GetDocHandler(), UNO_QUERY );
1888  OSL_ENSURE( xFilter.is(), "doc handler is not a filter" );
1889  if( xFilter.is() )
1890  xFilter->cancel();
1891 }
1892 
1893 // XInitialize
1895  const Sequence< Any >& rArguments )
1896 {
1897  Initialize( rArguments );
1898 }
1899 
1901 {
1902  if( !GetDocHandler().is() )
1903  {
1904  // if initialize hasn't been called, then we have to call it now
1905  // to get the sub component initialized.
1906  Sequence<Any> aArgs( 0 );
1907  Initialize( aArgs );
1908  }
1909 
1911 }
1912 
1914  const Sequence< Any >& rArguments )
1915 {
1916  OSL_ENSURE( !GetDocHandler().is(), "duplication initialization" );
1917 
1918  Reference< XDocumentHandler > xDocHandler;
1919  if( !m_aSubServiceName.isEmpty() )
1920  {
1923  try
1924  {
1925  // get filter component
1926  xDocHandler.set(
1927  xContext->getServiceManager()->createInstanceWithArgumentsAndContext(m_aSubServiceName, rArguments, xContext),
1928  UNO_QUERY);
1929  }
1930  catch( Exception& )
1931  {
1932  }
1933  }
1934 
1935  OSL_ENSURE( xDocHandler.is(), "can't instantiate filter component" );
1936  if( xDocHandler.is() )
1937  {
1938  Sequence<Any> aArgs( 1 + rArguments.getLength() );
1939  aArgs[0] <<= xDocHandler;
1940  std::copy(rArguments.begin(), rArguments.end(), std::next(aArgs.begin()));
1942 
1943  OSL_ENSURE( GetDocHandler() == xDocHandler,
1944  "duplicate doc handler" );
1945  }
1946  else
1947  {
1948  XMLTransformerBase::initialize( rArguments );
1949  }
1950 }
1951 
1952 namespace
1953 {
1954  class theOOo2OasisTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOOo2OasisTransformerUnoTunnelId> {};
1955 }
1956 
1957 const css::uno::Sequence<sal_Int8>& OOo2OasisTransformer::getUnoTunnelId() throw()
1958 {
1959  return theOOo2OasisTransformerUnoTunnelId::get().getSeq();
1960 }
1961 
1962 // XUnoTunnel
1964 {
1965  if( isUnoTunnelId<OOo2OasisTransformer>(rId) )
1966  {
1967  return reinterpret_cast< sal_Int64 >( this );
1968  }
1969 
1970  return sal_Int64(0);
1971 }
1972 
1973 // XServiceInfo
1975 {
1976  return m_aImplName;
1977 }
1978 
1979 sal_Bool SAL_CALL OOo2OasisTransformer::supportsService( const OUString& ServiceName )
1980 {
1981  return cppu::supportsService(this, ServiceName);
1982 }
1983 
1985 {
1986  return { };
1987 }
1988 
1989 // XTypeProvider
1990 Sequence< css::uno::Type > SAL_CALL OOo2OasisTransformer::getTypes()
1991 {
1992  return cppu::OTypeCollection(
1995  XMLTransformerBase::getTypes()
1996  ).getTypes();
1997 }
1998 
1999 // Service registration
2000 
2001 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
2003  css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
2004 {
2005  return cppu::acquire(new OOo2OasisTransformer("com.sun.star.comp.OOo2OasisTransformer", OUString()));
2006 }
2007 
2008 #define OOO_IMPORTER( className, implName, subServiceName ) \
2009 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* \
2010 xmloff_##className##_get_implementation( \
2011  css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&) \
2012 { \
2013  return cppu::acquire(new OOo2OasisTransformer( \
2014  implName, \
2015  subServiceName )); \
2016 }
2017 
2018 OOO_IMPORTER( XMLWriterImportOOO,
2019  "com.sun.star.comp.Writer.XMLImporter",
2020  "com.sun.star.comp.Writer.XMLOasisImporter" )
2021 OOO_IMPORTER( XMLWriterStylesImportOOO,
2022  "com.sun.star.comp.Writer.XMLStylesImporter",
2023  "com.sun.star.comp.Writer.XMLOasisStylesImporter" )
2024 OOO_IMPORTER( XMLWriterContentImportOOO,
2025  "com.sun.star.comp.Writer.XMLContentImporter",
2026  "com.sun.star.comp.Writer.XMLOasisContentImporter" )
2027 OOO_IMPORTER( XMLWriterMetaImportOOO,
2028  "com.sun.star.comp.Writer.XMLMetaImporter",
2029  "com.sun.star.comp.Writer.XMLOasisMetaImporter" )
2030 OOO_IMPORTER( XMLWriterSettingsImportOOO,
2031  "com.sun.star.comp.Writer.XMLSettingsImporter",
2032  "com.sun.star.comp.Writer.XMLOasisSettingsImporter" )
2033 
2034 OOO_IMPORTER( XMLImpressImportOOO,
2035  "com.sun.star.comp.Impress.XMLImporter",
2036  "com.sun.star.comp.Impress.XMLOasisImporter" )
2037 OOO_IMPORTER( XMLImpressStylesImportOOO,
2038  "com.sun.star.comp.Impress.XMLStylesImporter",
2039  "com.sun.star.comp.Impress.XMLOasisStylesImporter" )
2040 OOO_IMPORTER( XMLImpressContentImportOOO,
2041  "com.sun.star.comp.Impress.XMLContentImporter",
2042  "com.sun.star.comp.Impress.XMLOasisContentImporter" )
2043 OOO_IMPORTER( XMLImpressMetaImportOOO,
2044  "com.sun.star.comp.Impress.XMLMetaImporter",
2045  "com.sun.star.comp.Impress.XMLOasisMetaImporter" )
2046 OOO_IMPORTER( XMLImpressSettingsImportOOO,
2047  "com.sun.star.comp.Impress.XMLSettingsImporter",
2048  "com.sun.star.comp.Impress.XMLOasisSettingsImporter" )
2049 
2050 OOO_IMPORTER( XMLDrawImportOOO,
2051  "com.sun.star.comp.Draw.XMLImporter",
2052  "com.sun.star.comp.Draw.XMLOasisImporter" )
2053 OOO_IMPORTER( XMLDrawStylesImportOOO,
2054  "com.sun.star.comp.Draw.XMLStylesImporter",
2055  "com.sun.star.comp.Draw.XMLOasisStylesImporter" )
2056 OOO_IMPORTER( XMLDrawContentImportOOO,
2057  "com.sun.star.comp.Draw.XMLContentImporter",
2058  "com.sun.star.comp.Draw.XMLOasisContentImporter" )
2059 OOO_IMPORTER( XMLDrawMetaImportOOO,
2060  "com.sun.star.comp.Draw.XMLMetaImporter",
2061  "com.sun.star.comp.Draw.XMLOasisMetaImporter" )
2062 OOO_IMPORTER( XMLDrawSettingsImportOOO,
2063  "com.sun.star.comp.Draw.XMLSettingsImporter",
2064  "com.sun.star.comp.Draw.XMLOasisSettingsImporter" )
2065 
2066 OOO_IMPORTER( XMLCalcImportOOO,
2067  "com.sun.star.comp.Calc.XMLImporter",
2068  "com.sun.star.comp.Calc.XMLOasisImporter" )
2069 OOO_IMPORTER( XMLCalcStylesImportOOO,
2070  "com.sun.star.comp.Calc.XMLStylesImporter",
2071  "com.sun.star.comp.Calc.XMLOasisStylesImporter" )
2072 OOO_IMPORTER( XMLCalcContentImportOOO,
2073  "com.sun.star.comp.Calc.XMLContentImporter",
2074  "com.sun.star.comp.Calc.XMLOasisContentImporter" )
2075 OOO_IMPORTER( XMLCalcMetaImportOOO,
2076  "com.sun.star.comp.Calc.XMLMetaImporter",
2077  "com.sun.star.comp.Calc.XMLOasisMetaImporter" )
2078 OOO_IMPORTER( XMLCalcSettingsImportOOO,
2079  "com.sun.star.comp.Calc.XMLSettingsImporter",
2080  "com.sun.star.comp.Calc.XMLOasisSettingsImporter" )
2081 
2082 OOO_IMPORTER( XMLChartImportOOO,
2083  "com.sun.star.comp.Chart.XMLImporter",
2084  "com.sun.star.comp.Chart.XMLOasisImporter" )
2085 OOO_IMPORTER( XMLChartStylesImportOOO,
2086  "com.sun.star.comp.Chart.XMLStylesImporter",
2087  "com.sun.star.comp.Chart.XMLOasisStylesImporter" )
2088 OOO_IMPORTER( XMLChartContentImportOOO,
2089  "com.sun.star.comp.Chart.XMLContentImporter",
2090  "com.sun.star.comp.Chart.XMLOasisContentImporter" )
2091 
2092 OOO_IMPORTER( XMLMathMetaImportOOO,
2093  "com.sun.star.comp.Math.XMLMetaImporter",
2094  "com.sun.star.comp.Math.XMLOasisMetaImporter" )
2095 OOO_IMPORTER( XMLMathSettingsImportOOO,
2096  "com.sun.star.comp.Math.XMLSettingsImporter",
2097  "com.sun.star.comp.Math.XMLOasisSettingsImporter" )
2098 
2099 OOO_IMPORTER( XMLMetaImportOOO,
2100  "com.sun.star.document.XMLMetaImporter",
2101  "com.sun.star.document.XMLOasisMetaImporter" )
2102 
2103 OOO_IMPORTER( XMLAutoTextEventImportOOO,
2104  "com.sun.star.comp.Writer.XMLAutotextEventsImporter",
2105  "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter" )
2106 
2107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Type
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3434
XMLTransformerActionInit const aFontDeclActionTable[]
Definition: OOo2Oasis.cxx:664
XMLTransformerActionInit const aStyleActionTable[]
Definition: OOo2Oasis.cxx:577
XMLTransformerActionInit const aChangeInfoActionTable[]
Definition: OOo2Oasis.cxx:901
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
XMLTransformerActionInit const aDropCapActionTable[]
Definition: OOo2Oasis.cxx:820
com sun star comp Writer com sun star comp Writer XMLOasisStylesImporter com sun star comp Writer com sun star comp Writer XMLOasisMetaImporter com sun star comp Impress com sun star comp Impress XMLOasisImporter com sun star comp Impress com sun star comp Impress XMLOasisContentImporter com sun star comp Impress XMLSettingsImporter
Definition: OOo2Oasis.cxx:2047
#define ENTRY3QQN(n, l, a, n1, l1, n2, l2, p3)
Definition: OOo2Oasis.cxx:76
OOo2OasisTransformer(OUString const &rImplName, OUString const &rSubServiceName)
Definition: OOo2Oasis.cxx:1768
css::uno::Reference< css::frame::XModel > mxModel
constexpr sal_uInt16 XML_NAMESPACE_CHART
constexpr sal_uInt16 XML_NAMESPACE_DR3D
#define ID
virtual void SAL_CALL startDocument() override
#define SERVICE_NAME
XMLTransformerActionInit const aAnimationsActionTable[]
Definition: OOo2Oasis.cxx:1039
constexpr sal_uInt16 XML_NAMESPACE_SCRIPT
constexpr sal_uInt16 XML_NAMESPACE_OOOC
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
Definition: OOo2Oasis.cxx:1957
XMLTransformerActionInit const aFootnoteSepActionTable[]
Definition: OOo2Oasis.cxx:811
XMLTransformerActionInit const aDrawAreaPolygonActionTable[]
Definition: OOo2Oasis.cxx:1047
DIM
#define ENDNOTE
std::unique_ptr< XMLTransformerActions > m_aActions[MAX_OOO_ACTIONS]
Definition: OOo2Oasis.hxx:38
#define MIN_WIDTH
#define ENTRY2(n, l, a, p1, p2)
Definition: OOo2Oasis.cxx:80
constexpr sal_uInt16 XML_NAMESPACE_OOO
DOCUMENT
#define ENTRY1Q(n, l, a, n1, l1)
Definition: OOo2Oasis.cxx:87
XMLTransformerActionInit const aFormPropActionTable[]
Definition: OOo2Oasis.cxx:962
#define HEIGHT
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: OOo2Oasis.cxx:1979
XMLTransformerActionInit const aErrorMacroActionTable[]
Definition: OOo2Oasis.cxx:1000
constexpr sal_uInt16 XML_NAMESPACE_NUMBER
#define MIN_HEIGHT
constexpr sal_uInt16 XML_NAMESPACE_DOM
static XMLTransformerActions * CreateTransformerActions(sal_uInt16 nType)
const sal_uInt16 XML_NAMESPACE_UNKNOWN
NAME
const sal_uInt8 A
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
XMLTransformerActionInit const aDataPilotLevelActionTable[]
Definition: OOo2Oasis.cxx:1023
const sal_uInt16 XML_NAMESPACE_XMLNS
XMLTransformerActionInit const aFrameElemActionTable[]
Definition: OOo2Oasis.cxx:599
XMLTransformerActionInit const aParaActionTable[]
Definition: OOo2Oasis.cxx:674
XMLTransformerActionInit const aXLinkActionTable[]
Definition: OOo2Oasis.cxx:971
DATE
XMLTransformerActionInit const aAnnotationActionTable[]
Definition: OOo2Oasis.cxx:889
DRAW
#define X
XMLUserDefinedTransformerAction
Definition: Oasis2OOo.cxx:59
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define PROPERTY_TYPE
static sal_uInt16 GetEventName(const OUString &rName, OUString &rNewName, XMLTransformerOOoEventMap_Impl &rMap)
constexpr sal_uInt16 XML_NAMESPACE_FORM
XMLTransformerActionInit const aConfigItemSetActionTable[]
Definition: OOo2Oasis.cxx:978
#define RX
SvXMLNamespaceMap & GetNamespaceMap()
com sun star comp Writer com sun star comp Writer XMLOasisStylesImporter com sun star comp Writer com sun star comp Writer XMLOasisMetaImporter com sun star comp Impress XMLImporter
Definition: OOo2Oasis.cxx:2035
virtual sal_Int16 SAL_CALL getLength() override
XMLTransformerActionInit const aConnectorActionTable[]
Definition: OOo2Oasis.cxx:760
constexpr sal_uInt16 XML_NAMESPACE_DRAW
XMLTransformerActionInit const aWriterBackgroundImageActionTable[]
Definition: OOo2Oasis.cxx:923
OUString const m_aSubServiceName
Definition: OOo2Oasis.hxx:36
START
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:49
#define MAP(name, prefix, token, type, context, version)
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: OOo2Oasis.cxx:1752
#define INDEX_TITLE
XMLTransformerActionInit const aEventActionTable[]
Definition: OOo2Oasis.cxx:641
virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor) override
Definition: OOo2Oasis.cxx:1874
constexpr sal_uInt16 XML_NAMESPACE_CONFIG
XMLTransformerActionInit const aDDEConnectionDeclActionTable[]
Definition: OOo2Oasis.cxx:931
XMLTransformerActionInit const aFrameAttrActionTable[]
Definition: OOo2Oasis.cxx:612
XMLTransformerActionInit const aAlphabeticalIndexMarkActionTable[]
Definition: OOo2Oasis.cxx:1067
END
static void FlushEventMap(XMLTransformerOOoEventMap_Impl *p)
constexpr sal_uInt16 XML_NAMESPACE_SVG
constexpr sal_uInt16 XML_NAMESPACE_FO
XMLTransformerActionInit const aScriptActionTable[]
Definition: OOo2Oasis.cxx:1075
XMLTransformerActionInit const aIndexEntryTabStopActionTable[]
Definition: OOo2Oasis.cxx:785
int i
XMLTransformerActionInit const aBackgroundImageActionTable[]
Definition: OOo2Oasis.cxx:911
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: OOo2Oasis.cxx:1832
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: OOo2Oasis.cxx:1984
virtual void SAL_CALL startDocument() override
Definition: OOo2Oasis.cxx:1900
void SetValueByIndex(sal_Int16 i, const OUString &rValue)
constexpr sal_uInt16 XML_NAMESPACE_TEXT
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * xmloff_OOo2OasisTransformer_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: OOo2Oasis.cxx:2002
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: OOo2Oasis.cxx:1894
static void decode(css::uno::Sequence< sal_Int8 > &aPass, const OUString &sBuffer)
XMLTransformerActionInit const aFormulaActionTable[]
Definition: OOo2Oasis.cxx:986
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: OOo2Oasis.cxx:1990
NUMBER
XMLTransformerActionInit const aColumnsActionTable[]
Definition: OOo2Oasis.cxx:827
PROPERTY
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: OOo2Oasis.cxx:1519
XMLTransformerActionInit const aChartActionTable[]
Definition: OOo2Oasis.cxx:1055
unsigned char sal_Bool
void AddAttribute(const OUString &sName, const OUString &sValue)
void RenameAttributeByIndex(sal_Int16 i, const OUString &rNewName)
OUString GetQNameByKey(sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
constexpr sal_uInt16 XML_NAMESPACE_DC
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
#define TITLE
const sal_uInt8 MARGIN_LEFT
virtual void SAL_CALL cancel() override
Definition: OOo2Oasis.cxx:1885
#define Y
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
com sun star comp Writer XMLStylesImporter
Definition: OOo2Oasis.cxx:2022
#define ENTRY0(n, l, a)
Definition: OOo2Oasis.cxx:90
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
const sal_uInt8 MARGIN_RIGHT
XMLTransformerActionInit const aMasterPageActionTable[]
Definition: OOo2Oasis.cxx:654
constexpr sal_uInt16 XML_NAMESPACE_PRESENTATION
XMLTransformerActionInit const aLineNumberingActionTable[]
Definition: OOo2Oasis.cxx:802
sal_uInt16 GetQNamePrefixFromParam1() const
static XMLTransformerOOoEventMap_Impl * CreateEventMap()
friend class XMLTransformerContext
CONDITION
constexpr sal_uInt16 XML_NAMESPACE_TABLE
virtual OUString SAL_CALL getImplementationName() override
Definition: OOo2Oasis.cxx:1974
static bool ReplaceSingleInchWithIn(OUString &rValue)
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: OOo2Oasis.cxx:1963
XMLTransformerOOoEventMap_Impl * m_pEventMap
Definition: OOo2Oasis.hxx:39
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3378
Handling of tokens in XML:
#define ENTRY1(n, l, a, p1)
Definition: OOo2Oasis.cxx:85
#define OOO_IMPORTER(className, implName, subServiceName)
Definition: OOo2Oasis.cxx:2008
virtual ~OOo2OasisTransformer() override
Definition: OOo2Oasis.cxx:1825
XMLTransformerActionInit const aDDEConvModeActionTable[]
Definition: OOo2Oasis.cxx:1007
#define ENTRY2QN(n, l, a, n1, l1, p2)
Definition: OOo2Oasis.cxx:82
FORM
LINE
#define OFFSET
XMLTransformerActionInit const aActionTable[]
Definition: OOo2Oasis.cxx:100
const sal_uInt16 WIDTH
Reference< XComponentContext > getProcessComponentContext()
XMLTransformerActionInit const aFormColumnActionTable[]
Definition: OOo2Oasis.cxx:950
XMLTransformerActionInit const aFormControlActionTable[]
Definition: OOo2Oasis.cxx:939
XMLTransformerActionInit const aStyleRefActionTable[]
Definition: OOo2Oasis.cxx:685
TABLE
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: OOo2Oasis.cxx:1572
XMLTransformerActionInit const aTextValueTypeActionTable[]
Definition: OOo2Oasis.cxx:841
XMLTransformerActionInit const aSourceServiceActionTable[]
Definition: OOo2Oasis.cxx:1031
XMLTransformerActionInit const aTableValueTypeActionTable[]
Definition: OOo2Oasis.cxx:864
OUString const m_aImplName
Definition: OOo2Oasis.hxx:35
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
XMLTransformerActionInit const aTabStopActionTable[]
Definition: OOo2Oasis.cxx:793
void Initialize(const css::uno::Sequence< css::uno::Any > &aArguments)
Definition: OOo2Oasis.cxx:1913
XMLTokenEnum eToken
Definition: xmltoken.cxx:40
constexpr sal_uInt16 XML_NAMESPACE_META
virtual OUString SAL_CALL getValueByIndex(sal_Int16 i) override
static constexpr sal_Int32 RENAME_ENTRY(XMLTokenEnum f, XMLTokenEnum s)
Definition: OOo2Oasis.cxx:95
constexpr sal_uInt16 XML_NAMESPACE_OOOW
com sun star comp Writer com sun star comp Writer XMLOasisStylesImporter com sun star comp Writer com sun star comp Writer XMLOasisMetaImporter com sun star comp Impress com sun star comp Impress XMLOasisImporter com sun star comp Impress XMLContentImporter
Definition: OOo2Oasis.cxx:2041
::xmloff::token::XMLTokenEnum GetQNameTokenFromParam1() const
TEXT
XMLTransformerActionInit const aDataPilotMemberActionTable[]
Definition: OOo2Oasis.cxx:1015
FORMULA
constexpr sal_uInt16 XML_NAMESPACE_STYLE
XMLTransformerActionInit const aShapeActionTable[]
Definition: OOo2Oasis.cxx:715
XMLTokenEnum const aTokenMap[]
Definition: OOo2Oasis.cxx:1083
const bool READONLY
com sun star comp Writer com sun star comp Writer XMLOasisStylesImporter com sun star comp Writer XMLMetaImporter
Definition: OOo2Oasis.cxx:2028
const sal_uInt8 R
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: OOo2Oasis.cxx:1854
css::uno::Any SAL_CALL makeAny(const SharedUNOComponent< INTERFACE, COMPONENT > &value)