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 <config_wasm_strip.h>
21
22#include <osl/diagnose.h>
23#include <com/sun/star/lang/XMultiServiceFactory.hpp>
24#include <com/sun/star/uno/XComponentContext.hpp>
25#include <comphelper/base64.hxx>
28#include <utility>
31#include <xmloff/xmltoken.hxx>
32#include "MutableAttrList.hxx"
33#include "DeepTContext.hxx"
34#include "StyleOOoTContext.hxx"
35#include "FrameOOoTContext.hxx"
36#include "EventOOoTContext.hxx"
39#include "ChartOOoTContext.hxx"
45#include "OOo2Oasis.hxx"
49
50using namespace ::xmloff::token;
51using namespace ::com::sun::star::uno;
52using namespace ::com::sun::star::lang;
53using namespace ::com::sun::star::xml::sax;
54using namespace ::com::sun::star::beans;
55
56namespace {
57
58enum XMLUserDefinedTransformerAction
59{
60 XML_ETACTION_DOCUMENT=XML_ETACTION_USER_DEFINED,
61 XML_ETACTION_BODY,
62 XML_ETACTION_STYLE,
63 XML_ETACTION_STYLE_RENAME,
64 XML_ETACTION_FRAME,
65 XML_ETACTION_EVENT,
66 XML_ETACTION_TAB_STOP,
67 XML_ETACTION_FORM_CONTROL,
68 XML_ETACTION_FORM_PROPERTY,
69 XML_ETACTION_CHART,
70 XML_ETACTION_TRACKED_CHANGES,
71 XML_ETACTION_CHART_PLOT_AREA,
72 XML_ETACTION_DOCUMENT_RENAME,
73 XML_ETACTION_TABLE
74};
75
76}
77
78#define ENTRY3( n, l, a, p1, p2, p3 ) \
79 { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
80#define ENTRY3QQN( n, l, a, n1, l1, n2, l2, p3 ) \
81 ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
82 XMLTransformerActionInit::QNameParam( n2, l2 ), p3 )
83
84#define ENTRY2( n, l, a, p1, p2 ) \
85 ENTRY3( n, l, a, p1, p2, 0 )
86#define ENTRY2QN( n, l, a, n1, l1, p2 ) \
87 ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
88
89#define ENTRY1( n, l, a, p1 ) \
90 ENTRY3( n, l, a, p1, 0, 0 )
91#define ENTRY1Q( n, l, a, n1, l1 ) \
92 ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ) )
93
94#define ENTRY0( n, l, a ) \
95 ENTRY3( n, l, a, 0, 0, 0 )
96
97// BM: a macro to put two tokens into one sal_Int32 for the action
98// XML_ATACTION_RENAME_ATTRIBUTE
99static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum f, XMLTokenEnum s )
100{
101 return static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16);
102}
103
105{
106 // remove office:class from <office:document> and <office:document-content>
107 ENTRY0( OFFICE, DOCUMENT, XML_ETACTION_DOCUMENT ),
108 ENTRY0( OFFICE, DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT ),
109 ENTRY0( OFFICE, DOCUMENT_STYLES, XML_ETACTION_DOCUMENT ),
110 ENTRY0( OFFICE, DOCUMENT_SETTINGS, XML_ETACTION_DOCUMENT ),
111 ENTRY1Q( OFFICE, AUTO_TEXT_EVENTS, XML_ETACTION_DOCUMENT_RENAME,
113
114 // remove <meta:keywords>
116
117 // rename <office:script> to <office:scripts>
120
121 // rename <office:script-data> to <office:script> and process attributes
125
126 // rename <script:libraries> to <ooo:libraries>
129
130 // rename <script:library-linked> to <ooo:library-linked> and process attributes
134
135 // rename <script:library-embedded> to <ooo:library-embedded> and process attributes
139
140 // rename <script:module> to <ooo:module> and process attributes
144
145 // rename <script:source-code> to <ooo:source-code>
148
149 // rename <office:font-decls> to <office:font-face-decl>,
150 // rename <style:font-decl> to <style:font-face>, process attrs
156
157 // add genre element
158 ENTRY0( OFFICE, BODY, XML_ETACTION_BODY ),
159
160 // rename <style:page-master> to <style:page-layout>
161 ENTRY2QN( STYLE, PAGE_MASTER, XML_ETACTION_STYLE_RENAME,
166
167 // split <style:properties> into <style:*-properties> and do other
168 // styles processing
169 ENTRY1( STYLE, STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_END ),
170 ENTRY1( STYLE, DEFAULT_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_END ),
171 ENTRY1( NUMBER, NUMBER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
172 ENTRY1( NUMBER, CURRENCY_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
173 ENTRY1( NUMBER, PERCENTAGE_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
174 ENTRY1( NUMBER, DATE_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
175 ENTRY1( NUMBER, TIME_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
176 ENTRY1( NUMBER, BOOLEAN_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
177 ENTRY1( NUMBER, TEXT_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
178 ENTRY1( TEXT, LIST_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
179// ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
180 ENTRY1( STYLE, HEADER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_HEADER_FOOTER ),
181 ENTRY1( STYLE, FOOTER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_HEADER_FOOTER ),
182 ENTRY1( TEXT, LIST_LEVEL_STYLE_NUMBER, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
183 ENTRY1( TEXT, LIST_LEVEL_STYLE_BULLET, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
184 ENTRY1( TEXT, LIST_LEVEL_STYLE_IMAGE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
185 ENTRY1( TEXT, OUTLINE_LEVEL_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
186 ENTRY1( DRAW, GRADIENT, XML_ETACTION_STYLE,
188 ENTRY1( DRAW, FILL_IMAGE, XML_ETACTION_STYLE,
190 ENTRY2QN( DRAW, TRANSPARENCY, XML_ETACTION_STYLE_RENAME,
193 ENTRY1( DRAW, MARKER, XML_ETACTION_STYLE,
195 ENTRY1( DRAW, HATCH, XML_ETACTION_STYLE,
197 ENTRY1( DRAW, STROKE_DASH, XML_ETACTION_STYLE,
199
200 // rename <text:h>'s text:level to text:outline-level
201 // process <text:h/p>: process style-name attributes,
204
205 // rename <text:ordered-list> and <text:unordered-list> to <text:list>
212
213 // rename <text:footnote*> to <text:note*>
217 ENTRY1Q( TEXT, FOOTNOTE_BODY, XML_ETACTION_RENAME_ELEM,
219 ENTRY1Q( TEXT, FOOTNOTE_CITATION, XML_ETACTION_RENAME_ELEM,
221 ENTRY3QQN( TEXT, FOOTNOTES_CONFIGURATION,
226
227 // rename <text:endnote*> to <text:endnote*>
231 ENTRY1Q( TEXT, ENDNOTE_BODY, XML_ETACTION_RENAME_ELEM,
233 ENTRY1Q( TEXT, ENDNOTE_CITATION, XML_ETACTION_RENAME_ELEM,
235 ENTRY3QQN( TEXT, ENDNOTES_CONFIGURATION,
240
241 // rename <text:footnote> and <text:endnote> to <text:note>
248
249 // rename <text:tab-stop> to <text:tab>
252
253 // replace <table:sub-table> with <table:table table:is-sub-table>
257
258 // process *:style-name attributes
260 OOO_STYLE_REF_ACTIONS ), /* generated entry */
262 OOO_STYLE_REF_ACTIONS ), /* generated entry */
264 OOO_STYLE_REF_ACTIONS ), /* generated entry */
266 OOO_STYLE_REF_ACTIONS ), /* generated entry */
268 OOO_STYLE_REF_ACTIONS ), /* generated entry */
270 OOO_STYLE_REF_ACTIONS ), /* generated entry */
272 OOO_STYLE_REF_ACTIONS ), /* generated entry */
273 ENTRY1( TEXT, VARIABLE_GET, XML_ETACTION_PROC_ATTRS,
274 OOO_STYLE_REF_ACTIONS ), /* generated entry */
275 ENTRY1( TEXT, USER_FIELD_GET, XML_ETACTION_PROC_ATTRS,
276 OOO_STYLE_REF_ACTIONS ), /* generated entry */
277 ENTRY1( TEXT, USER_FIELD_INPUT, XML_ETACTION_PROC_ATTRS,
278 OOO_STYLE_REF_ACTIONS ), /* generated entry */
279 ENTRY1( TEXT, CREATION_DATE, XML_ETACTION_PROC_ATTRS,
280 OOO_STYLE_REF_ACTIONS ), /* generated entry */
281 ENTRY1( TEXT, CREATION_TIME, XML_ETACTION_PROC_ATTRS,
282 OOO_STYLE_REF_ACTIONS ), /* generated entry */
283 ENTRY1( TEXT, PRINT_TIME, XML_ETACTION_PROC_ATTRS,
284 OOO_STYLE_REF_ACTIONS ), /* generated entry */
285 ENTRY1( TEXT, PRINT_DATE, XML_ETACTION_PROC_ATTRS,
286 OOO_STYLE_REF_ACTIONS ), /* generated entry */
287 ENTRY1( TEXT, EDITING_DURATION, XML_ETACTION_PROC_ATTRS,
288 OOO_STYLE_REF_ACTIONS ), /* generated entry */
289 ENTRY1( TEXT, MODIFICATION_TIME, XML_ETACTION_PROC_ATTRS,
290 OOO_STYLE_REF_ACTIONS ), /* generated entry */
291 ENTRY1( TEXT, MODIFICATION_DATE, XML_ETACTION_PROC_ATTRS,
292 OOO_STYLE_REF_ACTIONS ), /* generated entry */
293 ENTRY1( TEXT, DATABASE_DISPLAY, XML_ETACTION_PROC_ATTRS,
294 OOO_STYLE_REF_ACTIONS ), /* generated entry */
295 ENTRY1( TEXT, TABLE_FORMULA, XML_ETACTION_PROC_ATTRS,
296 OOO_STYLE_REF_ACTIONS ), /* generated entry */
298 OOO_STYLE_REF_ACTIONS ), /* generated entry */
299 ENTRY1( TEXT, TABLE_OF_CONTENT, XML_ETACTION_PROC_ATTRS,
300 OOO_STYLE_REF_ACTIONS ), /* generated entry */
301 ENTRY1( TEXT, TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
302 OOO_STYLE_REF_ACTIONS ), /* generated entry */
303 ENTRY1( TEXT, ILLUSTRATION_INDEX, XML_ETACTION_PROC_ATTRS,
304 OOO_STYLE_REF_ACTIONS ), /* generated entry */
305 ENTRY1( TEXT, ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
306 OOO_STYLE_REF_ACTIONS ), /* generated entry */
307 ENTRY1( TEXT, TABLE_INDEX, XML_ETACTION_PROC_ATTRS,
308 OOO_STYLE_REF_ACTIONS ), /* generated entry */
309 ENTRY1( TEXT, TABLE_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
310 OOO_STYLE_REF_ACTIONS ), /* generated entry */
311 ENTRY1( TEXT, OBJECT_INDEX, XML_ETACTION_PROC_ATTRS,
312 OOO_STYLE_REF_ACTIONS ), /* generated entry */
313 ENTRY1( TEXT, OBJECT_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
314 OOO_STYLE_REF_ACTIONS ), /* generated entry */
315 ENTRY1( TEXT, USER_INDEX, XML_ETACTION_PROC_ATTRS,
316 OOO_STYLE_REF_ACTIONS ), /* generated entry */
317 ENTRY1( TEXT, USER_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
318 OOO_STYLE_REF_ACTIONS ), /* generated entry */
319 ENTRY1( TEXT, ALPHABETICAL_INDEX, XML_ETACTION_PROC_ATTRS,
320 OOO_STYLE_REF_ACTIONS ), /* generated entry */
321 ENTRY1( TEXT, ALPHABETICAL_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
322 OOO_STYLE_REF_ACTIONS ), /* generated entry */
323 ENTRY1( TEXT, BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
324 OOO_STYLE_REF_ACTIONS ), /* generated entry */
325 ENTRY1( TEXT, BIBLIOGRAPHY_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
326 OOO_STYLE_REF_ACTIONS ), /* generated entry */
327 ENTRY1( TEXT, INDEX_SOURCE_STYLE, XML_ETACTION_PROC_ATTRS,
328 OOO_STYLE_REF_ACTIONS ), /* generated entry */
329 ENTRY1( TEXT, INDEX_TITLE_TEMPLATE, XML_ETACTION_PROC_ATTRS,
330 OOO_STYLE_REF_ACTIONS ), /* generated entry */
331 ENTRY1( TEXT, INDEX_ENTRY_CHAPTER, XML_ETACTION_PROC_ATTRS,
332 OOO_STYLE_REF_ACTIONS ), /* generated entry */
333 ENTRY2QN( TEXT, INDEX_ENTRY_CHAPTER_NUMBER,
336 OOO_STYLE_REF_ACTIONS ), /* generated entry */
337 ENTRY1( TEXT, INDEX_ENTRY_TEXT, XML_ETACTION_PROC_ATTRS,
338 OOO_STYLE_REF_ACTIONS ), /* generated entry */
339 ENTRY1( TEXT, INDEX_ENTRY_PAGE_NUMBER, XML_ETACTION_PROC_ATTRS,
340 OOO_STYLE_REF_ACTIONS ), /* generated entry */
341 ENTRY1( TEXT, INDEX_ENTRY_SPAN, XML_ETACTION_PROC_ATTRS,
342 OOO_STYLE_REF_ACTIONS ), /* generated entry */
343 ENTRY1( TEXT, INDEX_ENTRY_BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
344 OOO_STYLE_REF_ACTIONS ), /* generated entry */
345 ENTRY1( TEXT, INDEX_ENTRY_LINK_START, XML_ETACTION_PROC_ATTRS,
346 OOO_STYLE_REF_ACTIONS ), /* generated entry */
347 ENTRY1( TEXT, INDEX_ENTRY_LINK_END, XML_ETACTION_PROC_ATTRS,
348 OOO_STYLE_REF_ACTIONS ), /* generated entry */
349 ENTRY1( STYLE, HANDOUT_MASTER, XML_ETACTION_PROC_ATTRS,
350 OOO_STYLE_REF_ACTIONS ), /* generated entry */
352 OOO_STYLE_REF_ACTIONS ), /* generated entry */
354 OOO_STYLE_REF_ACTIONS ), /* generated entry */
355 ENTRY1( PRESENTATION, NOTES, XML_ETACTION_PROC_ATTRS,
356 OOO_STYLE_REF_ACTIONS ), /* generated entry */
357 ENTRY1( STYLE, PRESENTATION_PAGE_LAYOUT, XML_ETACTION_PROC_ATTRS,
359 /* Consider also attribute table:style-name for <table:table>,
360 <table:table-row> and <table:table-column>. (#i40011#, #i40015#)
361 */
362 ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ),
365
366 // split frame elements
367 ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_FRAME ),
368 ENTRY0( DRAW, IMAGE, XML_ETACTION_FRAME ),
369 ENTRY0( DRAW, OBJECT, XML_ETACTION_FRAME ),
370 ENTRY0( DRAW, OBJECT_OLE, XML_ETACTION_FRAME ),
371 ENTRY0( DRAW, APPLET, XML_ETACTION_FRAME ),
372 ENTRY0( DRAW, PLUGIN, XML_ETACTION_FRAME ),
373 ENTRY0( DRAW, FLOATING_FRAME, XML_ETACTION_FRAME ),
375
376 // process events
379 ENTRY0( SCRIPT, EVENT, XML_ETACTION_EVENT ),
380 ENTRY0( PRESENTATION, EVENT, XML_ETACTION_EVENT ),
381
382 // process length attributes
396// ENTRY1( DRAW, TEXT_BOX, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
397 ENTRY1( PRESENTATION, PLACEHOLDER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
425
426 ENTRY0( CHART, CHART, XML_ETACTION_CHART ),
427 ENTRY0( CHART, PLOT_AREA, XML_ETACTION_CHART_PLOT_AREA ),
428
429 ENTRY1Q( TEXT, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
431 ENTRY1Q( TABLE, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
433
434 ENTRY1( TEXT, INDEX_ENTRY_TAB_STOP, XML_ETACTION_PROC_ATTRS,
436 ENTRY0( STYLE, TAB_STOP, XML_ETACTION_TAB_STOP ),
437 ENTRY1( STYLE, BACKGROUND_IMAGE, XML_ETACTION_PROC_ATTRS,
439 ENTRY1( TEXT, LINENUMBERING_CONFIGURATION, XML_ETACTION_PROC_ATTRS,
441 ENTRY1( STYLE, FOOTNOTE_SEP, XML_ETACTION_PROC_ATTRS,
446
447 // rename office:value-* to *:value-*
448 ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS,
449 OOO_TEXT_VALUE_TYPE_ACTIONS ), /* generated entry */
450 ENTRY1( TEXT, VARIABLE_SET, XML_ETACTION_PROC_ATTRS,
451 OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
452 ENTRY1( TEXT, VARIABLE_INPUT, XML_ETACTION_PROC_ATTRS,
453 OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
454 ENTRY1( TEXT, USER_FIELD_DECL, XML_ETACTION_PROC_ATTRS,
455 OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
456 ENTRY1( TEXT, EXPRESSION, XML_ETACTION_PROC_ATTRS,
457 OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
458// ENTRY1( TEXT, USER_DEFINED, XML_ETACTION_PROC_ATTRS,
459// OOO_TEXT_VALUE_TYPE_ACTIONS), /* text:user-defined has no attrs so far */
461 OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
462 ENTRY1( TABLE, COVERED_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
463 OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
464 ENTRY1( TABLE, CHANGE_TRACK_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
465 OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
466// ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
467// OOO_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
468// ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
469// OOO_VALUE_TYPE_ACTIONS), /* generated entry */
470
472 OOO_ANNOTATION_ACTIONS ), /* generated entry */
474 OOO_CHANGE_INFO_ACTIONS ), /* generated entry */
475
476 ENTRY1( TEXT, DDE_CONNECTION_DECL, XML_ETACTION_PROC_ATTRS,
478
479 ENTRY0( FORM, CONTROL, XML_ETACTION_FORM_CONTROL ),
482 ENTRY0( FORM, PROPERTY, XML_ETACTION_FORM_PROPERTY ),
483
484 // process xlink:href
486 OOO_XLINK_ACTIONS ), /* generated entry */
487 ENTRY1( META, AUTO_RELOAD, XML_ETACTION_PROC_ATTRS,
488 OOO_XLINK_ACTIONS ), /* generated entry */
489 ENTRY1( TEXT, SECTION_SOURCE, XML_ETACTION_PROC_ATTRS,
490 OOO_XLINK_ACTIONS ), /* generated entry */
492 OOO_XLINK_ACTIONS ), /* generated entry */
493 ENTRY1( TEXT, ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ETACTION_PROC_ATTRS,
494 OOO_XLINK_ACTIONS ), /* generated entry */
495 ENTRY1( TABLE, TABLE_SOURCE, XML_ETACTION_PROC_ATTRS,
496 OOO_XLINK_ACTIONS ), /* generated entry */
497 ENTRY1( TABLE, CELL_RANGE_SOURCE, XML_ETACTION_PROC_ATTRS,
498 OOO_XLINK_ACTIONS ), /* generated entry */
500 OOO_XLINK_ACTIONS ), /* generated entry */
501 ENTRY1( PRESENTATION, SOUND, XML_ETACTION_PROC_ATTRS,
502 OOO_XLINK_ACTIONS ), /* generated entry */
508
509 ENTRY2QN( CONFIG, CONFIG_ITEM_SET, XML_ETACTION_PROC_ATTRS_COND,
512
513 // add namespace prefix
514 // text:formula
516 OOO_FORMULA_ACTIONS ), /* generated entry */
517 // text:condition
518 ENTRY1( TEXT, DATABASE_NEXT, XML_ETACTION_PROC_ATTRS,
519 OOO_FORMULA_ACTIONS ), /* generated entry */
520 // text:condition
524 // text:condition
525 ENTRY1( TEXT, CONDITIONAL_TEXT, XML_ETACTION_PROC_ATTRS,
526 OOO_FORMULA_ACTIONS ), /* generated entry */
527 // text:condition
528 ENTRY1( TEXT, HIDDEN_TEXT, XML_ETACTION_PROC_ATTRS,
529 OOO_FORMULA_ACTIONS ), /* generated entry */
530 // text:condition
531 ENTRY1( TEXT, HIDDEN_PARAGRAPH, XML_ETACTION_PROC_ATTRS,
532 OOO_FORMULA_ACTIONS ), /* generated entry */
533 // table:condition
534 ENTRY1( TABLE, CONTENT_VALIDATION, XML_ETACTION_PROC_ATTRS,
535 OOO_FORMULA_ACTIONS ), /* generated entry */
536
537 // rename <table:dependences> to <table:dependencies>
542
543 // process table::error-macro
544 ENTRY1( TABLE, ERROR_MACRO, XML_ETACTION_PROC_ATTRS,
546
547 // process table::conversion-mode
548 ENTRY1( TABLE, CONVERSION_MODE, XML_ETACTION_PROC_ATTRS,
550
551 // fix <text:alphabatical-index-mark text:main-etry>
552 ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK, XML_ETACTION_PROC_ATTRS,
554 ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK_START, XML_ETACTION_PROC_ATTRS,
556
557 // process table::data-pilot-member
558 ENTRY1( TABLE, DATA_PILOT_MEMBER, XML_ETACTION_PROC_ATTRS,
560
561 // process table::data-pilot-level
562 ENTRY1( TABLE, DATA_PILOT_LEVEL, XML_ETACTION_PROC_ATTRS,
564
565 // process table::source-service
566 ENTRY1( TABLE, SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS,
568
569 // fix id strings in old animation elements
572 ENTRY1( PRESENTATION, SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
573 ENTRY1( PRESENTATION, SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
574 ENTRY1( PRESENTATION, HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
575 ENTRY1( PRESENTATION, HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
576
577 ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
578};
579
580// XML_ETACTION_STYLE
582{
585 ENTRY0( STYLE, PARENT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
588 ENTRY0( STYLE, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
592 ENTRY0( DRAW, DOTS1_LENGTH, XML_ATACTION_INCH2IN ),
593 ENTRY0( DRAW, DOTS2_LENGTH, XML_ATACTION_INCH2IN ),
598 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
599 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
600};
601
602// OOO_FRAME_ELEM_ACTIONS
604{
607 ENTRY0( DRAW, GLUE_POINT, XML_ETACTION_COPY ),
608 ENTRY0( DRAW, IMAGE_MAP, XML_ETACTION_COPY ),
610 ENTRY0( DRAW, CONTOUR_POLYGON, XML_ETACTION_COPY ),
611 ENTRY0( DRAW, CONTOUR_PATH, XML_ETACTION_COPY ),
612 ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
613};
614
615// OOO_FRAME_ATTR_ACTIONS
617{
618 ENTRY0( DRAW, ZINDEX, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
619 ENTRY0( DRAW, ID, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
620 ENTRY0( DRAW, LAYER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
621 ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
622 ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
623 ENTRY0( DRAW, TRANSFORM, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
624 ENTRY0( DRAW, NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
625 ENTRY0( TABLE, END_CELL_ADDRESS, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
626 ENTRY0( TABLE, END_X, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
627 ENTRY0( TABLE, END_Y, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
628 ENTRY0( TABLE, TABLE_BACKGROUND, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
629 ENTRY0( TEXT, ANCHOR_TYPE, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
630 ENTRY0( TEXT, ANCHOR_PAGE_NUMBER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
631 ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
632 ENTRY0( SVG, X, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
633 ENTRY0( SVG, Y, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
634 ENTRY0( SVG, WIDTH, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
635 ENTRY0( SVG, HEIGHT, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
636 ENTRY0( STYLE, REL_WIDTH, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
637 ENTRY0( STYLE, REL_HEIGHT, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
638 ENTRY0( PRESENTATION, CLASS, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
639 ENTRY0( PRESENTATION, PLACEHOLDER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
640 ENTRY0( PRESENTATION, USER_TRANSFORMED, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
641 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
642};
643
644// OOO_EVENT_ELEM_ACTIONS
646{
647 ENTRY0( XLINK, HREF, XML_ATACTION_HREF ),
650 ENTRY0( SCRIPT, EVENT_NAME, XML_ATACTION_EVENT_NAME ),
651 ENTRY0( SCRIPT, MACRO_NAME, XML_ATACTION_MACRO_NAME ),
653 ENTRY0( SCRIPT, LIBRARY, XML_ATACTION_MACRO_LOCATION ), // bug in draw
654 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
655};
656
657// action table for OOO_MASTER_PAGE_ACTIONS
659{
665 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
666};
667
669{
670 ENTRY1Q( FO, FONT_FAMILY, XML_ATACTION_RENAME,
672 ENTRY1Q( STYLE, FONT_STYLE_NAME, XML_ATACTION_RENAME,
674 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
675};
676
677// action table for OOO_PARA_ACTIONS
679{
682// ENTRY0( TEXT, CLASS_NAMES, XML_ATACTION_REMOVE ),
685 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
686};
687
688// action table for OOO_STYLE_REF_ACTIONS
690{
692 ENTRY0( TEXT, VISITED_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
693 ENTRY0( TEXT, MAIN_ENTRY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
694 ENTRY0( TEXT, CITATION_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
695 ENTRY0( TEXT, CITATION_BODY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
696 ENTRY0( TEXT, DEFAULT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
697 ENTRY0( TEXT, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
699 ENTRY0( STYLE, APPLY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
700 ENTRY0( STYLE, PAGE_LAYOUT_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
702 ENTRY0( TABLE, DEFAULT_CELL_STYLE_NAME,
705 ENTRY0( DRAW, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
706 ENTRY0( PRESENTATION, PRESENTATION_PAGE_LAYOUT_NAME,
708 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(false) ),
713 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
714};
715
716// OOO_SHAPE_ACTIONS
717// !!ATTENTION!! If you change something here, please also change
718// aConnectorActionTable if appropriate
720{
736 ENTRY0( FO, MAX_WIDTH, XML_ATACTION_INCH2IN ),
737 ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_INCH2IN ),
738 ENTRY0( DRAW, CORNER_RADIUS, XML_ATACTION_INCH2IN ),
739 ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INCHS2INS ),
740 ENTRY0( DRAW, CAPTION_POINT_X, XML_ATACTION_INCH2IN ),
741 ENTRY0( DRAW, CAPTION_POINT_Y, XML_ATACTION_INCH2IN ),
746 ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
748 ENTRY0( DR3D, FOCAL_LENGTH, XML_ATACTION_INCH2IN ),
751 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
752
753 // BM: needed by chart:legend. The legend needs also the draw actions. As
754 // there is no merge mechanism, all actions have to be in the same table
755 ENTRY2( CHART, LEGEND_POSITION, XML_ATACTION_RENAME_ATTRIBUTE,
759 ENTRY0( DRAW, START_SHAPE, XML_ATACTION_SHAPEID ),
760 ENTRY0( DRAW, END_SHAPE, XML_ATACTION_SHAPEID ),
761 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
762};
763
765{
774 ENTRY0( FO, MAX_WIDTH, XML_ATACTION_INCH2IN ),
775 ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_INCH2IN ),
780 ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
783 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
785 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
786};
787
788// OOO_INDEX_ENTRY_TAB_STOP_ACTIONS
790{
793 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
794};
795
796// OOO_TAB_STOP_ACTIONS
798{
800 ENTRY1Q( STYLE, LEADER_CHAR, XML_ATACTION_RENAME,
802 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
803};
804
805// OOO_LINENUMBERING_ACTIONS
807{
810 ENTRY1Q( TEXT, COUNT_IN_FLOATING_FRAMES, XML_ATACTION_RENAME,
812 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
813};
814
816{
818 ENTRY0( STYLE, DISTANCE_BEFORE_SEP, XML_ATACTION_INCH2IN ),
819 ENTRY0( STYLE, DISTANCE_AFTER_SEP, XML_ATACTION_INCH2IN ),
820 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
821};
822
823// OOO_DROP_CAP_ACTIONS
825{
828 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
829};
830
832{
833 ENTRY0( STYLE, COLUMN_GAP, XML_ATACTION_INCH2IN ),
834// ENTRY0( STYLE, SPACE_BEFORE, XML_ATACTION_INCH2IN ),
835// ENTRY0( STYLE, SPACE_AFTER, XML_ATACTION_INCH2IN ),
841 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
842};
843
844// OOO_TEXT_VALUE_TYPE_ACTIONS
846{
847 ENTRY1Q( TEXT, VALUE_TYPE, XML_ATACTION_RENAME,
853 ENTRY1Q( TEXT, DATE_VALUE, XML_ATACTION_RENAME,
855 ENTRY1Q( TEXT, TIME_VALUE, XML_ATACTION_RENAME,
857 ENTRY1Q( TEXT, BOOLEAN_VALUE, XML_ATACTION_RENAME,
859 ENTRY1Q( TEXT, STRING_VALUE, XML_ATACTION_RENAME,
864 ENTRY0( TEXT, TOKEN_INVALID, XML_ATACTION_EOT )
865};
866
867// OOO_TABLE_VALUE_TYPE_ACTIONS
869{
870 ENTRY1Q( TABLE, VALUE_TYPE, XML_ATACTION_RENAME,
876 ENTRY1Q( TABLE, DATE_VALUE, XML_ATACTION_RENAME,
878 ENTRY1Q( TABLE, TIME_VALUE, XML_ATACTION_RENAME,
880 ENTRY1Q( TABLE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
882 ENTRY1Q( TABLE, STRING_VALUE, XML_ATACTION_RENAME,
887 ENTRY1Q( TABLE, VALIDATION_NAME, XML_ATACTION_RENAME,
889 ENTRY0( TABLE, TOKEN_INVALID, XML_ATACTION_EOT )
890};
891
892// action table for OOO_ANNOTATION_ACTIONS
894{
899 ENTRY1Q( OFFICE, CREATE_DATE_STRING, XML_ATACTION_MOVE_TO_ELEM,
901 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
902};
903
904// action table for OOO_CHANGE_INFO_ACTIONS
906{
911 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
912};
913
914// OOO_BACKGROUND_IMAGE_ACTIONS
916{
919 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
920 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
921};
922
923/* OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents
924 OpenOffice.org text documents, written by OpenOffice.org, contain
925 wrong value for the transparency of the background graphic (#i50322#)
926*/
928{
930 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(true) ),
931 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
932};
933
934// OOO_DDE_CONNECTION_DECL
936{
939 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
940};
941
942// OOO_FORM_CONTROL_ACTIONS
944{
949 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(false) ),
950 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
951};
952
953// OOO_FORM_COLUMN_ACTIONS
955{
962 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
963};
964
965// OOO_FORM_PROP_ACTIONS
967{
970 ENTRY0( FORM, PROPERTY_IS_LIST, XML_ATACTION_REMOVE ),
971 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
972};
973
974// OOO_XLINK_ACTIONS
976{
977 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_uInt32(false) ),
978 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
979};
980
981// OOO_CONFIG_ITEM_SET_ACTIONS
983{
986 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
987};
988
989// OASIS_FORMULA_ACTIONS
991{
1000 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1001};
1002
1003// OOO_ERROR_MACRO_ACTIONS
1005{
1007 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1008};
1009
1010// OOO_DDE_CONV_MODE_ACTIONS
1012{
1013 ENTRY1Q( TABLE, LET_TEXT, XML_ATACTION_RENAME,
1015 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1016};
1017
1018// OOO_DATAPILOT_MEMBER_ACTIONS
1020{
1021 ENTRY1Q( TABLE, DISPLAY_DETAILS, XML_ATACTION_RENAME,
1023 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1024};
1025
1026// OOO_DATAPILOT_LEVEL_ACTIONS
1028{
1029 ENTRY1Q( TABLE, DISPLAY_EMPTY, XML_ATACTION_RENAME,
1031 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1032};
1033
1034// OOO_SOURCE_SERVICE_ACTIONS
1036{
1037 ENTRY1Q( TABLE, USERNAME, XML_ATACTION_RENAME,
1039 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1040};
1041
1042// OOO_ANIMATION_ACTIONS
1044{
1045 ENTRY0( DRAW, SHAPE_ID, XML_ATACTION_SHAPEID ),
1046 ENTRY0( PRESENTATION, PATH_ID, XML_ATACTION_SHAPEID ),
1047 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1048};
1049
1050// OOO_DRAW_AREA_POLYGON_ACTIONS (to be added to OOO_SHAPE_ACTIONS)
1052{
1055 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1056};
1057
1058// OOO_CHART_ACTIONS
1060{
1063 ENTRY0( CHART, ADD_IN_NAME, XML_ATACTION_REMOVE ),
1067 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1068};
1069
1070// OOO_ALPHABETICAL_INDEX_MARK_ACTIONS
1072{
1073 ENTRY1Q( TEXT, MAIN_ETRY, XML_ATACTION_RENAME,
1075 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1076};
1077
1078// OOO_SCRIPT_ACTIONS
1080{
1084 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1085};
1086
1088{
1094};
1095
1096namespace {
1097
1098class XMLDocumentTransformerContext_Impl : public XMLTransformerContext
1099{
1100 OUString const m_aElemQName;
1101 OUString m_aOldClass;
1102
1103public:
1104 XMLDocumentTransformerContext_Impl( XMLTransformerBase& rTransformer,
1105 const OUString& rQName );
1106 XMLDocumentTransformerContext_Impl( XMLTransformerBase& rTransformer,
1107 const OUString& rQName,
1108 sal_uInt16 nPrefix,
1110
1111 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1112 virtual void EndElement() override;
1113};
1114
1115}
1116
1117XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl(
1118 XMLTransformerBase& rImp,
1119 const OUString& rQName ) :
1120 XMLTransformerContext( rImp, rQName ),
1121 m_aElemQName( rQName )
1122{
1123}
1124XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl(
1125 XMLTransformerBase& rImp,
1126 const OUString& rQName ,
1127 sal_uInt16 nPrefix,
1129 XMLTransformerContext( rImp, rQName ),
1130 m_aElemQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
1131 ::xmloff::token::GetXMLToken( eToken ) ) )
1132{
1133}
1134
1135void XMLDocumentTransformerContext_Impl::StartElement(
1136 const Reference< XAttributeList >& rAttrList )
1137{
1138 Reference< XAttributeList > xAttrList( rAttrList );
1139
1140 m_aOldClass = GetTransformer().GetClass();
1141
1143 bool bOOo = false, bOOoW = false, bOOoC = false,
1144 bDOM=false, bDC = false, bSVG = false;
1145 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1146 for( sal_Int16 i=0; i < nAttrCount; i++ )
1147 {
1148 const OUString& rAttrName = xAttrList->getNameByIndex( i );
1149 OUString aLocalName;
1150 sal_uInt16 nPrefix =
1151 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1152 &aLocalName );
1153 if( XML_NAMESPACE_OFFICE == nPrefix &&
1154 IsXMLToken( aLocalName, XML_CLASS ) )
1155 {
1156 const OUString& rValue = xAttrList->getValueByIndex( i );
1157 GetTransformer().SetClass( rValue );
1158
1159 pMutableAttrList = new XMLMutableAttributeList( xAttrList );
1160 xAttrList = pMutableAttrList;
1161 OUString sMime = "application/vnd.oasis.opendocument." + rValue;
1162 pMutableAttrList->SetValueByIndex( i, sMime );
1163 OUString aNewAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, ::xmloff::token::GetXMLToken( XML_MIMETYPE ) ) );
1164 pMutableAttrList->RenameAttributeByIndex(i, aNewAttrQName );
1165 break;
1166 }
1167 else if( XML_NAMESPACE_XMLNS == nPrefix )
1168 {
1169 const OUString& rAttrValue = xAttrList->getValueByIndex( i );
1170 if( IsXMLToken( rAttrValue, XML_N_OOO ) )
1171 bOOo = true;
1172 else if( IsXMLToken( rAttrValue, XML_N_OOOW ) )
1173 bOOoW = true;
1174 else if( IsXMLToken( rAttrValue, XML_N_OOOC ) )
1175 bOOoC = true;
1176 else if( IsXMLToken( rAttrValue, XML_N_DOM ) )
1177 bDOM = true;
1178 else if( IsXMLToken( rAttrValue, XML_N_DC ) )
1179 bDC = true;
1180 else if( IsXMLToken( rAttrValue, XML_N_SVG ) )
1181 bSVG = true;
1182 }
1183 }
1184 if( !(bOOo && bOOoW && bOOoC && bDOM && bDC && bSVG) )
1185 {
1186 if( !pMutableAttrList )
1187 {
1188 pMutableAttrList = new XMLMutableAttributeList( xAttrList );
1189 xAttrList = pMutableAttrList;
1190 }
1191 if( !bOOo )
1192 pMutableAttrList->AddAttribute(
1193 GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1195 GetTransformer().GetNamespaceMap().GetNameByKey(
1197 if( !bOOoW )
1198 pMutableAttrList->AddAttribute(
1199 GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1201 GetTransformer().GetNamespaceMap().GetNameByKey(
1203 if( !bOOoC )
1204 pMutableAttrList->AddAttribute(
1205 GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1207 GetTransformer().GetNamespaceMap().GetNameByKey(
1209 if( !bDOM )
1210 pMutableAttrList->AddAttribute(
1211 GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1213 GetTransformer().GetNamespaceMap().GetNameByKey(
1215 if( !bDC )
1216 pMutableAttrList->AddAttribute(
1217 GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1219 GetTransformer().GetNamespaceMap().GetNameByKey(
1220 XML_NAMESPACE_DC ) );
1221 if( !bSVG )
1222 pMutableAttrList->AddAttribute(
1223 GetTransformer().GetNamespaceMap().GetAttrNameByKey(
1225 GetTransformer().GetNamespaceMap().GetNameByKey(
1227 }
1228
1229 GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1230}
1231
1232void XMLDocumentTransformerContext_Impl::EndElement()
1233{
1234 GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1235
1236 GetTransformer().SetClass( m_aOldClass );
1237}
1238
1239namespace {
1240
1241class XMLBodyTransformerContext_Impl : public XMLTransformerContext
1242{
1243 OUString m_aClassQName;
1244
1245public:
1246 XMLBodyTransformerContext_Impl( XMLTransformerBase& rTransformer,
1247 const OUString& rQName );
1248
1249 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1250 virtual void EndElement() override;
1251};
1252
1253}
1254
1255XMLBodyTransformerContext_Impl::XMLBodyTransformerContext_Impl(
1256 XMLTransformerBase& rImp,
1257 const OUString& rQName ) :
1258 XMLTransformerContext( rImp, rQName )
1259{
1260}
1261
1262void XMLBodyTransformerContext_Impl::StartElement(
1263 const Reference< XAttributeList >& rAttrList )
1264{
1266
1268 new XMLMutableAttributeList( rAttrList );
1269 Reference< XAttributeList > xAttrList = pMutableAttrList;
1270 OUString aClass( GetTransformer().GetClass() );
1271 if( aClass.isEmpty() )
1272 {
1273 aClass = GetXMLToken( XML_TEXT );
1274 }
1275 else if( IsXMLToken( aClass, XML_TEXT_GLOBAL ) )
1276 {
1277 OUString aGlobalQName(
1278 GetTransformer().GetNamespaceMap().GetQNameByKey(
1280 pMutableAttrList->AddAttribute( aGlobalQName, GetXMLToken(XML_TRUE) );
1281
1282 aClass = GetXMLToken( XML_TEXT );
1283 }
1284
1285 m_aClassQName = GetTransformer().GetNamespaceMap().GetQNameByKey(
1286 XML_NAMESPACE_OFFICE, aClass );
1287 GetTransformer().GetDocHandler()->startElement( m_aClassQName,
1288 xAttrList );
1289}
1290
1291void XMLBodyTransformerContext_Impl::EndElement()
1292{
1293 GetTransformer().GetDocHandler()->endElement( m_aClassQName );
1295}
1296
1297namespace {
1298
1299class XMLTabStopOOoTContext_Impl : public XMLPersElemContentTContext
1300{
1301public:
1302 XMLTabStopOOoTContext_Impl( XMLTransformerBase& rTransformer,
1303 const OUString& rQName );
1304
1305 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1306};
1307
1308}
1309
1310XMLTabStopOOoTContext_Impl::XMLTabStopOOoTContext_Impl(
1311 XMLTransformerBase& rImp,
1312 const OUString& rQName ) :
1313 XMLPersElemContentTContext( rImp, rQName )
1314{
1315}
1316
1317void XMLTabStopOOoTContext_Impl::StartElement(
1318 const Reference< XAttributeList >& rAttrList )
1319{
1320 XMLTransformerActions *pActions =
1321 GetTransformer().GetUserDefinedActions( OOO_TAB_STOP_ACTIONS );
1322 OSL_ENSURE( pActions, "go no actions" );
1323
1324 Reference< XAttributeList > xAttrList( rAttrList );
1326 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1327 for( sal_Int16 i=0; i < nAttrCount; i++ )
1328 {
1329 const OUString& rAttrName = xAttrList->getNameByIndex( i );
1330 OUString aLocalName;
1331 sal_uInt16 nPrefix =
1332 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1333 &aLocalName );
1334 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
1335 XMLTransformerActions::const_iterator aIter =
1336 pActions->find( aKey );
1337 if( aIter != pActions->end() )
1338 {
1339 if( !pMutableAttrList )
1340 {
1341 pMutableAttrList =
1342 new XMLMutableAttributeList( xAttrList );
1343 xAttrList = pMutableAttrList;
1344 }
1345 const OUString& rAttrValue = xAttrList->getValueByIndex( i );
1346 switch( (*aIter).second.m_nActionType )
1347 {
1349 {
1350 OUString aNewAttrQName(
1351 GetTransformer().GetNamespaceMap().GetQNameByKey(
1352 (*aIter).second.GetQNamePrefixFromParam1(),
1354 (*aIter).second.GetQNameTokenFromParam1()) ) );
1355 pMutableAttrList->RenameAttributeByIndex( i,
1356 aNewAttrQName );
1357 }
1358 if( IsXMLToken( aLocalName, XML_LEADER_CHAR ) &&
1359 !rAttrValue.isEmpty() &&
1360 rAttrValue[0] != ' ' )
1361 {
1362 OUString aNewAttrQName(
1363 GetTransformer().GetNamespaceMap().GetQNameByKey(
1366 pMutableAttrList->AddAttribute( aNewAttrQName,
1368 }
1369 break;
1371 {
1372 OUString aAttrValue( rAttrValue );
1374 aAttrValue ) )
1375 pMutableAttrList->SetValueByIndex( i, aAttrValue );
1376 }
1377 break;
1378 default:
1379 OSL_ENSURE( false, "unknown action" );
1380 break;
1381 }
1382 }
1383 }
1384
1386}
1387
1388namespace {
1389
1390class XMLTrackedChangesOOoTContext_Impl : public XMLTransformerContext
1391{
1392 sal_uInt16 const m_nPrefix;
1393 XMLTokenEnum const m_eToken;
1394
1395public:
1396 XMLTrackedChangesOOoTContext_Impl( XMLTransformerBase& rTransformer,
1397 const OUString& rQName,
1398 sal_uInt16 nPrefix,
1400
1401 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1402};
1403
1404}
1405
1406XMLTrackedChangesOOoTContext_Impl::XMLTrackedChangesOOoTContext_Impl(
1407 XMLTransformerBase& rImp,
1408 const OUString& rQName,
1409 sal_uInt16 nPrefix,
1411 XMLTransformerContext( rImp, rQName ),
1412 m_nPrefix( nPrefix ),
1413 m_eToken( eToken )
1414{
1415}
1416
1417void XMLTrackedChangesOOoTContext_Impl::StartElement(
1418 const Reference< XAttributeList >& rAttrList )
1419{
1420 sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0;
1421 for( sal_Int16 i=0; i < nAttrCount; i++ )
1422 {
1423 const OUString& rAttrName = rAttrList->getNameByIndex( i );
1424 OUString aLocalName;
1425 sal_uInt16 nPrefix =
1426 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1427 &aLocalName );
1428 if( m_nPrefix == nPrefix && IsXMLToken( aLocalName, m_eToken ) )
1429 {
1430 const Reference< XPropertySet > rPropSet =
1431 GetTransformer().GetPropertySet();
1432 OSL_ENSURE( rPropSet.is(), "no info property set" );
1433 if( rPropSet.is() )
1434 {
1435 OUString aPropName("RedlineProtectionKey");
1436 Reference< XPropertySetInfo > xPropSetInfo(
1437 rPropSet->getPropertySetInfo() );
1438 if( xPropSetInfo.is() &&
1439 xPropSetInfo->hasPropertyByName( aPropName ) )
1440 {
1441 Sequence < sal_Int8 > aKey;
1443 rAttrList->getValueByIndex( i ) );
1444 rPropSet->setPropertyValue( aPropName, Any( aKey ) );
1445 }
1446 else
1447 {
1448 OSL_ENSURE( false, "RedineProtectionKey is missing" );
1449 }
1450 }
1451 break;
1452 }
1453 }
1455}
1456
1457namespace {
1458
1459class XMLTableOOoTransformerContext_Impl : public XMLTransformerContext
1460{
1461 OUString const m_aElemQName;
1462
1463public:
1464 XMLTableOOoTransformerContext_Impl( XMLTransformerBase& rTransformer,
1465 const OUString& rQName );
1466
1467 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1468 virtual void EndElement() override;
1469};
1470
1471}
1472
1473XMLTableOOoTransformerContext_Impl::XMLTableOOoTransformerContext_Impl(
1474 XMLTransformerBase& rImp,
1475 const OUString& rQName ) :
1476 XMLTransformerContext( rImp, rQName ),
1477 m_aElemQName( rQName )
1478{
1479}
1480
1481void XMLTableOOoTransformerContext_Impl::StartElement(
1482 const Reference< XAttributeList >& rAttrList )
1483{
1484 // Perform OOO_STYLE_REF_ACTIONS for all applications (#i50521#)
1485 Reference< XAttributeList > xAttrList( rAttrList );
1486 XMLMutableAttributeList* pMutableAttrList =
1487 GetTransformer().ProcessAttrList( xAttrList, OOO_STYLE_REF_ACTIONS, false );
1488 if( rAttrList->getLength() && IsXMLToken( GetTransformer().GetClass(), XML_SPREADSHEET ) )
1489 {
1490 bool bPrintRanges(false);
1491
1492 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1493 for( sal_Int16 i=0; i < nAttrCount; i++ )
1494 {
1495 const OUString& rAttrName = xAttrList->getNameByIndex( i );
1496 OUString aLocalName;
1497 sal_uInt16 nPrefix =
1498 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1499 &aLocalName );
1500 if( XML_NAMESPACE_TABLE == nPrefix &&
1501 IsXMLToken( aLocalName, XML_PRINT_RANGES ) )
1502 {
1503 bPrintRanges = true;
1504 }
1505 }
1506 if (!bPrintRanges && pMutableAttrList)
1507 {
1508 xAttrList = pMutableAttrList;
1509 pMutableAttrList->AddAttribute(GetTransformer().GetNamespaceMap().GetQNameByKey(
1512 }
1513 }
1514
1515 GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1516}
1517
1518void XMLTableOOoTransformerContext_Impl::EndElement()
1519{
1520 GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1521}
1522
1524 const TransformerAction_Impl& rAction,
1525 const OUString& rQName,
1526 bool bPersistent )
1527{
1528 switch( rAction.m_nActionType )
1529 {
1530 case XML_ETACTION_DOCUMENT:
1531 return new XMLDocumentTransformerContext_Impl( *this, rQName );
1532 case XML_ETACTION_DOCUMENT_RENAME:
1533 return new XMLDocumentTransformerContext_Impl( *this, rQName,
1534 rAction.GetQNamePrefixFromParam1(),
1535 rAction.GetQNameTokenFromParam1() );
1536 case XML_ETACTION_BODY:
1537 return new XMLBodyTransformerContext_Impl( *this, rQName );
1538 case XML_ETACTION_STYLE:
1539 return new XMLStyleOOoTContext( *this, rQName,
1540 static_cast< XMLFamilyType >( rAction.m_nParam1 ),
1541 bPersistent );
1542 case XML_ETACTION_STYLE_RENAME:
1543 return new XMLStyleOOoTContext( *this, rQName,
1544 static_cast< XMLFamilyType >( rAction.m_nParam2 ),
1545 rAction.GetQNamePrefixFromParam1(),
1546 rAction.GetQNameTokenFromParam1(),
1547 bPersistent );
1548 case XML_ETACTION_FRAME:
1549 return new XMLFrameOOoTransformerContext( *this, rQName );
1550 case XML_ETACTION_EVENT:
1551 return new XMLEventOOoTransformerContext( *this, rQName, bPersistent );
1552 case XML_ETACTION_TAB_STOP:
1553 return new XMLTabStopOOoTContext_Impl( *this, rQName );
1554 case XML_ETACTION_FORM_CONTROL:
1555 return new XMLControlOOoTransformerContext( *this, rQName );
1556 case XML_ETACTION_FORM_PROPERTY:
1557 return new XMLFormPropOOoTransformerContext( *this, rQName );
1558#if !ENABLE_WASM_STRIP_CHART
1559 case XML_ETACTION_CHART:
1560 return new XMLChartOOoTransformerContext( *this, rQName );
1561 case XML_ETACTION_CHART_PLOT_AREA:
1562 return new XMLChartPlotAreaOOoTContext( *this, rQName );
1563#endif
1564 case XML_ETACTION_TRACKED_CHANGES:
1565 return new XMLTrackedChangesOOoTContext_Impl( *this, rQName,
1566 rAction.GetQNamePrefixFromParam1(),
1567 rAction.GetQNameTokenFromParam1() );
1568 case XML_ETACTION_TABLE:
1569 return new XMLTableOOoTransformerContext_Impl( *this, rQName );
1570 default:
1571 OSL_ENSURE( false, "no user defined context found!" );
1572 }
1573
1574 // default is copying
1575 return new XMLTransformerContext( *this, rQName );
1576}
1577
1579 sal_uInt16 n )
1580{
1581 XMLTransformerActions *pActions = nullptr;
1582 if( n < MAX_OOO_ACTIONS )
1583 {
1584 if( !m_aActions[n] )
1585 {
1587 {
1588 m_aActions[n].reset(
1590 }
1591 else switch( n )
1592 {
1593 case OOO_STYLE_ACTIONS:
1596 break;
1600 break;
1601 case OOO_SHAPE_ACTIONS:
1604 break;
1608 break;
1612 break;
1616 break;
1620 break;
1624 break;
1628 break;
1632 break;
1636 break;
1640 break;
1641 case OOO_PARA_ACTIONS:
1644 break;
1648 break;
1652 break;
1656 break;
1660 break;
1664 break;
1668 break;
1670 // Use special actions for Writer documents. (#i50322#)
1672 isWriter()
1675 break;
1679 break;
1680 case OOO_EVENT_ACTIONS:
1683 break;
1687 break;
1691 break;
1695 break;
1696 case OOO_XLINK_ACTIONS:
1699 break;
1703 break;
1707 break;
1708 case OOO_CHART_ACTIONS:
1711 break;
1715 break;
1719 break;
1723 break;
1727 break;
1731 break;
1735 break;
1741 break;
1742 case OOO_SCRIPT_ACTIONS:
1745 break;
1749 break;
1750 }
1751 }
1752 pActions = m_aActions[n].get();
1753 }
1754
1755 return pActions;
1756}
1757
1758OUString OOo2OasisTransformer::GetEventName( const OUString& rName, bool )
1759{
1760 if( !m_pEventMap )
1762
1763 OUString aNewName;
1764 sal_uInt16 nPrefix = XMLEventOOoTransformerContext::GetEventName( rName,
1765 aNewName, *m_pEventMap );
1766 if( XML_NAMESPACE_UNKNOWN != nPrefix )
1767 aNewName = GetNamespaceMap().GetQNameByKey( nPrefix, aNewName );
1768 else
1769 aNewName = rName;
1770
1771 return aNewName;
1772}
1773
1775 OUString aSubServiceName )
1776 noexcept :
1778 m_aImplName(std::move(aImplName)),
1779 m_aSubServiceName(std::move(aSubServiceName)),
1780 m_pEventMap( nullptr )
1781{
1783 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
1784
1786 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META), XML_NAMESPACE_META );
1787
1789 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
1790
1792 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
1793
1795 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
1796
1798 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
1799
1801 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
1802
1804 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
1805
1807 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
1808
1811
1813 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
1814
1816 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
1817
1819 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
1820
1821 GetNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO), XML_NAMESPACE_FO );
1822 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
1823
1824 GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG), XML_NAMESPACE_SVG );
1825 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
1826
1827 for(auto & rp : m_aActions)
1828 rp.reset();
1829}
1830
1832{
1833 for(auto & rp : m_aActions)
1834 rp.reset();
1836}
1837
1839{
1840 Any aRet;
1841 if ( rType == cppu::UnoType<XImporter>::get())
1842 {
1843 Reference<XImporter> xThis( this );
1844 aRet <<= xThis;
1845 }
1846 else if ( rType == cppu::UnoType<XFilter>::get())
1847 {
1848 Reference<XFilter> xThis( this );
1849 aRet <<= xThis;
1850 }
1851 else
1852 {
1853 aRet = XMLTransformerBase::queryInterface(rType);
1854 }
1855
1856 return aRet;
1857}
1858
1859// XImporter
1861 const Reference< XComponent >& xDoc )
1862{
1863 if( !GetDocHandler().is() )
1864 {
1865 // if initialize hasn't been called, then we have to call it now
1866 // to get the sub component initialized.
1867 Sequence<Any> aArgs( 0 );
1868 Initialize( aArgs );
1869 }
1870
1871 mxModel.set( xDoc, UNO_QUERY );
1872
1873 Reference< XImporter > xImp( GetDocHandler(), UNO_QUERY );
1874 OSL_ENSURE( xImp.is(), "doc handler is not an importer" );
1875 if( xImp.is() )
1876 xImp->setTargetDocument( xDoc );
1877}
1878
1879// XFilter
1881 const Sequence< PropertyValue >& aDescriptor )
1882{
1883 Reference< XFilter> xFilter( GetDocHandler(), UNO_QUERY );
1884 OSL_ENSURE( xFilter.is(), "doc handler is not a filter" );
1885 if( xFilter.is() )
1886 return xFilter->filter( aDescriptor );
1887
1888 return false;
1889}
1890
1892{
1893 Reference< XFilter> xFilter( GetDocHandler(), UNO_QUERY );
1894 OSL_ENSURE( xFilter.is(), "doc handler is not a filter" );
1895 if( xFilter.is() )
1896 xFilter->cancel();
1897}
1898
1899// XInitialize
1901 const Sequence< Any >& rArguments )
1902{
1903 Initialize( rArguments );
1904}
1905
1907{
1908 if( !GetDocHandler().is() )
1909 {
1910 // if initialize hasn't been called, then we have to call it now
1911 // to get the sub component initialized.
1912 Sequence<Any> aArgs( 0 );
1913 Initialize( aArgs );
1914 }
1915
1917}
1918
1920 const Sequence< Any >& rArguments )
1921{
1922 OSL_ENSURE( !GetDocHandler().is(), "duplication initialization" );
1923
1924 Reference< XInterface > xFilter;
1925 if( !m_aSubServiceName.isEmpty() )
1926 {
1927 Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
1928 // get filter component
1929 xFilter =
1930 xContext->getServiceManager()->createInstanceWithArgumentsAndContext(m_aSubServiceName, rArguments, xContext);
1931 SAL_WARN_IF(!xFilter, "xmloff", "could not instantiate " << m_aSubServiceName);
1932 }
1933 else
1934 SAL_WARN("xmloff", "no subservice name");
1935
1936 if (xFilter.is())
1937 {
1938 Sequence<Any> aArgs( 1 + rArguments.getLength() );
1939 auto pArgs = aArgs.getArray();
1940 pArgs[0] <<= xFilter;
1941 std::copy(rArguments.begin(), rArguments.end(), std::next(pArgs));
1943
1944 OSL_ENSURE( GetDocHandler() == xFilter,
1945 "duplicate doc handler" );
1946 }
1947 else
1948 {
1949 XMLTransformerBase::initialize( rArguments );
1950 }
1951}
1952
1953const css::uno::Sequence<sal_Int8>& OOo2OasisTransformer::getUnoTunnelId() noexcept
1954{
1955 static const comphelper::UnoIdInit theOOo2OasisTransformerUnoTunnelId;
1956 return theOOo2OasisTransformerUnoTunnelId.getSeq();
1957}
1958
1959// XUnoTunnel
1961{
1962 return comphelper::getSomethingImpl(rId, this);
1963}
1964
1965// XServiceInfo
1967{
1968 return m_aImplName;
1969}
1970
1971sal_Bool SAL_CALL OOo2OasisTransformer::supportsService( const OUString& ServiceName )
1972{
1973 return cppu::supportsService(this, ServiceName);
1974}
1975
1977{
1978 return { };
1979}
1980
1981// XTypeProvider
1982Sequence< css::uno::Type > SAL_CALL OOo2OasisTransformer::getTypes()
1983{
1984 return cppu::OTypeCollection(
1987 XMLTransformerBase::getTypes()
1988 ).getTypes();
1989}
1990
1991// Service registration
1992
1993extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
1995 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
1996{
1997 return cppu::acquire(new OOo2OasisTransformer("com.sun.star.comp.OOo2OasisTransformer", OUString()));
1998}
1999
2000#define OOO_IMPORTER( className, implName, subServiceName ) \
2001extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* \
2002xmloff_##className##_get_implementation( \
2003 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&) \
2004{ \
2005 return cppu::acquire(new OOo2OasisTransformer( \
2006 implName, \
2007 subServiceName )); \
2008}
2009
2010OOO_IMPORTER( XMLWriterImportOOO,
2011 "com.sun.star.comp.Writer.XMLImporter",
2012 "com.sun.star.comp.Writer.XMLOasisImporter" )
2013OOO_IMPORTER( XMLWriterStylesImportOOO,
2015 "com.sun.star.comp.Writer.XMLOasisStylesImporter" )
2016OOO_IMPORTER( XMLWriterContentImportOOO,
2017 "com.sun.star.comp.Writer.XMLContentImporter",
2018 "com.sun.star.comp.Writer.XMLOasisContentImporter" )
2019OOO_IMPORTER( XMLWriterMetaImportOOO,
2020 "com.sun.star.comp.Writer.XMLMetaImporter",
2021 "com.sun.star.comp.Writer.XMLOasisMetaImporter" )
2022OOO_IMPORTER( XMLWriterSettingsImportOOO,
2023 "com.sun.star.comp.Writer.XMLSettingsImporter",
2024 "com.sun.star.comp.Writer.XMLOasisSettingsImporter" )
2025
2026OOO_IMPORTER( XMLImpressImportOOO,
2027 "com.sun.star.comp.Impress.XMLImporter",
2028 "com.sun.star.comp.Impress.XMLOasisImporter" )
2029OOO_IMPORTER( XMLImpressStylesImportOOO,
2030 "com.sun.star.comp.Impress.XMLStylesImporter",
2031 "com.sun.star.comp.Impress.XMLOasisStylesImporter" )
2032OOO_IMPORTER( XMLImpressContentImportOOO,
2033 "com.sun.star.comp.Impress.XMLContentImporter",
2034 "com.sun.star.comp.Impress.XMLOasisContentImporter" )
2035OOO_IMPORTER( XMLImpressMetaImportOOO,
2036 "com.sun.star.comp.Impress.XMLMetaImporter",
2037 "com.sun.star.comp.Impress.XMLOasisMetaImporter" )
2038OOO_IMPORTER( XMLImpressSettingsImportOOO,
2039 "com.sun.star.comp.Impress.XMLSettingsImporter",
2040 "com.sun.star.comp.Impress.XMLOasisSettingsImporter" )
2041
2042OOO_IMPORTER( XMLDrawImportOOO,
2043 "com.sun.star.comp.Draw.XMLImporter",
2044 "com.sun.star.comp.Draw.XMLOasisImporter" )
2045OOO_IMPORTER( XMLDrawStylesImportOOO,
2046 "com.sun.star.comp.Draw.XMLStylesImporter",
2047 "com.sun.star.comp.Draw.XMLOasisStylesImporter" )
2048OOO_IMPORTER( XMLDrawContentImportOOO,
2049 "com.sun.star.comp.Draw.XMLContentImporter",
2050 "com.sun.star.comp.Draw.XMLOasisContentImporter" )
2051OOO_IMPORTER( XMLDrawMetaImportOOO,
2052 "com.sun.star.comp.Draw.XMLMetaImporter",
2053 "com.sun.star.comp.Draw.XMLOasisMetaImporter" )
2054OOO_IMPORTER( XMLDrawSettingsImportOOO,
2055 "com.sun.star.comp.Draw.XMLSettingsImporter",
2056 "com.sun.star.comp.Draw.XMLOasisSettingsImporter" )
2057
2058OOO_IMPORTER( XMLCalcImportOOO,
2059 "com.sun.star.comp.Calc.XMLImporter",
2060 "com.sun.star.comp.Calc.XMLOasisImporter" )
2061OOO_IMPORTER( XMLCalcStylesImportOOO,
2062 "com.sun.star.comp.Calc.XMLStylesImporter",
2063 "com.sun.star.comp.Calc.XMLOasisStylesImporter" )
2064OOO_IMPORTER( XMLCalcContentImportOOO,
2065 "com.sun.star.comp.Calc.XMLContentImporter",
2066 "com.sun.star.comp.Calc.XMLOasisContentImporter" )
2067OOO_IMPORTER( XMLCalcMetaImportOOO,
2068 "com.sun.star.comp.Calc.XMLMetaImporter",
2069 "com.sun.star.comp.Calc.XMLOasisMetaImporter" )
2070OOO_IMPORTER( XMLCalcSettingsImportOOO,
2071 "com.sun.star.comp.Calc.XMLSettingsImporter",
2072 "com.sun.star.comp.Calc.XMLOasisSettingsImporter" )
2073
2074OOO_IMPORTER( XMLChartImportOOO,
2075 "com.sun.star.comp.Chart.XMLImporter",
2076 "com.sun.star.comp.Chart.XMLOasisImporter" )
2077OOO_IMPORTER( XMLChartStylesImportOOO,
2078 "com.sun.star.comp.Chart.XMLStylesImporter",
2079 "com.sun.star.comp.Chart.XMLOasisStylesImporter" )
2080OOO_IMPORTER( XMLChartContentImportOOO,
2081 "com.sun.star.comp.Chart.XMLContentImporter",
2082 "com.sun.star.comp.Chart.XMLOasisContentImporter" )
2083
2084OOO_IMPORTER( XMLMathMetaImportOOO,
2085 "com.sun.star.comp.Math.XMLMetaImporter",
2086 "com.sun.star.comp.Math.XMLOasisMetaImporter" )
2087OOO_IMPORTER( XMLMathSettingsImportOOO,
2088 "com.sun.star.comp.Math.XMLSettingsImporter",
2089 "com.sun.star.comp.Math.XMLOasisSettingsImporter" )
2090
2091OOO_IMPORTER( XMLMetaImportOOO,
2092 "com.sun.star.document.XMLMetaImporter",
2093 "com.sun.star.document.XMLOasisMetaImporter" )
2094
2095OOO_IMPORTER( XMLAutoTextEventImportOOO,
2096 "com.sun.star.comp.Writer.XMLAutotextEventsImporter",
2097 "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter" )
2098
2099/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ OOO_TAB_STOP_ACTIONS
@ OOO_FRAME_ATTR_ACTIONS
@ OOO_CONFIG_ITEM_SET_ACTIONS
@ OOO_COLUMNS_ACTIONS
@ OOO_TABLE_VALUE_TYPE_ACTIONS
@ OOO_FRAME_ELEM_ACTIONS
@ OOO_FORM_PROP_ACTIONS
@ MAX_OOO_PROP_ACTIONS
@ OOO_FORM_COLUMN_ACTIONS
@ OOO_TEXT_VALUE_TYPE_ACTIONS
@ OOO_CHANGE_INFO_ACTIONS
@ OOO_MASTER_PAGE_ACTIONS
@ OOO_DDE_CONV_MODE_ACTIONS
@ OOO_XLINK_ACTIONS
@ OOO_DATAPILOT_LEVEL_ACTIONS
@ OOO_ANIMATION_ACTIONS
@ OOO_DDE_CONNECTION_DECL_ACTIONS
@ OOO_FORMULA_ACTIONS
@ OOO_SHAPE_ACTIONS
@ OOO_DRAW_AREA_POLYGON_ACTIONS
@ OOO_SCRIPT_ACTIONS
@ MAX_OOO_ACTIONS
@ OOO_DATAPILOT_MEMBER_ACTIONS
@ OOO_EVENT_ACTIONS
@ OOO_ALPHABETICAL_INDEX_MARK_ACTIONS
@ OOO_CONNECTOR_ACTIONS
@ OOO_INDEX_ENTRY_TAB_STOP_ACTIONS
@ OOO_ANNOTATION_ACTIONS
@ OOO_STYLE_ACTIONS
@ OOO_FOOTNOTE_SEP_ACTIONS
@ OOO_SOURCE_SERVICE_ACTIONS
@ OOO_FORM_CONTROL_ACTIONS
@ OOO_STYLE_REF_ACTIONS
@ OOO_DROP_CAP_ACTIONS
@ OOO_PARA_ACTIONS
@ OOO_LINENUMBERING_ACTIONS
@ OOO_BACKGROUND_IMAGE_ACTIONS
@ OOO_ERROR_MACRO_ACTIONS
@ OOO_FONT_DECL_ACTIONS
@ OOO_CHART_ACTIONS
@ XML_ATACTION_EVENT_NAME
@ XML_ATACTION_RENAME_ATTRIBUTE
@ XML_ATACTION_MOVE_TO_ELEM
@ XML_ATACTION_RENAME_INCH2IN
@ XML_ATACTION_REMOVE
@ XML_ATACTION_EOT
@ XML_ATACTION_RENAME_ENCODE_STYLE_NAME_REF
@ XML_ATACTION_TWIPS2IN
@ XML_ATACTION_URI_OOO
@ XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX
@ XML_ATACTION_SVG_WIDTH_HEIGHT_OOO
@ XML_ATACTION_ENCODE_STYLE_NAME
@ XML_ATACTION_RENAME_NEG_PERCENT
@ XML_ATACTION_ENCODE_STYLE_NAME_REF
@ XML_ATACTION_INCH2IN
@ XML_ATACTION_MACRO_LOCATION
@ XML_ATACTION_SHAPEID
@ XML_ATACTION_HREF
@ XML_ATACTION_INCHS2INS
@ XML_ATACTION_RENAME
@ XML_ATACTION_ADD_APP_NAMESPACE_PREFIX
@ XML_ATACTION_ADD_NAMESPACE_PREFIX
@ XML_ATACTION_STYLE_FAMILY
@ XML_ATACTION_NEG_PERCENT
@ XML_ATACTION_MACRO_NAME
@ XML_ETACTION_RENAME_ELEM_ADD_PROC_ATTR
@ XML_ETACTION_EOT
@ XML_ETACTION_RENAME_ELEM
@ XML_ETACTION_PROC_ATTRS_COND
@ XML_ETACTION_RENAME_ELEM_PROC_ATTRS
@ XML_ETACTION_RENAME_ELEM_ADD_ATTR
@ XML_ETACTION_COPY_TEXT
@ XML_ETACTION_USER_DEFINED
@ XML_ETACTION_COPY
@ XML_ETACTION_MOVE_ATTRS_TO_ELEMS
@ XML_ETACTION_COPY_CONTENT
@ XML_ETACTION_PROC_ATTRS
XMLFamilyType
Definition: FamilyType.hxx:23
@ XML_FAMILY_TYPE_PAGE_LAYOUT
Definition: FamilyType.hxx:28
@ XML_FAMILY_TYPE_FILL_IMAGE
Definition: FamilyType.hxx:43
@ XML_FAMILY_TYPE_GRADIENT
Definition: FamilyType.hxx:41
@ XML_FAMILY_TYPE_HATCH
Definition: FamilyType.hxx:42
@ XML_FAMILY_TYPE_END
Definition: FamilyType.hxx:46
@ XML_FAMILY_TYPE_MARKER
Definition: FamilyType.hxx:45
@ XML_FAMILY_TYPE_STROKE_DASH
Definition: FamilyType.hxx:44
@ XML_FAMILY_TYPE_DATA
Definition: FamilyType.hxx:40
@ XML_FAMILY_TYPE_LIST
Definition: FamilyType.hxx:38
@ XML_FAMILY_TYPE_HEADER_FOOTER
Definition: FamilyType.hxx:29
#define MIN_HEIGHT
XMLTransformerActionInit const aErrorMacroActionTable[]
Definition: OOo2Oasis.cxx:1004
#define ENTRY2(n, l, a, p1, p2)
Definition: OOo2Oasis.cxx:84
XMLTransformerActionInit const aConnectorActionTable[]
Definition: OOo2Oasis.cxx:764
#define ENTRY1Q(n, l, a, n1, l1)
Definition: OOo2Oasis.cxx:91
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:2033
XMLTransformerActionInit const aScriptActionTable[]
Definition: OOo2Oasis.cxx:1079
XMLTransformerActionInit const aTextValueTypeActionTable[]
Definition: OOo2Oasis.cxx:845
XMLTransformerActionInit const aFormControlActionTable[]
Definition: OOo2Oasis.cxx:943
XMLTransformerActionInit const aConfigItemSetActionTable[]
Definition: OOo2Oasis.cxx:982
XMLTransformerActionInit const aDDEConnectionDeclActionTable[]
Definition: OOo2Oasis.cxx:935
XMLTransformerActionInit const aBackgroundImageActionTable[]
Definition: OOo2Oasis.cxx:915
XMLTransformerActionInit const aFrameAttrActionTable[]
Definition: OOo2Oasis.cxx:616
XMLTransformerActionInit const aFormulaActionTable[]
Definition: OOo2Oasis.cxx:990
XMLTransformerActionInit const aAnnotationActionTable[]
Definition: OOo2Oasis.cxx:893
XMLTransformerActionInit const aDataPilotLevelActionTable[]
Definition: OOo2Oasis.cxx:1027
XMLTransformerActionInit const aFrameElemActionTable[]
Definition: OOo2Oasis.cxx:603
#define ENTRY1(n, l, a, p1)
Definition: OOo2Oasis.cxx:89
XMLTransformerActionInit const aFontDeclActionTable[]
Definition: OOo2Oasis.cxx:668
XMLTransformerActionInit const aDDEConvModeActionTable[]
Definition: OOo2Oasis.cxx:1011
XMLTransformerActionInit const aStyleActionTable[]
Definition: OOo2Oasis.cxx:581
#define OOO_IMPORTER(className, implName, subServiceName)
Definition: OOo2Oasis.cxx:2000
XMLTransformerActionInit const aDrawAreaPolygonActionTable[]
Definition: OOo2Oasis.cxx:1051
XMLTransformerActionInit const aXLinkActionTable[]
Definition: OOo2Oasis.cxx:975
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * xmloff_OOo2OasisTransformer_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: OOo2Oasis.cxx:1994
#define ENTRY3QQN(n, l, a, n1, l1, n2, l2, p3)
Definition: OOo2Oasis.cxx:80
XMLTransformerActionInit const aParaActionTable[]
Definition: OOo2Oasis.cxx:678
XMLTokenEnum const aTokenMap[]
Definition: OOo2Oasis.cxx:1087
XMLTransformerActionInit const aMasterPageActionTable[]
Definition: OOo2Oasis.cxx:658
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:2039
XMLTransformerActionInit const aSourceServiceActionTable[]
Definition: OOo2Oasis.cxx:1035
XMLTransformerActionInit const aAlphabeticalIndexMarkActionTable[]
Definition: OOo2Oasis.cxx:1071
XMLTransformerActionInit const aDropCapActionTable[]
Definition: OOo2Oasis.cxx:824
XMLTransformerActionInit const aFootnoteSepActionTable[]
Definition: OOo2Oasis.cxx:815
XMLTransformerActionInit const aTabStopActionTable[]
Definition: OOo2Oasis.cxx:797
XMLTransformerActionInit const aDataPilotMemberActionTable[]
Definition: OOo2Oasis.cxx:1019
XMLTransformerActionInit const aChartActionTable[]
Definition: OOo2Oasis.cxx:1059
XMLTransformerActionInit const aEventActionTable[]
Definition: OOo2Oasis.cxx:645
XMLTransformerActionInit const aStyleRefActionTable[]
Definition: OOo2Oasis.cxx:689
com sun star comp Writer com sun star comp Writer XMLOasisStylesImporter com sun star comp Writer XMLMetaImporter
Definition: OOo2Oasis.cxx:2020
XMLTransformerActionInit const aLineNumberingActionTable[]
Definition: OOo2Oasis.cxx:806
#define ENTRY0(n, l, a)
Definition: OOo2Oasis.cxx:94
XMLTransformerActionInit const aActionTable[]
Definition: OOo2Oasis.cxx:104
XMLTransformerActionInit const aAnimationsActionTable[]
Definition: OOo2Oasis.cxx:1043
XMLTransformerActionInit const aIndexEntryTabStopActionTable[]
Definition: OOo2Oasis.cxx:789
XMLTransformerActionInit const aFormPropActionTable[]
Definition: OOo2Oasis.cxx:966
XMLTransformerActionInit const aChangeInfoActionTable[]
Definition: OOo2Oasis.cxx:905
XMLTransformerActionInit const aShapeActionTable[]
Definition: OOo2Oasis.cxx:719
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:2027
XMLTransformerActionInit const aColumnsActionTable[]
Definition: OOo2Oasis.cxx:831
com sun star comp Writer XMLStylesImporter
Definition: OOo2Oasis.cxx:2014
XMLTransformerActionInit const aTableValueTypeActionTable[]
Definition: OOo2Oasis.cxx:868
XMLTransformerActionInit const aFormColumnActionTable[]
Definition: OOo2Oasis.cxx:954
static constexpr sal_Int32 RENAME_ENTRY(XMLTokenEnum f, XMLTokenEnum s)
Definition: OOo2Oasis.cxx:99
XMLTransformerActionInit const aWriterBackgroundImageActionTable[]
Definition: OOo2Oasis.cxx:927
#define ENTRY2QN(n, l, a, n1, l1, p2)
Definition: OOo2Oasis.cxx:86
#define MAP(name, prefix, token, type, context, version)
@ XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY
NAME
#define INDEX_TITLE
OOo2OasisTransformer(OUString aImplName, OUString aSubServiceName) noexcept
Definition: OOo2Oasis.cxx:1774
virtual sal_Bool SAL_CALL filter(const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor) override
Definition: OOo2Oasis.cxx:1880
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: OOo2Oasis.cxx:1976
virtual void SAL_CALL cancel() override
Definition: OOo2Oasis.cxx:1891
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept
Definition: OOo2Oasis.cxx:1953
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: OOo2Oasis.cxx:1971
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: OOo2Oasis.cxx:1523
virtual ~OOo2OasisTransformer() noexcept override
Definition: OOo2Oasis.cxx:1831
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &aType) override
Definition: OOo2Oasis.cxx:1838
void Initialize(const css::uno::Sequence< css::uno::Any > &aArguments)
Definition: OOo2Oasis.cxx:1919
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
Definition: OOo2Oasis.cxx:1900
std::unique_ptr< XMLTransformerActions > m_aActions[MAX_OOO_ACTIONS]
Definition: OOo2Oasis.hxx:37
virtual void SAL_CALL setTargetDocument(const css::uno::Reference< css::lang::XComponent > &xDoc) override
Definition: OOo2Oasis.cxx:1860
OUString const m_aImplName
Definition: OOo2Oasis.hxx:34
OUString const m_aSubServiceName
Definition: OOo2Oasis.hxx:35
XMLTransformerOOoEventMap_Impl * m_pEventMap
Definition: OOo2Oasis.hxx:38
virtual OUString SAL_CALL getImplementationName() override
Definition: OOo2Oasis.cxx:1966
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: OOo2Oasis.cxx:1960
virtual void SAL_CALL startDocument() override
Definition: OOo2Oasis.cxx:1906
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: OOo2Oasis.cxx:1578
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: OOo2Oasis.cxx:1758
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: OOo2Oasis.cxx:1982
OUString GetQNameByKey(sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
static sal_uInt16 GetEventName(const OUString &rName, OUString &rNewName, XMLTransformerOOoEventMap_Impl &rMap)
static XMLTransformerOOoEventMap_Impl * CreateEventMap()
static void FlushEventMap(XMLTransformerOOoEventMap_Impl *p)
void AddAttribute(const OUString &sName, const OUString &sValue)
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
static XMLTransformerActions * CreateTransformerActions(sal_uInt16 nType)
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
SvXMLNamespaceMap & GetNamespaceMap()
static bool ReplaceSingleInchWithIn(OUString &rValue)
virtual void SAL_CALL startDocument() override
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler() const
friend class XMLTransformerContext
css::uno::Reference< css::frame::XModel > mxModel
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
static void decode(css::uno::Sequence< sal_Int8 > &aPass, std::u16string_view sBuffer)
const css::uno::Sequence< sal_Int8 > & getSeq() const
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes()
constexpr OUStringLiteral TITLE
constexpr OUStringLiteral PROPERTY_TYPE
const bool READONLY
DRAW
sal_Int64 n
constexpr OUStringLiteral SERVICE_NAME
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
const sal_uInt8 MARGIN_RIGHT
const sal_uInt8 MARGIN_LEFT
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
Reference< XComponentContext > getProcessComponentContext()
FORMULA
CONDITION
DATE
Type
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
FORM
const sal_uInt16 WIDTH
int i
OUString aPropName
const sal_uInt16 XML_NAMESPACE_UNKNOWN
const sal_uInt16 XML_NAMESPACE_XMLNS
END
DOCUMENT
START
FOOTNOTE
ENDNOTE
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
Definition: xmltoken.hxx:50
@ XML_AUTO_TEXT_EVENTS
Definition: xmltoken.hxx:294
@ XML_NP_PRESENTATION
Definition: xmltoken.hxx:88
@ XML_CONTENT_VALIDATION_NAME
Definition: xmltoken.hxx:507
@ XML_DATABASE_ROW_SELECT
Definition: xmltoken.hxx:2740
@ XML_COUNT_IN_TEXT_BOXES
Definition: xmltoken.hxx:2699
@ XML_NOTES_CONFIGURATION
Definition: xmltoken.hxx:2617
@ XML_INDEX_ENTRY_CHAPTER
Definition: xmltoken.hxx:1086
@ XML_N_PRESENTATION
Definition: xmltoken.hxx:89
@ XML_CONTROL_IMPLEMENTATION
Definition: xmltoken.hxx:2741
@ XML_N_PRESENTATION_OOO
Definition: xmltoken.hxx:2606
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3581
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3525
#define OFFSET
#define MIN_WIDTH
#define HEIGHT
#define Y
sal_uInt16 GetQNamePrefixFromParam1() const
::xmloff::token::XMLTokenEnum GetQNameTokenFromParam1() const
NUMBER
DIM
PROPERTY
TEXT
LINE
unsigned char sal_Bool
#define RX
const sal_uInt8 A
const sal_uInt8 R
TABLE
constexpr sal_uInt16 XML_NAMESPACE_DRAW
constexpr sal_uInt16 XML_NAMESPACE_META
constexpr sal_uInt16 XML_NAMESPACE_DC
constexpr sal_uInt16 XML_NAMESPACE_OOOC
constexpr sal_uInt16 XML_NAMESPACE_SVG
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_FORM
constexpr sal_uInt16 XML_NAMESPACE_DR3D
constexpr sal_uInt16 XML_NAMESPACE_CHART
constexpr sal_uInt16 XML_NAMESPACE_DOM
constexpr sal_uInt16 XML_NAMESPACE_TABLE
constexpr sal_uInt16 XML_NAMESPACE_OOOW
constexpr sal_uInt16 XML_NAMESPACE_OFFICE
constexpr sal_uInt16 XML_NAMESPACE_PRESENTATION
constexpr sal_uInt16 XML_NAMESPACE_CONFIG
constexpr sal_uInt16 XML_NAMESPACE_OOO
constexpr sal_uInt16 XML_NAMESPACE_STYLE
constexpr sal_uInt16 XML_NAMESPACE_SCRIPT
constexpr sal_uInt16 XML_NAMESPACE_FO
constexpr sal_uInt16 XML_NAMESPACE_NUMBER
XMLTokenEnum eToken
Definition: xmltoken.cxx:40