LibreOffice Module xmloff (master) 1
Oasis2OOo.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 <comphelper/base64.hxx>
21#include <com/sun/star/beans/XPropertySetInfo.hpp>
22#include <com/sun/star/lang/XMultiServiceFactory.hpp>
23#include <com/sun/star/uno/XComponentContext.hpp>
24#include <rtl/ustrbuf.hxx>
25#include <sal/log.hxx>
28#include <xmloff/xmltoken.hxx>
29#include "DeepTContext.hxx"
30#include "MetaTContext.hxx"
31#include "DocumentTContext.hxx"
32#include "NotesTContext.hxx"
36#include "DlgOASISTContext.hxx"
41#include "MutableAttrList.hxx"
45#include "FamilyType.hxx"
47#include "Oasis2OOo.hxx"
49
50using namespace ::osl;
51using namespace ::xmloff::token;
52using namespace ::com::sun::star::uno;
53using namespace ::com::sun::star::lang;
54using namespace ::com::sun::star::xml::sax;
55using namespace ::com::sun::star::beans;
56
57namespace {
58
59enum XMLUserDefinedTransformerAction
60{
61 XML_ETACTION_META=XML_ETACTION_USER_DEFINED,
62 XML_ETACTION_DOCUMENT,
63 XML_ETACTION_BODY,
64 XML_ETACTION_NOTES,
65 XML_ETACTION_TABLE,
66 XML_ETACTION_STYLE,
67 XML_ETACTION_STYLE_RENAME,
68 XML_ETACTION_FRAME,
69 XML_ETACTION_EVENT,
70 XML_ETACTION_DLG,
71 XML_ETACTION_TAB_STOP,
72 XML_ETACTION_FORM_CONTROL,
73 XML_ETACTION_FORM_PROPERTY,
74 XML_ETACTION_CONFIG_ITEM,
75 XML_ETACTION_TRACKED_CHANGES,
76 XML_ETACTION_CHART,
77 XML_ETACTION_CHART_PLOT_AREA
78};
79
80}
81
82#define ENTRY3( n, l, a, p1, p2, p3 ) \
83 { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
84#define ENTRY3QNQ( n, l, a, n1, l1, p2, n3, l3 ) \
85 ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
86 p2, XMLTransformerActionInit::QNameParam( n3, l3 ) )
87
88#define ENTRY2( n, l, a, p1, p2 ) \
89 ENTRY3( n, l, a, p1, p2, 0 )
90#define ENTRY2QN( n, l, a, n1, l1, p2 ) \
91 ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
92
93#define ENTRY1( n, l, a, p1 ) \
94 ENTRY3( n, l, a, p1, 0, 0 )
95#define ENTRY1Q( n, l, a, p1, t1 ) \
96 ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( p1, t1 ) )
97
98#define ENTRY0( n, l, a ) \
99 ENTRY3( n, l, a, 0, 0, 0 )
100
101// a macro to put two tokens into one sal_Int32 for the action
102// XML_ATACTION_RENAME_ATTRIBUTE
103static constexpr sal_Int32 RENAME_ENTRY( XMLTokenEnum f, XMLTokenEnum s )
104{
105 return static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16);
106}
107
109{
110 // add office:class from <office:document> and <office:document-content>
111 ENTRY0( OFFICE, DOCUMENT, XML_ETACTION_DOCUMENT ),
112 ENTRY0( OFFICE, DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT ),
113 ENTRY1Q( OOO, AUTO_TEXT_EVENTS, XML_ETACTION_RENAME_ELEM,
115
116 // add <meta:keywords>
117 ENTRY0( OFFICE, META, XML_ETACTION_META ),
118
119 // rename <office:scripts> to <office:script>
122
123 // rename <office:script> to <office:script-data> and process attributes
127
128 // rename <ooo:libraries> to <script:libraries>
129 ENTRY1Q( OOO, LIBRARIES, XML_ETACTION_RENAME_ELEM,
131
132 // rename <ooo:library-linked> to <script:library-linked> and process attributes
133 ENTRY2QN( OOO, LIBRARY_LINKED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
136
137 // rename <ooo:library-embedded> to <script:library-embedded> and process attributes
138 ENTRY2QN( OOO, LIBRARY_EMBEDDED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
141
142 // rename <ooo:module> to <script:module> and process attributes
146
147 // rename <ooo:source-code> to <script:source-code>
148 ENTRY1Q( OOO, SOURCE_CODE, XML_ETACTION_RENAME_ELEM,
150
151 ENTRY0( OFFICE, BODY, XML_ETACTION_BODY ),
152
153 // rename <office:font-face-decls> to <office:font-decl>,
154 // rename <style:font-face> to <style:font-decl>, process attrs
155 ENTRY1Q( OFFICE, FONT_FACE_DECLS, XML_ETACTION_RENAME_ELEM,
160
161 // remove genre element
164 ENTRY0( OFFICE, PRESENTATION, XML_ETACTION_COPY_CONTENT ),
165 ENTRY0( OFFICE, SPREADSHEET, XML_ETACTION_COPY_CONTENT ),
168
169 // rename <style:page-layout> to <style:page-master>
170 // ENTRY1Q( STYLE, PAGE_LAYOUT, RENAME_ELEM,
171 // XML_NAMESPACE_STYLE, XML_PAGE_MASTER ),
174
175 // merge <style:*-properties> into <style:properties> and do other
176 // styles processing
177 ENTRY1( STYLE, STYLE, XML_ETACTION_STYLE,
179 ENTRY1( STYLE, DEFAULT_STYLE, XML_ETACTION_STYLE,
181 ENTRY2QN( STYLE, PAGE_LAYOUT, XML_ETACTION_STYLE_RENAME,
184 ENTRY1( NUMBER, NUMBER_STYLE, XML_ETACTION_STYLE,
186 ENTRY1( NUMBER, CURRENCY_STYLE, XML_ETACTION_STYLE,
188 ENTRY1( NUMBER, PERCENTAGE_STYLE, XML_ETACTION_STYLE,
190 ENTRY1( NUMBER, DATE_STYLE, XML_ETACTION_STYLE,
192 ENTRY1( NUMBER, TIME_STYLE, XML_ETACTION_STYLE,
194 ENTRY1( NUMBER, BOOLEAN_STYLE, XML_ETACTION_STYLE,
196 ENTRY1( NUMBER, TEXT_STYLE, XML_ETACTION_STYLE,
198 ENTRY1( TEXT, LIST_STYLE, XML_ETACTION_STYLE,
200// ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
201
202 ENTRY1( STYLE, HEADER_STYLE, XML_ETACTION_STYLE,
204 ENTRY1( STYLE, FOOTER_STYLE, XML_ETACTION_STYLE,
206 ENTRY1( TEXT, LIST_LEVEL_STYLE_NUMBER, XML_ETACTION_STYLE,
208 ENTRY1( TEXT, LIST_LEVEL_STYLE_BULLET, XML_ETACTION_STYLE,
210 ENTRY1( TEXT, LIST_LEVEL_STYLE_IMAGE, XML_ETACTION_STYLE,
212 ENTRY1( TEXT, OUTLINE_LEVEL_STYLE, XML_ETACTION_STYLE,
214 ENTRY1( DRAW, GRADIENT, XML_ETACTION_STYLE,
216 ENTRY1( DRAW, FILL_IMAGE, XML_ETACTION_STYLE,
218 ENTRY2QN( DRAW, OPACITY, XML_ETACTION_STYLE_RENAME,
221 ENTRY1( DRAW, MARKER, XML_ETACTION_STYLE,
223 ENTRY1( DRAW, HATCH, XML_ETACTION_STYLE,
225 ENTRY1( DRAW, STROKE_DASH, XML_ETACTION_STYLE,
227
228 // process <text:h/p>: process style-name attributes,
229 // rename <text:h>'s text:outline-level to text:level,
232
233 // process <test:list>'s text:style-name attributes
234 // rename <text:list> to <text:ordered-list> or <text:unordered-list>
235 // TODO: All list currently are renamed to <text:ordered-list>
239
240 // rename <text:note*> to <text:footnote*> or <text:endnote*>
241 ENTRY1( TEXT, NOTES_CONFIGURATION, XML_ETACTION_NOTES,
243 ENTRY1( TEXT, NOTE, XML_ETACTION_NOTES, XML_NOTE ),
244
245 // rename <text:footnote> and <text:endnote> to <text:note>
246 ENTRY1( TEXT, NOTE_REF, XML_ETACTION_NOTES, XML_NOTE_REF ),
247
248 // rename <text:tab> to <text:tab-stop>
251
252 // replace <table:table table:is-sub-table> with <table:sub-table>
253 ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ),
254
255 // merge frame element
256 ENTRY0( DRAW, FRAME, XML_ETACTION_FRAME ),
257
258 // process events
259 ENTRY1Q( OFFICE, EVENT_LISTENERS, XML_ETACTION_RENAME_ELEM,
261 ENTRY0( SCRIPT, EVENT_LISTENER, XML_ETACTION_EVENT ),
262 ENTRY0( SCRIPT, EVENT, XML_ETACTION_EVENT ),
263 ENTRY0( PRESENTATION, EVENT_LISTENER, XML_ETACTION_EVENT ),
264
265 // process Basic dialogs
266 ENTRY0( DLG, STYLE, XML_ETACTION_DLG ),
267
268 // process length attributes
282// ENTRY1( DRAW, FRAME, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
284 ENTRY1( PRESENTATION, PLACEHOLDER, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
312
313 ENTRY0( CHART, CHART, XML_ETACTION_CHART ),
314 ENTRY0( CHART, PLOT_AREA, XML_ETACTION_CHART_PLOT_AREA ),
315
316 ENTRY0( CONFIG, CONFIG_ITEM, XML_ETACTION_CONFIG_ITEM ),
317 ENTRY1Q( TEXT, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
319 ENTRY1Q( TABLE, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
321
322 ENTRY1( TEXT, INDEX_ENTRY_TAB_STOP, XML_ETACTION_PROC_ATTRS,
324 ENTRY0( STYLE, TAB_STOP, XML_ETACTION_TAB_STOP ),
325 ENTRY1( STYLE, BACKGROUND_IMAGE, XML_ETACTION_PROC_ATTRS,
327 ENTRY1( TEXT, LINENUMBERING_CONFIGURATION, XML_ETACTION_PROC_ATTRS,
329 ENTRY1( STYLE, FOOTNOTE_SEP, XML_ETACTION_PROC_ATTRS,
334
335 // process *:style-name attributes
341 ENTRY1( TEXT, TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
342 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
343 ENTRY1( TEXT, ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
344 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
345 ENTRY1( TEXT, TABLE_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
346 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
347 ENTRY1( TEXT, OBJECT_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
348 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
349 ENTRY1( TEXT, USER_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
350 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
351 ENTRY1( TEXT, ALPHABETICAL_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
352 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
353 ENTRY1( TEXT, BIBLIOGRAPHY_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
354 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
355 ENTRY1( TEXT, INDEX_SOURCE_STYLE, XML_ETACTION_PROC_ATTRS,
356 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
357 ENTRY1( TEXT, INDEX_TITLE_TEMPLATE, XML_ETACTION_PROC_ATTRS,
358 OASIS_PARA_STYLE_REF_ACTIONS ), /* generated entry */
359 ENTRY3QNQ( TEXT, INDEX_ENTRY_CHAPTER,
364 ENTRY1( TEXT, INDEX_ENTRY_TEXT, XML_ETACTION_PROC_ATTRS,
365 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
366 ENTRY1( TEXT, INDEX_ENTRY_PAGE_NUMBER, XML_ETACTION_PROC_ATTRS,
367 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
368 ENTRY1( TEXT, INDEX_ENTRY_SPAN, XML_ETACTION_PROC_ATTRS,
369 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
370 ENTRY1( TEXT, INDEX_ENTRY_BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
371 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
372 ENTRY1( TEXT, INDEX_ENTRY_LINK_START, XML_ETACTION_PROC_ATTRS,
373 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
374 ENTRY1( TEXT, INDEX_ENTRY_LINK_END, XML_ETACTION_PROC_ATTRS,
375 OASIS_TEXT_STYLE_REF_ACTIONS ), /* generated entry */
377 OASIS_MASTER_PAGE_REF_ACTIONS ), /* generated entry */
378 // Conversion of attribute <table:style-name> for <table:table-row> and
379 // <table:table-column> (#i40011#, #i40015#)
384
385 // rename office:value-* to *:value-*
386 ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS,
387 OASIS_TEXT_VALUE_TYPE_ACTIONS ), /* generated entry */
388 ENTRY1( TEXT, VARIABLE_SET, XML_ETACTION_PROC_ATTRS,
389 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
390 ENTRY1( TEXT, VARIABLE_INPUT, XML_ETACTION_PROC_ATTRS,
391 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
392 ENTRY1( TEXT, USER_FIELD_DECL, XML_ETACTION_PROC_ATTRS,
393 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
394 ENTRY1( TEXT, EXPRESSION, XML_ETACTION_PROC_ATTRS,
395 OASIS_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
396 ENTRY1( TEXT, USER_DEFINED, XML_ETACTION_PROC_ATTRS,
397 OASIS_DATETIME_ACTIONS ), // Add OASIS_TEXT_VALUE_TYPE_ACTIONS if attrs are added to text:user-defined
399 OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
400 ENTRY1( TABLE, COVERED_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
401 OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
402 ENTRY1( TABLE, CHANGE_TRACK_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
403 OASIS_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
404// ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
405// OASIS_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
406// ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
407// OASIS_VALUE_TYPE_ACTIONS), /* generated entry */
408
410 OASIS_ANNOTATION_ACTIONS ), /* generated entry */
412 OASIS_CHANGE_INFO_ACTIONS ), /* generated entry */
413
414 ENTRY1( TEXT, DDE_CONNECTION_DECL, XML_ETACTION_PROC_ATTRS,
416
417 ENTRY0( FORM, TEXT, XML_ETACTION_FORM_CONTROL ),
418 ENTRY0( FORM, TEXTAREA, XML_ETACTION_FORM_CONTROL ),
419 ENTRY0( FORM, FIXED_TEXT, XML_ETACTION_FORM_CONTROL ),
420 ENTRY0( FORM, FILE, XML_ETACTION_FORM_CONTROL ),
421 ENTRY0( FORM, PASSWORD, XML_ETACTION_FORM_CONTROL ),
422 ENTRY0( FORM, FORMATTED_TEXT, XML_ETACTION_FORM_CONTROL ),
423 ENTRY0( FORM, BUTTON, XML_ETACTION_FORM_CONTROL ),
424 ENTRY0( FORM, IMAGE, XML_ETACTION_FORM_CONTROL ),
425 ENTRY0( FORM, CHECKBOX, XML_ETACTION_FORM_CONTROL ),
426 ENTRY0( FORM, RADIO, XML_ETACTION_FORM_CONTROL ),
427 ENTRY0( FORM, LISTBOX, XML_ETACTION_FORM_CONTROL ),
428 ENTRY0( FORM, COMBOBOX, XML_ETACTION_FORM_CONTROL ),
429 ENTRY0( FORM, FRAME, XML_ETACTION_FORM_CONTROL ),
430 ENTRY0( FORM, HIDDEN, XML_ETACTION_FORM_CONTROL ),
431 ENTRY0( FORM, IMAGE_FRAME, XML_ETACTION_FORM_CONTROL ),
432 ENTRY0( FORM, GRID, XML_ETACTION_FORM_CONTROL ),
433 ENTRY0( FORM, VALUE_RANGE, XML_ETACTION_FORM_CONTROL ),
434 ENTRY0( FORM, GENERIC_CONTROL, XML_ETACTION_FORM_CONTROL ),
437 ENTRY1( FORM, PROPERTY, XML_ETACTION_FORM_PROPERTY, XML_PROPERTY ),
438 ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_FORM_PROPERTY,
440 ENTRY1( FORM, LIST_VALUE, XML_ETACTION_FORM_PROPERTY, XML_LIST_VALUE ),
441
442 // process xlink:href
444 OASIS_XLINK_ACTIONS ), /* generated entry */
445 ENTRY1( META, AUTO_RELOAD, XML_ETACTION_PROC_ATTRS,
446 OASIS_XLINK_ACTIONS ), /* generated entry */
447 ENTRY1( TEXT, SECTION_SOURCE, XML_ETACTION_PROC_ATTRS,
448 OASIS_XLINK_ACTIONS ), /* generated entry */
450 OASIS_XLINK_ACTIONS ), /* generated entry */
451 ENTRY1( TEXT, ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ETACTION_PROC_ATTRS,
452 OASIS_XLINK_ACTIONS ), /* generated entry */
453 ENTRY1( TABLE, TABLE_SOURCE, XML_ETACTION_PROC_ATTRS,
454 OASIS_XLINK_ACTIONS ), /* generated entry */
455 ENTRY1( TABLE, CELL_RANGE_SOURCE, XML_ETACTION_PROC_ATTRS,
456 OASIS_XLINK_ACTIONS ), /* generated entry */
458 OASIS_XLINK_ACTIONS ), /* generated entry */
459 ENTRY1( PRESENTATION, SOUND, XML_ETACTION_PROC_ATTRS,
460 OASIS_XLINK_ACTIONS ), /* generated entry */
462 OASIS_FORM_ACTIONS ), /* generated entry */
463// ENTRY1( SVG, FONT_FACE_URI, XML_ETACTION_PROC_ATTRS,
464// OASIS_XLINK_ACTIONS ), /* generated entry */
465// ENTRY1( SVG, DEFINITION_SRC, XML_ETACTION_PROC_ATTRS,
466// OASIS_XLINK_ACTIONS ), /* generated entry */
470// OASIS_XLINK_ACTIONS ), /* generated entry */
471// events don't have real URIs
472// ENTRY1( PRESENTATION, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
473// OASIS_XLINK_ACTIONS ), /* generated entry */
474// ENTRY1( SCRIPT, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
475// OASIS_XLINK_ACTIONS ), /* generated entry */
476
477 // add namespace prefix to name
478 ENTRY1( CONFIG, CONFIG_ITEM_SET, XML_ETACTION_PROC_ATTRS,
480
481 // add namespace prefix to formula and condition
482 // text:condition
484 OASIS_FORMULA_ACTIONS ), /* generated entry */
485 // text:formula
487 OASIS_FORMULA_ACTIONS ), /* generated entry */
488 // text:condition
489 ENTRY1( TEXT, DATABASE_NEXT, XML_ETACTION_PROC_ATTRS,
490 OASIS_FORMULA_ACTIONS ), /* generated entry */
491 // text:condition
494 OASIS_FORMULA_ACTIONS ), /* generated entry */
495 // text:condition
496 ENTRY1( TEXT, CONDITIONAL_TEXT, XML_ETACTION_PROC_ATTRS,
497 OASIS_FORMULA_ACTIONS ), /* generated entry */
498 // text:condition
499 ENTRY1( TEXT, HIDDEN_TEXT, XML_ETACTION_PROC_ATTRS,
500 OASIS_FORMULA_ACTIONS ), /* generated entry */
501 // text:condition
502 ENTRY1( TEXT, HIDDEN_PARAGRAPH, XML_ETACTION_PROC_ATTRS,
503 OASIS_FORMULA_ACTIONS ), /* generated entry */
504 // text:formula
505 ENTRY1( TEXT, TABLE_FORMULA, XML_ETACTION_PROC_ATTRS,
506 OASIS_FORMULA_ACTIONS ), /* generated entry */
507
508 // process table::content-validation
509 ENTRY1( TABLE, CONTENT_VALIDATION, XML_ETACTION_PROC_ATTRS,
511
512 // rename <table:dependencies> to <table:dependences>
513 ENTRY1Q( TABLE, DEPENDENCIES, XML_ETACTION_RENAME_ELEM,
517
518 // process table::conversion-mode
519 ENTRY1( TABLE, CONVERSION_MODE, XML_ETACTION_PROC_ATTRS,
521
522 // process table::data-pilot-member
523 ENTRY1( TABLE, DATA_PILOT_MEMBER, XML_ETACTION_PROC_ATTRS,
525
526 // process table::data-pilot-level
527 ENTRY1( TABLE, DATA_PILOT_LEVEL, XML_ETACTION_PROC_ATTRS,
529
530 // process table::source-service
531 ENTRY1( TABLE, SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS,
533
534 // entries for date time change (#i36576#)
536 ENTRY1( TEXT, CREATION_DATE, XML_ETACTION_PROC_ATTRS,
539 ENTRY1( TEXT, CREATION_TIME, XML_ETACTION_PROC_ATTRS,
542 ENTRY1( TEXT, MODIFICATION_TIME, XML_ETACTION_PROC_ATTRS,
544 ENTRY1( TEXT, EDITING_DURATION, XML_ETACTION_PROC_ATTRS,
549
550 // fix <text:alphabatical-index-mark text:main-etry>
551 ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK, XML_ETACTION_PROC_ATTRS,
553 ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK_START, XML_ETACTION_PROC_ATTRS,
555
556 // fix id strings in old animation elements
559 ENTRY1( PRESENTATION, SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
560 ENTRY1( PRESENTATION, SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
561 ENTRY1( PRESENTATION, HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
562 ENTRY1( PRESENTATION, HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OASIS_ANIMATION_ACTIONS ),
563
564 ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
565};
566
567// XML_ETACTION_STYLE
569{
583 ENTRY0( STYLE, DEFAULT_OUTLINE_LEVEL, XML_ATACTION_REMOVE ),
585 XML_FAMILY_TYPE_TEXT ), // list level styles
591 ENTRY0( DRAW, DOTS1_LENGTH, XML_ATACTION_IN2INCH ),
592 ENTRY0( DRAW, DOTS2_LENGTH, XML_ATACTION_IN2INCH ),
597 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
598 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
599};
600
601// OASIS_FRAME_ELEM_ACTIONS
603{
604 ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_COPY ),
607 ENTRY0( DRAW, OBJECT_OLE, XML_ETACTION_COPY ),
608 ENTRY0( DRAW, APPLET, XML_ETACTION_COPY ),
609 ENTRY0( DRAW, PLUGIN, XML_ETACTION_COPY ),
610 ENTRY0( DRAW, FLOATING_FRAME, XML_ETACTION_COPY ),
611 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
612};
613
614// OASIS_EVENT_ELEM_ACTIONS
616{
617 ENTRY0( XLINK, HREF, XML_ATACTION_HREF ),
620 ENTRY0( SCRIPT, EVENT_NAME, XML_ATACTION_EVENT_NAME ),
621 ENTRY0( SCRIPT, MACRO_NAME, XML_ATACTION_MACRO_NAME ),
622 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
623};
624
625// OASIS_EVENT_ELEM_ACTIONS
627{
629};
630
631// action table for OASIS_MASTER_PAGE_ACTIONS
633{
640 ENTRY1Q( STYLE, PAGE_LAYOUT_NAME, XML_ATACTION_RENAME,
642 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
643};
644
645// action table for OASIS_TEXT_STYLE_REF_ACTIONS
647{
650 ENTRY1( TEXT, VISITED_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
652 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
653 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
654};
655
656// action table for OASIS_PARA_STYLE_REF_ACTIONS
658{
661 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
662};
663
664// action table for OASIS_LIST_STYLE_REF_ACTIONS
666{
669 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
670};
671
672// action table for OASIS_MASTER_PAGE_REF_ACTIONS
674{
677 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
678};
679
680// action table for OASIS_MAP_STYLE_REF_ACTIONS
682{
685 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
686};
687
688// action table for OASIS_TABLE_STYLE_REF_ACTIONS (#i40011#, #i40015#)
690{
693 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
694};
695
697{
698 ENTRY1Q( SVG, FONT_FAMILY, XML_ATACTION_RENAME,
700 ENTRY1Q( STYLE, FONT_ADORNMENTS, XML_ATACTION_RENAME,
702 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
703};
704
705// action table for OASIS_PARA_ACTIONS
707{
712 ENTRY1Q( TEXT, OUTLINE_LEVEL, XML_ATACTION_RENAME,
714 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
715};
716
717// !!ATTENTION!! If you change something here, please also change
718// aConnectorActionTable if appropriate
720{
725 ENTRY1( PRESENTATION, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
744 ENTRY0( FO, MAX_WIDTH, XML_ATACTION_IN2INCH ),
745 ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_IN2INCH ),
746 ENTRY0( DRAW, CORNER_RADIUS, XML_ATACTION_IN2INCH ),
747 ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INS2INCHS ),
748 ENTRY0( DRAW, CAPTION_POINT_X, XML_ATACTION_IN2INCH ),
749 ENTRY0( DRAW, CAPTION_POINT_Y, XML_ATACTION_IN2INCH ),
751 ENTRY0( DR3D, FOCAL_LENGTH, XML_ATACTION_IN2INCH ),
754 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
755
756 // needed by chart:legend. The legend needs also the draw actions. As
757 // there is no merge mechanism, all actions have to be in the same table
758 ENTRY2( CHART, LEGEND_POSITION, XML_ATACTION_RENAME_ATTRIBUTE,
761
763
764 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
765};
766
767// OASIS_ANIMATION_ACTIONS
769{
770 ENTRY0( DRAW, SHAPE_ID, XML_ATACTION_DECODE_ID ),
771 ENTRY0( PRESENTATION, DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
772 ENTRY0( PRESENTATION, PAUSE, XML_ATACTION_RNG2ISO_DATETIME ),
773
774 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
775};
776
777// OOO_CONNECTOR_ACTIONS
779{
784 ENTRY1( PRESENTATION, STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
796 ENTRY0( FO, MAX_WIDTH, XML_ATACTION_IN2INCH ),
797 ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_IN2INCH ),
798 ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INS2INCHS ),
801 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
802 ENTRY0( DRAW, START_SHAPE, XML_ATACTION_DECODE_ID ),
803 ENTRY0( DRAW, END_SHAPE, XML_ATACTION_DECODE_ID ),
804
805 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
806};
807
808// OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
810{
814 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
815};
816
817// OASIS_TAB_STOP_ACTIONS
819{
821 ENTRY1Q( STYLE, LEADER_TEXT, XML_ATACTION_RENAME,
823 ENTRY0( STYLE, LEADER_STYLE, XML_ATACTION_REMOVE ),
824 ENTRY0( STYLE, LEADER_TYPE, XML_ATACTION_REMOVE ),
825 ENTRY0( STYLE, LEADER_WIDTH, XML_ATACTION_REMOVE ),
826 ENTRY0( STYLE, LEADER_COLOR, XML_ATACTION_REMOVE ),
827 ENTRY0( STYLE, LEADER_TEXT_STYLE, XML_ATACTION_REMOVE ),
828 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
829};
830
831// OASIS_LINENUMBERING_ACTIONS
833{
837 ENTRY1Q( TEXT, COUNT_IN_TEXT_BOXES , XML_ATACTION_RENAME,
839 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
840};
841
843{
845 ENTRY0( STYLE, DISTANCE_BEFORE_SEP, XML_ATACTION_IN2INCH ),
846 ENTRY0( STYLE, DISTANCE_AFTER_SEP, XML_ATACTION_IN2INCH ),
847 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
848};
849
850// OASIS_NOTES_ACTIONS (processed by special context)
852{
853 ENTRY0( TEXT, NOTE_CLASS, XML_ATACTION_STYLE_FAMILY ),
854 ENTRY1( TEXT, CITATION_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
856 ENTRY1( TEXT, CITATION_BODY_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
858 ENTRY1( TEXT, DEFAULT_STYLE_NAME, XML_ATACTION_DECODE_STYLE_NAME_REF,
862 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
863};
864
865// OASIS_DROP_CAP_ACTIONS
867{
871 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
872};
873
875{
876 ENTRY0( STYLE, COLUMN_GAP, XML_ATACTION_IN2INCH ),
877 ENTRY0( STYLE, SPACE_BEFORE, XML_ATACTION_REMOVE ),
878 ENTRY0( STYLE, SPACE_AFTER, XML_ATACTION_REMOVE ),
879 ENTRY1Q( FO, START_INDENT, XML_ATACTION_RENAME_IN2INCH,
881 ENTRY1Q( FO, END_INDENT, XML_ATACTION_RENAME_IN2INCH,
884 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
885};
886
887// OASIS_TEXT_VALUE_TYPE_ACTIONS
889{
890 ENTRY1Q( OFFICE, VALUE_TYPE, XML_ATACTION_RENAME,
900 ENTRY1Q( OFFICE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
902 ENTRY1Q( OFFICE, STRING_VALUE, XML_ATACTION_RENAME,
905 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
906};
907
908// OASIS_TABLE_VALUE_TYPE_ACTIONS
910{
911 ENTRY1Q( OFFICE, VALUE_TYPE, XML_ATACTION_RENAME,
921 ENTRY1Q( OFFICE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
923 ENTRY1Q( OFFICE, STRING_VALUE, XML_ATACTION_RENAME,
928 ENTRY1Q( TABLE, CONTENT_VALIDATION_NAME, XML_ATACTION_RENAME,
930 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
931};
932
933// action table for OASIS_ANNOTATION_ACTIONS
935{
943 ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
944};
945
946// action table for OASIS_CHANGE_INFO_ACTIONS
948{
953 ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
954};
955
956// OASIS_BACKGROUND_IMAGE_ACTIONS
958{
961 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(true) ),
962 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
963};
964
965// OASIS_DDE_CONNECTION_DECL
967{
970 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
971};
972
973// OASIS_FORM_CONTROL_ACTIONS
975{
977 ENTRY2QN( FORM, CONTROL_IMPLEMENTATION,
982 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
983 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
984};
985
986// OASIS_FORM_COLUMN_ACTIONS
988{
991 ENTRY2QN( FORM, CONTROL_IMPLEMENTATION,
995 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
996};
997
998// OASIS_FORM_PROP_ACTIONS
1000{
1001 ENTRY1Q( OFFICE, VALUE_TYPE, XML_ATACTION_RENAME,
1004 ENTRY0( OFFICE, STRING_VALUE, XML_ATACTION_REMOVE ),
1005 ENTRY0( OFFICE, BOOLEAN_VALUE, XML_ATACTION_REMOVE ),
1006 ENTRY0( OFFICE, DATE_VALUE, XML_ATACTION_REMOVE ),
1007 ENTRY0( OFFICE, TIME_VALUE, XML_ATACTION_REMOVE ),
1009 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1010};
1011
1012// OASIS_XLINK_ACTIONS
1014{
1015 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
1016 ENTRY0( TABLE, REFRESH_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1017 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1018};
1019
1020// OASIS_CONFIG_ITEM_SET_ACTIONS
1022{
1025 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1026};
1027
1028// OASIS_FORMULA_ACTIONS
1030{
1035 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1036};
1037
1038// OASIS_CONTENT_VALIDATION_ACTIONS
1040{
1042 ENTRY0( TABLE, DISPLAY_LIST, XML_ATACTION_REMOVE ),
1043 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1044};
1045
1046// OASIS_DDE_CONV_MODE_ACTIONS
1048{
1049 ENTRY1Q( TABLE, KEEP_TEXT, XML_ATACTION_RENAME,
1051 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1052};
1053
1054// OASIS_DATAPILOT_MEMBER_ACTIONS
1056{
1057 ENTRY1Q( TABLE, SHOW_DETAILS, XML_ATACTION_RENAME,
1059 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1060};
1061
1062// OASIS_DATAPILOT_LEVEL_ACTIONS
1064{
1065 ENTRY1Q( TABLE, SHOW_EMPTY, XML_ATACTION_RENAME,
1067 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1068};
1069
1070// OASIS_SOURCE_SERVICE_ACTIONS
1072{
1073 ENTRY1Q( TABLE, USER_NAME, XML_ATACTION_RENAME,
1075 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1076};
1077
1078// OASIS_CHART_ACTIONS
1080{
1086 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1087};
1088
1089// OASIS_FORM_ACTIONS
1091{
1092 ENTRY2QN( FORM, CONTROL_IMPLEMENTATION,
1096 ENTRY1( XLINK, HREF, XML_ATACTION_URI_OASIS, sal_uInt32(false) ),
1097 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1098};
1099
1100// OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
1102{
1103 ENTRY1Q( TEXT, MAIN_ENTRY, XML_ATACTION_RENAME,
1105 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1106};
1107
1108// OASIS_DRAW_AREA_POLYGON_ACTIONS (to be added to OASIS_SHAPE_ACTIONS)
1110{
1113 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1114};
1115
1116// OASIS_SCRIPT_ACTIONS
1118{
1122 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1123};
1124
1125// OASIS_DATETIME_ACTIONS
1127{
1130 ENTRY0( TEXT, DATE_ADJUST, XML_ATACTION_RNG2ISO_DATETIME ),
1131 ENTRY0( TEXT, TIME_ADJUST, XML_ATACTION_RNG2ISO_DATETIME ),
1136 ENTRY0( FORM, CURRENT_VALUE, XML_ATACTION_RNG2ISO_DATETIME ),
1139 ENTRY0( TABLE, REFRESH_DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1140 ENTRY0( PRESENTATION, DELAY, XML_ATACTION_RNG2ISO_DATETIME ),
1141 ENTRY0( PRESENTATION, PAUSE, XML_ATACTION_RNG2ISO_DATETIME ),
1142 ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
1143};
1144
1146{
1149};
1150
1151namespace {
1152
1153class XMLTableTransformerContext_Impl : public XMLTransformerContext
1154{
1155 OUString m_aElemQName;
1156
1157public:
1158 XMLTableTransformerContext_Impl( XMLTransformerBase& rTransformer,
1159 const OUString& rQName );
1160
1161 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1162 virtual void EndElement() override;
1163};
1164
1165}
1166
1167XMLTableTransformerContext_Impl::XMLTableTransformerContext_Impl(
1168 XMLTransformerBase& rImp,
1169 const OUString& rQName ) :
1170 XMLTransformerContext( rImp, rQName ),
1171 m_aElemQName( rQName )
1172{
1173}
1174
1175void XMLTableTransformerContext_Impl::StartElement(
1176 const Reference< XAttributeList >& rAttrList )
1177{
1178 Reference< XAttributeList > xAttrList( rAttrList );
1179
1181
1182 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1183 for( sal_Int16 i=0; i < nAttrCount; i++ )
1184 {
1185 const OUString& rAttrName = xAttrList->getNameByIndex( i );
1186 OUString aLocalName;
1187 sal_uInt16 nPrefix =
1188 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1189 &aLocalName );
1190 if( XML_NAMESPACE_TABLE == nPrefix )
1191 {
1192 if ( IsXMLToken( aLocalName, XML_IS_SUB_TABLE ) )
1193 {
1194 const OUString& rValue = xAttrList->getValueByIndex( i );
1195 if( IsXMLToken( rValue, XML_TRUE ) )
1196 {
1197 m_aElemQName = GetTransformer().GetNamespaceMap().GetQNameByKey(
1200 if ( !pMutableAttrList )
1201 {
1202 pMutableAttrList =
1203 new XMLMutableAttributeList( xAttrList );
1204 xAttrList = pMutableAttrList;
1205 }
1206 pMutableAttrList->RemoveAttributeByIndex( i );
1207 }
1208 // #i50521# - no break here for safety reason.
1209 }
1210 // Convert attribute table:style-name for <table:table> (#i40011#, #i40015#)
1211 else if ( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
1212 {
1213 const OUString& rValue = xAttrList->getValueByIndex( i );
1214 OUString aAttrValue( rValue );
1215 if( XMLTransformerBase::DecodeStyleName(aAttrValue) )
1216 {
1217 if ( !pMutableAttrList )
1218 {
1219 pMutableAttrList =
1220 new XMLMutableAttributeList( xAttrList );
1221 xAttrList = pMutableAttrList;
1222 }
1223 pMutableAttrList->SetValueByIndex( i, aAttrValue );
1224 }
1225 }
1226 else if( IsXMLToken( aLocalName, XML_PRINT ) )
1227 {
1228 if ( !pMutableAttrList )
1229 {
1230 pMutableAttrList =
1231 new XMLMutableAttributeList( xAttrList );
1232 xAttrList = pMutableAttrList;
1233 }
1234 pMutableAttrList->RemoveAttributeByIndex( i );
1235 }
1236 }
1237 }
1238
1239 GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
1240}
1241
1242void XMLTableTransformerContext_Impl::EndElement()
1243{
1244 GetTransformer().GetDocHandler()->endElement( m_aElemQName );
1245}
1246
1247namespace {
1248
1249class XMLBodyOASISTransformerContext_Impl : public XMLTransformerContext
1250{
1251 bool m_bFirstChild;
1252
1253public:
1254 XMLBodyOASISTransformerContext_Impl( XMLTransformerBase& rTransformer,
1255 const OUString& rQName );
1256
1257 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1258
1260 const OUString& rLocalName,
1261 const OUString& rQName,
1262 const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1263 virtual void EndElement() override;
1264};
1265
1266}
1267
1268XMLBodyOASISTransformerContext_Impl::XMLBodyOASISTransformerContext_Impl(
1269 XMLTransformerBase& rImp,
1270 const OUString& rQName ) :
1271 XMLTransformerContext( rImp, rQName ),
1272 m_bFirstChild( false )
1273{
1274}
1275
1276void XMLBodyOASISTransformerContext_Impl::StartElement(
1277 const Reference< XAttributeList >& )
1278{
1279}
1280
1281rtl::Reference<XMLTransformerContext> XMLBodyOASISTransformerContext_Impl::CreateChildContext( sal_uInt16 nPrefix,
1282 const OUString& rLocalName,
1283 const OUString& rQName,
1284 const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList )
1285{
1286 if (!m_bFirstChild)
1287 {
1288 m_bFirstChild = true;
1290 }
1291
1292 return XMLTransformerContext::CreateChildContext(nPrefix, rLocalName, rQName, xAttrList);
1293}
1294
1295void XMLBodyOASISTransformerContext_Impl::EndElement()
1296{
1297 if (!m_bFirstChild)
1298 XMLTransformerContext::StartElement(Reference< XAttributeList >());
1299
1301}
1302
1303namespace {
1304
1305class XMLTabStopOASISTContext_Impl : public XMLPersElemContentTContext
1306{
1307public:
1308 XMLTabStopOASISTContext_Impl( XMLTransformerBase& rTransformer,
1309 const OUString& rQName );
1310
1311 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1312};
1313
1314}
1315
1316XMLTabStopOASISTContext_Impl::XMLTabStopOASISTContext_Impl(
1317 XMLTransformerBase& rImp,
1318 const OUString& rQName ) :
1319 XMLPersElemContentTContext( rImp, rQName )
1320{
1321}
1322
1323void XMLTabStopOASISTContext_Impl::StartElement(
1324 const Reference< XAttributeList >& rAttrList )
1325{
1326 XMLTransformerActions *pActions =
1327 GetTransformer().GetUserDefinedActions( OASIS_TAB_STOP_ACTIONS );
1328 SAL_WARN_IF( nullptr == pActions, "xmloff.transform", "got no actions" );
1329
1330 sal_Unicode cStyleLeaderChar = 0;
1331 sal_Int16 nLeaderText = -1;
1332 Reference< XAttributeList > xAttrList( rAttrList );
1334 sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
1335 for( sal_Int16 i=0; i < nAttrCount; i++ )
1336 {
1337 const OUString& rAttrName = xAttrList->getNameByIndex( i );
1338 OUString aLocalName;
1339 sal_uInt16 nPrefix =
1340 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1341 &aLocalName );
1342 XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
1343 XMLTransformerActions::const_iterator aIter =
1344 pActions->find( aKey );
1345 if( aIter != pActions->end() )
1346 {
1347 if( !pMutableAttrList )
1348 {
1349 pMutableAttrList =
1350 new XMLMutableAttributeList( xAttrList );
1351 xAttrList = pMutableAttrList;
1352 }
1353 const OUString& rAttrValue = xAttrList->getValueByIndex( i );
1354 switch( (*aIter).second.m_nActionType )
1355 {
1357 if( IsXMLToken( aLocalName, XML_LEADER_STYLE ) )
1358 {
1359 if( IsXMLToken( rAttrValue, XML_NONE ) )
1360 cStyleLeaderChar = ' ';
1361 else if( IsXMLToken( rAttrValue, XML_DOTTED ) )
1362 cStyleLeaderChar = '.';
1363 else
1364 cStyleLeaderChar = 0;
1365 pMutableAttrList->RemoveAttributeByIndex( i );
1366 --i;
1367 --nAttrCount;
1368 }
1369 break;
1371 {
1372 OUString aNewAttrQName(
1373 GetTransformer().GetNamespaceMap().GetQNameByKey(
1374 (*aIter).second.GetQNamePrefixFromParam1(),
1376 (*aIter).second.GetQNameTokenFromParam1()) ) );
1377 pMutableAttrList->RenameAttributeByIndex( i,
1378 aNewAttrQName );
1379 }
1380 if( IsXMLToken( aLocalName, XML_LEADER_TEXT ) )
1381 {
1382 if( rAttrValue.getLength() > 1 )
1383 {
1384 OUString aAttrValue( rAttrValue.copy( 0, 1 ) );
1385 pMutableAttrList->SetValueByIndex( i, aAttrValue );
1386 nLeaderText = i;
1387 }
1388 }
1389 break;
1391 {
1392 OUString aAttrValue( rAttrValue );
1394 aAttrValue ) )
1395 pMutableAttrList->SetValueByIndex( i, aAttrValue );
1396 }
1397 break;
1398 default:
1399 SAL_WARN( "xmloff.transform", "unknown action" );
1400 break;
1401 }
1402 }
1403 }
1404
1405 if( cStyleLeaderChar && ' ' != cStyleLeaderChar )
1406 {
1407 if( nLeaderText != -1 )
1408 {
1409 OUString aNewAttrQName(
1410 GetTransformer().GetNamespaceMap().GetQNameByKey(
1413 pMutableAttrList->AddAttribute( aNewAttrQName,
1414 OUString( cStyleLeaderChar ) );
1415 }
1416 }
1417 else
1418 {
1419 if( nLeaderText != -1 )
1420 pMutableAttrList->RemoveAttributeByIndex( nLeaderText );
1421 }
1422
1424}
1425
1426namespace {
1427
1428class XMLConfigItemTContext_Impl : public XMLTransformerContext
1429{
1430 OUString m_aContent;
1431 bool m_bIsRedlineProtectionKey;
1432 bool m_bIsCursorX;
1433 bool m_bIsCursorY;
1434
1435public:
1436 XMLConfigItemTContext_Impl( XMLTransformerBase& rTransformer,
1437 const OUString& rQName );
1438
1439 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1440 virtual void EndElement() override;
1441
1442 virtual void Characters( const OUString& rChars ) override;
1443};
1444
1445}
1446
1447XMLConfigItemTContext_Impl::XMLConfigItemTContext_Impl(
1448 XMLTransformerBase& rImp,
1449 const OUString& rQName ) :
1450 XMLTransformerContext( rImp, rQName ),
1451 m_bIsRedlineProtectionKey( false ),
1452 m_bIsCursorX( false ),
1453 m_bIsCursorY( false )
1454{
1455}
1456
1457void XMLConfigItemTContext_Impl::StartElement(
1458 const Reference< XAttributeList >& rAttrList )
1459{
1460 sal_Int16 nAttrCount = rAttrList.is() ? rAttrList->getLength() : 0;
1461 for( sal_Int16 i=0; i < nAttrCount; i++ )
1462 {
1463 const OUString& rAttrName = rAttrList->getNameByIndex( i );
1464 OUString aLocalName;
1465 sal_uInt16 nPrefix =
1466 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
1467 &aLocalName );
1468 if( XML_NAMESPACE_CONFIG == nPrefix )
1469 {
1470 if ( IsXMLToken( aLocalName, XML_NAME ) )
1471 {
1472 const OUString& rValue = rAttrList->getValueByIndex( i );
1473 if( rValue == "RedlineProtectionKey" )
1474 m_bIsRedlineProtectionKey = true;
1475 else if( rValue == "CursorPositionX" )
1476 m_bIsCursorX = true;
1477 else if( rValue == "CursorPositionY" )
1478 m_bIsCursorY = true;
1479
1480 break;
1481 }
1482 }
1483 }
1484
1486}
1487
1488void XMLConfigItemTContext_Impl::Characters( const OUString& rChars )
1489{
1490 OUString sChars(rChars);
1491 if (m_bIsRedlineProtectionKey)
1492 m_aContent += rChars;
1493 else if (m_bIsCursorX || m_bIsCursorY)
1494 {
1495 sal_Int32 nPos = rChars.toInt32();
1496 if (m_bIsCursorX && nPos > 255)
1497 nPos = 255;
1498 else if (m_bIsCursorY && nPos > 31999)
1499 nPos = 31999;
1500
1501 sChars = OUString::number(nPos);
1502 }
1503
1505}
1506
1507void XMLConfigItemTContext_Impl::EndElement()
1508{
1509
1510 if( m_bIsRedlineProtectionKey )
1511 {
1512 const Reference< XPropertySet > rPropSet =
1513 GetTransformer().GetPropertySet();
1514 if( rPropSet.is() )
1515 {
1516 OUString aPropName("RedlineProtectionKey");
1517 Reference< XPropertySetInfo > xPropSetInfo(
1518 rPropSet->getPropertySetInfo() );
1519 if( xPropSetInfo.is() &&
1520 xPropSetInfo->hasPropertyByName( aPropName ) )
1521 {
1522 Sequence < sal_Int8 > aKey;
1523 ::comphelper::Base64::decode( aKey, m_aContent );
1524 rPropSet->setPropertyValue( aPropName, Any( aKey ) );
1525 }
1526 }
1527 }
1529}
1530
1531namespace {
1532
1533class XMLTrackedChangesOASISTContext_Impl : public XMLTransformerContext
1534{
1535 OUString const m_aAttrQName;
1536
1537public:
1538
1539 XMLTrackedChangesOASISTContext_Impl( XMLTransformerBase& rTransformer,
1540 const OUString& rQName,
1541 sal_uInt16 nPrefix,
1543
1544 virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
1545};
1546
1547}
1548
1549XMLTrackedChangesOASISTContext_Impl::XMLTrackedChangesOASISTContext_Impl(
1550 XMLTransformerBase& rImp,
1551 const OUString& rQName,
1552 sal_uInt16 nPrefix,
1554 XMLTransformerContext( rImp, rQName ),
1555 m_aAttrQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
1557{
1558}
1559
1560void XMLTrackedChangesOASISTContext_Impl::StartElement(
1561 const Reference< XAttributeList >& rAttrList )
1562{
1563 Reference< XAttributeList > xAttrList( rAttrList );
1564 const Reference< XPropertySet > rPropSet =
1565 GetTransformer().GetPropertySet();
1566 if( rPropSet.is() )
1567 {
1568 OUString aPropName("RedlineProtectionKey");
1569 Reference< XPropertySetInfo > xPropSetInfo(
1570 rPropSet->getPropertySetInfo() );
1571 if( xPropSetInfo.is() &&
1572 xPropSetInfo->hasPropertyByName( aPropName ) )
1573 {
1574 Any aAny = rPropSet->getPropertyValue( aPropName);
1575 Sequence < sal_Int8 > aKey;
1576 aAny >>= aKey;
1577 if( aKey.hasElements() )
1578 {
1579 OUStringBuffer aBuffer;
1580 ::comphelper::Base64::encode( aBuffer, aKey );
1582 new XMLMutableAttributeList( xAttrList );
1583 xAttrList = pMutableAttrList;
1584 pMutableAttrList->AddAttribute( m_aAttrQName,
1585 aBuffer.makeStringAndClear() );
1586 }
1587 }
1588 }
1590}
1591
1593 const TransformerAction_Impl& rAction,
1594 const OUString& rQName,
1595 bool bPersistent )
1596{
1597 switch( rAction.m_nActionType )
1598 {
1599 case XML_ETACTION_META:
1600 return new XMLMetaTransformerContext( *this, rQName );
1601 case XML_ETACTION_DOCUMENT:
1602 return new XMLDocumentTransformerContext( *this, rQName );
1603 case XML_ETACTION_BODY:
1604 return new XMLBodyOASISTransformerContext_Impl( *this, rQName );
1605 case XML_ETACTION_NOTES:
1606 return new XMLNotesTransformerContext( *this, rQName,
1607 static_cast< XMLTokenEnum>( rAction.m_nParam1 ), bPersistent );
1608 case XML_ETACTION_TABLE:
1609 return new XMLTableTransformerContext_Impl( *this, rQName );
1610 case XML_ETACTION_STYLE:
1611 return new XMLStyleOASISTContext( *this, rQName, bPersistent );
1612 case XML_ETACTION_STYLE_RENAME:
1613 return new XMLStyleOASISTContext( *this, rQName,
1614 rAction.GetQNamePrefixFromParam1(),
1615 rAction.GetQNameTokenFromParam1(), bPersistent );
1616 case XML_ETACTION_FRAME:
1617 return new XMLFrameOASISTransformerContext( *this, rQName );
1618 case XML_ETACTION_EVENT:
1619 return new XMLEventOASISTransformerContext( *this, rQName );
1620 case XML_ETACTION_DLG:
1621 return new XMLDlgOASISTransformerContext( *this, rQName );
1622 case XML_ETACTION_TAB_STOP:
1623 return new XMLTabStopOASISTContext_Impl( *this, rQName );
1624 case XML_ETACTION_FORM_CONTROL:
1625 {
1626 const XMLTransformerContext *pCurrent = GetCurrentContext();
1627 return new XMLControlOASISTransformerContext( *this, rQName,
1628 pCurrent && pCurrent->HasQName( XML_NAMESPACE_FORM,
1629 XML_FORM ) );
1630 }
1631 case XML_ETACTION_FORM_PROPERTY:
1632 return new XMLFormPropOASISTransformerContext( *this, rQName,
1633 static_cast< XMLTokenEnum >( rAction.m_nParam1 ) );
1634 case XML_ETACTION_CHART:
1635 return new XMLChartOASISTransformerContext( *this, rQName );
1636 case XML_ETACTION_CONFIG_ITEM:
1637 return new XMLConfigItemTContext_Impl( *this, rQName );
1638 case XML_ETACTION_TRACKED_CHANGES:
1639 return new XMLTrackedChangesOASISTContext_Impl( *this, rQName,
1640 rAction.GetQNamePrefixFromParam1(),
1641 rAction.GetQNameTokenFromParam1() );
1642 case XML_ETACTION_CHART_PLOT_AREA:
1643 return new XMLChartPlotAreaOASISTContext( *this, rQName );
1644 default:
1645 SAL_WARN( "xmloff.transform", "no user defined context found!" );
1646 break;
1647 }
1648
1649 // default is copying
1650 return new XMLTransformerContext( *this, rQName );
1651}
1652
1654 sal_uInt16 n )
1655{
1656 XMLTransformerActions *pActions = nullptr;
1657 if( n < MAX_OASIS_ACTIONS )
1658 {
1659 if( !m_aActions[n] )
1660 {
1662 {
1663 m_aActions[n].reset(
1665 }
1666 else switch( n )
1667 {
1671 break;
1675 break;
1679 break;
1683 break;
1687 break;
1691 break;
1695 break;
1699 break;
1703 break;
1707 break;
1711 break;
1715 break;
1716 case OASIS_PARA_ACTIONS:
1719 break;
1723 break;
1727 break;
1731 break;
1735 break;
1739 break;
1743 break;
1747 break;
1751 break;
1755 break;
1759 break;
1763 break;
1767 break;
1771 break;
1772 case OASIS_DLG_ACTIONS:
1775 break;
1779 break;
1783 break;
1787 break;
1791 break;
1795 break;
1799 break;
1803 break;
1804 case OASIS_FORM_ACTIONS:
1807 break;
1812 break;
1816 break;
1820 break;
1824 break;
1828 break;
1832 break;
1838 break;
1842 break;
1846 break;
1847 // Bugdoc with table won't load correctly (#i40011#, #i40015#)
1851 break;
1855 break;
1856 }
1857 }
1858 pActions = m_aActions[n].get();
1859 }
1860
1861 return pActions;
1862}
1863
1864OUString Oasis2OOoTransformer::GetEventName( const OUString& rName,
1865 bool bForm )
1866{
1867 if( bForm && !m_pFormEventMap )
1870 if( !m_pEventMap )
1872
1873 OUString aMacroName;
1874 sal_uInt16 nPrefix =
1875 GetNamespaceMap().GetKeyByAttrName( rName, &aMacroName );
1877 nPrefix, aMacroName, *m_pEventMap,
1878 bForm ? m_pFormEventMap : nullptr );
1879}
1880
1883 m_pEventMap( nullptr ),
1884 m_pFormEventMap( nullptr )
1885{
1888
1891
1894
1897
1900
1903
1906
1909
1912
1915
1918
1921
1924
1927
1930
1933
1934 for(auto & rp : m_aActions)
1935 rp.reset();
1936}
1937
1939{
1940 for(auto & rp : m_aActions)
1941 rp.reset();
1944}
1945
1946const css::uno::Sequence<sal_Int8>& Oasis2OOoTransformer::getUnoTunnelId() noexcept
1947{
1948 static const class comphelper::UnoIdInit theOasis2OOoTransformerUnoTunnelId;
1949 return theOasis2OOoTransformerUnoTunnelId.getSeq();
1950}
1951
1952// XUnoTunnel
1954{
1955 return comphelper::getSomethingImpl(rId, this);
1956}
1957
1958// XServiceInfo
1960{
1961 return "com.sun.star.comp.Oasis2OOoTransformer";
1962}
1963
1964sal_Bool SAL_CALL Oasis2OOoTransformer::supportsService( const OUString& ServiceName )
1965{
1966 return cppu::supportsService(this, ServiceName);
1967}
1968
1970{
1971 return { };
1972}
1973
1974// Service registration
1975
1976extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
1978 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
1979{
1980 SAL_INFO("xmloff.transform", "Creating Oasis2OOoTransformer");
1981 return cppu::acquire(new Oasis2OOoTransformer);
1982}
1983
1984/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ OASIS_BACKGROUND_IMAGE_ACTIONS
@ OASIS_FORMULA_ACTIONS
@ OASIS_TAB_STOP_ACTIONS
@ OASIS_COLUMNS_ACTIONS
@ OASIS_TABLE_VALUE_TYPE_ACTIONS
@ OASIS_DDE_CONNECTION_DECL_ACTIONS
@ OASIS_PARA_STYLE_REF_ACTIONS
@ OASIS_FOOTNOTE_SEP_ACTIONS
@ OASIS_TEXT_VALUE_TYPE_ACTIONS
@ OASIS_ANNOTATION_ACTIONS
@ OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
@ OASIS_SHAPE_ACTIONS
@ OASIS_FORM_PROP_ACTIONS
@ OASIS_DATAPILOT_MEMBER_ACTIONS
@ MAX_OASIS_ACTIONS
@ OASIS_NOTES_ACTIONS
@ OASIS_PARA_ACTIONS
@ OASIS_STYLE_ACTIONS
@ OASIS_LINENUMBERING_ACTIONS
@ OASIS_CHART_ACTIONS
@ OASIS_MAP_STYLE_REF_ACTIONS
@ OASIS_TEXT_STYLE_REF_ACTIONS
@ OASIS_CONTENT_VALIDATION_ACTIONS
@ OASIS_CHANGE_INFO_ACTIONS
@ OASIS_SCRIPT_ACTIONS
@ OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
@ OASIS_LIST_STYLE_REF_ACTIONS
@ OASIS_DDE_CONV_MODE_ACTIONS
@ OASIS_FONT_FACE_ACTIONS
@ OASIS_DATETIME_ACTIONS
@ OASIS_SOURCE_SERVICE_ACTIONS
@ OASIS_FORM_ACTIONS
@ OASIS_XLINK_ACTIONS
@ OASIS_MASTER_PAGE_REF_ACTIONS
@ OASIS_DROP_CAP_ACTIONS
@ OASIS_DLG_ACTIONS
@ OASIS_EVENT_ACTIONS
@ OASIS_ANIMATION_ACTIONS
@ OASIS_CONNECTOR_ACTIONS
@ OASIS_FRAME_ELEM_ACTIONS
@ OASIS_DRAW_AREA_POLYGON_ACTIONS
@ OASIS_TABLE_STYLE_REF_ACTIONS
@ OASIS_CONFIG_ITEM_SET_ACTIONS
@ OASIS_DATAPILOT_LEVEL_ACTIONS
@ OASIS_FORM_CONTROL_ACTIONS
@ MAX_OASIS_PROP_ACTIONS
@ OASIS_FORM_COLUMN_ACTIONS
@ OASIS_MASTER_PAGE_ACTIONS
@ XML_ATACTION_DECODE_STYLE_NAME_REF
@ XML_ATACTION_EVENT_NAME
@ XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF
@ XML_ATACTION_IN2INCH
@ XML_ATACTION_RENAME_IN2INCH
@ XML_ATACTION_RENAME_ATTRIBUTE
@ XML_ATACTION_MOVE_TO_ELEM
@ XML_ATACTION_REMOVE
@ XML_ATACTION_EOT
@ XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
@ XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
@ XML_ATACTION_DECODE_STYLE_NAME
@ XML_ATACTION_INS2INCHS
@ XML_ATACTION_RNG2ISO_DATETIME
@ XML_ATACTION_RENAME_NEG_PERCENT
@ XML_ATACTION_HREF
@ XML_ATACTION_REMOVE_NAMESPACE_PREFIX
@ XML_ATACTION_URI_OASIS
@ XML_ATACTION_RENAME
@ XML_ATACTION_DECODE_ID
@ XML_ATACTION_DLG_BORDER
@ XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
@ XML_ATACTION_STYLE_FAMILY
@ XML_ATACTION_STYLE_DISPLAY_NAME
@ XML_ATACTION_IN2TWIPS
@ XML_ATACTION_RENAME_RNG2ISO_DATETIME
@ XML_ATACTION_NEG_PERCENT
@ XML_ATACTION_MACRO_NAME
@ XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND
@ XML_ETACTION_EXTRACT_CHARACTERS
@ XML_ETACTION_EOT
@ XML_ETACTION_RENAME_ELEM
@ XML_ETACTION_RENAME_ELEM_PROC_ATTRS
@ XML_ETACTION_MOVE_ELEMS_TO_ATTRS
@ XML_ETACTION_USER_DEFINED
@ XML_ETACTION_COPY
@ XML_ETACTION_MOVE_TO_ATTR
@ XML_ETACTION_COPY_CONTENT
@ XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME
@ XML_ETACTION_PROC_ATTRS
@ 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_TABLE_CELL
Definition: FamilyType.hxx:37
@ XML_FAMILY_TYPE_TEXT
Definition: FamilyType.hxx:30
@ XML_FAMILY_TYPE_HATCH
Definition: FamilyType.hxx:42
@ XML_FAMILY_TYPE_END
Definition: FamilyType.hxx:46
@ XML_FAMILY_TYPE_GRAPHIC
Definition: FamilyType.hxx:24
@ XML_FAMILY_TYPE_MARKER
Definition: FamilyType.hxx:45
@ XML_FAMILY_TYPE_STROKE_DASH
Definition: FamilyType.hxx:44
@ XML_FAMILY_TYPE_MASTER_PAGE
Definition: FamilyType.hxx:27
@ XML_FAMILY_TYPE_PARAGRAPH
Definition: FamilyType.hxx:31
@ XML_FAMILY_TYPE_PRESENTATION
Definition: FamilyType.hxx:25
@ 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 aTableStyleRefActionTable[]
Definition: Oasis2OOo.cxx:689
#define ENTRY2(n, l, a, p1, p2)
Definition: Oasis2OOo.cxx:88
XMLTransformerActionInit const aConnectorActionTable[]
Definition: Oasis2OOo.cxx:778
XMLTransformerActionInit const aScriptActionTable[]
Definition: Oasis2OOo.cxx:1117
XMLTransformerActionInit const aTextStyleRefActionTable[]
Definition: Oasis2OOo.cxx:646
XMLTransformerActionInit const aParaStyleRefActionTable[]
Definition: Oasis2OOo.cxx:657
XMLTransformerActionInit const aTextValueTypeActionTable[]
Definition: Oasis2OOo.cxx:888
XMLTransformerActionInit const aFormControlActionTable[]
Definition: Oasis2OOo.cxx:974
XMLTransformerActionInit const aConfigItemSetActionTable[]
Definition: Oasis2OOo.cxx:1021
XMLTransformerActionInit const aDDEConnectionDeclActionTable[]
Definition: Oasis2OOo.cxx:966
XMLTransformerActionInit const aBackgroundImageActionTable[]
Definition: Oasis2OOo.cxx:957
XMLTransformerActionInit const aFormulaActionTable[]
Definition: Oasis2OOo.cxx:1029
XMLTransformerActionInit const aListStyleRefActionTable[]
Definition: Oasis2OOo.cxx:665
XMLTransformerActionInit const aAnnotationActionTable[]
Definition: Oasis2OOo.cxx:934
XMLTransformerActionInit const aDataPilotLevelActionTable[]
Definition: Oasis2OOo.cxx:1063
#define ENTRY1(n, l, a, p1)
Definition: Oasis2OOo.cxx:93
XMLTransformerActionInit const aDDEConvModeActionTable[]
Definition: Oasis2OOo.cxx:1047
XMLTransformerActionInit const aStyleActionTable[]
Definition: Oasis2OOo.cxx:568
XMLTransformerActionInit const aContentValidationActionTable[]
Definition: Oasis2OOo.cxx:1039
XMLTransformerActionInit const aDrawAreaPolygonActionTable[]
Definition: Oasis2OOo.cxx:1109
XMLTransformerActionInit const aXLinkActionTable[]
Definition: Oasis2OOo.cxx:1013
XMLTransformerActionInit const aFrameActionTable[]
Definition: Oasis2OOo.cxx:602
XMLTransformerActionInit const aParaActionTable[]
Definition: Oasis2OOo.cxx:706
XMLTokenEnum const aTokenMap[]
Definition: Oasis2OOo.cxx:1145
XMLTransformerActionInit const aMasterPageRefActionTable[]
Definition: Oasis2OOo.cxx:673
XMLTransformerActionInit const aMasterPageActionTable[]
Definition: Oasis2OOo.cxx:632
XMLTransformerActionInit const aSourceServiceActionTable[]
Definition: Oasis2OOo.cxx:1071
XMLTransformerActionInit const aAlphabeticalIndexMarkActionTable[]
Definition: Oasis2OOo.cxx:1101
XMLTransformerActionInit const aDropCapActionTable[]
Definition: Oasis2OOo.cxx:866
XMLTransformerActionInit const aFootnoteSepActionTable[]
Definition: Oasis2OOo.cxx:842
XMLTransformerActionInit const aTabStopActionTable[]
Definition: Oasis2OOo.cxx:818
XMLTransformerActionInit const aDataPilotMemberActionTable[]
Definition: Oasis2OOo.cxx:1055
#define ENTRY3QNQ(n, l, a, n1, l1, p2, n3, l3)
Definition: Oasis2OOo.cxx:84
XMLTransformerActionInit const aChartActionTable[]
Definition: Oasis2OOo.cxx:1079
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * xmloff_Oasis2OOoTransformer_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: Oasis2OOo.cxx:1977
XMLTransformerActionInit const aEventActionTable[]
Definition: Oasis2OOo.cxx:615
#define ENTRY1Q(n, l, a, p1, t1)
Definition: Oasis2OOo.cxx:95
XMLTransformerActionInit const aFormActionTable[]
Definition: Oasis2OOo.cxx:1090
XMLTransformerActionInit const aLineNumberingActionTable[]
Definition: Oasis2OOo.cxx:832
#define ENTRY0(n, l, a)
Definition: Oasis2OOo.cxx:98
XMLTransformerActionInit const aNotesActionTable[]
Definition: Oasis2OOo.cxx:851
XMLTransformerActionInit const aActionTable[]
Definition: Oasis2OOo.cxx:108
XMLTransformerActionInit const aIndexEntryTabStopActionTable[]
Definition: Oasis2OOo.cxx:809
XMLTransformerActionInit const aFormPropActionTable[]
Definition: Oasis2OOo.cxx:999
XMLTransformerActionInit const aChangeInfoActionTable[]
Definition: Oasis2OOo.cxx:947
XMLTransformerActionInit const aShapeActionTable[]
Definition: Oasis2OOo.cxx:719
XMLTransformerActionInit const aDlgActionTable[]
Definition: Oasis2OOo.cxx:626
XMLTransformerActionInit const aColumnsActionTable[]
Definition: Oasis2OOo.cxx:874
XMLTransformerActionInit const aTableValueTypeActionTable[]
Definition: Oasis2OOo.cxx:909
XMLTransformerActionInit const aFontFaceActionTable[]
Definition: Oasis2OOo.cxx:696
XMLTransformerActionInit const aFormColumnActionTable[]
Definition: Oasis2OOo.cxx:987
XMLTransformerActionInit const aDateTimeActionTable[]
Definition: Oasis2OOo.cxx:1126
XMLTransformerActionInit const aMapStyleRefActionTable[]
Definition: Oasis2OOo.cxx:681
static constexpr sal_Int32 RENAME_ENTRY(XMLTokenEnum f, XMLTokenEnum s)
Definition: Oasis2OOo.cxx:103
XMLTransformerActionInit const aAnimationActionTable[]
Definition: Oasis2OOo.cxx:768
#define ENTRY2QN(n, l, a, n1, l1, p2)
Definition: Oasis2OOo.cxx:90
#define MAP(name, prefix, token, type, context, version)
NAME
virtual OUString SAL_CALL getImplementationName() override
Definition: Oasis2OOo.cxx:1959
virtual sal_Int64 SAL_CALL getSomething(const css::uno::Sequence< sal_Int8 > &aIdentifier) override
Definition: Oasis2OOo.cxx:1953
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: Oasis2OOo.cxx:1969
virtual OUString GetEventName(const OUString &rName, bool bForm=false) override
Definition: Oasis2OOo.cxx:1864
virtual ~Oasis2OOoTransformer() noexcept override
Definition: Oasis2OOo.cxx:1938
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: Oasis2OOo.cxx:1964
virtual XMLTransformerActions * GetUserDefinedActions(sal_uInt16 n) override
Definition: Oasis2OOo.cxx:1653
Oasis2OOoTransformer() noexcept
Definition: Oasis2OOo.cxx:1881
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() noexcept
Definition: Oasis2OOo.cxx:1946
virtual XMLTransformerContext * CreateUserDefinedContext(const TransformerAction_Impl &rAction, const OUString &rQName, bool bPersistent=false) override
Definition: Oasis2OOo.cxx:1592
XMLTransformerOASISEventMap_Impl * m_pEventMap
Definition: Oasis2OOo.hxx:30
std::unique_ptr< XMLTransformerActions > m_aActions[MAX_OASIS_ACTIONS]
Definition: Oasis2OOo.hxx:29
XMLTransformerOASISEventMap_Impl * m_pFormEventMap
Definition: Oasis2OOo.hxx:31
sal_uInt16 GetKeyByAttrName(const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
sal_uInt16 Add(const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey=XML_NAMESPACE_UNKNOWN)
static OUString GetEventName(sal_uInt16 nPrefix, const OUString &rName, XMLTransformerOASISEventMap_Impl &rMap, XMLTransformerOASISEventMap_Impl *pMap2)
static XMLTransformerOASISEventMap_Impl * CreateEventMap()
static XMLTransformerOASISEventMap_Impl * CreateFormEventMap()
static void FlushEventMap(XMLTransformerOASISEventMap_Impl *p)
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList) override
static XMLTransformerActions * CreateTransformerActions(sal_uInt16 nType)
static bool DecodeStyleName(OUString &rName)
SvXMLNamespaceMap & GetNamespaceMap()
friend class XMLTransformerContext
static bool ReplaceSingleInWithInch(OUString &rValue)
const XMLTransformerContext * GetCurrentContext() const
SvXMLNamespaceMap & GetReplaceNamespaceMap()
virtual rtl::Reference< XMLTransformerContext > CreateChildContext(sal_uInt16 nPrefix, const OUString &rLocalName, const OUString &rQName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
virtual void Characters(const OUString &rChars)
bool HasQName(sal_uInt16 nPrefix, ::xmloff::token::XMLTokenEnum eToken) const
virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
static void encode(OUStringBuffer &aStrBuffer, const css::uno::Sequence< sal_Int8 > &aPass)
static void decode(css::uno::Sequence< sal_Int8 > &aPass, std::u16string_view sBuffer)
const css::uno::Sequence< sal_Int8 > & getSeq() const
constexpr OUStringLiteral TITLE
const bool READONLY
#define BORDER
DRAW
sal_Int64 n
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
HIDDEN
sal_Int64 getSomethingImpl(const css::uno::Sequence< sal_Int8 > &rId, T *pThis, FallbackToGetSomethingOf< Base >={})
FORMULA
CONDITION
DATE
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
FORM
const sal_uInt16 WIDTH
int i
OUString aPropName
END
DOCUMENT
START
void(* f)(TrueTypeTable *)
FRAME
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_TABLE_OF_CONTENT_ENTRY_TEMPLATE
Definition: xmltoken.hxx:1916
@ XML_COUNT_IN_FLOATING_FRAMES
Definition: xmltoken.hxx:532
@ XML_NOTES_CONFIGURATION
Definition: xmltoken.hxx:2611
@ XML_INDEX_ENTRY_CHAPTER_NUMBER
Definition: xmltoken.hxx:1086
@ XML_CREATE_DATE_STRING
Definition: xmltoken.hxx:541
@ XML_N_PRESENTATION
Definition: xmltoken.hxx:89
@ XML_N_PRESENTATION_OOO
Definition: xmltoken.hxx:2600
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Definition: xmltoken.cxx:3575
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
Definition: xmltoken.cxx:3519
#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
sal_uInt16 sal_Unicode
::ucbhelper::Content m_aContent
std::unique_ptr< char[]> aBuffer
#define RX
const sal_uInt8 A
const sal_uInt8 R
TABLE
constexpr sal_uInt16 XML_NAMESPACE_DRAW
constexpr sal_uInt16 XML_NAMESPACE_DLG
constexpr sal_uInt16 XML_NAMESPACE_META
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_TABLE
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