LCOV - code coverage report
Current view: top level - libreoffice/xmloff/source/transform - OOo2Oasis.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 295 627 47.0 %
Date: 2012-12-27 Functions: 37 154 24.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10