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