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

Generated by: LCOV version 1.10