LCOV - code coverage report
Current view: top level - xmloff/source/transform - OOo2Oasis.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 602 0.0 %
Date: 2014-04-14 Functions: 0 154 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 <rtl/ustrbuf.hxx>
      21             : #include <comphelper/processfactory.hxx>
      22             : #include <comphelper/servicehelper.hxx>
      23             : #include <sax/tools/converter.hxx>
      24             : #include <xmloff/nmspmap.hxx>
      25             : #include <xmloff/xmlnmspe.hxx>
      26             : #include <xmloff/xmltoken.hxx>
      27             : #include "MutableAttrList.hxx"
      28             : #include "DeepTContext.hxx"
      29             : #include "StyleOOoTContext.hxx"
      30             : #include "FrameOOoTContext.hxx"
      31             : #include "EventOOoTContext.hxx"
      32             : #include "ControlOOoTContext.hxx"
      33             : #include "FormPropOOoTContext.hxx"
      34             : #include "ChartOOoTContext.hxx"
      35             : #include "ChartPlotAreaOOoTContext.hxx"
      36             : #include "ElemTransformerAction.hxx"
      37             : #include "AttrTransformerAction.hxx"
      38             : #include "PropertyActionsOOo.hxx"
      39             : #include "TransformerActions.hxx"
      40             : #include "OOo2Oasis.hxx"
      41             : #include "XMLFilterRegistration.hxx"
      42             : #include <cppuhelper/supportsservice.hxx>
      43             : 
      44             : using namespace ::xmloff::token;
      45             : using namespace ::com::sun::star::uno;
      46             : using namespace ::com::sun::star::lang;
      47             : using namespace ::com::sun::star::xml::sax;
      48             : using namespace ::com::sun::star::beans;
      49             : 
      50             : OUString SAL_CALL OOo2OasisTransformer_getImplementationName() throw();
      51             : 
      52             : enum XMLUserDefinedTransformerAction
      53             : {
      54             :     XML_ETACTION_DOCUMENT=XML_ETACTION_USER_DEFINED,
      55             :     XML_ETACTION_BODY,
      56             :     XML_ETACTION_STYLE,
      57             :     XML_ETACTION_STYLE_RENAME,
      58             :     XML_ETACTION_FRAME,
      59             :     XML_ETACTION_EVENT,
      60             :     XML_ETACTION_TAB_STOP,
      61             :     XML_ETACTION_FORM_CONTROL,
      62             :     XML_ETACTION_FORM_PROPERTY,
      63             :     XML_ETACTION_CHART,
      64             :     XML_ETACTION_TRACKED_CHANGES,
      65             :     XML_ETACTION_CHART_PLOT_AREA,
      66             :     XML_ETACTION_DOCUMENT_RENAME,
      67             :     XML_ETACTION_TABLE
      68             : };
      69             : 
      70             : #define ENTRY3( n, l, a, p1, p2, p3 ) \
      71             :     { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
      72             : #define ENTRY3QQN( n, l, a, n1, l1, n2, l2, p3 ) \
      73             :     ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
      74             :             XMLTransformerActionInit::QNameParam( n2, l2 ), p3 )
      75             : 
      76             : #define ENTRY2( n, l, a, p1, p2 ) \
      77             :     ENTRY3( n, l, a, p1, p2, 0 )
      78             : #define ENTRY2QN( n, l, a, n1, l1, p2 ) \
      79             :     ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
      80             : 
      81             : #define ENTRY1( n, l, a, p1 ) \
      82             :     ENTRY3( n, l, a, p1, 0, 0 )
      83             : #define ENTRY1Q( n, l, a, n1, l1 ) \
      84             :     ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ) )
      85             : 
      86             : #define ENTRY0( n, l, a ) \
      87             :     ENTRY3( n, l, a, 0, 0, 0 )
      88             : 
      89             : // BM: a macro to put two tokens into one sal_Int32 for the action
      90             : // XML_ATACTION_RENAME_ATTRIBUTE
      91             : #define RENAME_ENTRY( f, s ) \
      92             :     (static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16))
      93             : 
      94             : static XMLTransformerActionInit aActionTable[] =
      95             : {
      96             :     // remove office:class from <office:document> and <office:document-content>
      97             :     ENTRY0( OFFICE, DOCUMENT, XML_ETACTION_DOCUMENT ),
      98             :     ENTRY0( OFFICE, DOCUMENT_CONTENT, XML_ETACTION_DOCUMENT ),
      99             :     ENTRY0( OFFICE, DOCUMENT_STYLES, XML_ETACTION_DOCUMENT ),
     100             :     ENTRY0( OFFICE, DOCUMENT_SETTINGS, XML_ETACTION_DOCUMENT ),
     101           0 :     ENTRY1Q( OFFICE, AUTO_TEXT_EVENTS, XML_ETACTION_DOCUMENT_RENAME,
     102             :                           XML_NAMESPACE_OOO, XML_AUTO_TEXT_EVENTS),
     103             : 
     104             :     // remove <meta:keywords>
     105             :     ENTRY0( META, KEYWORDS, XML_ETACTION_COPY_CONTENT ),
     106             : 
     107             :     // rename <office:script> to <office:scripts>
     108           0 :     ENTRY1Q( OFFICE, SCRIPT, XML_ETACTION_RENAME_ELEM,
     109             :                         XML_NAMESPACE_OFFICE, XML_SCRIPTS ),
     110             : 
     111             :     // rename <office:script-data> to <office:script> and process attributes
     112           0 :     ENTRY2QN( OFFICE, SCRIPT_DATA, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     113             :                         XML_NAMESPACE_OFFICE, XML_SCRIPT,
     114             :                         OOO_SCRIPT_ACTIONS ),
     115             : 
     116             :     // rename <script:libraries> to <ooo:libraries>
     117           0 :     ENTRY1Q( SCRIPT, LIBRARIES, XML_ETACTION_RENAME_ELEM,
     118             :                         XML_NAMESPACE_OOO, XML_LIBRARIES ),
     119             : 
     120             :     // rename <script:library-linked> to <ooo:library-linked> and process attributes
     121           0 :     ENTRY2QN( SCRIPT, LIBRARY_LINKED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     122             :                         XML_NAMESPACE_OOO, XML_LIBRARY_LINKED,
     123             :                         OOO_SCRIPT_ACTIONS ),
     124             : 
     125             :     // rename <script:library-embedded> to <ooo:library-embedded> and process attributes
     126           0 :     ENTRY2QN( SCRIPT, LIBRARY_EMBEDDED, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     127             :                         XML_NAMESPACE_OOO, XML_LIBRARY_EMBEDDED,
     128             :                         OOO_SCRIPT_ACTIONS ),
     129             : 
     130             :     // rename <script:module> to <ooo:module> and process attributes
     131           0 :     ENTRY2QN( SCRIPT, MODULE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     132             :                         XML_NAMESPACE_OOO, XML_MODULE,
     133             :                         OOO_SCRIPT_ACTIONS ),
     134             : 
     135             :     // rename <script:source-code> to <ooo:source-code>
     136           0 :     ENTRY1Q( SCRIPT, SOURCE_CODE, XML_ETACTION_RENAME_ELEM,
     137             :                         XML_NAMESPACE_OOO, XML_SOURCE_CODE ),
     138             : 
     139             :     // rename <office:font-decls> to <office:font-face-decl>,
     140             :     // rename <style:font-decl> to <style:font-face>, process attrs
     141           0 :     ENTRY1Q( OFFICE, FONT_DECLS, XML_ETACTION_RENAME_ELEM,
     142             :                         XML_NAMESPACE_OFFICE, XML_FONT_FACE_DECLS ),
     143           0 :     ENTRY2QN( STYLE, FONT_DECL, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     144             :                         XML_NAMESPACE_STYLE, XML_FONT_FACE,
     145             :                            OOO_FONT_DECL_ACTIONS ),
     146             : 
     147             :     // add genre element
     148             :     ENTRY0( OFFICE, BODY, XML_ETACTION_BODY ),
     149             : 
     150             :     // rename <style:page-master> to <style:page-layout>
     151           0 :     ENTRY2QN( STYLE, PAGE_MASTER, XML_ETACTION_STYLE_RENAME,
     152             :                         XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT,
     153             :                            XML_FAMILY_TYPE_PAGE_LAYOUT  ),
     154             :     ENTRY1( STYLE, MASTER_PAGE, XML_ETACTION_PROC_ATTRS,
     155             :                         OOO_MASTER_PAGE_ACTIONS ),
     156             : 
     157             :     // split <style:properties> into <style:*-properties> and do other
     158             :     // styles processing
     159             :     ENTRY1( STYLE, STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_END ),
     160             :     ENTRY1( STYLE, DEFAULT_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_END ),
     161             :     ENTRY1( NUMBER, NUMBER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     162             :     ENTRY1( NUMBER, CURRENCY_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     163             :     ENTRY1( NUMBER, PERCENTAGE_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     164             :     ENTRY1( NUMBER, DATE_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     165             :     ENTRY1( NUMBER, TIME_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     166             :     ENTRY1( NUMBER, BOOLEAN_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     167             :     ENTRY1( NUMBER, TEXT_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_DATA ),
     168             :     ENTRY1( TEXT, LIST_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
     169             : //  ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
     170             :     ENTRY1( STYLE, HEADER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_HEADER_FOOTER ),
     171             :     ENTRY1( STYLE, FOOTER_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_HEADER_FOOTER ),
     172             :     ENTRY1( TEXT, LIST_LEVEL_STYLE_NUMBER, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
     173             :     ENTRY1( TEXT, LIST_LEVEL_STYLE_BULLET, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
     174             :     ENTRY1( TEXT, LIST_LEVEL_STYLE_IMAGE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
     175             :     ENTRY1( TEXT, OUTLINE_LEVEL_STYLE, XML_ETACTION_STYLE, XML_FAMILY_TYPE_LIST ),
     176             :     ENTRY1( DRAW, GRADIENT, XML_ETACTION_STYLE,
     177             :                  XML_FAMILY_TYPE_GRADIENT ),
     178             :     ENTRY1( DRAW, FILL_IMAGE, XML_ETACTION_STYLE,
     179             :                  XML_FAMILY_TYPE_FILL_IMAGE ),
     180           0 :     ENTRY2QN( DRAW, TRANSPARENCY, XML_ETACTION_STYLE_RENAME,
     181             :                 XML_NAMESPACE_DRAW, XML_OPACITY,
     182             :                  XML_FAMILY_TYPE_GRADIENT ),
     183             :     ENTRY1( DRAW, MARKER, XML_ETACTION_STYLE,
     184             :                  XML_FAMILY_TYPE_MARKER ),
     185             :     ENTRY1( DRAW, HATCH, XML_ETACTION_STYLE,
     186             :                  XML_FAMILY_TYPE_HATCH ),
     187             :     ENTRY1( DRAW, STROKE_DASH, XML_ETACTION_STYLE,
     188             :                  XML_FAMILY_TYPE_STROKE_DASH ),
     189             : 
     190             :     // rename <text:h>'s text:level to text:outline-level
     191             :     // process <text:h/p>: process style-name attributes,
     192             :     ENTRY1( TEXT, H, XML_ETACTION_PROC_ATTRS, OOO_PARA_ACTIONS ),
     193             :     ENTRY1( TEXT, P, XML_ETACTION_PROC_ATTRS, OOO_PARA_ACTIONS ),
     194             : 
     195             :     // rename <text:ordered-list> and <text:unordered-list> to <text:list>
     196           0 :     ENTRY2QN( TEXT, UNORDERED_LIST, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     197             :                         XML_NAMESPACE_TEXT, XML_LIST,
     198             :                           OOO_STYLE_REF_ACTIONS ),
     199           0 :     ENTRY2QN( TEXT, ORDERED_LIST, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     200             :                         XML_NAMESPACE_TEXT, XML_LIST,
     201             :                           OOO_STYLE_REF_ACTIONS ),
     202             : 
     203             :     // rename <text:footnote*> to <text:note*>
     204           0 :     ENTRY3QQN( TEXT, FOOTNOTE, XML_ETACTION_RENAME_ELEM_ADD_ATTR,
     205             :                         XML_NAMESPACE_TEXT, XML_NOTE,
     206             :                            XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_FOOTNOTE ),
     207           0 :     ENTRY1Q( TEXT, FOOTNOTE_BODY, XML_ETACTION_RENAME_ELEM,
     208             :                         XML_NAMESPACE_TEXT, XML_NOTE_BODY ),
     209           0 :     ENTRY1Q( TEXT, FOOTNOTE_CITATION, XML_ETACTION_RENAME_ELEM,
     210             :                         XML_NAMESPACE_TEXT, XML_NOTE_CITATION ),
     211           0 :     ENTRY3QQN( TEXT, FOOTNOTES_CONFIGURATION,
     212             :                         XML_ETACTION_RENAME_ELEM_ADD_PROC_ATTR,
     213             :                         XML_NAMESPACE_TEXT, XML_NOTES_CONFIGURATION,
     214             :                            XML_NAMESPACE_TEXT, XML_NOTE_CLASS,
     215             :                         XML_FOOTNOTE | (OOO_STYLE_REF_ACTIONS << 16) ),
     216             : 
     217             :     // rename <text:endnote*> to <text:endnote*>
     218           0 :     ENTRY3QQN( TEXT, ENDNOTE, XML_ETACTION_RENAME_ELEM_ADD_ATTR,
     219             :                         XML_NAMESPACE_TEXT, XML_NOTE,
     220             :                            XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_ENDNOTE ),
     221           0 :     ENTRY1Q( TEXT, ENDNOTE_BODY, XML_ETACTION_RENAME_ELEM,
     222             :                         XML_NAMESPACE_TEXT, XML_NOTE_BODY ),
     223           0 :     ENTRY1Q( TEXT, ENDNOTE_CITATION, XML_ETACTION_RENAME_ELEM,
     224             :                         XML_NAMESPACE_TEXT, XML_NOTE_CITATION ),
     225           0 :     ENTRY3QQN( TEXT, ENDNOTES_CONFIGURATION,
     226             :                         XML_ETACTION_RENAME_ELEM_ADD_PROC_ATTR,
     227             :                         XML_NAMESPACE_TEXT, XML_NOTES_CONFIGURATION,
     228             :                            XML_NAMESPACE_TEXT, XML_NOTE_CLASS,
     229             :                         XML_ENDNOTE | (OOO_STYLE_REF_ACTIONS << 16) ),
     230             : 
     231             :     // rename <text:footnote> and <text:endnote> to <text:note>
     232           0 :     ENTRY3QQN( TEXT, ENDNOTE_REF, XML_ETACTION_RENAME_ELEM_ADD_ATTR,
     233             :                         XML_NAMESPACE_TEXT, XML_NOTE_REF,
     234             :                            XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_ENDNOTE ),
     235           0 :     ENTRY3QQN( TEXT, FOOTNOTE_REF, XML_ETACTION_RENAME_ELEM_ADD_ATTR,
     236             :                         XML_NAMESPACE_TEXT, XML_NOTE_REF,
     237             :                            XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_FOOTNOTE ),
     238             : 
     239             :     // rename <text:tab-stop> to <text:tab>
     240           0 :     ENTRY1Q( TEXT, TAB_STOP, XML_ETACTION_RENAME_ELEM,
     241             :                         XML_NAMESPACE_TEXT, XML_TAB ),
     242             : 
     243             :     // replace <table:sub-table> with <table:table table:is-sub-table>
     244           0 :     ENTRY3QQN( TABLE, SUB_TABLE, XML_ETACTION_RENAME_ELEM_ADD_ATTR,
     245             :                         XML_NAMESPACE_TABLE, XML_TABLE,
     246             :                            XML_NAMESPACE_TABLE, XML_IS_SUB_TABLE, XML_TRUE ),
     247             : 
     248             :     // process *:style-name attributes
     249             :     ENTRY1( TEXT, SECTION, XML_ETACTION_PROC_ATTRS,
     250             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     251             :     ENTRY1( TEXT, SPAN, XML_ETACTION_PROC_ATTRS,
     252             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     253             :     ENTRY1( TEXT, A, XML_ETACTION_PROC_ATTRS,
     254             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     255             :     ENTRY1( TEXT, RUBY, XML_ETACTION_PROC_ATTRS,
     256             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     257             :     ENTRY1( TEXT, RUBY_TEXT, XML_ETACTION_PROC_ATTRS,
     258             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     259             :     ENTRY1( TEXT, DATE, XML_ETACTION_PROC_ATTRS,
     260             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     261             :     ENTRY1( TEXT, TIME, XML_ETACTION_PROC_ATTRS,
     262             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     263             :     ENTRY1( TEXT, VARIABLE_GET, XML_ETACTION_PROC_ATTRS,
     264             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     265             :     ENTRY1( TEXT, USER_FIELD_GET, XML_ETACTION_PROC_ATTRS,
     266             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     267             :     ENTRY1( TEXT, USER_FIELD_INPUT, XML_ETACTION_PROC_ATTRS,
     268             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     269             :     ENTRY1( TEXT, CREATION_DATE, XML_ETACTION_PROC_ATTRS,
     270             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     271             :     ENTRY1( TEXT, CREATION_TIME, XML_ETACTION_PROC_ATTRS,
     272             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     273             :     ENTRY1( TEXT, PRINT_TIME, XML_ETACTION_PROC_ATTRS,
     274             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     275             :     ENTRY1( TEXT, PRINT_DATE, XML_ETACTION_PROC_ATTRS,
     276             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     277             :     ENTRY1( TEXT, EDITING_DURATION, XML_ETACTION_PROC_ATTRS,
     278             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     279             :     ENTRY1( TEXT, MODIFICATION_TIME, XML_ETACTION_PROC_ATTRS,
     280             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     281             :     ENTRY1( TEXT, MODIFICATION_DATE, XML_ETACTION_PROC_ATTRS,
     282             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     283             :     ENTRY1( TEXT, DATABASE_DISPLAY, XML_ETACTION_PROC_ATTRS,
     284             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     285             :     ENTRY1( TEXT, TABLE_FORMULA, XML_ETACTION_PROC_ATTRS,
     286             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     287             :     ENTRY1( TEXT, INDEX_TITLE, XML_ETACTION_PROC_ATTRS,
     288             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     289             :     ENTRY1( TEXT, TABLE_OF_CONTENT, XML_ETACTION_PROC_ATTRS,
     290             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     291             :     ENTRY1( TEXT, TABLE_OF_CONTENT_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     292             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     293             :     ENTRY1( TEXT, ILLUSTRATION_INDEX, XML_ETACTION_PROC_ATTRS,
     294             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     295             :     ENTRY1( TEXT, ILLUSTRATION_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     296             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     297             :     ENTRY1( TEXT, TABLE_INDEX, XML_ETACTION_PROC_ATTRS,
     298             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     299             :     ENTRY1( TEXT, TABLE_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     300             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     301             :     ENTRY1( TEXT, OBJECT_INDEX, XML_ETACTION_PROC_ATTRS,
     302             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     303             :     ENTRY1( TEXT, OBJECT_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     304             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     305             :     ENTRY1( TEXT, USER_INDEX, XML_ETACTION_PROC_ATTRS,
     306             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     307             :     ENTRY1( TEXT, USER_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     308             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     309             :     ENTRY1( TEXT, ALPHABETICAL_INDEX, XML_ETACTION_PROC_ATTRS,
     310             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     311             :     ENTRY1( TEXT, ALPHABETICAL_INDEX_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     312             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     313             :     ENTRY1( TEXT, BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
     314             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     315             :     ENTRY1( TEXT, BIBLIOGRAPHY_ENTRY_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     316             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     317             :     ENTRY1( TEXT, INDEX_SOURCE_STYLE, XML_ETACTION_PROC_ATTRS,
     318             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     319             :     ENTRY1( TEXT, INDEX_TITLE_TEMPLATE, XML_ETACTION_PROC_ATTRS,
     320             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     321             :     ENTRY1( TEXT, INDEX_ENTRY_CHAPTER, XML_ETACTION_PROC_ATTRS,
     322             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     323           0 :     ENTRY2QN( TEXT, INDEX_ENTRY_CHAPTER_NUMBER,
     324             :             XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     325             :             XML_NAMESPACE_TEXT, XML_INDEX_ENTRY_CHAPTER,
     326             :             OOO_STYLE_REF_ACTIONS ), /* generated entry */
     327             :     ENTRY1( TEXT, INDEX_ENTRY_TEXT, XML_ETACTION_PROC_ATTRS,
     328             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     329             :     ENTRY1( TEXT, INDEX_ENTRY_PAGE_NUMBER, XML_ETACTION_PROC_ATTRS,
     330             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     331             :     ENTRY1( TEXT, INDEX_ENTRY_SPAN, XML_ETACTION_PROC_ATTRS,
     332             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     333             :     ENTRY1( TEXT, INDEX_ENTRY_BIBLIOGRAPHY, XML_ETACTION_PROC_ATTRS,
     334             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     335             :     ENTRY1( TEXT, INDEX_ENTRY_LINK_START, XML_ETACTION_PROC_ATTRS,
     336             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     337             :     ENTRY1( TEXT, INDEX_ENTRY_LINK_END, XML_ETACTION_PROC_ATTRS,
     338             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     339             :     ENTRY1( STYLE, HANDOUT_MASTER, XML_ETACTION_PROC_ATTRS,
     340             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     341             :     ENTRY1( DRAW, PAGE, XML_ETACTION_PROC_ATTRS,
     342             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     343             :     ENTRY1( STYLE, MAP, XML_ETACTION_PROC_ATTRS,
     344             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     345             :     ENTRY1( PRESENTATION, NOTES, XML_ETACTION_PROC_ATTRS,
     346             :         OOO_STYLE_REF_ACTIONS ), /* generated entry */
     347             :     ENTRY1( STYLE, PRESENTATION_PAGE_LAYOUT, XML_ETACTION_PROC_ATTRS,
     348             :                         OOO_MASTER_PAGE_ACTIONS ),
     349             :     /* Consider also attribute table:style-name for <table:table>,
     350             :        <table:table-row> and <table:table-column>. (#i40011#, #i40015#)
     351             :     */
     352             :     ENTRY0( TABLE, TABLE, XML_ETACTION_TABLE ),
     353             :     ENTRY1( TABLE, TABLE_ROW, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ),
     354             :     ENTRY1( TABLE, TABLE_COLUMN, XML_ETACTION_PROC_ATTRS, OOO_STYLE_REF_ACTIONS ),
     355             : 
     356             :     // split frame elements
     357             :     ENTRY0( DRAW, TEXT_BOX, XML_ETACTION_FRAME ),
     358             :     ENTRY0( DRAW, IMAGE, XML_ETACTION_FRAME ),
     359             :     ENTRY0( DRAW, OBJECT, XML_ETACTION_FRAME ),
     360             :     ENTRY0( DRAW, OBJECT_OLE, XML_ETACTION_FRAME ),
     361             :     ENTRY0( DRAW, APPLET, XML_ETACTION_FRAME ),
     362             :     ENTRY0( DRAW, PLUGIN, XML_ETACTION_FRAME ),
     363             :     ENTRY0( DRAW, FLOATING_FRAME, XML_ETACTION_FRAME ),
     364             :     ENTRY0( SVG, DESC, XML_ETACTION_COPY_TEXT ),
     365             : 
     366             :     // process events
     367           0 :     ENTRY1Q( OFFICE, EVENTS, XML_ETACTION_RENAME_ELEM,
     368             :                       XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS ),
     369             :     ENTRY0( SCRIPT, EVENT, XML_ETACTION_EVENT ),
     370             :     ENTRY0( PRESENTATION, EVENT, XML_ETACTION_EVENT ),
     371             : 
     372             :     // process length attributes
     373             :     ENTRY1( DRAW, RECT, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     374             :     ENTRY1( DRAW, LINE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     375             :     ENTRY1( DRAW, POLYLINE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     376             :     ENTRY1( DRAW, POLYGON, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     377             :     ENTRY1( DRAW, PATH, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     378             :     ENTRY1( DRAW, CIRCLE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     379             :     ENTRY1( DRAW, ELLIPSE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     380             :     ENTRY1( DRAW, CONNECTOR, XML_ETACTION_PROC_ATTRS, OOO_CONNECTOR_ACTIONS ),
     381             :     ENTRY1( DRAW, CAPTION, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     382             :     ENTRY1( DRAW, CONTROL, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     383             :     ENTRY1( DRAW, PAGE_THUMBNAIL, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     384             :     ENTRY1( DRAW, MEASURE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     385             :     ENTRY1( DRAW, G, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     386             : //  ENTRY1( DRAW, TEXT_BOX, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     387             :     ENTRY1( PRESENTATION, PLACEHOLDER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     388             :     ENTRY1( DRAW, CONTOUR_POLYGON, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     389             :     ENTRY1( DRAW, CONTOUR_PATH, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     390             :     ENTRY1( DRAW, AREA_RECTANGLE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     391             :     ENTRY1( DRAW, AREA_CIRCLE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     392             :     ENTRY1( DRAW, AREA_POLYGON, XML_ETACTION_PROC_ATTRS, OOO_DRAW_AREA_POLYGON_ACTIONS ),
     393             :     ENTRY1( DRAW, GLUE_POINT, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     394             :     ENTRY1( DR3D, SCENE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     395             :     ENTRY1( DR3D, CUBE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     396             :     ENTRY1( DR3D, SPHERE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     397             :     ENTRY1( DR3D, EXTRUDE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     398             :     ENTRY1( DR3D, ROTATE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     399             :     ENTRY1( CHART, TITLE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     400             :     ENTRY1( CHART, SUBTITLE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     401             :     ENTRY1( CHART, FOOTER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     402             :     ENTRY1( CHART, LEGEND, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     403             :     ENTRY1( CHART, WALL, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     404             :     ENTRY1( CHART, FLOOR, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     405             :     ENTRY1( CHART, AXIS, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     406             :     ENTRY1( CHART, GRID, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     407             :     ENTRY1( CHART, SERIES, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     408             :     ENTRY1( CHART, DATA_POINT, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     409             :     ENTRY1( CHART, MEAN_VALUE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     410             :     ENTRY1( CHART, ERROR_INDICATOR, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     411             :     ENTRY1( CHART, REGRESSION_CURVE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     412             :     ENTRY1( CHART, STOCK_GAIN_MARKER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     413             :     ENTRY1( CHART, STOCK_LOSS_MARKER, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     414             :     ENTRY1( CHART, STOCK_RANGE_LINE, XML_ETACTION_PROC_ATTRS, OOO_SHAPE_ACTIONS ),
     415             : 
     416             :     ENTRY0( CHART, CHART, XML_ETACTION_CHART ),
     417             :     ENTRY0( CHART, PLOT_AREA, XML_ETACTION_CHART_PLOT_AREA ),
     418             : 
     419           0 :     ENTRY1Q( TEXT, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
     420             :                         XML_NAMESPACE_TEXT, XML_PROTECTION_KEY ),
     421           0 :     ENTRY1Q( TABLE, TRACKED_CHANGES, XML_ETACTION_TRACKED_CHANGES,
     422             :                         XML_NAMESPACE_TABLE, XML_PROTECTION_KEY ),
     423             : 
     424             :     ENTRY1( TEXT, INDEX_ENTRY_TAB_STOP, XML_ETACTION_PROC_ATTRS,
     425             :                   OOO_INDEX_ENTRY_TAB_STOP_ACTIONS ),
     426             :     ENTRY0( STYLE, TAB_STOP, XML_ETACTION_TAB_STOP ),
     427             :     ENTRY1( STYLE, BACKGROUND_IMAGE, XML_ETACTION_PROC_ATTRS,
     428             :                      OOO_BACKGROUND_IMAGE_ACTIONS  ),
     429             :     ENTRY1( TEXT, LINENUMBERING_CONFIGURATION, XML_ETACTION_PROC_ATTRS,
     430             :                   OOO_LINENUMBERING_ACTIONS ),
     431             :     ENTRY1( STYLE, FOOTNOTE_SEP, XML_ETACTION_PROC_ATTRS,
     432             :                    OOO_FOOTNOTE_SEP_ACTIONS ),
     433             :     ENTRY1( STYLE, DROP_CAP, XML_ETACTION_PROC_ATTRS, OOO_DROP_CAP_ACTIONS ),
     434             :     ENTRY1( STYLE, COLUMNS, XML_ETACTION_PROC_ATTRS, OOO_COLUMNS_ACTIONS ),
     435             :     ENTRY1( STYLE, COLUMN, XML_ETACTION_PROC_ATTRS, OOO_COLUMNS_ACTIONS ),
     436             : 
     437             :     // rename office:value-* to *:value-*
     438             :     ENTRY1( TEXT, VARIABLE_DECL, XML_ETACTION_PROC_ATTRS,
     439             :             OOO_TEXT_VALUE_TYPE_ACTIONS ), /* generated entry */
     440             :     ENTRY1( TEXT, VARIABLE_SET, XML_ETACTION_PROC_ATTRS,
     441             :             OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
     442             :     ENTRY1( TEXT, VARIABLE_INPUT, XML_ETACTION_PROC_ATTRS,
     443             :             OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
     444             :     ENTRY1( TEXT, USER_FIELD_DECL, XML_ETACTION_PROC_ATTRS,
     445             :             OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
     446             :     ENTRY1( TEXT, EXPRESSION, XML_ETACTION_PROC_ATTRS,
     447             :             OOO_TEXT_VALUE_TYPE_ACTIONS), /* generated entry */
     448             : //  ENTRY1( TEXT, USER_DEFINED, XML_ETACTION_PROC_ATTRS,
     449             : //          OOO_TEXT_VALUE_TYPE_ACTIONS), /* text:user-defined has no attrs so far */
     450             :     ENTRY1( TABLE, TABLE_CELL, XML_ETACTION_PROC_ATTRS,
     451             :             OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
     452             :     ENTRY1( TABLE, COVERED_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
     453             :             OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
     454             :     ENTRY1( TABLE, CHANGE_TRACK_TABLE_CELL, XML_ETACTION_PROC_ATTRS,
     455             :             OOO_TABLE_VALUE_TYPE_ACTIONS), /* generated entry */
     456             : //  ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
     457             : //          OOO_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
     458             : //  ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
     459             : //          OOO_VALUE_TYPE_ACTIONS), /* generated entry */
     460             : 
     461             :     ENTRY1( OFFICE, ANNOTATION, XML_ETACTION_MOVE_ATTRS_TO_ELEMS,
     462             :             OOO_ANNOTATION_ACTIONS ), /* generated entry */
     463             :     ENTRY1( OFFICE, CHANGE_INFO, XML_ETACTION_MOVE_ATTRS_TO_ELEMS,
     464             :             OOO_CHANGE_INFO_ACTIONS ), /* generated entry */
     465             : 
     466             :     ENTRY1( TEXT, DDE_CONNECTION_DECL, XML_ETACTION_PROC_ATTRS,
     467             :                      OOO_DDE_CONNECTION_DECL_ACTIONS  ),
     468             : 
     469             :     ENTRY0( FORM, CONTROL, XML_ETACTION_FORM_CONTROL ),
     470             :     ENTRY1( FORM, COLUMN, XML_ETACTION_PROC_ATTRS,
     471             :                      OOO_FORM_COLUMN_ACTIONS  ),
     472             :     ENTRY0( FORM, PROPERTY, XML_ETACTION_FORM_PROPERTY ),
     473             : 
     474             :     // process xlink:href
     475             :     ENTRY1( META, TEMPLATE, XML_ETACTION_PROC_ATTRS,
     476             :         OOO_XLINK_ACTIONS ), /* generated entry */
     477             :     ENTRY1( META, AUTO_RELOAD, XML_ETACTION_PROC_ATTRS,
     478             :         OOO_XLINK_ACTIONS ), /* generated entry */
     479             :     ENTRY1( TEXT, SECTION_SOURCE, XML_ETACTION_PROC_ATTRS,
     480             :         OOO_XLINK_ACTIONS ), /* generated entry */
     481             :     ENTRY1( TEXT, SCRIPT, XML_ETACTION_PROC_ATTRS,
     482             :         OOO_XLINK_ACTIONS ), /* generated entry */
     483             :     ENTRY1( TEXT, ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ETACTION_PROC_ATTRS,
     484             :         OOO_XLINK_ACTIONS ), /* generated entry */
     485             :     ENTRY1( TABLE, TABLE_SOURCE, XML_ETACTION_PROC_ATTRS,
     486             :         OOO_XLINK_ACTIONS ), /* generated entry */
     487             :     ENTRY1( TABLE, CELL_RANGE_SOURCE, XML_ETACTION_PROC_ATTRS,
     488             :         OOO_XLINK_ACTIONS ), /* generated entry */
     489             :     ENTRY1( DRAW, A, XML_ETACTION_PROC_ATTRS,
     490             :         OOO_XLINK_ACTIONS ), /* generated entry */
     491             :     ENTRY1( PRESENTATION, SOUND, XML_ETACTION_PROC_ATTRS,
     492             :         OOO_XLINK_ACTIONS ), /* generated entry */
     493             :     ENTRY1( FORM, FORM, XML_ETACTION_PROC_ATTRS,
     494             :         OOO_FORM_CONTROL_ACTIONS ),
     495           0 :     ENTRY2QN( STYLE, SYMBOL_IMAGE, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     496             :               XML_NAMESPACE_CHART, XML_SYMBOL_IMAGE,
     497             :               OOO_BACKGROUND_IMAGE_ACTIONS ),
     498             : 
     499           0 :     ENTRY2QN( CONFIG, CONFIG_ITEM_SET, XML_ETACTION_PROC_ATTRS_COND,
     500             :         XML_NAMESPACE_OFFICE, XML_SETTINGS,
     501             :         OOO_CONFIG_ITEM_SET_ACTIONS ),
     502             : 
     503             :     // add namespace prefix
     504             :     //  text:formula
     505             :     ENTRY1( TEXT, SEQUENCE, XML_ETACTION_PROC_ATTRS,
     506             :         OOO_FORMULA_ACTIONS ), /* generated entry */
     507             :     //  text:condition
     508             :     ENTRY1( TEXT, DATABASE_NEXT, XML_ETACTION_PROC_ATTRS,
     509             :         OOO_FORMULA_ACTIONS ), /* generated entry */
     510             :     //  text:condition
     511           0 :     ENTRY2QN( TEXT, DATABASE_SELECT, XML_ETACTION_RENAME_ELEM_PROC_ATTRS,
     512             :                 XML_NAMESPACE_TEXT, XML_DATABASE_ROW_SELECT,
     513             :         OOO_FORMULA_ACTIONS ),
     514             :     //  text:condition
     515             :     ENTRY1( TEXT, CONDITIONAL_TEXT, XML_ETACTION_PROC_ATTRS,
     516             :         OOO_FORMULA_ACTIONS ), /* generated entry */
     517             :     //  text:condition
     518             :     ENTRY1( TEXT, HIDDEN_TEXT, XML_ETACTION_PROC_ATTRS,
     519             :         OOO_FORMULA_ACTIONS ), /* generated entry */
     520             :     //  text:condition
     521             :     ENTRY1( TEXT, HIDDEN_PARAGRAPH, XML_ETACTION_PROC_ATTRS,
     522             :         OOO_FORMULA_ACTIONS ), /* generated entry */
     523             :     //  table:condition
     524             :     ENTRY1( TABLE, CONTENT_VALIDATION, XML_ETACTION_PROC_ATTRS,
     525             :         OOO_FORMULA_ACTIONS ), /* generated entry */
     526             : 
     527             :     // rename <table:dependences> to <table:dependencies>
     528           0 :     ENTRY1Q( TABLE, DEPENDENCES, XML_ETACTION_RENAME_ELEM,
     529             :                         XML_NAMESPACE_TABLE, XML_DEPENDENCIES ),
     530           0 :     ENTRY1Q( TABLE, DEPENDENCE, XML_ETACTION_RENAME_ELEM,
     531             :                         XML_NAMESPACE_TABLE, XML_DEPENDENCY ),
     532             : 
     533             :     // process table::error-macro
     534             :     ENTRY1( TABLE, ERROR_MACRO, XML_ETACTION_PROC_ATTRS,
     535             :             OOO_ERROR_MACRO_ACTIONS ),
     536             : 
     537             :     // process table::conversion-mode
     538             :     ENTRY1( TABLE, CONVERSION_MODE, XML_ETACTION_PROC_ATTRS,
     539             :             OOO_DDE_CONV_MODE_ACTIONS ),
     540             : 
     541             :     // fix <text:alphabatical-index-mark text:main-etry>
     542             :     ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK, XML_ETACTION_PROC_ATTRS,
     543             :             OOO_ALPHABETICAL_INDEX_MARK_ACTIONS ),
     544             :     ENTRY1( TEXT, ALPHABETICAL_INDEX_MARK_START, XML_ETACTION_PROC_ATTRS,
     545             :             OOO_ALPHABETICAL_INDEX_MARK_ACTIONS ),
     546             : 
     547             :     // process table::data-pilot-member
     548             :     ENTRY1( TABLE, DATA_PILOT_MEMBER, XML_ETACTION_PROC_ATTRS,
     549             :             OOO_DATAPILOT_MEMBER_ACTIONS ),
     550             : 
     551             :     // process table::data-pilot-level
     552             :     ENTRY1( TABLE, DATA_PILOT_LEVEL, XML_ETACTION_PROC_ATTRS,
     553             :             OOO_DATAPILOT_LEVEL_ACTIONS ),
     554             : 
     555             :     // process table::source-service
     556             :     ENTRY1( TABLE, SOURCE_SERVICE, XML_ETACTION_PROC_ATTRS,
     557             :             OOO_SOURCE_SERVICE_ACTIONS ),
     558             : 
     559             :     // fix id strings in old animation elements
     560             :     ENTRY1( PRESENTATION, DIM, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
     561             :     ENTRY1( PRESENTATION, PLAY, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
     562             :     ENTRY1( PRESENTATION, SHOW_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
     563             :     ENTRY1( PRESENTATION, SHOW_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
     564             :     ENTRY1( PRESENTATION, HIDE_TEXT, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
     565             :     ENTRY1( PRESENTATION, HIDE_SHAPE, XML_ETACTION_PROC_ATTRS, OOO_ANIMATION_ACTIONS ),
     566             : 
     567             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
     568           0 : };
     569             : 
     570             : // XML_ETACTION_STYLE
     571             : static XMLTransformerActionInit aStyleActionTable[] =
     572             : {
     573             :     ENTRY0( STYLE, FAMILY, XML_ATACTION_STYLE_FAMILY ),
     574             :     ENTRY0( STYLE, NAME, XML_ATACTION_ENCODE_STYLE_NAME ),
     575             :     ENTRY0( STYLE, PARENT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     576             :     ENTRY0( STYLE, NEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     577             :     ENTRY0( STYLE, LIST_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     578             :     ENTRY0( STYLE, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     579             :     ENTRY0( STYLE, DATA_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     580             :     ENTRY0( DRAW, NAME, XML_ATACTION_ENCODE_STYLE_NAME ),
     581             :     ENTRY0( DRAW, DISTANCE, XML_ATACTION_INCH2IN ),
     582             :     ENTRY0( DRAW, DOTS1_LENGTH, XML_ATACTION_INCH2IN ),
     583             :     ENTRY0( DRAW, DOTS2_LENGTH, XML_ATACTION_INCH2IN ),
     584             :     ENTRY0( SVG, WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OOO ),
     585             :     ENTRY0( SVG, HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OOO ),
     586             :     ENTRY0( DRAW, START, XML_ATACTION_NEG_PERCENT ),
     587             :     ENTRY0( DRAW, END, XML_ATACTION_NEG_PERCENT ),
     588             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ),
     589             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     590             : };
     591             : 
     592             : // OOO_FRAME_ELEM_ACTIONS
     593             : static XMLTransformerActionInit aFrameElemActionTable[] =
     594             : {
     595           0 :     ENTRY1Q( OFFICE, EVENTS, XML_ETACTION_RENAME_ELEM,
     596             :                       XML_NAMESPACE_OFFICE, XML_EVENT_LISTENERS ),
     597             :     ENTRY0( DRAW, GLUE_POINT, XML_ETACTION_COPY ),
     598             :     ENTRY0( DRAW, IMAGE_MAP, XML_ETACTION_COPY ),
     599             :     ENTRY0( SVG, DESC, XML_ETACTION_COPY_TEXT ),
     600             :     ENTRY0( DRAW, CONTOUR_POLYGON, XML_ETACTION_COPY ),
     601             :     ENTRY0( DRAW, CONTOUR_PATH, XML_ETACTION_COPY ),
     602             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ETACTION_EOT )
     603           0 : };
     604             : 
     605             : // OOO_FRAME_ATTR_ACTIONS
     606             : static XMLTransformerActionInit aFrameAttrActionTable[] =
     607             : {
     608             :     ENTRY0( DRAW, ZINDEX, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     609             :     ENTRY0( DRAW, ID, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     610             :     ENTRY0( DRAW, LAYER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     611             :     ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     612             :     ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     613             :     ENTRY0( DRAW, TRANSFORM, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     614             :     ENTRY0( DRAW, NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     615             :     ENTRY0( TABLE, END_CELL_ADDRESS, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     616             :     ENTRY0( TABLE, END_X, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     617             :     ENTRY0( TABLE, END_Y, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     618             :     ENTRY0( TABLE, TABLE_BACKGROUND, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     619             :     ENTRY0( TEXT, ANCHOR_TYPE, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     620             :     ENTRY0( TEXT, ANCHOR_PAGE_NUMBER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     621             :     ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     622             :     ENTRY0( SVG, X, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     623             :     ENTRY0( SVG, Y, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     624             :     ENTRY0( SVG, WIDTH, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     625             :     ENTRY0( SVG, HEIGHT, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     626             :     ENTRY0( STYLE, REL_WIDTH, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     627             :     ENTRY0( STYLE, REL_HEIGHT, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     628             :     ENTRY0( PRESENTATION, CLASS, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     629             :     ENTRY0( PRESENTATION, PLACEHOLDER, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     630             :     ENTRY0( PRESENTATION, USER_TRANSFORMED, XML_ATACTION_MOVE_TO_ELEM ), /* generated entry */
     631             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     632             : };
     633             : 
     634             : // OOO_EVENT_ELEM_ACTIONS
     635             : static XMLTransformerActionInit aEventActionTable[] =
     636             : {
     637             :     ENTRY0( XLINK, HREF, XML_ATACTION_HREF ),
     638             :     ENTRY1( SCRIPT, LANGUAGE, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     639             :                     XML_NAMESPACE_OOO ),
     640             :     ENTRY0( SCRIPT, EVENT_NAME, XML_ATACTION_EVENT_NAME ),
     641             :     ENTRY0( SCRIPT, MACRO_NAME, XML_ATACTION_MACRO_NAME ),
     642             :     ENTRY0( SCRIPT, LOCATION, XML_ATACTION_MACRO_LOCATION ),
     643             :     ENTRY0( SCRIPT, LIBRARY, XML_ATACTION_MACRO_LOCATION ), // bug in draw
     644             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     645             : };
     646             : 
     647             : // action table for OOO_MASTER_PAGE_ACTIONS
     648             : static XMLTransformerActionInit aMasterPageActionTable[] =
     649             : {
     650             :     ENTRY0( STYLE, NAME, XML_ATACTION_ENCODE_STYLE_NAME ),
     651             :     ENTRY0( STYLE, NEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     652           0 :     ENTRY1Q( STYLE, PAGE_MASTER_NAME, XML_ATACTION_RENAME_ENCODE_STYLE_NAME_REF,
     653             :                         XML_NAMESPACE_STYLE, XML_PAGE_LAYOUT_NAME ),
     654             :     ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     655             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     656           0 : };
     657             : 
     658             : static XMLTransformerActionInit aFontDeclActionTable[] =
     659             : {
     660           0 :     ENTRY1Q( FO, FONT_FAMILY, XML_ATACTION_RENAME,
     661             :                         XML_NAMESPACE_SVG, XML_FONT_FAMILY ),
     662           0 :     ENTRY1Q( STYLE, FONT_STYLE_NAME, XML_ATACTION_RENAME,
     663             :                         XML_NAMESPACE_STYLE, XML_FONT_ADORNMENTS ),
     664             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     665           0 : };
     666             : 
     667             : // action table for OOO_PARA_ACTIONS
     668             : static XMLTransformerActionInit aParaActionTable[] =
     669             : {
     670             :     ENTRY0( TEXT, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     671             :     ENTRY0( TEXT, COND_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     672             : //  ENTRY0( TEXT, CLASS_NAMES, XML_ATACTION_REMOVE ),
     673           0 :     ENTRY1Q( TEXT, LEVEL, XML_ATACTION_RENAME,
     674             :                         XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL ),
     675             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     676           0 : };
     677             : 
     678             : // action table for OOO_STYLE_REF_ACTIONS
     679             : static XMLTransformerActionInit aStyleRefActionTable[] =
     680             : {
     681             :     ENTRY0( TEXT, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     682             :     ENTRY0( TEXT, VISITED_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     683             :     ENTRY0( TEXT, MAIN_ENTRY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     684             :     ENTRY0( TEXT, CITATION_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     685             :     ENTRY0( TEXT, CITATION_BODY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     686             :     ENTRY0( TEXT, DEFAULT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     687             :     ENTRY0( TEXT, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     688             :     ENTRY0( STYLE, DATA_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     689             :     ENTRY0( STYLE, APPLY_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     690             :     ENTRY0( STYLE, PAGE_LAYOUT_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     691             :     ENTRY0( TABLE, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     692             :     ENTRY0( TABLE, DEFAULT_CELL_STYLE_NAME,
     693             :             XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     694             :     ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     695             :     ENTRY0( DRAW, MASTER_PAGE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     696             :     ENTRY0( PRESENTATION, PRESENTATION_PAGE_LAYOUT_NAME,
     697             :             XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     698             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_False ),
     699             :     ENTRY1( TEXT, CONDITION, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     700             :                      XML_NAMESPACE_OOOW ),
     701             :     ENTRY1( TEXT, FORMULA, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     702             :                      XML_NAMESPACE_OOOW ),
     703             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     704             : };
     705             : 
     706             : // OOO_SHAPE_ACTIONS
     707             : // !!ATTENTION!! If you change something here, please also change
     708             : // aConnectorActionTable if appropriate
     709             : static XMLTransformerActionInit aShapeActionTable[] =
     710             : {
     711             :     ENTRY0( SVG, X, XML_ATACTION_INCH2IN ),
     712             :     ENTRY0( SVG, Y, XML_ATACTION_INCH2IN ),
     713             :     ENTRY0( SVG, X1, XML_ATACTION_INCH2IN ),
     714             :     ENTRY0( SVG, Y1, XML_ATACTION_INCH2IN ),
     715             :     ENTRY0( SVG, X2, XML_ATACTION_INCH2IN ),
     716             :     ENTRY0( SVG, Y2, XML_ATACTION_INCH2IN ),
     717             :     ENTRY0( SVG, CX, XML_ATACTION_INCH2IN ),
     718             :     ENTRY0( SVG, CY, XML_ATACTION_INCH2IN ),
     719             :     ENTRY0( SVG, R, XML_ATACTION_INCH2IN ),
     720             :     ENTRY0( SVG, RX, XML_ATACTION_INCH2IN ),
     721             :     ENTRY0( SVG, RY, XML_ATACTION_INCH2IN ),
     722             :     ENTRY0( SVG, WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OOO ),
     723             :     ENTRY0( SVG, HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OOO ),
     724             :     ENTRY0( FO, MIN_WIDTH, XML_ATACTION_INCH2IN ),
     725             :     ENTRY0( FO, MIN_HEIGHT, XML_ATACTION_INCH2IN ),
     726             :     ENTRY0( FO, MAX_WIDTH, XML_ATACTION_INCH2IN ),
     727             :     ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_INCH2IN ),
     728             :     ENTRY0( DRAW, CORNER_RADIUS, XML_ATACTION_INCH2IN ),
     729             :     ENTRY0( DRAW, LINE_SKEW, XML_ATACTION_INCHS2INS ),
     730             :     ENTRY0( DRAW, CAPTION_POINT_X, XML_ATACTION_INCH2IN ),
     731             :     ENTRY0( DRAW, CAPTION_POINT_Y, XML_ATACTION_INCH2IN ),
     732             :     ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     733             :     ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     734             :     ENTRY0( DRAW, END_X, XML_ATACTION_INCH2IN ),
     735             :     ENTRY0( DRAW, END_Y, XML_ATACTION_INCH2IN ),
     736             :     ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     737             :     ENTRY0( DR3D, DISTANCE, XML_ATACTION_INCH2IN ),
     738             :     ENTRY0( DR3D, FOCAL_LENGTH, XML_ATACTION_INCH2IN ),
     739           0 :     ENTRY1Q( FORM, ID, XML_ATACTION_RENAME,
     740             :                     XML_NAMESPACE_DRAW, XML_CONTROL ),
     741             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ),
     742             : 
     743             :     // BM: needed by chart:legend.  The legend needs also the draw actions.  As
     744             :     // there is no merge mechanism, all actions have to be in the same table
     745             :     ENTRY2( CHART, LEGEND_POSITION, XML_ATACTION_RENAME_ATTRIBUTE,
     746             :             RENAME_ENTRY( XML_LEFT, XML_START ),
     747             :             RENAME_ENTRY( XML_RIGHT, XML_END )),
     748             :     ENTRY0( DRAW, ID, XML_ATACTION_SHAPEID ),
     749             :     ENTRY0( DRAW, START_SHAPE, XML_ATACTION_SHAPEID ),
     750             :     ENTRY0( DRAW, END_SHAPE, XML_ATACTION_SHAPEID ),
     751             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     752           0 : };
     753             : 
     754             : static XMLTransformerActionInit aConnectorActionTable[] =
     755             : {
     756             :     ENTRY0( SVG, X1, XML_ATACTION_TWIPS2IN ),
     757             :     ENTRY0( SVG, Y1, XML_ATACTION_TWIPS2IN ),
     758             :     ENTRY0( SVG, X2, XML_ATACTION_TWIPS2IN ),
     759             :     ENTRY0( SVG, Y2, XML_ATACTION_TWIPS2IN ),
     760             :     ENTRY0( SVG, WIDTH, XML_ATACTION_SVG_WIDTH_HEIGHT_OOO ),
     761             :     ENTRY0( SVG, HEIGHT, XML_ATACTION_SVG_WIDTH_HEIGHT_OOO ),
     762             :     ENTRY0( FO, MIN_WIDTH, XML_ATACTION_INCH2IN ),
     763             :     ENTRY0( FO, MIN_HEIGHT, XML_ATACTION_INCH2IN ),
     764             :     ENTRY0( FO, MAX_WIDTH, XML_ATACTION_INCH2IN ),
     765             :     ENTRY0( FO, MAX_HEIGHT, XML_ATACTION_INCH2IN ),
     766             :     ENTRY0( DRAW, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     767             :     ENTRY0( DRAW, TEXT_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     768             :     ENTRY0( DRAW, END_X, XML_ATACTION_INCH2IN ),
     769             :     ENTRY0( DRAW, END_Y, XML_ATACTION_INCH2IN ),
     770             :     ENTRY0( PRESENTATION, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     771           0 :     ENTRY1Q( FORM, ID, XML_ATACTION_RENAME,
     772             :                     XML_NAMESPACE_DRAW, XML_CONTROL ),
     773             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ),
     774             :     ENTRY0( DRAW, ID, XML_ATACTION_SHAPEID ),
     775             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     776           0 : };
     777             : 
     778             : // OOO_INDEX_ENTRY_TAB_STOP_ACTIONS
     779             : static XMLTransformerActionInit aIndexEntryTabStopActionTable[] =
     780             : {
     781             :     ENTRY0( STYLE, POSITION, XML_ATACTION_INCH2IN ),
     782             :     ENTRY0( TEXT, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     783             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     784             : };
     785             : 
     786             : // OOO_TAB_STOP_ACTIONS
     787             : static XMLTransformerActionInit aTabStopActionTable[] =
     788             : {
     789             :     ENTRY0( STYLE, POSITION, XML_ATACTION_INCH2IN ),
     790           0 :     ENTRY1Q( STYLE, LEADER_CHAR, XML_ATACTION_RENAME,
     791             :                     XML_NAMESPACE_STYLE, XML_LEADER_TEXT ),
     792             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     793           0 : };
     794             : 
     795             : // OOO_LINENUMBERING_ACTIONS
     796             : static XMLTransformerActionInit aLineNumberingActionTable[] =
     797             : {
     798             :     ENTRY0( TEXT, OFFSET, XML_ATACTION_INCH2IN ),
     799             :     ENTRY0( TEXT, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     800           0 :     ENTRY1Q( TEXT, COUNT_IN_FLOATING_FRAMES, XML_ATACTION_RENAME,
     801             :                     XML_NAMESPACE_TEXT, XML_COUNT_IN_TEXT_BOXES ),
     802             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     803           0 : };
     804             : 
     805             : static XMLTransformerActionInit aFootnoteSepActionTable[] =
     806             : {
     807             :     ENTRY0( STYLE, WIDTH, XML_ATACTION_INCH2IN ),
     808             :     ENTRY0( STYLE, DISTANCE_BEFORE_SEP, XML_ATACTION_INCH2IN ),
     809             :     ENTRY0( STYLE, DISTANCE_AFTER_SEP, XML_ATACTION_INCH2IN ),
     810             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     811             : };
     812             : 
     813             : // OOO_DROP_CAP_ACTIONS
     814             : static XMLTransformerActionInit aDropCapActionTable[] =
     815             : {
     816             :     ENTRY0( STYLE, DISTANCE, XML_ATACTION_INCH2IN ),
     817             :     ENTRY0( STYLE, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     818             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     819             : };
     820             : 
     821             : static XMLTransformerActionInit aColumnsActionTable[] =
     822             : {
     823             :     ENTRY0( STYLE, COLUMN_GAP, XML_ATACTION_INCH2IN ),
     824             : //  ENTRY0( STYLE, SPACE_BEFORE, XML_ATACTION_INCH2IN ),
     825             : //  ENTRY0( STYLE, SPACE_AFTER, XML_ATACTION_INCH2IN ),
     826           0 :     ENTRY1Q( FO, MARGIN_LEFT, XML_ATACTION_RENAME_INCH2IN,
     827             :            XML_NAMESPACE_FO, XML_START_INDENT ),
     828           0 :     ENTRY1Q( FO, MARGIN_RIGHT, XML_ATACTION_RENAME_INCH2IN,
     829             :            XML_NAMESPACE_FO, XML_END_INDENT ),
     830             :     ENTRY0( STYLE, WIDTH, XML_ATACTION_INCH2IN ),
     831             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     832           0 : };
     833             : 
     834             : // OOO_TEXT_VALUE_TYPE_ACTIONS
     835             : static XMLTransformerActionInit aTextValueTypeActionTable[] =
     836             : {
     837           0 :     ENTRY1Q( TEXT, VALUE_TYPE, XML_ATACTION_RENAME,
     838             :            XML_NAMESPACE_OFFICE, XML_VALUE_TYPE ),
     839           0 :     ENTRY1Q( TEXT, VALUE, XML_ATACTION_RENAME,
     840             :            XML_NAMESPACE_OFFICE, XML_VALUE ),
     841           0 :     ENTRY1Q( TEXT, CURRENCY, XML_ATACTION_RENAME,
     842             :            XML_NAMESPACE_OFFICE, XML_CURRENCY ),
     843           0 :     ENTRY1Q( TEXT, DATE_VALUE, XML_ATACTION_RENAME,
     844             :            XML_NAMESPACE_OFFICE, XML_DATE_VALUE ),
     845           0 :     ENTRY1Q( TEXT, TIME_VALUE, XML_ATACTION_RENAME,
     846             :            XML_NAMESPACE_OFFICE, XML_TIME_VALUE ),
     847           0 :     ENTRY1Q( TEXT, BOOLEAN_VALUE, XML_ATACTION_RENAME,
     848             :            XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE ),
     849           0 :     ENTRY1Q( TEXT, STRING_VALUE, XML_ATACTION_RENAME,
     850             :            XML_NAMESPACE_OFFICE, XML_STRING_VALUE ),
     851             :     ENTRY0( STYLE, DATA_STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     852             :     ENTRY1( TEXT, FORMULA, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     853             :                      XML_NAMESPACE_OOOW ),
     854             :     ENTRY0( TEXT, TOKEN_INVALID, XML_ATACTION_EOT )
     855           0 : };
     856             : 
     857             : // OOO_TABLE_VALUE_TYPE_ACTIONS
     858             : static XMLTransformerActionInit aTableValueTypeActionTable[] =
     859             : {
     860           0 :     ENTRY1Q( TABLE, VALUE_TYPE, XML_ATACTION_RENAME,
     861             :            XML_NAMESPACE_OFFICE, XML_VALUE_TYPE ),
     862           0 :     ENTRY1Q( TABLE, VALUE, XML_ATACTION_RENAME,
     863             :            XML_NAMESPACE_OFFICE, XML_VALUE ),
     864           0 :     ENTRY1Q( TABLE, CURRENCY, XML_ATACTION_RENAME,
     865             :            XML_NAMESPACE_OFFICE, XML_CURRENCY ),
     866           0 :     ENTRY1Q( TABLE, DATE_VALUE, XML_ATACTION_RENAME,
     867             :            XML_NAMESPACE_OFFICE, XML_DATE_VALUE ),
     868           0 :     ENTRY1Q( TABLE, TIME_VALUE, XML_ATACTION_RENAME,
     869             :            XML_NAMESPACE_OFFICE, XML_TIME_VALUE ),
     870           0 :     ENTRY1Q( TABLE, BOOLEAN_VALUE, XML_ATACTION_RENAME,
     871             :            XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE ),
     872           0 :     ENTRY1Q( TABLE, STRING_VALUE, XML_ATACTION_RENAME,
     873             :            XML_NAMESPACE_OFFICE, XML_STRING_VALUE ),
     874             :     ENTRY0( TABLE, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
     875             :     ENTRY1( TABLE, FORMULA, XML_ATACTION_ADD_APP_NAMESPACE_PREFIX,
     876             :                      XML_NAMESPACE_OOOW ),
     877           0 :     ENTRY1Q( TABLE, VALIDATION_NAME, XML_ATACTION_RENAME,
     878             :            XML_NAMESPACE_TABLE, XML_CONTENT_VALIDATION_NAME ),
     879             :     ENTRY0( TABLE, TOKEN_INVALID, XML_ATACTION_EOT )
     880           0 : };
     881             : 
     882             : // action table for OOO_ANNOTATION_ACTIONS
     883             : static XMLTransformerActionInit aAnnotationActionTable[] =
     884             : {
     885           0 :     ENTRY1Q( OFFICE, AUTHOR, XML_ATACTION_MOVE_TO_ELEM,
     886             :                 XML_NAMESPACE_DC, XML_CREATOR ),
     887           0 :     ENTRY1Q( OFFICE, CREATE_DATE, XML_ATACTION_MOVE_TO_ELEM,
     888             :                 XML_NAMESPACE_DC, XML_DATE ),
     889           0 :     ENTRY1Q( OFFICE, CREATE_DATE_STRING, XML_ATACTION_MOVE_TO_ELEM,
     890             :                 XML_NAMESPACE_META, XML_DATE_STRING ),
     891             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     892           0 : };
     893             : 
     894             : // action table for OOO_CHANGE_INFO_ACTIONS
     895             : static XMLTransformerActionInit aChangeInfoActionTable[] =
     896             : {
     897           0 :     ENTRY1Q( OFFICE, CHG_AUTHOR, XML_ATACTION_MOVE_TO_ELEM,
     898             :                 XML_NAMESPACE_DC, XML_CREATOR ),
     899           0 :     ENTRY1Q( OFFICE, CHG_DATE_TIME, XML_ATACTION_MOVE_TO_ELEM,
     900             :                 XML_NAMESPACE_DC, XML_DATE ),
     901             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     902           0 : };
     903             : 
     904             : // OOO_BACKGROUND_IMAGE_ACTIONS
     905             : static XMLTransformerActionInit aBackgroundImageActionTable[] =
     906             : {
     907           0 :     ENTRY1Q( DRAW, TRANSPARENCY, XML_ATACTION_RENAME_NEG_PERCENT,
     908             :                      XML_NAMESPACE_DRAW, XML_OPACITY ),
     909             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ),
     910             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     911           0 : };
     912             : 
     913             : /* OOO_BACKGROUND_IMAGE_ACTIONS for OpenOffice.org text documents
     914             :    OpenOffice.org text documents, written by OpenOffice.org, contain
     915             :    wrong value for the transparency of the background graphic (#i50322#)
     916             : */
     917             : static XMLTransformerActionInit aWriterBackgroundImageActionTable[] =
     918             : {
     919           0 :     ENTRY1Q( DRAW, TRANSPARENCY, XML_ATACTION_WRITER_BACK_GRAPHIC_TRANSPARENCY, XML_NAMESPACE_DRAW, XML_OPACITY ),
     920             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_True ),
     921             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     922           0 : };
     923             : 
     924             : // OOO_DDE_CONNECTION_DECL
     925             : static XMLTransformerActionInit aDDEConnectionDeclActionTable[] =
     926             : {
     927           0 :     ENTRY1Q( TEXT, NAME, XML_ATACTION_RENAME,
     928             :                      XML_NAMESPACE_OFFICE, XML_NAME ),
     929             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     930           0 : };
     931             : 
     932             : // OOO_FORM_CONTROL_ACTIONS
     933             : static XMLTransformerActionInit aFormControlActionTable[] =
     934             : {
     935           0 :     ENTRY2QN( FORM, SERVICE_NAME,
     936             :                     XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX,
     937             :                        XML_NAMESPACE_FORM, XML_CONTROL_IMPLEMENTATION,
     938             :                     XML_NAMESPACE_OOO ),
     939             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_False ),
     940             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     941           0 : };
     942             : 
     943             : // OOO_FORM_COLUMN_ACTIONS
     944             : static XMLTransformerActionInit aFormColumnActionTable[] =
     945             : {
     946           0 :     ENTRY1Q( FORM, COLUMN_STYLE_NAME, XML_ATACTION_RENAME_ENCODE_STYLE_NAME_REF,
     947             :                         XML_NAMESPACE_FORM, XML_TEXT_STYLE_NAME ),
     948           0 :     ENTRY2QN( FORM, SERVICE_NAME,
     949             :                     XML_ATACTION_RENAME_ADD_NAMESPACE_PREFIX,
     950             :                        XML_NAMESPACE_FORM, XML_CONTROL_IMPLEMENTATION,
     951             :                     XML_NAMESPACE_OOO ),
     952             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     953           0 : };
     954             : 
     955             : // OOO_FORM_PROP_ACTIONS
     956             : static XMLTransformerActionInit aFormPropActionTable[] =
     957             : {
     958           0 :     ENTRY1Q( FORM, PROPERTY_TYPE, XML_ATACTION_RENAME,
     959             :                           XML_NAMESPACE_OFFICE, XML_VALUE_TYPE ),
     960             :     ENTRY0( FORM, PROPERTY_IS_LIST, XML_ATACTION_REMOVE ),
     961             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     962           0 : };
     963             : 
     964             : // OOO_XLINK_ACTIONS
     965             : static XMLTransformerActionInit aXLinkActionTable[] =
     966             : {
     967             :     ENTRY1( XLINK, HREF, XML_ATACTION_URI_OOO, sal_False ),
     968             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     969             : };
     970             : 
     971             : // OOO_CONFIG_ITEM_SET_ACTIONS
     972             : static XMLTransformerActionInit aConfigItemSetActionTable[] =
     973             : {
     974             :     ENTRY1( CONFIG, NAME, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     975             :                     XML_NAMESPACE_OOO ),
     976             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     977             : };
     978             : 
     979             : // OASIS_FORMULA_ACTIONS
     980             : static XMLTransformerActionInit aFormulaActionTable[] =
     981             : {
     982             :     ENTRY1( TEXT, CONDITION, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     983             :                      XML_NAMESPACE_OOOW ),
     984             :     ENTRY1( TEXT, FORMULA, XML_ATACTION_ADD_NAMESPACE_PREFIX,
     985             :                      XML_NAMESPACE_OOOW ),
     986             :     ENTRY1( TABLE, CONDITION, XML_ATACTION_ADD_APP_NAMESPACE_PREFIX,
     987             :                      XML_NAMESPACE_OOOW ),
     988             :     ENTRY1( TABLE, FORMULA, XML_ATACTION_ADD_APP_NAMESPACE_PREFIX,
     989             :                      XML_NAMESPACE_OOOW ),
     990             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     991             : };
     992             : 
     993             : // OOO_ERROR_MACRO_ACTIONS
     994             : static XMLTransformerActionInit aErrorMacroActionTable[] =
     995             : {
     996             :     ENTRY0( TABLE, NAME, XML_ATACTION_REMOVE ),
     997             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
     998             : };
     999             : 
    1000             : // OOO_DDE_CONV_MODE_ACTIONS
    1001             : static XMLTransformerActionInit aDDEConvModeActionTable[] =
    1002             : {
    1003           0 :     ENTRY1Q( TABLE, LET_TEXT, XML_ATACTION_RENAME,
    1004             :                         XML_NAMESPACE_TABLE, XML_KEEP_TEXT ),
    1005             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1006           0 : };
    1007             : 
    1008             : // OOO_DATAPILOT_MEMBER_ACTIONS
    1009             : static XMLTransformerActionInit aDataPilotMemberActionTable[] =
    1010             : {
    1011           0 :     ENTRY1Q( TABLE, DISPLAY_DETAILS, XML_ATACTION_RENAME,
    1012             :                         XML_NAMESPACE_TABLE, XML_SHOW_DETAILS ),
    1013             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1014           0 : };
    1015             : 
    1016             : // OOO_DATAPILOT_LEVEL_ACTIONS
    1017             : static XMLTransformerActionInit aDataPilotLevelActionTable[] =
    1018             : {
    1019           0 :     ENTRY1Q( TABLE, DISPLAY_EMPTY, XML_ATACTION_RENAME,
    1020             :                         XML_NAMESPACE_TABLE, XML_SHOW_EMPTY ),
    1021             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1022           0 : };
    1023             : 
    1024             : // OOO_SOURCE_SERVICE_ACTIONS
    1025             : static XMLTransformerActionInit aSourceServiceActionTable[] =
    1026             : {
    1027           0 :     ENTRY1Q( TABLE, USERNAME, XML_ATACTION_RENAME,
    1028             :                         XML_NAMESPACE_TABLE, XML_USER_NAME ),
    1029             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1030           0 : };
    1031             : 
    1032             : // OOO_ANIMATION_ACTIONS
    1033             : static XMLTransformerActionInit aAnimationsActionTable[] =
    1034             : {
    1035             :     ENTRY0( DRAW, SHAPE_ID, XML_ATACTION_SHAPEID ),
    1036             :     ENTRY0( PRESENTATION, PATH_ID, XML_ATACTION_SHAPEID ),
    1037             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1038             : };
    1039             : 
    1040             : // OOO_DRAW_AREA_POLYGON_ACTIONS (to be added to OOO_SHAPE_ACTIONS)
    1041             : static XMLTransformerActionInit aDrawAreaPolygonActionTable[] =
    1042             : {
    1043           0 :     ENTRY1Q( SVG, POINTS, XML_ATACTION_RENAME,
    1044             :              XML_NAMESPACE_DRAW, XML_POINTS ),
    1045             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1046           0 : };
    1047             : 
    1048             : // OOO_CHART_ACTIONS
    1049             : static XMLTransformerActionInit aChartActionTable[] =
    1050             : {
    1051             :     ENTRY1( CHART, CLASS, XML_ATACTION_ADD_NAMESPACE_PREFIX,
    1052             :                      XML_NAMESPACE_CHART ),
    1053             :     ENTRY0( CHART, ADD_IN_NAME, XML_ATACTION_REMOVE ),
    1054             :     ENTRY0( SVG, WIDTH, XML_ATACTION_INCH2IN ),
    1055             :     ENTRY0( SVG, HEIGHT, XML_ATACTION_INCH2IN ),
    1056             :     ENTRY0( CHART, STYLE_NAME, XML_ATACTION_ENCODE_STYLE_NAME_REF ),
    1057             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1058             : };
    1059             : 
    1060             : // OOO_ALPHABETICAL_INDEX_MARK_ACTIONS
    1061             : static XMLTransformerActionInit aAlphabeticalIndexMarkActionTable[] =
    1062             : {
    1063           0 :     ENTRY1Q( TEXT, MAIN_ETRY, XML_ATACTION_RENAME,
    1064             :              XML_NAMESPACE_TEXT, XML_MAIN_ENTRY ),
    1065             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1066           0 : };
    1067             : 
    1068             : // OOO_SCRIPT_ACTIONS
    1069             : static XMLTransformerActionInit aScriptActionTable[] =
    1070             : {
    1071             :     ENTRY1( SCRIPT, LANGUAGE, XML_ATACTION_ADD_NAMESPACE_PREFIX, XML_NAMESPACE_OOO ),
    1072           0 :     ENTRY1Q( SCRIPT, NAME, XML_ATACTION_RENAME, XML_NAMESPACE_OOO, XML_NAME ),
    1073           0 :     ENTRY1Q( SCRIPT, READONLY, XML_ATACTION_RENAME, XML_NAMESPACE_OOO, XML_READONLY ),
    1074             :     ENTRY0( OFFICE, TOKEN_INVALID, XML_ATACTION_EOT )
    1075           0 : };
    1076             : 
    1077             : static XMLTokenEnum aTokenMap[] =
    1078             : {
    1079             :     XML_NONE, XML_SINGLE, XML_DOUBLE, XML_BOLD, XML_BOLD_DOTTED,
    1080             :     XML_BOLD_DASH, XML_BOLD_LONG_DASH, XML_BOLD_DOT_DASH,
    1081             :     XML_BOLD_DOT_DOT_DASH, XML_BOLD_WAVE, XML_DOUBLE_WAVE,
    1082             :     XML_SINGLE_LINE, XML_DOUBLE_LINE, XML_THICK_LINE, XML_SLASH, XML_uX,
    1083             :     XML_TOKEN_END
    1084             : };
    1085             : 
    1086             : class XMLDocumentTransformerContext_Impl : public XMLTransformerContext
    1087             : {
    1088             :     OUString m_aElemQName;
    1089             :     OUString m_aOldClass;
    1090             : 
    1091             : public:
    1092             :     TYPEINFO_OVERRIDE();
    1093             : 
    1094             :     XMLDocumentTransformerContext_Impl( XMLTransformerBase& rTransformer,
    1095             :                            const OUString& rQName );
    1096             :     XMLDocumentTransformerContext_Impl( XMLTransformerBase& rTransformer,
    1097             :                            const OUString& rQName,
    1098             :                               sal_uInt16 nPrefix,
    1099             :                               ::xmloff::token::XMLTokenEnum eToken  );
    1100             : 
    1101             :     virtual ~XMLDocumentTransformerContext_Impl();
    1102             : 
    1103             :     virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
    1104             :     virtual void EndElement() SAL_OVERRIDE;
    1105             : };
    1106             : 
    1107           0 : TYPEINIT1( XMLDocumentTransformerContext_Impl, XMLTransformerContext );
    1108             : 
    1109           0 : XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl(
    1110             :         XMLTransformerBase& rImp,
    1111             :         const OUString& rQName ) :
    1112             :     XMLTransformerContext( rImp, rQName ),
    1113           0 :     m_aElemQName( rQName )
    1114             : {
    1115           0 : }
    1116           0 : XMLDocumentTransformerContext_Impl::XMLDocumentTransformerContext_Impl(
    1117             :         XMLTransformerBase& rImp,
    1118             :         const OUString& rQName ,
    1119             :         sal_uInt16 nPrefix,
    1120             :         ::xmloff::token::XMLTokenEnum eToken) :
    1121             :     XMLTransformerContext( rImp, rQName ),
    1122           0 :     m_aElemQName( rImp.GetNamespaceMap().GetQNameByKey( nPrefix,
    1123           0 :                             ::xmloff::token::GetXMLToken( eToken ) ) )
    1124             : {
    1125           0 : }
    1126             : 
    1127           0 : XMLDocumentTransformerContext_Impl::~XMLDocumentTransformerContext_Impl()
    1128             : {
    1129           0 : }
    1130             : 
    1131           0 : void XMLDocumentTransformerContext_Impl::StartElement(
    1132             :         const Reference< XAttributeList >& rAttrList )
    1133             : {
    1134           0 :     Reference< XAttributeList > xAttrList( rAttrList );
    1135             : 
    1136           0 :     m_aOldClass = GetTransformer().GetClass();
    1137             : 
    1138           0 :     XMLMutableAttributeList *pMutableAttrList = 0;
    1139           0 :     bool bOOo = false, bOOoW = false, bOOoC = false,
    1140           0 :         bDOM=false, bDC = false, bSVG = false;
    1141           0 :     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
    1142           0 :     for( sal_Int16 i=0; i < nAttrCount; i++ )
    1143             :     {
    1144           0 :         const OUString& rAttrName = xAttrList->getNameByIndex( i );
    1145           0 :         OUString aLocalName;
    1146             :         sal_uInt16 nPrefix =
    1147           0 :             GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
    1148           0 :                                                                  &aLocalName );
    1149           0 :         if( XML_NAMESPACE_OFFICE == nPrefix &&
    1150           0 :             IsXMLToken( aLocalName, XML_CLASS ) )
    1151             :         {
    1152           0 :             const OUString& rValue = xAttrList->getValueByIndex( i );
    1153           0 :             GetTransformer().SetClass( rValue );
    1154             : 
    1155           0 :             pMutableAttrList = new XMLMutableAttributeList( xAttrList );
    1156           0 :             xAttrList = pMutableAttrList;
    1157           0 :             OUString sMime("application/vnd.oasis.opendocument.");
    1158           0 :             sMime += rValue;
    1159           0 :             pMutableAttrList->SetValueByIndex( i, sMime );
    1160           0 :             OUString aNewAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, ::xmloff::token::GetXMLToken( XML_MIMETYPE ) ) );
    1161           0 :             pMutableAttrList->RenameAttributeByIndex(i, aNewAttrQName );
    1162           0 :             break;
    1163             :         }
    1164           0 :         else if( XML_NAMESPACE_XMLNS == nPrefix )
    1165             :         {
    1166           0 :             const OUString& rAttrValue = xAttrList->getValueByIndex( i );
    1167           0 :             if( IsXMLToken( rAttrValue, XML_N_OOO ) )
    1168           0 :                 bOOo = true;
    1169           0 :             else if( IsXMLToken( rAttrValue, XML_N_OOOW ) )
    1170           0 :                 bOOoW = true;
    1171           0 :             else if( IsXMLToken( rAttrValue, XML_N_OOOC ) )
    1172           0 :                 bOOoC = true;
    1173           0 :             else if( IsXMLToken( rAttrValue, XML_N_DOM ) )
    1174           0 :                 bDOM = true;
    1175           0 :             else if( IsXMLToken( rAttrValue, XML_N_DC ) )
    1176           0 :                 bDC = true;
    1177           0 :             else if( IsXMLToken( rAttrValue, XML_N_SVG ) )
    1178           0 :                 bSVG = true;
    1179             :         }
    1180           0 :     }
    1181           0 :     if( !(bOOo && bOOoW && bOOoC && bDOM && bDC && bSVG) )
    1182             :     {
    1183           0 :         if( !pMutableAttrList  )
    1184             :         {
    1185           0 :             pMutableAttrList = new XMLMutableAttributeList( xAttrList );
    1186           0 :             xAttrList = pMutableAttrList;
    1187             :         }
    1188           0 :         if( !bOOo )
    1189             :             pMutableAttrList->AddAttribute(
    1190           0 :                     GetTransformer().GetNamespaceMap().GetAttrNameByKey(
    1191             :                         XML_NAMESPACE_OOO ),
    1192           0 :                     GetTransformer().GetNamespaceMap().GetNameByKey(
    1193           0 :                         XML_NAMESPACE_OOO ) );
    1194           0 :         if( !bOOoW )
    1195             :             pMutableAttrList->AddAttribute(
    1196           0 :                     GetTransformer().GetNamespaceMap().GetAttrNameByKey(
    1197             :                         XML_NAMESPACE_OOOW ),
    1198           0 :                     GetTransformer().GetNamespaceMap().GetNameByKey(
    1199           0 :                         XML_NAMESPACE_OOOW ) );
    1200           0 :         if( !bOOoC )
    1201             :             pMutableAttrList->AddAttribute(
    1202           0 :                     GetTransformer().GetNamespaceMap().GetAttrNameByKey(
    1203             :                         XML_NAMESPACE_OOOC ),
    1204           0 :                     GetTransformer().GetNamespaceMap().GetNameByKey(
    1205           0 :                         XML_NAMESPACE_OOOC ) );
    1206           0 :         if( !bDOM )
    1207             :             pMutableAttrList->AddAttribute(
    1208           0 :                     GetTransformer().GetNamespaceMap().GetAttrNameByKey(
    1209             :                         XML_NAMESPACE_DOM ),
    1210           0 :                     GetTransformer().GetNamespaceMap().GetNameByKey(
    1211           0 :                         XML_NAMESPACE_DOM ) );
    1212           0 :         if( !bDC )
    1213             :             pMutableAttrList->AddAttribute(
    1214           0 :                     GetTransformer().GetNamespaceMap().GetAttrNameByKey(
    1215             :                         XML_NAMESPACE_DC ),
    1216           0 :                     GetTransformer().GetNamespaceMap().GetNameByKey(
    1217           0 :                         XML_NAMESPACE_DC ) );
    1218           0 :         if( !bSVG )
    1219             :             pMutableAttrList->AddAttribute(
    1220           0 :                     GetTransformer().GetNamespaceMap().GetAttrNameByKey(
    1221             :                         XML_NAMESPACE_SVG ),
    1222           0 :                     GetTransformer().GetNamespaceMap().GetNameByKey(
    1223           0 :                         XML_NAMESPACE_SVG ) );
    1224             :     }
    1225             : 
    1226           0 :     GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
    1227           0 : }
    1228             : 
    1229           0 : void XMLDocumentTransformerContext_Impl::EndElement()
    1230             : {
    1231           0 :     GetTransformer().GetDocHandler()->endElement( m_aElemQName );
    1232             : 
    1233           0 :     GetTransformer().SetClass( m_aOldClass );
    1234           0 : }
    1235             : 
    1236             : class XMLBodyTransformerContext_Impl : public XMLTransformerContext
    1237             : {
    1238             :     OUString m_aClassQName;
    1239             : 
    1240             : public:
    1241             :     TYPEINFO_OVERRIDE();
    1242             : 
    1243             :     XMLBodyTransformerContext_Impl( XMLTransformerBase& rTransformer,
    1244             :                            const OUString& rQName );
    1245             : 
    1246             :     virtual ~XMLBodyTransformerContext_Impl();
    1247             : 
    1248             :     virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
    1249             :     virtual void EndElement() SAL_OVERRIDE;
    1250             : };
    1251             : 
    1252           0 : TYPEINIT1( XMLBodyTransformerContext_Impl, XMLTransformerContext );
    1253             : 
    1254           0 : XMLBodyTransformerContext_Impl::XMLBodyTransformerContext_Impl(
    1255             :         XMLTransformerBase& rImp,
    1256             :         const OUString& rQName ) :
    1257           0 :     XMLTransformerContext( rImp, rQName )
    1258             : {
    1259           0 : }
    1260             : 
    1261           0 : XMLBodyTransformerContext_Impl::~XMLBodyTransformerContext_Impl()
    1262             : {
    1263           0 : }
    1264             : 
    1265           0 : void XMLBodyTransformerContext_Impl::StartElement(
    1266             :         const Reference< XAttributeList >& rAttrList )
    1267             : {
    1268           0 :     XMLTransformerContext::StartElement( rAttrList );
    1269             : 
    1270             :     XMLMutableAttributeList *pMutableAttrList =
    1271           0 :         new XMLMutableAttributeList( rAttrList );
    1272           0 :     Reference< XAttributeList > xAttrList = pMutableAttrList;
    1273           0 :     OUString aClass( GetTransformer().GetClass() );
    1274           0 :     if( aClass.isEmpty() )
    1275             :     {
    1276           0 :         aClass = GetXMLToken( XML_TEXT );
    1277             :     }
    1278           0 :     else if( IsXMLToken( aClass, XML_TEXT_GLOBAL ) )
    1279             :     {
    1280             :         OUString aGlobalQName(
    1281           0 :                 GetTransformer().GetNamespaceMap().GetQNameByKey(
    1282           0 :                             XML_NAMESPACE_TEXT, GetXMLToken(XML_GLOBAL ) ) );
    1283           0 :         pMutableAttrList->AddAttribute( aGlobalQName, GetXMLToken(XML_TRUE) );
    1284             : 
    1285           0 :         aClass = GetXMLToken( XML_TEXT );
    1286             :     }
    1287             : 
    1288           0 :     m_aClassQName = GetTransformer().GetNamespaceMap().GetQNameByKey(
    1289           0 :                         XML_NAMESPACE_OFFICE, aClass );
    1290           0 :     GetTransformer().GetDocHandler()->startElement( m_aClassQName,
    1291           0 :                                                     xAttrList );
    1292           0 : }
    1293             : 
    1294           0 : void XMLBodyTransformerContext_Impl::EndElement()
    1295             : {
    1296           0 :     GetTransformer().GetDocHandler()->endElement( m_aClassQName );
    1297           0 :     XMLTransformerContext::EndElement();
    1298           0 : }
    1299             : 
    1300             : class XMLTabStopOOoTContext_Impl : public XMLPersElemContentTContext
    1301             : {
    1302             : public:
    1303             :     TYPEINFO_OVERRIDE();
    1304             : 
    1305             :     XMLTabStopOOoTContext_Impl( XMLTransformerBase& rTransformer,
    1306             :                            const OUString& rQName );
    1307             : 
    1308             :     virtual ~XMLTabStopOOoTContext_Impl();
    1309             : 
    1310             :     virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
    1311             : };
    1312             : 
    1313           0 : TYPEINIT1( XMLTabStopOOoTContext_Impl, XMLPersElemContentTContext );
    1314             : 
    1315           0 : XMLTabStopOOoTContext_Impl::XMLTabStopOOoTContext_Impl(
    1316             :         XMLTransformerBase& rImp,
    1317             :         const OUString& rQName ) :
    1318           0 :     XMLPersElemContentTContext( rImp, rQName )
    1319             : {
    1320           0 : }
    1321             : 
    1322           0 : XMLTabStopOOoTContext_Impl::~XMLTabStopOOoTContext_Impl()
    1323             : {
    1324           0 : }
    1325             : 
    1326           0 : void XMLTabStopOOoTContext_Impl::StartElement(
    1327             :         const Reference< XAttributeList >& rAttrList )
    1328             : {
    1329             :     XMLTransformerActions *pActions =
    1330           0 :         GetTransformer().GetUserDefinedActions( OOO_TAB_STOP_ACTIONS  );
    1331             :     OSL_ENSURE( pActions, "go no actions" );
    1332             : 
    1333           0 :     Reference< XAttributeList > xAttrList( rAttrList );
    1334           0 :     XMLMutableAttributeList *pMutableAttrList = 0;
    1335           0 :     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
    1336           0 :     for( sal_Int16 i=0; i < nAttrCount; i++ )
    1337             :     {
    1338           0 :         const OUString& rAttrName = xAttrList->getNameByIndex( i );
    1339           0 :         OUString aLocalName;
    1340             :         sal_uInt16 nPrefix =
    1341           0 :             GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
    1342           0 :                                                                  &aLocalName );
    1343           0 :         XMLTransformerActions::key_type aKey( nPrefix, aLocalName );
    1344             :         XMLTransformerActions::const_iterator aIter =
    1345           0 :             pActions->find( aKey );
    1346           0 :         if( !(aIter == pActions->end() ) )
    1347             :         {
    1348           0 :             if( !pMutableAttrList )
    1349             :             {
    1350             :                 pMutableAttrList =
    1351           0 :                     new XMLMutableAttributeList( xAttrList );
    1352           0 :                 xAttrList = pMutableAttrList;
    1353             :             }
    1354           0 :             const OUString& rAttrValue = xAttrList->getValueByIndex( i );
    1355           0 :             switch( (*aIter).second.m_nActionType )
    1356             :             {
    1357             :             case XML_ATACTION_RENAME:
    1358             :                 {
    1359             :                     OUString aNewAttrQName(
    1360           0 :                         GetTransformer().GetNamespaceMap().GetQNameByKey(
    1361           0 :                             (*aIter).second.GetQNamePrefixFromParam1(),
    1362             :                             ::xmloff::token::GetXMLToken(
    1363           0 :                             (*aIter).second.GetQNameTokenFromParam1()) ) );
    1364             :                     pMutableAttrList->RenameAttributeByIndex( i,
    1365           0 :                                                               aNewAttrQName );
    1366             :                 }
    1367           0 :                 if( IsXMLToken( aLocalName, XML_LEADER_CHAR ) &&
    1368           0 :                      !rAttrValue.isEmpty() &&
    1369           0 :                     rAttrValue[0] != ' ' )
    1370             :                 {
    1371             :                     OUString aNewAttrQName(
    1372           0 :                         GetTransformer().GetNamespaceMap().GetQNameByKey(
    1373             :                             XML_NAMESPACE_STYLE,
    1374           0 :                             ::xmloff::token::GetXMLToken(XML_LEADER_STYLE) ) );
    1375             :                     pMutableAttrList->AddAttribute( aNewAttrQName,
    1376           0 :                                                  GetXMLToken( XML_SOLID ) );
    1377             :                 }
    1378           0 :                 break;
    1379             :             case XML_ATACTION_INCH2IN:
    1380             :                 {
    1381           0 :                     OUString aAttrValue( rAttrValue );
    1382           0 :                     if( XMLTransformerBase::ReplaceSingleInchWithIn(
    1383           0 :                                 aAttrValue ) )
    1384           0 :                         pMutableAttrList->SetValueByIndex( i, aAttrValue );
    1385             :                 }
    1386           0 :                 break;
    1387             :             default:
    1388             :                 OSL_ENSURE( !this, "unknown action" );
    1389           0 :                 break;
    1390           0 :             }
    1391             :         }
    1392           0 :     }
    1393             : 
    1394           0 :     XMLPersElemContentTContext::StartElement( xAttrList );
    1395           0 : }
    1396             : 
    1397             : class XMLTrackedChangesOOoTContext_Impl : public XMLTransformerContext
    1398             : {
    1399             :     sal_uInt16 m_nPrefix;
    1400             :     XMLTokenEnum m_eToken;
    1401             : 
    1402             : public:
    1403             : 
    1404             :     TYPEINFO_OVERRIDE();
    1405             : 
    1406             :     XMLTrackedChangesOOoTContext_Impl( XMLTransformerBase& rTransformer,
    1407             :                            const OUString& rQName,
    1408             :                                sal_uInt16 nPrefix,
    1409             :                             XMLTokenEnum eToken );
    1410             : 
    1411             :     virtual ~XMLTrackedChangesOOoTContext_Impl();
    1412             : 
    1413             :     virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
    1414             : };
    1415             : 
    1416           0 : TYPEINIT1( XMLTrackedChangesOOoTContext_Impl, XMLTransformerContext );
    1417             : 
    1418           0 : XMLTrackedChangesOOoTContext_Impl::XMLTrackedChangesOOoTContext_Impl(
    1419             :         XMLTransformerBase& rImp,
    1420             :         const OUString& rQName,
    1421             :         sal_uInt16 nPrefix,
    1422             :         XMLTokenEnum eToken ) :
    1423             :     XMLTransformerContext( rImp, rQName ),
    1424             :     m_nPrefix( nPrefix ),
    1425           0 :     m_eToken( eToken )
    1426             : {
    1427           0 : }
    1428             : 
    1429           0 : XMLTrackedChangesOOoTContext_Impl::~XMLTrackedChangesOOoTContext_Impl()
    1430             : {
    1431           0 : }
    1432             : 
    1433           0 : void XMLTrackedChangesOOoTContext_Impl::StartElement(
    1434             :         const Reference< XAttributeList >& rAttrList )
    1435             : {
    1436           0 :     Reference< XAttributeList > xAttrList( rAttrList );
    1437           0 :     sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
    1438           0 :     for( sal_Int16 i=0; i < nAttrCount; i++ )
    1439             :     {
    1440           0 :         const OUString& rAttrName = xAttrList->getNameByIndex( i );
    1441           0 :         OUString aLocalName;
    1442             :         sal_uInt16 nPrefix =
    1443           0 :             GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
    1444           0 :                                                                  &aLocalName );
    1445           0 :         if( m_nPrefix == nPrefix && IsXMLToken( aLocalName, m_eToken ) )
    1446             :         {
    1447             :             const Reference< XPropertySet > rPropSet =
    1448           0 :                 GetTransformer().GetPropertySet();
    1449             :             OSL_ENSURE( rPropSet.is(), "no info property set" );
    1450           0 :             if( rPropSet.is() )
    1451             :             {
    1452           0 :                 const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
    1453           0 :                 OUString aPropName(sRedlineProtectionKey);
    1454             :                 Reference< XPropertySetInfo > xPropSetInfo(
    1455           0 :                             rPropSet->getPropertySetInfo() );
    1456           0 :                 if( xPropSetInfo.is() &&
    1457           0 :                     xPropSetInfo->hasPropertyByName( aPropName ) )
    1458             :                 {
    1459           0 :                     Sequence < sal_Int8 > aKey;
    1460             :                     ::sax::Converter::decodeBase64( aKey,
    1461           0 :                                         xAttrList->getValueByIndex( i ) );
    1462           0 :                     rPropSet->setPropertyValue( aPropName, makeAny( aKey ) );
    1463             :                 }
    1464             :                 else
    1465             :                 {
    1466             :                     OSL_ENSURE( !this, "RedineProtectionKey is missing" );
    1467           0 :                 }
    1468             :             }
    1469           0 :             break;
    1470             :         }
    1471           0 :     }
    1472           0 :     XMLTransformerContext::StartElement( xAttrList );
    1473           0 : }
    1474             : 
    1475             : class XMLTableOOoTransformerContext_Impl : public XMLTransformerContext
    1476             : {
    1477             :     OUString m_aElemQName;
    1478             : 
    1479             : public:
    1480             :     TYPEINFO_OVERRIDE();
    1481             : 
    1482             :     XMLTableOOoTransformerContext_Impl( XMLTransformerBase& rTransformer,
    1483             :                            const OUString& rQName );
    1484             : 
    1485             :     virtual ~XMLTableOOoTransformerContext_Impl();
    1486             : 
    1487             :     virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE;
    1488             :     virtual void EndElement() SAL_OVERRIDE;
    1489             : };
    1490             : 
    1491           0 : TYPEINIT1( XMLTableOOoTransformerContext_Impl, XMLTransformerContext );
    1492             : 
    1493           0 : XMLTableOOoTransformerContext_Impl::XMLTableOOoTransformerContext_Impl(
    1494             :         XMLTransformerBase& rImp,
    1495             :         const OUString& rQName ) :
    1496             :     XMLTransformerContext( rImp, rQName ),
    1497           0 :     m_aElemQName( rQName )
    1498             : {
    1499           0 : }
    1500             : 
    1501           0 : XMLTableOOoTransformerContext_Impl::~XMLTableOOoTransformerContext_Impl()
    1502             : {
    1503           0 : }
    1504             : 
    1505           0 : void XMLTableOOoTransformerContext_Impl::StartElement(
    1506             :         const Reference< XAttributeList >& rAttrList )
    1507             : {
    1508             :     // Perform OOO_STYLE_REF_ACTIONS for all applications (#i50521#)
    1509           0 :     Reference< XAttributeList > xAttrList( rAttrList );
    1510             :     XMLMutableAttributeList* pMutableAttrList =
    1511           0 :         GetTransformer().ProcessAttrList( xAttrList, OOO_STYLE_REF_ACTIONS, sal_False );
    1512           0 :     if( rAttrList->getLength() && IsXMLToken( GetTransformer().GetClass(), XML_SPREADSHEET  ) )
    1513             :     {
    1514           0 :         bool bPrintRanges(false);
    1515             : 
    1516           0 :         sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
    1517           0 :         for( sal_Int16 i=0; i < nAttrCount; i++ )
    1518             :         {
    1519           0 :             const OUString& rAttrName = xAttrList->getNameByIndex( i );
    1520           0 :             OUString aLocalName;
    1521             :             sal_uInt16 nPrefix =
    1522           0 :                 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName,
    1523           0 :                                                                     &aLocalName );
    1524           0 :             if( XML_NAMESPACE_TABLE == nPrefix &&
    1525           0 :                 IsXMLToken( aLocalName, XML_PRINT_RANGES ) )
    1526             :             {
    1527           0 :                 bPrintRanges = true;
    1528             :             }
    1529           0 :         }
    1530           0 :         if (!bPrintRanges && pMutableAttrList)
    1531             :         {
    1532           0 :             xAttrList = pMutableAttrList;
    1533           0 :             pMutableAttrList->AddAttribute(GetTransformer().GetNamespaceMap().GetQNameByKey(
    1534             :                                 XML_NAMESPACE_TABLE,
    1535           0 :                                 GetXMLToken( XML_PRINT ) ), GetXMLToken ( XML_FALSE ));
    1536             :         }
    1537             :     }
    1538             : 
    1539           0 :     GetTransformer().GetDocHandler()->startElement( m_aElemQName, xAttrList );
    1540           0 : }
    1541             : 
    1542           0 : void XMLTableOOoTransformerContext_Impl::EndElement()
    1543             : {
    1544           0 :     GetTransformer().GetDocHandler()->endElement( m_aElemQName );
    1545           0 : }
    1546             : 
    1547           0 : XMLTransformerContext *OOo2OasisTransformer::CreateUserDefinedContext(
    1548             :                               const TransformerAction_Impl& rAction,
    1549             :                               const OUString& rQName,
    1550             :                                  sal_Bool bPersistent   )
    1551             : {
    1552           0 :     switch( rAction.m_nActionType )
    1553             :     {
    1554             :     case XML_ETACTION_DOCUMENT:
    1555           0 :         return new XMLDocumentTransformerContext_Impl( *this, rQName );
    1556             :     case XML_ETACTION_DOCUMENT_RENAME:
    1557             :         return new XMLDocumentTransformerContext_Impl( *this, rQName,
    1558           0 :                             rAction.GetQNamePrefixFromParam1(),
    1559           0 :                             rAction.GetQNameTokenFromParam1() );
    1560             :     case XML_ETACTION_BODY:
    1561           0 :         return new XMLBodyTransformerContext_Impl( *this, rQName );
    1562             :     case XML_ETACTION_STYLE:
    1563             :         return new XMLStyleOOoTContext( *this, rQName,
    1564             :                                static_cast< XMLFamilyType >( rAction.m_nParam1 ),
    1565           0 :                                bPersistent  );
    1566             :     case XML_ETACTION_STYLE_RENAME:
    1567             :         return new XMLStyleOOoTContext( *this, rQName,
    1568             :                     static_cast< XMLFamilyType >( rAction.m_nParam2 ),
    1569           0 :                     rAction.GetQNamePrefixFromParam1(),
    1570             :                     rAction.GetQNameTokenFromParam1(),
    1571           0 :                     bPersistent );
    1572             :     case XML_ETACTION_FRAME:
    1573           0 :         return new XMLFrameOOoTransformerContext( *this, rQName );
    1574             :     case XML_ETACTION_EVENT:
    1575           0 :         return new XMLEventOOoTransformerContext( *this, rQName, bPersistent );
    1576             :     case XML_ETACTION_TAB_STOP:
    1577           0 :         return new XMLTabStopOOoTContext_Impl( *this, rQName );
    1578             :     case XML_ETACTION_FORM_CONTROL:
    1579           0 :         return new XMLControlOOoTransformerContext( *this, rQName );
    1580             :     case XML_ETACTION_FORM_PROPERTY:
    1581           0 :         return new XMLFormPropOOoTransformerContext( *this, rQName );
    1582             :     case XML_ETACTION_CHART:
    1583           0 :         return new XMLChartOOoTransformerContext( *this, rQName );
    1584             :     case XML_ETACTION_TRACKED_CHANGES:
    1585             :         return new XMLTrackedChangesOOoTContext_Impl( *this, rQName,
    1586           0 :                                rAction.GetQNamePrefixFromParam1(),
    1587           0 :                             rAction.GetQNameTokenFromParam1() );
    1588             :     case XML_ETACTION_CHART_PLOT_AREA:
    1589           0 :         return new XMLChartPlotAreaOOoTContext( *this, rQName );
    1590             :     case XML_ETACTION_TABLE:
    1591           0 :         return new XMLTableOOoTransformerContext_Impl( *this, rQName );
    1592             :     default:
    1593             :         OSL_ENSURE( !this, "no user defined context found!" );
    1594             :     }
    1595             : 
    1596             :     // default is copying
    1597           0 :     return new XMLTransformerContext( *this, rQName );
    1598             : }
    1599             : 
    1600           0 : XMLTransformerActions *OOo2OasisTransformer::GetUserDefinedActions(
    1601             :         sal_uInt16 n )
    1602             : {
    1603           0 :     XMLTransformerActions *pActions = 0;
    1604           0 :     if( n < MAX_OOO_ACTIONS )
    1605             :     {
    1606           0 :         if( !m_aActions[n] )
    1607             :         {
    1608           0 :             if( n<MAX_OOO_PROP_ACTIONS )
    1609             :             {
    1610           0 :                 m_aActions[n] =
    1611           0 :                     XMLStyleOOoTContext::CreateTransformerActions( n );
    1612             :             }
    1613           0 :             else switch( n )
    1614             :             {
    1615             :                 case OOO_STYLE_ACTIONS:
    1616             :                     m_aActions[OOO_STYLE_ACTIONS] =
    1617           0 :                         new XMLTransformerActions( aStyleActionTable );
    1618           0 :                     break;
    1619             :                 case OOO_FONT_DECL_ACTIONS:
    1620             :                     m_aActions[OOO_FONT_DECL_ACTIONS] =
    1621           0 :                         new XMLTransformerActions( aFontDeclActionTable );
    1622           0 :                     break;
    1623             :                 case OOO_SHAPE_ACTIONS:
    1624             :                     m_aActions[OOO_SHAPE_ACTIONS] =
    1625           0 :                         new XMLTransformerActions( aShapeActionTable );
    1626           0 :                     break;
    1627             :                 case OOO_CONNECTOR_ACTIONS:
    1628             :                     m_aActions[OOO_CONNECTOR_ACTIONS] =
    1629           0 :                         new XMLTransformerActions( aConnectorActionTable );
    1630           0 :                     break;
    1631             :                 case OOO_TAB_STOP_ACTIONS:
    1632             :                     m_aActions[OOO_TAB_STOP_ACTIONS] =
    1633           0 :                         new XMLTransformerActions( aTabStopActionTable );
    1634           0 :                     break;
    1635             :                 case OOO_INDEX_ENTRY_TAB_STOP_ACTIONS:
    1636             :                     m_aActions[OOO_INDEX_ENTRY_TAB_STOP_ACTIONS] =
    1637           0 :                         new XMLTransformerActions( aIndexEntryTabStopActionTable );
    1638           0 :                     break;
    1639             :                 case OOO_LINENUMBERING_ACTIONS:
    1640             :                     m_aActions[OOO_LINENUMBERING_ACTIONS] =
    1641           0 :                         new XMLTransformerActions( aLineNumberingActionTable );
    1642           0 :                     break;
    1643             :                 case OOO_FOOTNOTE_SEP_ACTIONS:
    1644             :                     m_aActions[OOO_FOOTNOTE_SEP_ACTIONS] =
    1645           0 :                         new XMLTransformerActions( aFootnoteSepActionTable );
    1646           0 :                     break;
    1647             :                 case OOO_DROP_CAP_ACTIONS:
    1648             :                     m_aActions[OOO_DROP_CAP_ACTIONS] =
    1649           0 :                         new XMLTransformerActions( aDropCapActionTable );
    1650           0 :                     break;
    1651             :                 case OOO_COLUMNS_ACTIONS:
    1652             :                     m_aActions[OOO_COLUMNS_ACTIONS] =
    1653           0 :                         new XMLTransformerActions( aColumnsActionTable );
    1654           0 :                     break;
    1655             :                 case OOO_TEXT_VALUE_TYPE_ACTIONS:
    1656             :                     m_aActions[OOO_TEXT_VALUE_TYPE_ACTIONS] =
    1657           0 :                         new XMLTransformerActions( aTextValueTypeActionTable );
    1658           0 :                     break;
    1659             :                 case OOO_TABLE_VALUE_TYPE_ACTIONS:
    1660             :                     m_aActions[OOO_TABLE_VALUE_TYPE_ACTIONS] =
    1661           0 :                         new XMLTransformerActions( aTableValueTypeActionTable );
    1662           0 :                     break;
    1663             :                 case OOO_PARA_ACTIONS:
    1664             :                     m_aActions[OOO_PARA_ACTIONS] =
    1665           0 :                         new XMLTransformerActions( aParaActionTable );
    1666           0 :                     break;
    1667             :                 case OOO_STYLE_REF_ACTIONS:
    1668             :                     m_aActions[OOO_STYLE_REF_ACTIONS] =
    1669           0 :                         new XMLTransformerActions( aStyleRefActionTable );
    1670           0 :                     break;
    1671             :                 case OOO_MASTER_PAGE_ACTIONS:
    1672             :                     m_aActions[OOO_MASTER_PAGE_ACTIONS] =
    1673           0 :                         new XMLTransformerActions( aMasterPageActionTable );
    1674           0 :                     break;
    1675             :                 case OOO_ANNOTATION_ACTIONS:
    1676             :                     m_aActions[OOO_ANNOTATION_ACTIONS] =
    1677           0 :                         new XMLTransformerActions( aAnnotationActionTable );
    1678           0 :                     break;
    1679             :                 case OOO_CHANGE_INFO_ACTIONS:
    1680             :                     m_aActions[OOO_CHANGE_INFO_ACTIONS] =
    1681           0 :                         new XMLTransformerActions( aChangeInfoActionTable );
    1682           0 :                     break;
    1683             :                 case OOO_FRAME_ELEM_ACTIONS:
    1684             :                     m_aActions[OOO_FRAME_ELEM_ACTIONS] =
    1685           0 :                         new XMLTransformerActions( aFrameElemActionTable );
    1686           0 :                     break;
    1687             :                 case OOO_FRAME_ATTR_ACTIONS:
    1688             :                     m_aActions[OOO_FRAME_ATTR_ACTIONS] =
    1689           0 :                         new XMLTransformerActions( aFrameAttrActionTable );
    1690           0 :                     break;
    1691             :                 case OOO_BACKGROUND_IMAGE_ACTIONS:
    1692             :                     // Use special actions for Writer documents. (#i50322#)
    1693             :                     m_aActions[OOO_BACKGROUND_IMAGE_ACTIONS] =
    1694           0 :                         isWriter()
    1695           0 :                         ? new XMLTransformerActions( aWriterBackgroundImageActionTable )
    1696           0 :                         : new XMLTransformerActions( aBackgroundImageActionTable );
    1697           0 :                     break;
    1698             :                 case OOO_DDE_CONNECTION_DECL_ACTIONS:
    1699             :                     m_aActions[OOO_DDE_CONNECTION_DECL_ACTIONS] =
    1700           0 :                         new XMLTransformerActions( aDDEConnectionDeclActionTable );
    1701           0 :                     break;
    1702             :                 case OOO_EVENT_ACTIONS:
    1703             :                     m_aActions[OOO_EVENT_ACTIONS] =
    1704           0 :                         new XMLTransformerActions( aEventActionTable );
    1705           0 :                     break;
    1706             :                 case OOO_FORM_CONTROL_ACTIONS:
    1707             :                     m_aActions[OOO_FORM_CONTROL_ACTIONS] =
    1708           0 :                         new XMLTransformerActions( aFormControlActionTable );
    1709           0 :                     break;
    1710             :                 case OOO_FORM_COLUMN_ACTIONS:
    1711             :                     m_aActions[OOO_FORM_COLUMN_ACTIONS] =
    1712           0 :                         new XMLTransformerActions( aFormColumnActionTable );
    1713           0 :                     break;
    1714             :                 case OOO_FORM_PROP_ACTIONS:
    1715             :                     m_aActions[OOO_FORM_PROP_ACTIONS] =
    1716           0 :                         new XMLTransformerActions( aFormPropActionTable );
    1717           0 :                     break;
    1718             :                 case OOO_XLINK_ACTIONS:
    1719             :                     m_aActions[OOO_XLINK_ACTIONS] =
    1720           0 :                         new XMLTransformerActions( aXLinkActionTable );
    1721           0 :                     break;
    1722             :                 case OOO_CONFIG_ITEM_SET_ACTIONS:
    1723             :                     m_aActions[OOO_CONFIG_ITEM_SET_ACTIONS] =
    1724           0 :                         new XMLTransformerActions( aConfigItemSetActionTable );
    1725           0 :                     break;
    1726             :                 case OOO_FORMULA_ACTIONS:
    1727             :                     m_aActions[OOO_FORMULA_ACTIONS] =
    1728           0 :                         new XMLTransformerActions( aFormulaActionTable );
    1729           0 :                     break;
    1730             :                 case OOO_CHART_ACTIONS:
    1731             :                     m_aActions[OOO_CHART_ACTIONS] =
    1732           0 :                         new XMLTransformerActions( aChartActionTable );
    1733           0 :                     break;
    1734             :                 case OOO_ERROR_MACRO_ACTIONS:
    1735             :                     m_aActions[OOO_ERROR_MACRO_ACTIONS] =
    1736           0 :                         new XMLTransformerActions( aErrorMacroActionTable );
    1737           0 :                     break;
    1738             :                 case OOO_DDE_CONV_MODE_ACTIONS:
    1739             :                     m_aActions[OOO_DDE_CONV_MODE_ACTIONS] =
    1740           0 :                         new XMLTransformerActions( aDDEConvModeActionTable );
    1741           0 :                     break;
    1742             :                 case OOO_ALPHABETICAL_INDEX_MARK_ACTIONS:
    1743             :                     m_aActions[OOO_ALPHABETICAL_INDEX_MARK_ACTIONS] =
    1744           0 :                         new XMLTransformerActions( aAlphabeticalIndexMarkActionTable );
    1745           0 :                     break;
    1746             :                 case OOO_DATAPILOT_MEMBER_ACTIONS:
    1747             :                     m_aActions[OOO_DATAPILOT_MEMBER_ACTIONS] =
    1748           0 :                         new XMLTransformerActions( aDataPilotMemberActionTable );
    1749           0 :                     break;
    1750             :                 case OOO_DATAPILOT_LEVEL_ACTIONS:
    1751             :                     m_aActions[OOO_DATAPILOT_LEVEL_ACTIONS] =
    1752           0 :                         new XMLTransformerActions( aDataPilotLevelActionTable );
    1753           0 :                     break;
    1754             :                 case OOO_SOURCE_SERVICE_ACTIONS:
    1755             :                     m_aActions[OOO_SOURCE_SERVICE_ACTIONS] =
    1756           0 :                         new XMLTransformerActions( aSourceServiceActionTable );
    1757           0 :                     break;
    1758             :                 case OOO_DRAW_AREA_POLYGON_ACTIONS:
    1759             :                     m_aActions[OOO_DRAW_AREA_POLYGON_ACTIONS] =
    1760           0 :                         new XMLTransformerActions( aShapeActionTable );
    1761           0 :                     m_aActions[OOO_DRAW_AREA_POLYGON_ACTIONS]
    1762           0 :                         ->Add( aDrawAreaPolygonActionTable );
    1763           0 :                     break;
    1764             :                 case OOO_SCRIPT_ACTIONS:
    1765             :                     m_aActions[OOO_SCRIPT_ACTIONS] =
    1766           0 :                         new XMLTransformerActions( aScriptActionTable );
    1767           0 :                     break;
    1768             :                 case OOO_ANIMATION_ACTIONS:
    1769             :                     m_aActions[OOO_ANIMATION_ACTIONS] =
    1770           0 :                         new XMLTransformerActions( aAnimationsActionTable );
    1771           0 :                     break;
    1772             :             }
    1773             :         }
    1774           0 :         pActions = m_aActions[n];
    1775             :     }
    1776             : 
    1777           0 :     return pActions;
    1778             : }
    1779             : 
    1780           0 : OUString OOo2OasisTransformer::GetEventName( const OUString& rName, sal_Bool )
    1781             : {
    1782           0 :     if( !m_pEventMap )
    1783           0 :         m_pEventMap = XMLEventOOoTransformerContext::CreateEventMap();
    1784             : 
    1785           0 :     OUString aNewName;
    1786             :     sal_uInt16 nPrefix = XMLEventOOoTransformerContext::GetEventName( rName,
    1787           0 :                                                     aNewName, *m_pEventMap );
    1788           0 :     if( XML_NAMESPACE_UNKNOWN != nPrefix )
    1789           0 :         aNewName = GetNamespaceMap().GetQNameByKey( nPrefix, aNewName );
    1790             :     else
    1791           0 :         aNewName = rName;
    1792             : 
    1793           0 :     return aNewName;
    1794             : }
    1795             : 
    1796           0 : OOo2OasisTransformer::OOo2OasisTransformer( const sal_Char *pImplName,
    1797             :                                             const sal_Char *pSubServiceName )
    1798             :         throw() :
    1799             :     XMLTransformerBase( aActionTable, aTokenMap ),
    1800           0 :     m_pEventMap( 0 )
    1801             : {
    1802           0 :     if( pImplName )
    1803           0 :         m_aImplName = OUString::createFromAscii( pImplName );
    1804             :     else
    1805           0 :         m_aImplName = OOo2OasisTransformer_getImplementationName();
    1806           0 :     if( pSubServiceName )
    1807           0 :         m_aSubServiceName = OUString::createFromAscii( pSubServiceName );
    1808             : 
    1809           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE_OOO), XML_NAMESPACE_OFFICE );
    1810           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
    1811             : 
    1812           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META_OOO), XML_NAMESPACE_META );
    1813           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META), XML_NAMESPACE_META );
    1814             : 
    1815           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE_OOO), XML_NAMESPACE_STYLE );
    1816           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
    1817             : 
    1818           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER_OOO), XML_NAMESPACE_NUMBER );
    1819           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
    1820             : 
    1821           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG_OOO), XML_NAMESPACE_CONFIG );
    1822           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG), GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
    1823             : 
    1824           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT_OOO), XML_NAMESPACE_TEXT );
    1825           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT), GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
    1826             : 
    1827           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE_OOO), XML_NAMESPACE_TABLE );
    1828           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
    1829             : 
    1830           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW_OOO), XML_NAMESPACE_DRAW );
    1831           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW), GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
    1832             : 
    1833           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D_OOO), XML_NAMESPACE_DR3D );
    1834           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D), GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
    1835             : 
    1836           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), GetXMLToken(XML_N_PRESENTATION_OOO), XML_NAMESPACE_PRESENTATION );
    1837           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION), GetXMLToken(XML_N_PRESENTATION), XML_NAMESPACE_PRESENTATION );
    1838             : 
    1839           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART_OOO), XML_NAMESPACE_CHART );
    1840           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART), GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
    1841             : 
    1842           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM_OOO), XML_NAMESPACE_FORM );
    1843           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
    1844             : 
    1845           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT_OOO), XML_NAMESPACE_SCRIPT );
    1846           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT), GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
    1847             : 
    1848           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO), XML_NAMESPACE_FO );
    1849           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO), GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
    1850             : 
    1851           0 :     GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG),  XML_NAMESPACE_SVG );
    1852           0 :     GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG), GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
    1853             : 
    1854           0 :     for( sal_uInt16 i=0; i<MAX_OOO_ACTIONS; ++i )
    1855           0 :         m_aActions[i] = 0;
    1856           0 : }
    1857             : 
    1858           0 : OOo2OasisTransformer::~OOo2OasisTransformer() throw()
    1859             : {
    1860           0 :     for( sal_uInt16 i=0; i<MAX_OOO_ACTIONS; ++i )
    1861           0 :         delete m_aActions[i];
    1862           0 :     XMLEventOOoTransformerContext::FlushEventMap( m_pEventMap );
    1863           0 : }
    1864             : 
    1865           0 : Any OOo2OasisTransformer::queryInterface( const Type& rType )
    1866             :     throw (RuntimeException, std::exception)
    1867             : {
    1868           0 :     Any aRet;
    1869           0 :     if ( rType == ::getCppuType((Reference<XImporter> *)0) )
    1870             :     {
    1871           0 :         Reference<XImporter> xThis( this );
    1872           0 :            aRet <<= xThis;
    1873             :     }
    1874           0 :     else if ( rType == ::getCppuType((Reference<XFilter> *)0) )
    1875             :     {
    1876           0 :         Reference<XFilter> xThis( this );
    1877           0 :         aRet <<= xThis;
    1878             :     }
    1879             :     else
    1880             :     {
    1881           0 :         aRet = XMLTransformerBase::queryInterface(rType);
    1882             :     }
    1883             : 
    1884           0 :     return aRet;
    1885             : }
    1886             : 
    1887             : // XImporter
    1888           0 : void SAL_CALL OOo2OasisTransformer::setTargetDocument(
    1889             :         const Reference< XComponent >& xDoc )
    1890             :     throw( IllegalArgumentException, RuntimeException, std::exception)
    1891             : {
    1892           0 :     if( !GetDocHandler().is() )
    1893             :     {
    1894             :         // if initialize hasn't been called, then we have to call it now
    1895             :         // to get the sub component initialized.
    1896           0 :         Sequence<Any> aArgs( 0 );
    1897           0 :         Initialize( aArgs );
    1898             :     }
    1899             : 
    1900           0 :     mxModel.set( xDoc, UNO_QUERY );
    1901             : 
    1902           0 :     Reference< XImporter > xImp( GetDocHandler(), UNO_QUERY );
    1903             :     OSL_ENSURE( xImp.is(), "doc handler is not an importer" );
    1904           0 :     if( xImp.is() )
    1905           0 :         xImp->setTargetDocument( xDoc );
    1906           0 : }
    1907             : 
    1908             : // XFilter
    1909           0 : sal_Bool SAL_CALL OOo2OasisTransformer::filter(
    1910             :         const Sequence< PropertyValue >& aDescriptor )
    1911             :     throw ( RuntimeException, std::exception)
    1912             : {
    1913           0 :     Reference< XFilter> xFilter( GetDocHandler(), UNO_QUERY );
    1914             :     OSL_ENSURE( xFilter.is(), "doc handler is not a filter" );
    1915           0 :     if( xFilter.is() )
    1916           0 :         return xFilter->filter( aDescriptor );
    1917             : 
    1918           0 :     return sal_False;
    1919             : }
    1920             : 
    1921           0 : void SAL_CALL OOo2OasisTransformer::cancel(  )
    1922             :     throw ( RuntimeException, std::exception)
    1923             : {
    1924           0 :     Reference< XFilter> xFilter( GetDocHandler(), UNO_QUERY );
    1925             :     OSL_ENSURE( xFilter.is(), "doc handler is not a filter" );
    1926           0 :     if( xFilter.is() )
    1927           0 :         xFilter->cancel();
    1928           0 : }
    1929             : 
    1930             : // XInitialize
    1931           0 : void SAL_CALL OOo2OasisTransformer::initialize(
    1932             :                 const Sequence< Any >& rArguments )
    1933             :     throw( Exception, RuntimeException, std::exception )
    1934             : {
    1935           0 :     Initialize( rArguments );
    1936           0 : }
    1937             : 
    1938           0 : void SAL_CALL OOo2OasisTransformer::startDocument( void )
    1939             :     throw( SAXException, RuntimeException, std::exception )
    1940             : {
    1941           0 :     if( !GetDocHandler().is() )
    1942             :     {
    1943             :         // if initialize hasn't been called, then we have to call it now
    1944             :         // to get the sub component initialized.
    1945           0 :         Sequence<Any> aArgs( 0 );
    1946           0 :         Initialize( aArgs );
    1947             :     }
    1948             : 
    1949           0 :     XMLTransformerBase::startDocument();
    1950           0 : }
    1951             : 
    1952           0 : void SAL_CALL OOo2OasisTransformer::Initialize(
    1953             :                 const Sequence< Any >& rArguments )
    1954             :     throw( Exception, RuntimeException )
    1955             : {
    1956             :     OSL_ENSURE( !GetDocHandler().is(), "duplication initialization" );
    1957             : 
    1958           0 :     Reference< XDocumentHandler > xDocHandler;
    1959           0 :     if( !m_aSubServiceName.isEmpty() )
    1960             :     {
    1961             :         Reference< XComponentContext > xContext =
    1962           0 :             comphelper::getProcessComponentContext();
    1963             :         try
    1964             :         {
    1965             :             // get filter component
    1966           0 :             xDocHandler = Reference< XDocumentHandler >(
    1967           0 :                     xContext->getServiceManager()->createInstanceWithArgumentsAndContext(m_aSubServiceName, rArguments, xContext),
    1968           0 :                     UNO_QUERY);
    1969             :         }
    1970           0 :         catch( Exception& )
    1971             :         {
    1972           0 :         }
    1973             :     }
    1974             : 
    1975             :     OSL_ENSURE( xDocHandler.is(), "can't instantiate filter component" );
    1976           0 :     if( xDocHandler.is() )
    1977             :     {
    1978           0 :         Sequence<Any> aArgs( 1 + rArguments.getLength() );
    1979           0 :         aArgs[0] <<= xDocHandler;
    1980           0 :         for(sal_Int32 i = 0; i < rArguments.getLength(); i++)
    1981           0 :             aArgs[i+1] = rArguments[i];
    1982           0 :         XMLTransformerBase::initialize( aArgs );
    1983             : 
    1984             :         OSL_ENSURE( GetDocHandler() == xDocHandler,
    1985           0 :                     "duplicate doc handler" );
    1986             :     }
    1987             :     else
    1988             :     {
    1989           0 :         XMLTransformerBase::initialize( rArguments );
    1990           0 :     }
    1991           0 : }
    1992             : 
    1993             : namespace
    1994             : {
    1995             :     class theOOo2OasisTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOOo2OasisTransformerUnoTunnelId> {};
    1996             : }
    1997             : 
    1998           0 : const Sequence< sal_Int8 > & OOo2OasisTransformer::getUnoTunnelId() throw()
    1999             : {
    2000           0 :     return theOOo2OasisTransformerUnoTunnelId::get().getSeq();
    2001             : }
    2002             : 
    2003             : // XUnoTunnel
    2004           0 : sal_Int64 SAL_CALL OOo2OasisTransformer::getSomething( const Sequence< sal_Int8 >& rId )
    2005             :     throw(RuntimeException, std::exception)
    2006             : {
    2007           0 :     if( rId.getLength() == 16
    2008           0 :         && 0 == memcmp( getUnoTunnelId().getConstArray(),
    2009           0 :                                         rId.getConstArray(), 16 ) )
    2010             :     {
    2011           0 :         return reinterpret_cast< sal_Int64 >( this );
    2012             :     }
    2013             :     else
    2014             :     {
    2015           0 :         return (sal_Int64)0;
    2016             :     }
    2017             : }
    2018             : 
    2019             : // XServiceInfo
    2020           0 : OUString SAL_CALL OOo2OasisTransformer::getImplementationName()
    2021             :     throw(RuntimeException, std::exception)
    2022             : {
    2023           0 :     return m_aImplName;
    2024             : }
    2025             : 
    2026           0 : sal_Bool SAL_CALL OOo2OasisTransformer::supportsService( const OUString& ServiceName )
    2027             :     throw(RuntimeException, std::exception)
    2028             : {
    2029           0 :     return cppu::supportsService(this, ServiceName);
    2030             : }
    2031             : 
    2032           0 : Sequence< OUString > SAL_CALL OOo2OasisTransformer::getSupportedServiceNames(  )
    2033             :     throw(RuntimeException, std::exception)
    2034             : {
    2035           0 :     Sequence<OUString> aSeq(0);
    2036           0 :     return aSeq;
    2037             : }
    2038             : 
    2039             : // XTypeProvider
    2040             : Sequence< ::com::sun::star::uno::Type > SAL_CALL
    2041           0 :     OOo2OasisTransformer::getTypes() throw(RuntimeException, std::exception)
    2042             : {
    2043             :     Sequence< ::com::sun::star::uno::Type > aTypes(
    2044           0 :                         XMLTransformerBase::getTypes() );
    2045             : 
    2046           0 :     sal_Int32 nIndex = aTypes.getLength();
    2047           0 :     aTypes.realloc( nIndex + 2 );
    2048             : 
    2049           0 :     ::com::sun::star::uno::Type* pTypes = aTypes.getArray();
    2050           0 :     pTypes[nIndex++] = ::getCppuType( static_cast< Reference< XImporter > * >( 0 ) );
    2051           0 :     pTypes[nIndex++] = ::getCppuType( static_cast< Reference< XFilter > * >( 0 ) );
    2052             : 
    2053           0 :     return aTypes;
    2054             : }
    2055             : 
    2056             : // Service registration
    2057             : 
    2058           0 : OUString SAL_CALL OOo2OasisTransformer_getImplementationName() throw()
    2059             : {
    2060           0 :     return OUString( "com.sun.star.comp.OOo2OasisTransformer" );
    2061             : }
    2062             : 
    2063           0 : Sequence< OUString > SAL_CALL OOo2OasisTransformer_getSupportedServiceNames() throw()
    2064             : {
    2065           0 :     const OUString aServiceName( OOo2OasisTransformer_getImplementationName() );
    2066           0 :     const Sequence< OUString > aSeq( &aServiceName, 1 );
    2067           0 :     return aSeq;
    2068             : }
    2069             : 
    2070           0 : Reference< XInterface > SAL_CALL OOo2OasisTransformer_createInstance(
    2071             :         const Reference< XMultiServiceFactory > & )
    2072             :     throw( Exception )
    2073             : {
    2074           0 :     return (cppu::OWeakObject*)new OOo2OasisTransformer();
    2075             : }
    2076             : 
    2077             : #define OOO_IMPORTER( className, implName, subServiceName )             \
    2078             : OUString SAL_CALL className##_getImplementationName() throw()           \
    2079             : {                                                                       \
    2080             :     return OUString( implName );         \
    2081             : }                                                                       \
    2082             :                                                                         \
    2083             : Sequence< OUString > SAL_CALL className##_getSupportedServiceNames() throw()\
    2084             : {                                                                       \
    2085             :     const OUString aServiceName( className##_getImplementationName() ); \
    2086             :     const Sequence< OUString > aSeq( &aServiceName, 1 );                \
    2087             :     return aSeq;                                                        \
    2088             : }                                                                       \
    2089             :                                                                         \
    2090             : Reference< XInterface > SAL_CALL className##_createInstance(            \
    2091             :         const Reference< XMultiServiceFactory > & )                     \
    2092             :     throw( Exception )                                                  \
    2093             : {                                                                       \
    2094             :     return (cppu::OWeakObject*)new OOo2OasisTransformer( implName,      \
    2095             :                                          subServiceName );              \
    2096             : }
    2097             : 
    2098           0 : OOO_IMPORTER( XMLWriterImportOOO,
    2099             :               "com.sun.star.comp.Writer.XMLImporter",
    2100             :               "com.sun.star.comp.Writer.XMLOasisImporter" )
    2101           0 : OOO_IMPORTER( XMLWriterStylesImportOOO,
    2102             :               "com.sun.star.comp.Writer.XMLStylesImporter",
    2103             :               "com.sun.star.comp.Writer.XMLOasisStylesImporter" )
    2104           0 : OOO_IMPORTER( XMLWriterContentImportOOO,
    2105             :               "com.sun.star.comp.Writer.XMLContentImporter",
    2106             :               "com.sun.star.comp.Writer.XMLOasisContentImporter" )
    2107           0 : OOO_IMPORTER( XMLWriterMetaImportOOO,
    2108             :               "com.sun.star.comp.Writer.XMLMetaImporter",
    2109             :               "com.sun.star.comp.Writer.XMLOasisMetaImporter" )
    2110           0 : OOO_IMPORTER( XMLWriterSettingsImportOOO,
    2111             :               "com.sun.star.comp.Writer.XMLSettingsImporter",
    2112             :               "com.sun.star.comp.Writer.XMLOasisSettingsImporter" )
    2113             : 
    2114           0 : OOO_IMPORTER( XMLImpressImportOOO,
    2115             :               "com.sun.star.comp.Impress.XMLImporter",
    2116             :               "com.sun.star.comp.Impress.XMLOasisImporter" )
    2117           0 : OOO_IMPORTER( XMLImpressStylesImportOOO,
    2118             :               "com.sun.star.comp.Impress.XMLStylesImporter",
    2119             :               "com.sun.star.comp.Impress.XMLOasisStylesImporter" )
    2120           0 : OOO_IMPORTER( XMLImpressContentImportOOO,
    2121             :               "com.sun.star.comp.Impress.XMLContentImporter",
    2122             :               "com.sun.star.comp.Impress.XMLOasisContentImporter" )
    2123           0 : OOO_IMPORTER( XMLImpressMetaImportOOO,
    2124             :               "com.sun.star.comp.Impress.XMLMetaImporter",
    2125             :               "com.sun.star.comp.Impress.XMLOasisMetaImporter" )
    2126           0 : OOO_IMPORTER( XMLImpressSettingsImportOOO,
    2127             :               "com.sun.star.comp.Impress.XMLSettingsImporter",
    2128             :               "com.sun.star.comp.Impress.XMLOasisSettingsImporter" )
    2129             : 
    2130           0 : OOO_IMPORTER( XMLDrawImportOOO,
    2131             :               "com.sun.star.comp.Draw.XMLImporter",
    2132             :               "com.sun.star.comp.Draw.XMLOasisImporter" )
    2133           0 : OOO_IMPORTER( XMLDrawStylesImportOOO,
    2134             :               "com.sun.star.comp.Draw.XMLStylesImporter",
    2135             :               "com.sun.star.comp.Draw.XMLOasisStylesImporter" )
    2136           0 : OOO_IMPORTER( XMLDrawContentImportOOO,
    2137             :               "com.sun.star.comp.Draw.XMLContentImporter",
    2138             :               "com.sun.star.comp.Draw.XMLOasisContentImporter" )
    2139           0 : OOO_IMPORTER( XMLDrawMetaImportOOO,
    2140             :               "com.sun.star.comp.Draw.XMLMetaImporter",
    2141             :               "com.sun.star.comp.Draw.XMLOasisMetaImporter" )
    2142           0 : OOO_IMPORTER( XMLDrawSettingsImportOOO,
    2143             :               "com.sun.star.comp.Draw.XMLSettingsImporter",
    2144             :               "com.sun.star.comp.Draw.XMLOasisSettingsImporter" )
    2145             : 
    2146           0 : OOO_IMPORTER( XMLCalcImportOOO,
    2147             :               "com.sun.star.comp.Calc.XMLImporter",
    2148             :               "com.sun.star.comp.Calc.XMLOasisImporter" )
    2149           0 : OOO_IMPORTER( XMLCalcStylesImportOOO,
    2150             :               "com.sun.star.comp.Calc.XMLStylesImporter",
    2151             :               "com.sun.star.comp.Calc.XMLOasisStylesImporter" )
    2152           0 : OOO_IMPORTER( XMLCalcContentImportOOO,
    2153             :               "com.sun.star.comp.Calc.XMLContentImporter",
    2154             :               "com.sun.star.comp.Calc.XMLOasisContentImporter" )
    2155           0 : OOO_IMPORTER( XMLCalcMetaImportOOO,
    2156             :               "com.sun.star.comp.Calc.XMLMetaImporter",
    2157             :               "com.sun.star.comp.Calc.XMLOasisMetaImporter" )
    2158           0 : OOO_IMPORTER( XMLCalcSettingsImportOOO,
    2159             :               "com.sun.star.comp.Calc.XMLSettingsImporter",
    2160             :               "com.sun.star.comp.Calc.XMLOasisSettingsImporter" )
    2161             : 
    2162           0 : OOO_IMPORTER( XMLChartImportOOO,
    2163             :               "com.sun.star.comp.Chart.XMLImporter",
    2164             :               "com.sun.star.comp.Chart.XMLOasisImporter" )
    2165           0 : OOO_IMPORTER( XMLChartStylesImportOOO,
    2166             :               "com.sun.star.comp.Chart.XMLStylesImporter",
    2167             :               "com.sun.star.comp.Chart.XMLOasisStylesImporter" )
    2168           0 : OOO_IMPORTER( XMLChartContentImportOOO,
    2169             :               "com.sun.star.comp.Chart.XMLContentImporter",
    2170             :               "com.sun.star.comp.Chart.XMLOasisContentImporter" )
    2171             : 
    2172           0 : OOO_IMPORTER( XMLMathMetaImportOOO,
    2173             :               "com.sun.star.comp.Math.XMLMetaImporter",
    2174             :               "com.sun.star.comp.Math.XMLOasisMetaImporter" )
    2175           0 : OOO_IMPORTER( XMLMathSettingsImportOOO,
    2176             :               "com.sun.star.comp.Math.XMLSettingsImporter",
    2177             :               "com.sun.star.comp.Math.XMLOasisSettingsImporter" )
    2178             : 
    2179           0 : OOO_IMPORTER( XMLMetaImportOOO,
    2180             :               "com.sun.star.document.XMLMetaImporter",
    2181             :               "com.sun.star.document.XMLOasisMetaImporter" )
    2182             : 
    2183           0 : OOO_IMPORTER( XMLAutoTextEventImportOOO,
    2184             :               "com.sun.star.comp.Writer.XMLAutotextEventsImporter",
    2185             :               "com.sun.star.comp.Writer.XMLOasisAutotextEventsImporter" )
    2186             : 
    2187             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10