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