LCOV - code coverage report
Current view: top level - xmloff/source/transform - Oasis2OOo.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 512 0.0 %
Date: 2014-04-14 Functions: 0 66 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10