1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Oasis2OOo.cxx,v $
10 * $Revision: 1.24.56.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include <com/sun/star/beans/XPropertySetInfo.hpp>
35 #include <rtl/ustrbuf.hxx>
36 #include <xmloff/nmspmap.hxx>
37 #include "xmlnmspe.hxx"
38 #include <xmloff/xmltoken.hxx>
39 #include "DeepTContext.hxx"
40 #include "MetaTContext.hxx"
41 #include "DocumentTContext.hxx"
42 #ifndef _XMLOFF_NOTESCONTEXT_HXX
43 #include "NotesTContext.hxx"
45 #include "StyleOASISTContext.hxx"
46 #include "FrameOASISTContext.hxx"
47 #include "EventOASISTContext.hxx"
48 #include "DlgOASISTContext.hxx"
49 #ifndef _XMLOFF_CONTROLOASISTCONTEXT_HXX
50 #include "ControlOASISTContext.hxx"
52 #include "FormPropOASISTContext.hxx"
53 #include "ChartOASISTContext.hxx"
54 #include "ChartPlotAreaOASISTContext.hxx"
55 #include "MutableAttrList.hxx"
56 #include "ElemTransformerAction.hxx"
57 #include "AttrTransformerAction.hxx"
58 #include "TransformerActions.hxx"
59 #include "FamilyType.hxx"
60 #include <xmloff/xmluconv.hxx>
61 #include "Oasis2OOo.hxx"
63 using ::rtl::OUString
;
64 using ::rtl::OUStringBuffer
;
65 using namespace ::osl
;
66 using namespace ::xmloff::token
;
67 using namespace ::com::sun::star::uno
;
68 using namespace ::com::sun::star::lang
;
69 using namespace ::com::sun::star::xml::sax
;
70 using namespace ::com::sun::star::beans
;
72 OUString SAL_CALL
Oasis2OOoTransformer_getImplementationName() throw();
74 enum XMLUserDefinedTransformerAction
76 XML_ETACTION_META
=XML_ETACTION_USER_DEFINED
,
77 XML_ETACTION_DOCUMENT
,
82 XML_ETACTION_STYLE_RENAME
,
86 XML_ETACTION_TAB_STOP
,
87 XML_ETACTION_FORM_CONTROL
,
88 XML_ETACTION_FORM_PROPERTY
,
89 XML_ETACTION_CONFIG_ITEM
,
90 XML_ETACTION_TRACKED_CHANGES
,
92 XML_ETACTION_CHART_PLOT_AREA
95 #define ENTRY3( n, l, a, p1, p2, p3 ) \
96 { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
97 #define ENTRY3QNQ( n, l, a, n1, l1, p2, n3, l3 ) \
98 ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
99 p2, XMLTransformerActionInit::QNameParam( n3, l3 ) )
101 #define ENTRY2( n, l, a, p1, p2 ) \
102 ENTRY3( n, l, a, p1, p2, 0 )
103 #define ENTRY2QQ( n, l, a, n1, l1, n2, l2 ) \
104 ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
105 XMLTransformerActionInit::QNameParam( n2, l2 ) )
106 #define ENTRY2QN( n, l, a, n1, l1, p2 ) \
107 ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
109 #define ENTRY1( n, l, a, p1 ) \
110 ENTRY3( n, l, a, p1, 0, 0 )
111 #define ENTRY1Q( n, l, a, p1, t1 ) \
112 ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( p1, t1 ) )
114 #define ENTRY0( n, l, a ) \
115 ENTRY3( n, l, a, 0, 0, 0 )
117 // BM: a macro to put two tokens into one sal_Int32 for the action
118 // XML_ATACTION_RENAME_ATTRIBUTE
119 #define RENAME_ENTRY( f, s ) \
120 (static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16))
122 static XMLTransformerActionInit aActionTable
[] =
124 // add office:class from <office:document> and <office:document-content>
125 ENTRY0( OFFICE
, DOCUMENT
, XML_ETACTION_DOCUMENT
),
126 ENTRY0( OFFICE
, DOCUMENT_CONTENT
, XML_ETACTION_DOCUMENT
),
127 ENTRY1Q( OOO
, AUTO_TEXT_EVENTS
, XML_ETACTION_RENAME_ELEM
,
128 XML_NAMESPACE_OFFICE
, XML_AUTO_TEXT_EVENTS
),
130 // add <meta:keywords>
131 ENTRY0( OFFICE
, META
, XML_ETACTION_META
),
133 // rename <office:scripts> to <office:script>
134 ENTRY1Q( OFFICE
, SCRIPTS
, XML_ETACTION_RENAME_ELEM
,
135 XML_NAMESPACE_OFFICE
, XML_SCRIPT
),
137 // rename <office:script> to <office:script-data> and process attributes
138 ENTRY2QN( OFFICE
, SCRIPT
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
139 XML_NAMESPACE_OFFICE
, XML_SCRIPT_DATA
,
140 OASIS_SCRIPT_ACTIONS
),
142 // rename <ooo:libraries> to <script:libraries>
143 ENTRY1Q( OOO
, LIBRARIES
, XML_ETACTION_RENAME_ELEM
,
144 XML_NAMESPACE_SCRIPT
, XML_LIBRARIES
),
146 // rename <ooo:library-linked> to <script:library-linked> and process attributes
147 ENTRY2QN( OOO
, LIBRARY_LINKED
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
148 XML_NAMESPACE_SCRIPT
, XML_LIBRARY_LINKED
,
149 OASIS_SCRIPT_ACTIONS
),
151 // rename <ooo:library-embedded> to <script:library-embedded> and process attributes
152 ENTRY2QN( OOO
, LIBRARY_EMBEDDED
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
153 XML_NAMESPACE_SCRIPT
, XML_LIBRARY_EMBEDDED
,
154 OASIS_SCRIPT_ACTIONS
),
156 // rename <ooo:module> to <script:module> and process attributes
157 ENTRY2QN( OOO
, MODULE
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
158 XML_NAMESPACE_SCRIPT
, XML_MODULE
,
159 OASIS_SCRIPT_ACTIONS
),
161 // rename <ooo:source-code> to <script:source-code>
162 ENTRY1Q( OOO
, SOURCE_CODE
, XML_ETACTION_RENAME_ELEM
,
163 XML_NAMESPACE_SCRIPT
, XML_SOURCE_CODE
),
165 ENTRY0( OFFICE
, BODY
, XML_ETACTION_BODY
),
167 // rename <office:font-face-decls> to <office:font-decl>,
168 // rename <style:font-face> to <style:font-decl>, process attrs
169 ENTRY1Q( OFFICE
, FONT_FACE_DECLS
, XML_ETACTION_RENAME_ELEM
,
170 XML_NAMESPACE_OFFICE
, XML_FONT_DECLS
),
171 ENTRY2QN( STYLE
, FONT_FACE
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
172 XML_NAMESPACE_STYLE
, XML_FONT_DECL
,
173 OASIS_FONT_FACE_ACTIONS
),
175 // remove genre element
176 ENTRY0( OFFICE
, TEXT
, XML_ETACTION_COPY_CONTENT
),
177 ENTRY0( OFFICE
, DRAWING
, XML_ETACTION_COPY_CONTENT
),
178 ENTRY0( OFFICE
, PRESENTATION
, XML_ETACTION_COPY_CONTENT
),
179 ENTRY0( OFFICE
, SPREADSHEET
, XML_ETACTION_COPY_CONTENT
),
180 ENTRY0( OFFICE
, CHART
, XML_ETACTION_COPY_CONTENT
),
181 ENTRY0( OFFICE
, IMAGE
, XML_ETACTION_COPY_CONTENT
),
183 // rename <style:page-layout> to <style:page-master>
184 // ENTRY1Q( STYLE, PAGE_LAYOUT, RENAME_ELEM,
185 // XML_NAMESPACE_STYLE, XML_PAGE_MASTER ),
186 ENTRY1( STYLE
, MASTER_PAGE
, XML_ETACTION_PROC_ATTRS
,
187 OASIS_MASTER_PAGE_ACTIONS
),
189 // merge <style:*-properties> into <style:properties> and do other
191 ENTRY1( STYLE
, STYLE
, XML_ETACTION_STYLE
,
192 XML_FAMILY_TYPE_END
),
193 ENTRY1( STYLE
, DEFAULT_STYLE
, XML_ETACTION_STYLE
,
194 XML_FAMILY_TYPE_END
),
195 ENTRY2QN( STYLE
, PAGE_LAYOUT
, XML_ETACTION_STYLE_RENAME
,
196 XML_NAMESPACE_STYLE
, XML_PAGE_MASTER
,
197 XML_FAMILY_TYPE_PAGE_LAYOUT
),
198 ENTRY1( NUMBER
, NUMBER_STYLE
, XML_ETACTION_STYLE
,
199 XML_FAMILY_TYPE_DATA
),
200 ENTRY1( NUMBER
, CURRENCY_STYLE
, XML_ETACTION_STYLE
,
201 XML_FAMILY_TYPE_DATA
),
202 ENTRY1( NUMBER
, PERCENTAGE_STYLE
, XML_ETACTION_STYLE
,
203 XML_FAMILY_TYPE_DATA
),
204 ENTRY1( NUMBER
, DATE_STYLE
, XML_ETACTION_STYLE
,
205 XML_FAMILY_TYPE_DATA
),
206 ENTRY1( NUMBER
, TIME_STYLE
, XML_ETACTION_STYLE
,
207 XML_FAMILY_TYPE_DATA
),
208 ENTRY1( NUMBER
, BOOLEAN_STYLE
, XML_ETACTION_STYLE
,
209 XML_FAMILY_TYPE_DATA
),
210 ENTRY1( NUMBER
, TEXT_STYLE
, XML_ETACTION_STYLE
,
211 XML_FAMILY_TYPE_DATA
),
212 ENTRY1( TEXT
, LIST_STYLE
, XML_ETACTION_STYLE
,
213 XML_FAMILY_TYPE_LIST
),
214 // ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
216 ENTRY1( STYLE
, HEADER_STYLE
, XML_ETACTION_STYLE
,
217 XML_FAMILY_TYPE_HEADER_FOOTER
),
218 ENTRY1( STYLE
, FOOTER_STYLE
, XML_ETACTION_STYLE
,
219 XML_FAMILY_TYPE_HEADER_FOOTER
),
220 ENTRY1( TEXT
, LIST_LEVEL_STYLE_NUMBER
, XML_ETACTION_STYLE
,
221 XML_FAMILY_TYPE_LIST
),
222 ENTRY1( TEXT
, LIST_LEVEL_STYLE_BULLET
, XML_ETACTION_STYLE
,
223 XML_FAMILY_TYPE_LIST
),
224 ENTRY1( TEXT
, LIST_LEVEL_STYLE_IMAGE
, XML_ETACTION_STYLE
,
225 XML_FAMILY_TYPE_LIST
),
226 ENTRY1( TEXT
, OUTLINE_LEVEL_STYLE
, XML_ETACTION_STYLE
,
227 XML_FAMILY_TYPE_LIST
),
228 ENTRY1( DRAW
, GRADIENT
, XML_ETACTION_STYLE
,
229 XML_FAMILY_TYPE_GRADIENT
),
230 ENTRY1( DRAW
, FILL_IMAGE
, XML_ETACTION_STYLE
,
231 XML_FAMILY_TYPE_FILL_IMAGE
),
232 ENTRY2QN( DRAW
, OPACITY
, XML_ETACTION_STYLE_RENAME
,
233 XML_NAMESPACE_DRAW
, XML_TRANSPARENCY
,
234 XML_FAMILY_TYPE_GRADIENT
),
235 ENTRY1( DRAW
, MARKER
, XML_ETACTION_STYLE
,
236 XML_FAMILY_TYPE_MARKER
),
237 ENTRY1( DRAW
, HATCH
, XML_ETACTION_STYLE
,
238 XML_FAMILY_TYPE_HATCH
),
239 ENTRY1( DRAW
, STROKE_DASH
, XML_ETACTION_STYLE
,
240 XML_FAMILY_TYPE_STROKE_DASH
),
242 // process <text:h/p>: process style-name attributes,
243 // rename <text:h>'s text:outline-level to text:level,
244 ENTRY1( TEXT
, H
, XML_ETACTION_PROC_ATTRS
, OASIS_PARA_ACTIONS
),
245 ENTRY1( TEXT
, P
, XML_ETACTION_PROC_ATTRS
, OASIS_PARA_ACTIONS
),
247 // process <test:list>'s text:style-name attributes
248 // rename <text:list> to <text:ordered-list> or <text:unordered-list>
249 // TODO: All list currenty are renamed to <text:ordered-list>
250 ENTRY2QN( TEXT
, LIST
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
251 XML_NAMESPACE_TEXT
, XML_ORDERED_LIST
,
252 OASIS_LIST_STYLE_REF_ACTIONS
),
254 // rename <text:note*> to <text:footnote*> or <text:endnote*>
255 ENTRY1( TEXT
, NOTES_CONFIGURATION
, XML_ETACTION_NOTES
,
256 XML_NOTES_CONFIGURATION
),
257 ENTRY1( TEXT
, NOTE
, XML_ETACTION_NOTES
, XML_NOTE
),
259 // rename <text:footnote> and <text:endnote> to <text:note>
260 ENTRY1( TEXT
, NOTE_REF
, XML_ETACTION_NOTES
, XML_NOTE_REF
),
262 // rename <text:tab> to <text:tab-stop>
263 ENTRY1Q( TEXT
, TAB
, XML_ETACTION_RENAME_ELEM
,
264 XML_NAMESPACE_TEXT
, XML_TAB_STOP
),
267 // replace <table:table tabke:is-sub-table> with <table:sub-table>
268 ENTRY0( TABLE
, TABLE
, XML_ETACTION_TABLE
),
270 // merge frame element
271 ENTRY0( DRAW
, FRAME
, XML_ETACTION_FRAME
),
274 ENTRY1Q( OFFICE
, EVENT_LISTENERS
, XML_ETACTION_RENAME_ELEM
,
275 XML_NAMESPACE_OFFICE
, XML_EVENTS
),
276 ENTRY0( SCRIPT
, EVENT_LISTENER
, XML_ETACTION_EVENT
),
277 ENTRY0( SCRIPT
, EVENT
, XML_ETACTION_EVENT
),
278 ENTRY0( PRESENTATION
, EVENT_LISTENER
, XML_ETACTION_EVENT
),
280 // process Basic dialogs
281 ENTRY0( DLG
, STYLE
, XML_ETACTION_DLG
),
283 // process length attributes
284 ENTRY1( DRAW
, RECT
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
285 ENTRY1( DRAW
, LINE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
286 ENTRY1( DRAW
, POLYLINE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
287 ENTRY1( DRAW
, POLYGON
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
288 ENTRY1( DRAW
, PATH
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
289 ENTRY1( DRAW
, CIRCLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
290 ENTRY1( DRAW
, ELLIPSE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
291 ENTRY1( DRAW
, CONNECTOR
, XML_ETACTION_PROC_ATTRS
, OASIS_CONNECTOR_ACTIONS
),
292 ENTRY1( DRAW
, CAPTION
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
293 ENTRY1( DRAW
, MEASURE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
294 ENTRY1( DRAW
, CONTROL
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
295 ENTRY1( DRAW
, PAGE_THUMBNAIL
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
296 ENTRY1( DRAW
, G
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
297 // ENTRY1( DRAW, FRAME, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
298 ENTRY1( DRAW
, TEXT_BOX
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
299 ENTRY1( PRESENTATION
, PLACEHOLDER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
300 ENTRY1( DRAW
, CONTOUR_POLYGON
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
301 ENTRY1( DRAW
, CONTOUR_PATH
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
302 ENTRY1( DRAW
, AREA_RECTANGLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
303 ENTRY1( DRAW
, AREA_CIRCLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
304 ENTRY1( DRAW
, AREA_POLYGON
, XML_ETACTION_PROC_ATTRS
, OASIS_DRAW_AREA_POLYGON_ACTIONS
),
305 ENTRY1( DRAW
, GLUE_POINT
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
306 ENTRY1( DR3D
, SCENE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
307 ENTRY1( DR3D
, CUBE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
308 ENTRY1( DR3D
, SPHERE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
309 ENTRY1( DR3D
, EXTRUDE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
310 ENTRY1( DR3D
, ROTATE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
311 ENTRY1( CHART
, TITLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
312 ENTRY1( CHART
, SUBTITLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
313 ENTRY1( CHART
, FOOTER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
314 ENTRY1( CHART
, LEGEND
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
315 ENTRY1( CHART
, WALL
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
316 ENTRY1( CHART
, FLOOR
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
317 ENTRY1( CHART
, AXIS
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
318 ENTRY1( CHART
, GRID
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
319 ENTRY1( CHART
, SERIES
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
320 ENTRY1( CHART
, DATA_POINT
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
321 ENTRY1( CHART
, MEAN_VALUE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
322 ENTRY1( CHART
, ERROR_INDICATOR
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
323 ENTRY1( CHART
, REGRESSION_CURVE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
324 ENTRY1( CHART
, STOCK_GAIN_MARKER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
325 ENTRY1( CHART
, STOCK_LOSS_MARKER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
326 ENTRY1( CHART
, STOCK_RANGE_LINE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
328 ENTRY0( CHART
, CHART
, XML_ETACTION_CHART
),
329 ENTRY0( CHART
, PLOT_AREA
, XML_ETACTION_CHART_PLOT_AREA
),
331 ENTRY0( CONFIG
, CONFIG_ITEM
, XML_ETACTION_CONFIG_ITEM
),
332 ENTRY1Q( TEXT
, TRACKED_CHANGES
, XML_ETACTION_TRACKED_CHANGES
,
333 XML_NAMESPACE_TEXT
, XML_PROTECTION_KEY
),
334 ENTRY1Q( TABLE
, TRACKED_CHANGES
, XML_ETACTION_TRACKED_CHANGES
,
335 XML_NAMESPACE_TABLE
, XML_PROTECTION_KEY
),
337 ENTRY1( TEXT
, INDEX_ENTRY_TAB_STOP
, XML_ETACTION_PROC_ATTRS
,
338 OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
),
339 ENTRY0( STYLE
, TAB_STOP
, XML_ETACTION_TAB_STOP
),
340 ENTRY1( STYLE
, BACKGROUND_IMAGE
, XML_ETACTION_PROC_ATTRS
,
341 OASIS_BACKGROUND_IMAGE_ACTIONS
),
342 ENTRY1( TEXT
, LINENUMBERING_CONFIGURATION
, XML_ETACTION_PROC_ATTRS
,
343 OASIS_LINENUMBERING_ACTIONS
),
344 ENTRY1( STYLE
, FOOTNOTE_SEP
, XML_ETACTION_PROC_ATTRS
,
345 OASIS_FOOTNOTE_SEP_ACTIONS
),
346 ENTRY1( STYLE
, DROP_CAP
, XML_ETACTION_PROC_ATTRS
, OASIS_DROP_CAP_ACTIONS
),
347 ENTRY1( STYLE
, COLUMNS
, XML_ETACTION_PROC_ATTRS
, OASIS_COLUMNS_ACTIONS
),
348 ENTRY1( STYLE
, COLUMN
, XML_ETACTION_PROC_ATTRS
, OASIS_COLUMNS_ACTIONS
),
350 // process *:style-name attributes
351 ENTRY1( STYLE
, MAP
, XML_ETACTION_PROC_ATTRS
, OASIS_MAP_STYLE_REF_ACTIONS
),
352 ENTRY1( TEXT
, SPAN
, XML_ETACTION_PROC_ATTRS
, OASIS_TEXT_STYLE_REF_ACTIONS
),
353 ENTRY1( TEXT
, A
, XML_ETACTION_PROC_ATTRS
, OASIS_TEXT_STYLE_REF_ACTIONS
),
354 ENTRY1( TEXT
, RUBY_TEXT
, XML_ETACTION_PROC_ATTRS
,
355 OASIS_TEXT_STYLE_REF_ACTIONS
),
356 ENTRY1( TEXT
, TABLE_OF_CONTENT_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
357 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
358 ENTRY1( TEXT
, ILLUSTRATION_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
359 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
360 ENTRY1( TEXT
, TABLE_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
361 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
362 ENTRY1( TEXT
, OBJECT_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
363 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
364 ENTRY1( TEXT
, USER_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
365 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
366 ENTRY1( TEXT
, ALPHABETICAL_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
367 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
368 ENTRY1( TEXT
, BIBLIOGRAPHY_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
369 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
370 ENTRY1( TEXT
, INDEX_SOURCE_STYLE
, XML_ETACTION_PROC_ATTRS
,
371 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
372 ENTRY1( TEXT
, INDEX_TITLE_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
373 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
374 ENTRY3QNQ( TEXT
, INDEX_ENTRY_CHAPTER
,
375 XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND
,
376 XML_NAMESPACE_TEXT
, XML_INDEX_ENTRY_CHAPTER_NUMBER
,
377 OASIS_TEXT_STYLE_REF_ACTIONS
,
378 XML_NAMESPACE_TEXT
, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE
),
379 ENTRY1( TEXT
, INDEX_ENTRY_TEXT
, XML_ETACTION_PROC_ATTRS
,
380 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
381 ENTRY1( TEXT
, INDEX_ENTRY_PAGE_NUMBER
, XML_ETACTION_PROC_ATTRS
,
382 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
383 ENTRY1( TEXT
, INDEX_ENTRY_SPAN
, XML_ETACTION_PROC_ATTRS
,
384 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
385 ENTRY1( TEXT
, INDEX_ENTRY_BIBLIOGRAPHY
, XML_ETACTION_PROC_ATTRS
,
386 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
387 ENTRY1( TEXT
, INDEX_ENTRY_LINK_START
, XML_ETACTION_PROC_ATTRS
,
388 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
389 ENTRY1( TEXT
, INDEX_ENTRY_LINK_END
, XML_ETACTION_PROC_ATTRS
,
390 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
391 ENTRY1( DRAW
, PAGE
, XML_ETACTION_PROC_ATTRS
,
392 OASIS_MASTER_PAGE_REF_ACTIONS
), /* generated entry */
393 // --> OD 2005-01-10 #i40011#, #i40015#
394 // - conversion of attribute <table:style-name> for <table:table-row> and
395 // <table:table-column>
396 ENTRY1( TABLE
, TABLE_ROW
, XML_ETACTION_PROC_ATTRS
,
397 OASIS_TABLE_STYLE_REF_ACTIONS
),
398 ENTRY1( TABLE
, TABLE_COLUMN
, XML_ETACTION_PROC_ATTRS
,
399 OASIS_TABLE_STYLE_REF_ACTIONS
),
402 // rename office:value-* to *:value-*
403 ENTRY1( TEXT
, VARIABLE_DECL
, XML_ETACTION_PROC_ATTRS
,
404 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
405 ENTRY1( TEXT
, VARIABLE_SET
, XML_ETACTION_PROC_ATTRS
,
406 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
407 ENTRY1( TEXT
, VARIABLE_INPUT
, XML_ETACTION_PROC_ATTRS
,
408 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
409 ENTRY1( TEXT
, USER_FIELD_DECL
, XML_ETACTION_PROC_ATTRS
,
410 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
411 ENTRY1( TEXT
, EXPRESSION
, XML_ETACTION_PROC_ATTRS
,
412 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
413 ENTRY1( TEXT
, USER_DEFINED
, XML_ETACTION_PROC_ATTRS
,
414 OASIS_DATETIME_ACTIONS
), // Add OASIS_TEXT_VALUE_TYPE_ACTIONS if attrs are added to text:user-defined
415 ENTRY1( TABLE
, TABLE_CELL
, XML_ETACTION_PROC_ATTRS
,
416 OASIS_TABLE_VALUE_TYPE_ACTIONS
), /* generated entry */
417 ENTRY1( TABLE
, COVERED_TABLE_CELL
, XML_ETACTION_PROC_ATTRS
,
418 OASIS_TABLE_VALUE_TYPE_ACTIONS
), /* generated entry */
419 ENTRY1( TABLE
, CHANGE_TRACK_TABLE_CELL
, XML_ETACTION_PROC_ATTRS
,
420 OASIS_TABLE_VALUE_TYPE_ACTIONS
), /* generated entry */
421 // ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
422 // OASIS_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
423 // ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
424 // OASIS_VALUE_TYPE_ACTIONS), /* generated entry */
426 ENTRY1( OFFICE
, ANNOTATION
, XML_ETACTION_MOVE_ELEMS_TO_ATTRS
,
427 OASIS_ANNOTATION_ACTIONS
), /* generated entry */
428 ENTRY1( OFFICE
, CHANGE_INFO
, XML_ETACTION_MOVE_ELEMS_TO_ATTRS
,
429 OASIS_CHANGE_INFO_ACTIONS
), /* generated entry */
431 ENTRY1( TEXT
, DDE_CONNECTION_DECL
, XML_ETACTION_PROC_ATTRS
,
432 OASIS_DDE_CONNECTION_DECL_ACTIONS
),
434 ENTRY0( FORM
, TEXT
, XML_ETACTION_FORM_CONTROL
),
435 ENTRY0( FORM
, TEXTAREA
, XML_ETACTION_FORM_CONTROL
),
436 ENTRY0( FORM
, FIXED_TEXT
, XML_ETACTION_FORM_CONTROL
),
437 ENTRY0( FORM
, FILE, XML_ETACTION_FORM_CONTROL
),
438 ENTRY0( FORM
, PASSWORD
, XML_ETACTION_FORM_CONTROL
),
439 ENTRY0( FORM
, FORMATTED_TEXT
, XML_ETACTION_FORM_CONTROL
),
440 ENTRY0( FORM
, BUTTON
, XML_ETACTION_FORM_CONTROL
),
441 ENTRY0( FORM
, IMAGE
, XML_ETACTION_FORM_CONTROL
),
442 ENTRY0( FORM
, CHECKBOX
, XML_ETACTION_FORM_CONTROL
),
443 ENTRY0( FORM
, RADIO
, XML_ETACTION_FORM_CONTROL
),
444 ENTRY0( FORM
, LISTBOX
, XML_ETACTION_FORM_CONTROL
),
445 ENTRY0( FORM
, COMBOBOX
, XML_ETACTION_FORM_CONTROL
),
446 ENTRY0( FORM
, FRAME
, XML_ETACTION_FORM_CONTROL
),
447 ENTRY0( FORM
, HIDDEN
, XML_ETACTION_FORM_CONTROL
),
448 ENTRY0( FORM
, IMAGE_FRAME
, XML_ETACTION_FORM_CONTROL
),
449 ENTRY0( FORM
, GRID
, XML_ETACTION_FORM_CONTROL
),
450 ENTRY0( FORM
, VALUE_RANGE
, XML_ETACTION_FORM_CONTROL
),
451 ENTRY0( FORM
, GENERIC_CONTROL
, XML_ETACTION_FORM_CONTROL
),
452 ENTRY1( FORM
, COLUMN
, XML_ETACTION_PROC_ATTRS
,
453 OASIS_FORM_COLUMN_ACTIONS
),
454 ENTRY1( FORM
, PROPERTY
, XML_ETACTION_FORM_PROPERTY
, XML_PROPERTY
),
455 ENTRY1( FORM
, LIST_PROPERTY
, XML_ETACTION_FORM_PROPERTY
,
457 ENTRY1( FORM
, LIST_VALUE
, XML_ETACTION_FORM_PROPERTY
, XML_LIST_VALUE
),
459 // process xlink:href
460 ENTRY1( META
, TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
461 OASIS_XLINK_ACTIONS
), /* generated entry */
462 ENTRY1( META
, AUTO_RELOAD
, XML_ETACTION_PROC_ATTRS
,
463 OASIS_XLINK_ACTIONS
), /* generated entry */
464 ENTRY1( TEXT
, SECTION_SOURCE
, XML_ETACTION_PROC_ATTRS
,
465 OASIS_XLINK_ACTIONS
), /* generated entry */
466 ENTRY1( TEXT
, SCRIPT
, XML_ETACTION_PROC_ATTRS
,
467 OASIS_XLINK_ACTIONS
), /* generated entry */
468 ENTRY1( TEXT
, ALPHABETICAL_INDEX_AUTO_MARK_FILE
, XML_ETACTION_PROC_ATTRS
,
469 OASIS_XLINK_ACTIONS
), /* generated entry */
470 ENTRY1( TABLE
, TABLE_SOURCE
, XML_ETACTION_PROC_ATTRS
,
471 OASIS_XLINK_ACTIONS
), /* generated entry */
472 ENTRY1( TABLE
, CELL_RANGE_SOURCE
, XML_ETACTION_PROC_ATTRS
,
473 OASIS_XLINK_ACTIONS
), /* generated entry */
474 ENTRY1( DRAW
, A
, XML_ETACTION_PROC_ATTRS
,
475 OASIS_XLINK_ACTIONS
), /* generated entry */
476 ENTRY1( PRESENTATION
, SOUND
, XML_ETACTION_PROC_ATTRS
,
477 OASIS_XLINK_ACTIONS
), /* generated entry */
478 ENTRY1( FORM
, FORM
, XML_ETACTION_PROC_ATTRS
,
479 OASIS_FORM_ACTIONS
), /* generated entry */
480 // ENTRY1( SVG, FONT_FACE_URI, XML_ETACTION_PROC_ATTRS,
481 // OASIS_XLINK_ACTIONS ), /* generated entry */
482 // ENTRY1( SVG, DEFINITION_SRC, XML_ETACTION_PROC_ATTRS,
483 // OASIS_XLINK_ACTIONS ), /* generated entry */
484 ENTRY2QN( CHART
, SYMBOL_IMAGE
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
485 XML_NAMESPACE_STYLE
, XML_SYMBOL_IMAGE
,
486 OASIS_BACKGROUND_IMAGE_ACTIONS
),
487 // OASIS_XLINK_ACTIONS ), /* generated entry */
488 // events don't have real URIs
489 // ENTRY1( PRESENTATION, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
490 // OASIS_XLINK_ACTIONS ), /* generated entry */
491 // ENTRY1( SCRIPT, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
492 // OASIS_XLINK_ACTIONS ), /* generated entry */
494 // add namespace prefix to name
495 ENTRY1( CONFIG
, CONFIG_ITEM_SET
, XML_ETACTION_PROC_ATTRS
,
496 OASIS_CONFIG_ITEM_SET_ACTIONS
),
498 // add namespace prefix to formula and condition
500 ENTRY1( TEXT
, SECTION
, XML_ETACTION_PROC_ATTRS
,
501 OASIS_FORMULA_ACTIONS
), /* generated entry */
503 ENTRY1( TEXT
, SEQUENCE
, XML_ETACTION_PROC_ATTRS
,
504 OASIS_FORMULA_ACTIONS
), /* generated entry */
506 ENTRY1( TEXT
, DATABASE_NEXT
, XML_ETACTION_PROC_ATTRS
,
507 OASIS_FORMULA_ACTIONS
), /* generated entry */
509 ENTRY2QN( TEXT
, DATABASE_ROW_SELECT
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
510 XML_NAMESPACE_TEXT
, XML_DATABASE_SELECT
,
511 OASIS_FORMULA_ACTIONS
), /* generated entry */
513 ENTRY1( TEXT
, CONDITIONAL_TEXT
, XML_ETACTION_PROC_ATTRS
,
514 OASIS_FORMULA_ACTIONS
), /* generated entry */
516 ENTRY1( TEXT
, HIDDEN_TEXT
, XML_ETACTION_PROC_ATTRS
,
517 OASIS_FORMULA_ACTIONS
), /* generated entry */
519 ENTRY1( TEXT
, HIDDEN_PARAGRAPH
, XML_ETACTION_PROC_ATTRS
,
520 OASIS_FORMULA_ACTIONS
), /* generated entry */
522 ENTRY1( TEXT
, TABLE_FORMULA
, XML_ETACTION_PROC_ATTRS
,
523 OASIS_FORMULA_ACTIONS
), /* generated entry */
525 // process table::content-validation
526 ENTRY1( TABLE
, CONTENT_VALIDATION
, XML_ETACTION_PROC_ATTRS
,
527 OASIS_CONTENT_VALIDATION_ACTIONS
),
529 // rename <table:dependencies> to <table:dependences>
530 ENTRY1Q( TABLE
, DEPENDENCIES
, XML_ETACTION_RENAME_ELEM
,
531 XML_NAMESPACE_TABLE
, XML_DEPENDENCES
),
532 ENTRY1Q( TABLE
, DEPENDENCY
, XML_ETACTION_RENAME_ELEM
,
533 XML_NAMESPACE_TABLE
, XML_DEPENDENCE
),
535 // process table::conversion-mode
536 ENTRY1( TABLE
, CONVERSION_MODE
, XML_ETACTION_PROC_ATTRS
,
537 OASIS_DDE_CONV_MODE_ACTIONS
),
539 // process table::data-pilot-member
540 ENTRY1( TABLE
, DATA_PILOT_MEMBER
, XML_ETACTION_PROC_ATTRS
,
541 OASIS_DATAPILOT_MEMBER_ACTIONS
),
543 // process table::data-pilot-level
544 ENTRY1( TABLE
, DATA_PILOT_LEVEL
, XML_ETACTION_PROC_ATTRS
,
545 OASIS_DATAPILOT_LEVEL_ACTIONS
),
547 // process table::source-service
548 ENTRY1( TABLE
, SOURCE_SERVICE
, XML_ETACTION_PROC_ATTRS
,
549 OASIS_SOURCE_SERVICE_ACTIONS
),
551 // entries for date time change (#i36576#)
552 ENTRY1( TEXT
, DATE
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
553 ENTRY1( TEXT
, CREATION_DATE
, XML_ETACTION_PROC_ATTRS
,
554 OASIS_DATETIME_ACTIONS
),
555 ENTRY1( TEXT
, TIME
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
556 ENTRY1( TEXT
, CREATION_TIME
, XML_ETACTION_PROC_ATTRS
,
557 OASIS_DATETIME_ACTIONS
),
558 ENTRY1( TEXT
, PRINT_TIME
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
559 ENTRY1( TEXT
, MODIFICATION_TIME
, XML_ETACTION_PROC_ATTRS
,
560 OASIS_DATETIME_ACTIONS
),
561 ENTRY1( TEXT
, EDITING_DURATION
, XML_ETACTION_PROC_ATTRS
,
562 OASIS_DATETIME_ACTIONS
),
563 ENTRY1( FORM
, TIME
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
564 ENTRY1( PRESENTATION
, SETTINGS
, XML_ETACTION_PROC_ATTRS
,
565 OASIS_DATETIME_ACTIONS
),
567 // fix <text:alphabatical-index-mark text:main-etry>
568 ENTRY1( TEXT
, ALPHABETICAL_INDEX_MARK
, XML_ETACTION_PROC_ATTRS
,
569 OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
),
570 ENTRY1( TEXT
, ALPHABETICAL_INDEX_MARK_START
, XML_ETACTION_PROC_ATTRS
,
571 OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
),
573 // fix id strings in old animation elements
574 ENTRY1( PRESENTATION
, DIM
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
575 ENTRY1( PRESENTATION
, PLAY
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
576 ENTRY1( PRESENTATION
, SHOW_TEXT
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
577 ENTRY1( PRESENTATION
, SHOW_SHAPE
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
578 ENTRY1( PRESENTATION
, HIDE_TEXT
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
579 ENTRY1( PRESENTATION
, HIDE_SHAPE
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
581 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ETACTION_EOT
)
584 // XML_ETACTION_STYLE
585 static XMLTransformerActionInit aStyleActionTable
[] =
587 ENTRY0( STYLE
, FAMILY
, XML_ATACTION_STYLE_FAMILY
),
588 ENTRY1( STYLE
, NAME
, XML_ATACTION_DECODE_STYLE_NAME
,
589 XML_FAMILY_TYPE_END
),
590 ENTRY1( STYLE
, DISPLAY_NAME
, XML_ATACTION_STYLE_DISPLAY_NAME
,
591 XML_FAMILY_TYPE_END
),
592 ENTRY1( STYLE
, PARENT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
593 XML_FAMILY_TYPE_END
),
594 ENTRY1( STYLE
, NEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
595 XML_FAMILY_TYPE_END
),
596 ENTRY1( STYLE
, LIST_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
597 XML_FAMILY_TYPE_LIST
),
598 ENTRY1( STYLE
, MASTER_PAGE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
599 XML_FAMILY_TYPE_MASTER_PAGE
),
600 ENTRY0( STYLE
, DEFAULT_OUTLINE_LEVEL
, XML_ATACTION_REMOVE
),
601 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
602 XML_FAMILY_TYPE_TEXT
), // list level styles
603 ENTRY1( DRAW
, NAME
, XML_ATACTION_DECODE_STYLE_NAME
,
604 XML_FAMILY_TYPE_END
),
605 ENTRY1( DRAW
, DISPLAY_NAME
, XML_ATACTION_STYLE_DISPLAY_NAME
,
606 XML_FAMILY_TYPE_END
),
607 ENTRY0( DRAW
, DISTANCE
, XML_ATACTION_IN2INCH
),
608 ENTRY0( DRAW
, DOTS1_LENGTH
, XML_ATACTION_IN2INCH
),
609 ENTRY0( DRAW
, DOTS2_LENGTH
, XML_ATACTION_IN2INCH
),
610 ENTRY0( SVG
, WIDTH
, XML_ATACTION_IN2INCH
),
611 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_IN2INCH
),
612 ENTRY0( DRAW
, START
, XML_ATACTION_NEG_PERCENT
),
613 ENTRY0( DRAW
, END
, XML_ATACTION_NEG_PERCENT
),
614 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_True
),
615 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
618 // OASIS_FRAME_ELEM_ACTIONS
619 static XMLTransformerActionInit aFrameActionTable
[] =
621 ENTRY0( DRAW
, TEXT_BOX
, XML_ETACTION_COPY
),
622 ENTRY0( DRAW
, IMAGE
, XML_ETACTION_COPY
),
623 ENTRY0( DRAW
, OBJECT
, XML_ETACTION_COPY
),
624 ENTRY0( DRAW
, OBJECT_OLE
, XML_ETACTION_COPY
),
625 ENTRY0( DRAW
, APPLET
, XML_ETACTION_COPY
),
626 ENTRY0( DRAW
, PLUGIN
, XML_ETACTION_COPY
),
627 ENTRY0( DRAW
, FLOATING_FRAME
, XML_ETACTION_COPY
),
628 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
631 // OASIS_EVENT_ELEM_ACTIONS
632 static XMLTransformerActionInit aEventActionTable
[] =
634 ENTRY0( XLINK
, HREF
, XML_ATACTION_HREF
),
635 ENTRY1( SCRIPT
, LANGUAGE
, XML_ATACTION_REMOVE_NAMESPACE_PREFIX
,
637 ENTRY0( SCRIPT
, EVENT_NAME
, XML_ATACTION_EVENT_NAME
),
638 ENTRY0( SCRIPT
, MACRO_NAME
, XML_ATACTION_MACRO_NAME
),
639 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
642 // OASIS_EVENT_ELEM_ACTIONS
643 static XMLTransformerActionInit aDlgActionTable
[] =
645 ENTRY0( DLG
, BORDER
, XML_ATACTION_DLG_BORDER
)
648 // action table for OASIS_MASTER_PAGE_ACTIONS
649 static XMLTransformerActionInit aMasterPageActionTable
[] =
651 ENTRY1( STYLE
, NAME
, XML_ATACTION_DECODE_STYLE_NAME
,
652 XML_FAMILY_TYPE_MASTER_PAGE
),
653 ENTRY1( STYLE
, DISPLAY_NAME
, XML_ATACTION_STYLE_DISPLAY_NAME
,
654 XML_FAMILY_TYPE_MASTER_PAGE
),
655 ENTRY1( STYLE
, NEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
656 XML_FAMILY_TYPE_MASTER_PAGE
),
657 ENTRY1Q( STYLE
, PAGE_LAYOUT_NAME
, XML_ATACTION_RENAME
,
658 XML_NAMESPACE_STYLE
, XML_PAGE_MASTER_NAME
),
659 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
662 // action table for OASIS_TEXT_STYLE_REF_ACTIONS
663 static XMLTransformerActionInit aTextStyleRefActionTable
[] =
665 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
666 XML_FAMILY_TYPE_TEXT
),
667 ENTRY1( TEXT
, VISITED_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
668 XML_FAMILY_TYPE_TEXT
),
669 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_False
),
670 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
673 // action table for OASIS_PARA_STYLE_REF_ACTIONS
674 static XMLTransformerActionInit aParaStyleRefActionTable
[] =
676 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
677 XML_FAMILY_TYPE_PARAGRAPH
),
678 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
682 // action table for OASIS_LIST_STYLE_REF_ACTIONS
683 static XMLTransformerActionInit aListStyleRefActionTable
[] =
685 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
686 XML_FAMILY_TYPE_LIST
),
687 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
690 // action table for OASIS_MASTER_PAGE_REF_ACTIONS
691 static XMLTransformerActionInit aMasterPageRefActionTable
[] =
693 ENTRY1( DRAW
, MASTER_PAGE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
694 XML_FAMILY_TYPE_MASTER_PAGE
),
695 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
698 // action table for OASIS_MAP_STYLE_REF_ACTIONS
699 static XMLTransformerActionInit aMapStyleRefActionTable
[] =
701 ENTRY1( STYLE
, APPLY_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
702 XML_FAMILY_TYPE_END
),
703 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
706 // --> OD 2005-01-10 #i40011#, #i40015#
707 // action table for OASIS_TABLE_STYLE_REF_ACTIONS
708 static XMLTransformerActionInit aTableStyleRefActionTable
[] =
710 ENTRY1( TABLE
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
711 XML_FAMILY_TYPE_END
),
712 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
717 static XMLTransformerActionInit aFontFaceActionTable
[] =
719 ENTRY1Q( SVG
, FONT_FAMILY
, XML_ATACTION_RENAME
,
720 XML_NAMESPACE_FO
, XML_FONT_FAMILY
),
721 ENTRY1Q( STYLE
, FONT_ADORNMENTS
, XML_ATACTION_RENAME
,
722 XML_NAMESPACE_STYLE
, XML_FONT_STYLE_NAME
),
723 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
726 // action table for OASIS_PARA_ACTIONS
727 static XMLTransformerActionInit aParaActionTable
[] =
729 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
730 XML_FAMILY_TYPE_PARAGRAPH
),
731 ENTRY1( TEXT
, COND_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
732 XML_FAMILY_TYPE_PARAGRAPH
),
733 ENTRY1Q( TEXT
, OUTLINE_LEVEL
, XML_ATACTION_RENAME
,
734 XML_NAMESPACE_TEXT
, XML_LEVEL
),
735 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
738 // !!ATTENTION!! If you change something here, please also change
739 // aConnectorActionTable if apropriate
740 static XMLTransformerActionInit aShapeActionTable
[] =
742 ENTRY1( DRAW
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
743 XML_FAMILY_TYPE_GRAPHIC
),
744 ENTRY1( DRAW
, TEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
745 XML_FAMILY_TYPE_PARAGRAPH
),
746 ENTRY1( PRESENTATION
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
747 XML_FAMILY_TYPE_PRESENTATION
),
748 ENTRY0( SVG
, X
, XML_ATACTION_IN2INCH
),
749 ENTRY0( SVG
, Y
, XML_ATACTION_IN2INCH
),
750 ENTRY0( SVG
, X1
, XML_ATACTION_IN2INCH
),
751 ENTRY0( SVG
, Y1
, XML_ATACTION_IN2INCH
),
752 ENTRY0( SVG
, X2
, XML_ATACTION_IN2INCH
),
753 ENTRY0( SVG
, Y2
, XML_ATACTION_IN2INCH
),
754 ENTRY0( SVG
, CX
, XML_ATACTION_IN2INCH
),
755 ENTRY0( SVG
, CY
, XML_ATACTION_IN2INCH
),
756 ENTRY0( DRAW
, END_X
, XML_ATACTION_IN2INCH
),
757 ENTRY0( DRAW
, END_Y
, XML_ATACTION_IN2INCH
),
758 ENTRY0( SVG
, R
, XML_ATACTION_IN2INCH
),
759 ENTRY0( SVG
, RX
, XML_ATACTION_IN2INCH
),
760 ENTRY0( SVG
, RY
, XML_ATACTION_IN2INCH
),
761 ENTRY0( SVG
, WIDTH
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
762 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
763 ENTRY0( FO
, MIN_WIDTH
, XML_ATACTION_IN2INCH
),
764 ENTRY0( FO
, MIN_HEIGHT
, XML_ATACTION_IN2INCH
),
765 ENTRY0( FO
, MAX_WIDTH
, XML_ATACTION_IN2INCH
),
766 ENTRY0( FO
, MAX_HEIGHT
, XML_ATACTION_IN2INCH
),
767 ENTRY0( DRAW
, CORNER_RADIUS
, XML_ATACTION_IN2INCH
),
768 ENTRY0( DRAW
, LINE_SKEW
, XML_ATACTION_INS2INCHS
),
769 ENTRY0( DRAW
, CAPTION_POINT_X
, XML_ATACTION_IN2INCH
),
770 ENTRY0( DRAW
, CAPTION_POINT_Y
, XML_ATACTION_IN2INCH
),
771 ENTRY0( DR3D
, DISTANCE
, XML_ATACTION_IN2INCH
),
772 ENTRY0( DR3D
, FOCAL_LENGTH
, XML_ATACTION_IN2INCH
),
773 ENTRY1Q( DRAW
, CONTROL
, XML_ATACTION_RENAME
,
774 XML_NAMESPACE_FORM
, XML_ID
),
775 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_True
),
777 // BM: needed by chart:legend. The legend needs also the draw actions. As
778 // there is no merge mechanism, all actions have to be in the same table
779 ENTRY2( CHART
, LEGEND_POSITION
, XML_ATACTION_RENAME_ATTRIBUTE
,
780 RENAME_ENTRY( XML_START
, XML_LEFT
),
781 RENAME_ENTRY( XML_END
, XML_RIGHT
)),
783 ENTRY0( DRAW
, ID
, XML_ATACTION_DECODE_ID
),
785 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
788 // OASIS_ANIMATION_ACTIONS
789 static XMLTransformerActionInit aAnimationActionTable
[] =
791 ENTRY0( DRAW
, SHAPE_ID
, XML_ATACTION_DECODE_ID
),
792 ENTRY0( PRESENTATION
, DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
793 ENTRY0( PRESENTATION
, PAUSE
, XML_ATACTION_RNG2ISO_DATETIME
),
795 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
798 // OOO_CONNECTOR_ACTIONS
799 static XMLTransformerActionInit aConnectorActionTable
[] =
801 ENTRY1( DRAW
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
802 XML_FAMILY_TYPE_GRAPHIC
),
803 ENTRY1( DRAW
, TEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
804 XML_FAMILY_TYPE_PARAGRAPH
),
805 ENTRY1( PRESENTATION
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
806 XML_FAMILY_TYPE_PRESENTATION
),
807 ENTRY0( SVG
, X1
, XML_ATACTION_IN2TWIPS
),
808 ENTRY0( SVG
, Y1
, XML_ATACTION_IN2TWIPS
),
809 ENTRY0( SVG
, X2
, XML_ATACTION_IN2TWIPS
),
810 ENTRY0( SVG
, Y2
, XML_ATACTION_IN2TWIPS
),
811 ENTRY0( DRAW
, END_X
, XML_ATACTION_IN2INCH
),
812 ENTRY0( DRAW
, END_Y
, XML_ATACTION_IN2INCH
),
813 ENTRY0( SVG
, WIDTH
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
814 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
815 ENTRY0( FO
, MIN_WIDTH
, XML_ATACTION_IN2INCH
),
816 ENTRY0( FO
, MIN_HEIGHT
, XML_ATACTION_IN2INCH
),
817 ENTRY0( FO
, MAX_WIDTH
, XML_ATACTION_IN2INCH
),
818 ENTRY0( FO
, MAX_HEIGHT
, XML_ATACTION_IN2INCH
),
819 ENTRY0( DRAW
, LINE_SKEW
, XML_ATACTION_INS2INCHS
),
820 ENTRY1Q( DRAW
, CONTROL
, XML_ATACTION_RENAME
,
821 XML_NAMESPACE_FORM
, XML_ID
),
822 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_True
),
823 ENTRY0( DRAW
, START_SHAPE
, XML_ATACTION_DECODE_ID
),
824 ENTRY0( DRAW
, END_SHAPE
, XML_ATACTION_DECODE_ID
),
826 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
829 // OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
830 static XMLTransformerActionInit aIndexEntryTabStopActionTable
[] =
832 ENTRY0( STYLE
, POSITION
, XML_ATACTION_IN2INCH
),
833 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
834 XML_FAMILY_TYPE_TEXT
),
835 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
838 // OASIS_TAB_STOP_ACTIONS
839 static XMLTransformerActionInit aTabStopActionTable
[] =
841 ENTRY0( STYLE
, POSITION
, XML_ATACTION_IN2INCH
),
842 ENTRY1Q( STYLE
, LEADER_TEXT
, XML_ATACTION_RENAME
,
843 XML_NAMESPACE_STYLE
, XML_LEADER_CHAR
),
844 ENTRY0( STYLE
, LEADER_STYLE
, XML_ATACTION_REMOVE
),
845 ENTRY0( STYLE
, LEADER_TYPE
, XML_ATACTION_REMOVE
),
846 ENTRY0( STYLE
, LEADER_WIDTH
, XML_ATACTION_REMOVE
),
847 ENTRY0( STYLE
, LEADER_COLOR
, XML_ATACTION_REMOVE
),
848 ENTRY0( STYLE
, LEADER_TEXT_STYLE
, XML_ATACTION_REMOVE
),
849 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
852 // OASIS_LINENUMBERING_ACTIONS
853 static XMLTransformerActionInit aLineNumberingActionTable
[] =
855 ENTRY0( TEXT
, OFFSET
, XML_ATACTION_IN2INCH
),
856 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
857 XML_FAMILY_TYPE_TEXT
),
858 ENTRY1Q( TEXT
, COUNT_IN_TEXT_BOXES
, XML_ATACTION_RENAME
,
859 XML_NAMESPACE_TEXT
, XML_COUNT_IN_FLOATING_FRAMES
),
860 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
863 static XMLTransformerActionInit aFootnoteSepActionTable
[] =
865 ENTRY0( STYLE
, WIDTH
, XML_ATACTION_IN2INCH
),
866 ENTRY0( STYLE
, DISTANCE_BEFORE_SEP
, XML_ATACTION_IN2INCH
),
867 ENTRY0( STYLE
, DISTANCE_AFTER_SEP
, XML_ATACTION_IN2INCH
),
868 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
871 // OASIS_NOTES_ACTIONS (processed by special context)
872 static XMLTransformerActionInit aNotesActionTable
[] =
874 ENTRY0( TEXT
, NOTE_CLASS
, XML_ATACTION_STYLE_FAMILY
),
875 ENTRY1( TEXT
, CITATION_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
876 XML_FAMILY_TYPE_TEXT
),
877 ENTRY1( TEXT
, CITATION_BODY_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
878 XML_FAMILY_TYPE_TEXT
),
879 ENTRY1( TEXT
, DEFAULT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
880 XML_FAMILY_TYPE_PARAGRAPH
),
881 ENTRY1( TEXT
, MASTER_PAGE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
882 XML_FAMILY_TYPE_MASTER_PAGE
),
883 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
886 // OASIS_DROP_CAP_ACTIONS
887 static XMLTransformerActionInit aDropCapActionTable
[] =
889 ENTRY0( STYLE
, DISTANCE
, XML_ATACTION_IN2INCH
),
890 ENTRY1( STYLE
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
891 XML_FAMILY_TYPE_TEXT
),
892 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
895 static XMLTransformerActionInit aColumnsActionTable
[] =
897 ENTRY0( STYLE
, COLUMN_GAP
, XML_ATACTION_IN2INCH
),
898 ENTRY0( STYLE
, SPACE_BEFORE
, XML_ATACTION_REMOVE
),
899 ENTRY0( STYLE
, SPACE_AFTER
, XML_ATACTION_REMOVE
),
900 ENTRY1Q( FO
, START_INDENT
, XML_ATACTION_RENAME_IN2INCH
,
901 XML_NAMESPACE_FO
, XML_MARGIN_LEFT
),
902 ENTRY1Q( FO
, END_INDENT
, XML_ATACTION_RENAME_IN2INCH
,
903 XML_NAMESPACE_FO
, XML_MARGIN_RIGHT
),
904 ENTRY0( STYLE
, WIDTH
, XML_ATACTION_IN2INCH
),
905 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
908 // OASIS_TEXT_VALUE_TYPE_ACTIONS
909 static XMLTransformerActionInit aTextValueTypeActionTable
[] =
911 ENTRY1Q( OFFICE
, VALUE_TYPE
, XML_ATACTION_RENAME
,
912 XML_NAMESPACE_TEXT
, XML_VALUE_TYPE
),
913 ENTRY1Q( OFFICE
, VALUE
, XML_ATACTION_RENAME
,
914 XML_NAMESPACE_TEXT
, XML_VALUE
),
915 ENTRY1Q( OFFICE
, CURRENCY
, XML_ATACTION_RENAME
,
916 XML_NAMESPACE_TEXT
, XML_CURRENCY
),
917 ENTRY1Q( OFFICE
, DATE_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
918 XML_NAMESPACE_TEXT
, XML_DATE_VALUE
),
919 ENTRY1Q( OFFICE
, TIME_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
920 XML_NAMESPACE_TEXT
, XML_TIME_VALUE
),
921 ENTRY1Q( OFFICE
, BOOLEAN_VALUE
, XML_ATACTION_RENAME
,
922 XML_NAMESPACE_TEXT
, XML_BOOLEAN_VALUE
),
923 ENTRY1Q( OFFICE
, STRING_VALUE
, XML_ATACTION_RENAME
,
924 XML_NAMESPACE_TEXT
, XML_STRING_VALUE
),
925 ENTRY0( TEXT
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
926 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
929 // OASIS_TABLE_VALUE_TYPE_ACTIONS
930 static XMLTransformerActionInit aTableValueTypeActionTable
[] =
932 ENTRY1Q( OFFICE
, VALUE_TYPE
, XML_ATACTION_RENAME
,
933 XML_NAMESPACE_TABLE
, XML_VALUE_TYPE
),
934 ENTRY1Q( OFFICE
, VALUE
, XML_ATACTION_RENAME
,
935 XML_NAMESPACE_TABLE
, XML_VALUE
),
936 ENTRY1Q( OFFICE
, CURRENCY
, XML_ATACTION_RENAME
,
937 XML_NAMESPACE_TABLE
, XML_CURRENCY
),
938 ENTRY1Q( OFFICE
, DATE_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
939 XML_NAMESPACE_TABLE
, XML_DATE_VALUE
),
940 ENTRY1Q( OFFICE
, TIME_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
941 XML_NAMESPACE_TABLE
, XML_TIME_VALUE
),
942 ENTRY1Q( OFFICE
, BOOLEAN_VALUE
, XML_ATACTION_RENAME
,
943 XML_NAMESPACE_TABLE
, XML_BOOLEAN_VALUE
),
944 ENTRY1Q( OFFICE
, STRING_VALUE
, XML_ATACTION_RENAME
,
945 XML_NAMESPACE_TABLE
, XML_STRING_VALUE
),
946 ENTRY1( TABLE
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
947 XML_FAMILY_TYPE_TABLE_CELL
),
948 ENTRY0( TABLE
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
949 ENTRY1Q( TABLE
, CONTENT_VALIDATION_NAME
, XML_ATACTION_RENAME
,
950 XML_NAMESPACE_TABLE
, XML_VALIDATION_NAME
),
951 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
954 // action table for OASIS_ANNOTATION_ACTIONS
955 static XMLTransformerActionInit aAnnotationActionTable
[] =
957 ENTRY1Q( DC
, CREATOR
, XML_ATACTION_MOVE_FROM_ELEM
,
958 XML_NAMESPACE_OFFICE
, XML_AUTHOR
),
959 ENTRY1Q( DC
, DATE
, XML_ATACTION_MOVE_FROM_ELEM_RNG2ISO_DATETIME
,
960 XML_NAMESPACE_OFFICE
, XML_CREATE_DATE
),
961 ENTRY1Q( META
, DATE_STRING
, XML_ATACTION_MOVE_FROM_ELEM
,
962 XML_NAMESPACE_OFFICE
, XML_CREATE_DATE_STRING
),
963 ENTRY0( TEXT
, P
, XML_ETACTION_EXTRACT_CHARACTERS
),
964 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
967 // action table for OASIS_CHANGE_INFO_ACTIONS
968 static XMLTransformerActionInit aChangeInfoActionTable
[] =
970 ENTRY1Q( DC
, CREATOR
, XML_ATACTION_MOVE_FROM_ELEM
,
971 XML_NAMESPACE_OFFICE
, XML_CHG_AUTHOR
),
972 ENTRY1Q( DC
, DATE
, XML_ATACTION_MOVE_FROM_ELEM_RNG2ISO_DATETIME
,
973 XML_NAMESPACE_OFFICE
, XML_CHG_DATE_TIME
),
974 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
977 // OASIS_BACKGROUND_IMAGE_ACTIONS
978 static XMLTransformerActionInit aBackgroundImageActionTable
[] =
980 ENTRY1Q( DRAW
, OPACITY
, XML_ATACTION_RENAME_NEG_PERCENT
,
981 XML_NAMESPACE_DRAW
, XML_TRANSPARENCY
),
982 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_True
),
983 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
986 // OASIS_DDE_CONNECTION_DECL
987 static XMLTransformerActionInit aDDEConnectionDeclActionTable
[] =
989 ENTRY1Q( OFFICE
, NAME
, XML_ATACTION_RENAME
,
990 XML_NAMESPACE_TEXT
, XML_NAME
),
991 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
995 // OASIS_FORM_CONTROL_ACTIONS
996 static XMLTransformerActionInit aFormControlActionTable
[] =
998 ENTRY0( FORM
, NAME
, XML_ATACTION_MOVE_TO_ELEM
),
999 ENTRY2QN( FORM
, CONTROL_IMPLEMENTATION
,
1000 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,
1001 XML_NAMESPACE_FORM
, XML_SERVICE_NAME
,
1002 XML_NAMESPACE_OOO
),
1003 ENTRY0( FORM
, ID
, XML_ATACTION_MOVE_TO_ELEM
),
1004 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_False
),
1005 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1008 // OASIS_FORM_COLUMN_ACTIONS
1009 static XMLTransformerActionInit aFormColumnActionTable
[] =
1011 ENTRY1Q( FORM
, TEXT_STYLE_NAME
, XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF
,
1012 XML_NAMESPACE_FORM
, XML_COLUMN_STYLE_NAME
),
1013 ENTRY2QN( FORM
, CONTROL_IMPLEMENTATION
,
1014 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,
1015 XML_NAMESPACE_FORM
, XML_SERVICE_NAME
,
1016 XML_NAMESPACE_OOO
),
1017 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1020 // OASIS_FORM_PROP_ACTIONS
1021 static XMLTransformerActionInit aFormPropActionTable
[] =
1023 ENTRY1Q( OFFICE
, VALUE_TYPE
, XML_ATACTION_RENAME
,
1024 XML_NAMESPACE_FORM
, XML_PROPERTY_TYPE
),
1025 ENTRY0( OFFICE
, VALUE
, XML_ATACTION_REMOVE
),
1026 ENTRY0( OFFICE
, STRING_VALUE
, XML_ATACTION_REMOVE
),
1027 ENTRY0( OFFICE
, BOOLEAN_VALUE
, XML_ATACTION_REMOVE
),
1028 ENTRY0( OFFICE
, DATE_VALUE
, XML_ATACTION_REMOVE
),
1029 ENTRY0( OFFICE
, TIME_VALUE
, XML_ATACTION_REMOVE
),
1030 ENTRY0( OFFICE
, CURRENCY
, XML_ATACTION_REMOVE
),
1031 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1034 // OASIS_XLINK_ACTIONS
1035 static XMLTransformerActionInit aXLinkActionTable
[] =
1037 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_False
),
1038 ENTRY0( TABLE
, REFRESH_DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
1039 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1042 // OASIS_CONFIG_ITEM_SET_ACTIONS
1043 static XMLTransformerActionInit aConfigItemSetActionTable
[] =
1045 ENTRY1( CONFIG
, NAME
, XML_ATACTION_REMOVE_NAMESPACE_PREFIX
,
1046 XML_NAMESPACE_OOO
),
1047 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1050 // OASIS_FORMULA_ACTIONS
1051 static XMLTransformerActionInit aFormulaActionTable
[] =
1053 ENTRY0( TEXT
, CONDITION
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1054 ENTRY0( TEXT
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1055 ENTRY0( TABLE
, CONDITION
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1056 ENTRY0( TABLE
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1057 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1060 // OASIS_CONTENT_VALIDATION_ACTIONS
1061 static XMLTransformerActionInit aContentValidationActionTable
[] =
1063 ENTRY0( TABLE
, CONDITION
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1064 ENTRY0( TABLE
, DISPLAY_LIST
, XML_ATACTION_REMOVE
),
1065 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1068 // OASIS_DDE_CONV_MODE_ACTIONS
1069 static XMLTransformerActionInit aDDEConvModeActionTable
[] =
1071 ENTRY1Q( TABLE
, KEEP_TEXT
, XML_ATACTION_RENAME
,
1072 XML_NAMESPACE_TABLE
, XML_LET_TEXT
),
1073 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1076 // OASIS_DATAPILOT_MEMBER_ACTIONS
1077 static XMLTransformerActionInit aDataPilotMemberActionTable
[] =
1079 ENTRY1Q( TABLE
, SHOW_DETAILS
, XML_ATACTION_RENAME
,
1080 XML_NAMESPACE_TABLE
, XML_DISPLAY_DETAILS
),
1081 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1084 // OASIS_DATAPILOT_LEVEL_ACTIONS
1085 static XMLTransformerActionInit aDataPilotLevelActionTable
[] =
1087 ENTRY1Q( TABLE
, SHOW_EMPTY
, XML_ATACTION_RENAME
,
1088 XML_NAMESPACE_TABLE
, XML_DISPLAY_EMPTY
),
1089 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1092 // OASIS_SOURCE_SERVICE_ACTIONS
1093 static XMLTransformerActionInit aSourceServiceActionTable
[] =
1095 ENTRY1Q( TABLE
, USER_NAME
, XML_ATACTION_RENAME
,
1096 XML_NAMESPACE_TABLE
, XML_USERNAME
),
1097 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1100 // OASIS_CHART_ACTIONS
1101 static XMLTransformerActionInit aChartActionTable
[] =
1103 ENTRY0( CHART
, CLASS
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1104 ENTRY1( DRAW
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
1105 XML_FAMILY_TYPE_GRAPHIC
),
1106 ENTRY0( SVG
, WIDTH
, XML_ATACTION_IN2INCH
),
1107 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_IN2INCH
),
1108 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1111 // OASIS_FORM_ACTIONS
1112 static XMLTransformerActionInit aFormActionTable
[] =
1114 ENTRY2QN( FORM
, CONTROL_IMPLEMENTATION
,
1115 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,
1116 XML_NAMESPACE_FORM
, XML_SERVICE_NAME
,
1117 XML_NAMESPACE_OOO
),
1118 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_False
),
1119 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1122 // OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
1123 static XMLTransformerActionInit aAlphabeticalIndexMarkActionTable
[] =
1125 ENTRY1Q( TEXT
, MAIN_ENTRY
, XML_ATACTION_RENAME
,
1126 XML_NAMESPACE_TEXT
, XML_MAIN_ETRY
),
1127 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1130 // OASIS_DRAW_AREA_POLYGON_ACTIONS (to be added to OASIS_SHAPE_ACTIONS)
1131 static XMLTransformerActionInit aDrawAreaPolygonActionTable
[] =
1133 ENTRY1Q( DRAW
, POINTS
, XML_ATACTION_RENAME
,
1134 XML_NAMESPACE_SVG
, XML_POINTS
),
1135 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1138 // OASIS_SCRIPT_ACTIONS
1139 static XMLTransformerActionInit aScriptActionTable
[] =
1141 ENTRY1( SCRIPT
, LANGUAGE
, XML_ATACTION_REMOVE_NAMESPACE_PREFIX
, XML_NAMESPACE_OOO
),
1142 ENTRY1Q( OOO
, NAME
, XML_ATACTION_RENAME
, XML_NAMESPACE_SCRIPT
, XML_NAME
),
1143 ENTRY1Q( OOO
, READONLY
, XML_ATACTION_RENAME
, XML_NAMESPACE_SCRIPT
, XML_READONLY
),
1144 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1147 // OASIS_DATETIME_ACTIONS
1148 static XMLTransformerActionInit aDateTimeActionTable
[] =
1150 ENTRY0( TEXT
, DATE_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1151 ENTRY0( TEXT
, TIME_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1152 ENTRY0( TEXT
, DATE_ADJUST
, XML_ATACTION_RNG2ISO_DATETIME
),
1153 ENTRY0( TEXT
, TIME_ADJUST
, XML_ATACTION_RNG2ISO_DATETIME
),
1154 ENTRY0( TEXT
, DURATION
, XML_ATACTION_RNG2ISO_DATETIME
),
1155 ENTRY0( OFFICE
, DATE_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1156 ENTRY0( OFFICE
, TIME_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1157 ENTRY0( FORM
, VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1158 ENTRY0( FORM
, CURRENT_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1159 ENTRY0( TABLE
, DATE_START
, XML_ATACTION_RNG2ISO_DATETIME
),
1160 ENTRY0( TABLE
, DATE_END
, XML_ATACTION_RNG2ISO_DATETIME
),
1161 ENTRY0( TABLE
, REFRESH_DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
1162 ENTRY0( PRESENTATION
, DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
1163 ENTRY0( PRESENTATION
, PAUSE
, XML_ATACTION_RNG2ISO_DATETIME
),
1164 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1167 static XMLTokenEnum aTokenMap
[] =
1169 XML_NONE
, XML_SOLID
, XML_DOTTED
, XML_DASH
, XML_LONG_DASH
, XML_DOT_DASH
,
1170 XML_DOT_DOT_DASH
, XML_WAVE
, XML_SMALL_WAVE
, XML_TOKEN_END
1173 // -----------------------------------------------------------------------------
1175 class XMLTableTransformerContext_Impl
: public XMLTransformerContext
1177 ::rtl::OUString m_aElemQName
;
1182 XMLTableTransformerContext_Impl( XMLTransformerBase
& rTransformer
,
1183 const ::rtl::OUString
& rQName
);
1185 virtual ~XMLTableTransformerContext_Impl();
1187 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
1188 virtual void EndElement();
1191 TYPEINIT1( XMLTableTransformerContext_Impl
, XMLTransformerContext
);
1193 XMLTableTransformerContext_Impl::XMLTableTransformerContext_Impl(
1194 XMLTransformerBase
& rImp
,
1195 const OUString
& rQName
) :
1196 XMLTransformerContext( rImp
, rQName
),
1197 m_aElemQName( rQName
)
1201 XMLTableTransformerContext_Impl::~XMLTableTransformerContext_Impl()
1205 void XMLTableTransformerContext_Impl::StartElement(
1206 const Reference
< XAttributeList
>& rAttrList
)
1208 Reference
< XAttributeList
> xAttrList( rAttrList
);
1210 XMLMutableAttributeList
*pMutableAttrList
= 0;
1213 sal_Int16 nAttrCount
= xAttrList
.is() ? xAttrList
->getLength() : 0;
1214 for( sal_Int16 i
=0; i
< nAttrCount
; i
++ )
1216 const OUString
& rAttrName
= xAttrList
->getNameByIndex( i
);
1217 OUString aLocalName
;
1218 sal_uInt16 nPrefix
=
1219 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName
,
1221 if( XML_NAMESPACE_TABLE
== nPrefix
)
1223 if ( IsXMLToken( aLocalName
, XML_IS_SUB_TABLE
) )
1225 const OUString
& rValue
= xAttrList
->getValueByIndex( i
);
1226 if( IsXMLToken( rValue
, XML_TRUE
) )
1228 m_aElemQName
= GetTransformer().GetNamespaceMap().GetQNameByKey(
1229 XML_NAMESPACE_TABLE
,
1230 ::xmloff::token::GetXMLToken( XML_SUB_TABLE
) );
1231 if ( !pMutableAttrList
)
1234 new XMLMutableAttributeList( xAttrList
);
1235 xAttrList
= pMutableAttrList
;
1237 pMutableAttrList
->RemoveAttributeByIndex( i
);
1239 // OD 2005-07-05 #i50521# - no break here for savety reason.
1241 // --> OD 2005-01-10 #i40011#, #i40015#
1242 // - convert attribute table:style-name for <table:table>
1243 else if ( IsXMLToken( aLocalName
, XML_STYLE_NAME
) )
1245 const OUString
& rValue
= xAttrList
->getValueByIndex( i
);
1246 OUString
aAttrValue( rValue
);
1247 if( GetTransformer().DecodeStyleName(aAttrValue
) )
1249 if ( !pMutableAttrList
)
1252 new XMLMutableAttributeList( xAttrList
);
1253 xAttrList
= pMutableAttrList
;
1255 pMutableAttrList
->SetValueByIndex( i
, aAttrValue
);
1259 else if( IsXMLToken( aLocalName
, XML_PRINT
) )
1261 if ( !pMutableAttrList
)
1264 new XMLMutableAttributeList( xAttrList
);
1265 xAttrList
= pMutableAttrList
;
1267 pMutableAttrList
->RemoveAttributeByIndex( i
);
1272 GetTransformer().GetDocHandler()->startElement( m_aElemQName
, xAttrList
);
1275 void XMLTableTransformerContext_Impl::EndElement()
1277 GetTransformer().GetDocHandler()->endElement( m_aElemQName
);
1280 // -----------------------------------------------------------------------------
1282 class XMLBodyOASISTransformerContext_Impl
: public XMLTransformerContext
1284 sal_Bool m_bFirstChild
;
1289 XMLBodyOASISTransformerContext_Impl( XMLTransformerBase
& rTransformer
,
1290 const ::rtl::OUString
& rQName
);
1292 virtual ~XMLBodyOASISTransformerContext_Impl();
1294 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
1296 virtual XMLTransformerContext
*CreateChildContext( sal_uInt16 nPrefix
,
1297 const ::rtl::OUString
& rLocalName
,
1298 const ::rtl::OUString
& rQName
,
1299 const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
1300 virtual void EndElement();
1303 TYPEINIT1( XMLBodyOASISTransformerContext_Impl
, XMLTransformerContext
);
1305 XMLBodyOASISTransformerContext_Impl::XMLBodyOASISTransformerContext_Impl(
1306 XMLTransformerBase
& rImp
,
1307 const OUString
& rQName
) :
1308 XMLTransformerContext( rImp
, rQName
),
1309 m_bFirstChild( sal_False
)
1313 XMLBodyOASISTransformerContext_Impl::~XMLBodyOASISTransformerContext_Impl()
1317 void XMLBodyOASISTransformerContext_Impl::StartElement(
1318 const Reference
< XAttributeList
>& )
1322 XMLTransformerContext
* XMLBodyOASISTransformerContext_Impl::CreateChildContext( sal_uInt16 nPrefix
,
1323 const ::rtl::OUString
& rLocalName
,
1324 const ::rtl::OUString
& rQName
,
1325 const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
)
1329 m_bFirstChild
= sal_True
;
1330 XMLTransformerContext::StartElement(xAttrList
);
1333 return XMLTransformerContext::CreateChildContext(nPrefix
, rLocalName
, rQName
, xAttrList
);
1336 void XMLBodyOASISTransformerContext_Impl::EndElement()
1339 XMLTransformerContext::StartElement(Reference
< XAttributeList
>());
1341 XMLTransformerContext::EndElement();
1344 //-----------------------------------------------------------------------------
1346 class XMLTabStopOASISTContext_Impl
: public XMLPersElemContentTContext
1351 XMLTabStopOASISTContext_Impl( XMLTransformerBase
& rTransformer
,
1352 const ::rtl::OUString
& rQName
);
1354 virtual ~XMLTabStopOASISTContext_Impl();
1356 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
1359 TYPEINIT1( XMLTabStopOASISTContext_Impl
, XMLPersElemContentTContext
);
1361 XMLTabStopOASISTContext_Impl::XMLTabStopOASISTContext_Impl(
1362 XMLTransformerBase
& rImp
,
1363 const OUString
& rQName
) :
1364 XMLPersElemContentTContext( rImp
, rQName
)
1368 XMLTabStopOASISTContext_Impl::~XMLTabStopOASISTContext_Impl()
1372 void XMLTabStopOASISTContext_Impl::StartElement(
1373 const Reference
< XAttributeList
>& rAttrList
)
1375 XMLTransformerActions
*pActions
=
1376 GetTransformer().GetUserDefinedActions( OASIS_TAB_STOP_ACTIONS
);
1377 OSL_ENSURE( pActions
, "go no actions" );
1379 sal_Unicode cStyleLeaderChar
= 0;
1380 sal_Int16 nLeaderText
= -1;
1381 Reference
< XAttributeList
> xAttrList( rAttrList
);
1382 XMLMutableAttributeList
*pMutableAttrList
= 0;
1383 sal_Int16 nAttrCount
= xAttrList
.is() ? xAttrList
->getLength() : 0;
1384 for( sal_Int16 i
=0; i
< nAttrCount
; i
++ )
1386 const OUString
& rAttrName
= xAttrList
->getNameByIndex( i
);
1387 OUString aLocalName
;
1388 sal_uInt16 nPrefix
=
1389 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName
,
1391 XMLTransformerActions::key_type
aKey( nPrefix
, aLocalName
);
1392 XMLTransformerActions::const_iterator aIter
=
1393 pActions
->find( aKey
);
1394 if( !(aIter
== pActions
->end() ) )
1396 if( !pMutableAttrList
)
1399 new XMLMutableAttributeList( xAttrList
);
1400 xAttrList
= pMutableAttrList
;
1402 const OUString
& rAttrValue
= xAttrList
->getValueByIndex( i
);
1403 switch( (*aIter
).second
.m_nActionType
)
1405 case XML_ATACTION_REMOVE
:
1406 if( IsXMLToken( aLocalName
, XML_LEADER_STYLE
) )
1408 if( IsXMLToken( rAttrValue
, XML_NONE
) )
1409 cStyleLeaderChar
= ' ';
1410 else if( IsXMLToken( rAttrValue
, XML_DOTTED
) )
1411 cStyleLeaderChar
= '.';
1413 cStyleLeaderChar
= 0;
1414 pMutableAttrList
->RemoveAttributeByIndex( i
);
1419 case XML_ATACTION_RENAME
:
1421 OUString
aNewAttrQName(
1422 GetTransformer().GetNamespaceMap().GetQNameByKey(
1423 (*aIter
).second
.GetQNamePrefixFromParam1(),
1424 ::xmloff::token::GetXMLToken(
1425 (*aIter
).second
.GetQNameTokenFromParam1()) ) );
1426 pMutableAttrList
->RenameAttributeByIndex( i
,
1429 if( IsXMLToken( aLocalName
, XML_LEADER_TEXT
) )
1431 if( rAttrValue
.getLength() > 1 )
1433 OUString
aAttrValue( rAttrValue
.copy( 0, 1 ) );
1434 pMutableAttrList
->SetValueByIndex( i
, aAttrValue
);
1439 case XML_ATACTION_IN2INCH
:
1441 OUString
aAttrValue( rAttrValue
);
1442 if( XMLTransformerBase::ReplaceSingleInWithInch(
1444 pMutableAttrList
->SetValueByIndex( i
, aAttrValue
);
1448 OSL_ENSURE( !this, "unknown action" );
1454 if( cStyleLeaderChar
&& ' ' != cStyleLeaderChar
)
1456 if( nLeaderText
!= -1 )
1458 OUString
aNewAttrQName(
1459 GetTransformer().GetNamespaceMap().GetQNameByKey(
1460 XML_NAMESPACE_STYLE
,
1461 ::xmloff::token::GetXMLToken( XML_LEADER_CHAR
) ) );
1462 pMutableAttrList
->AddAttribute( aNewAttrQName
,
1463 OUString::valueOf( cStyleLeaderChar
) );
1468 if( nLeaderText
!= -1 )
1469 pMutableAttrList
->RemoveAttributeByIndex( nLeaderText
);
1472 XMLPersElemContentTContext::StartElement( xAttrList
);
1475 // -----------------------------------------------------------------------------
1477 class XMLConfigItemTContext_Impl
: public XMLTransformerContext
1479 ::rtl::OUString m_aContent
;
1480 sal_Bool m_bIsRedlineProtectionKey
;
1481 sal_Bool m_bIsCursorX
;
1482 sal_Bool m_bIsCursorY
;
1488 XMLConfigItemTContext_Impl( XMLTransformerBase
& rTransformer
,
1489 const ::rtl::OUString
& rQName
);
1491 virtual ~XMLConfigItemTContext_Impl();
1493 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
1494 virtual void EndElement();
1496 virtual void Characters( const ::rtl::OUString
& rChars
);
1499 TYPEINIT1( XMLConfigItemTContext_Impl
, XMLTransformerContext
);
1501 XMLConfigItemTContext_Impl::XMLConfigItemTContext_Impl(
1502 XMLTransformerBase
& rImp
,
1503 const OUString
& rQName
) :
1504 XMLTransformerContext( rImp
, rQName
),
1505 m_bIsRedlineProtectionKey( sal_False
),
1506 m_bIsCursorX( sal_False
),
1507 m_bIsCursorY( sal_False
)
1511 XMLConfigItemTContext_Impl::~XMLConfigItemTContext_Impl()
1515 void XMLConfigItemTContext_Impl::StartElement(
1516 const Reference
< XAttributeList
>& rAttrList
)
1518 Reference
< XAttributeList
> xAttrList( rAttrList
);
1520 sal_Int16 nAttrCount
= xAttrList
.is() ? xAttrList
->getLength() : 0;
1521 for( sal_Int16 i
=0; i
< nAttrCount
; i
++ )
1523 const OUString
& rAttrName
= xAttrList
->getNameByIndex( i
);
1524 OUString aLocalName
;
1525 sal_uInt16 nPrefix
=
1526 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName
,
1528 if( XML_NAMESPACE_CONFIG
== nPrefix
)
1530 if ( IsXMLToken( aLocalName
, XML_NAME
) )
1532 const OUString
& rValue
= xAttrList
->getValueByIndex( i
);
1533 const sal_Char sRedlineProtectionKey
[] = "RedlineProtectionKey";
1534 const sal_Char sCursorX
[] = "CursorPositionX";
1535 const sal_Char sCursorY
[] = "CursorPositionY";
1536 if( rValue
.equalsAsciiL( sRedlineProtectionKey
, sizeof(sRedlineProtectionKey
)-1 ) )
1537 m_bIsRedlineProtectionKey
= sal_True
;
1538 else if( rValue
.equalsAsciiL( sCursorX
, sizeof(sCursorX
)-1 ) )
1539 m_bIsCursorX
= sal_True
;
1540 else if( rValue
.equalsAsciiL( sCursorY
, sizeof(sCursorY
)-1 ) )
1541 m_bIsCursorY
= sal_True
;
1548 XMLTransformerContext::StartElement( xAttrList
);
1551 void XMLConfigItemTContext_Impl::Characters( const ::rtl::OUString
& rChars
)
1553 rtl::OUString
sChars(rChars
);
1554 if (m_bIsRedlineProtectionKey
)
1555 m_aContent
+= rChars
;
1556 else if (m_bIsCursorX
|| m_bIsCursorY
)
1558 sal_Int32 nPos
= rChars
.toInt32();
1559 if (m_bIsCursorX
&& nPos
> 255)
1561 else if (m_bIsCursorY
&& nPos
> 31999)
1564 sChars
= ::rtl::OUString::valueOf(nPos
);
1567 XMLTransformerContext::Characters( sChars
);
1570 void XMLConfigItemTContext_Impl::EndElement()
1573 if( m_bIsRedlineProtectionKey
)
1575 const Reference
< XPropertySet
> rPropSet
=
1576 GetTransformer().GetPropertySet();
1579 const sal_Char sRedlineProtectionKey
[] = "RedlineProtectionKey";
1580 OUString
aPropName(RTL_CONSTASCII_USTRINGPARAM(sRedlineProtectionKey
));
1581 Reference
< XPropertySetInfo
> xPropSetInfo(
1582 rPropSet
->getPropertySetInfo() );
1583 if( xPropSetInfo
.is() &&
1584 xPropSetInfo
->hasPropertyByName( aPropName
) )
1586 Sequence
< sal_Int8
> aKey
;
1587 SvXMLUnitConverter::decodeBase64( aKey
, m_aContent
);
1588 rPropSet
->setPropertyValue( aPropName
, makeAny( aKey
) );
1592 XMLTransformerContext::EndElement();
1595 // -----------------------------------------------------------------------------
1597 class XMLTrackedChangesOASISTContext_Impl
: public XMLTransformerContext
1599 ::rtl::OUString m_aAttrQName
;
1605 XMLTrackedChangesOASISTContext_Impl( XMLTransformerBase
& rTransformer
,
1606 const ::rtl::OUString
& rQName
,
1608 XMLTokenEnum eToken
);
1610 virtual ~XMLTrackedChangesOASISTContext_Impl();
1612 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
1615 TYPEINIT1( XMLTrackedChangesOASISTContext_Impl
, XMLTransformerContext
);
1617 XMLTrackedChangesOASISTContext_Impl::XMLTrackedChangesOASISTContext_Impl(
1618 XMLTransformerBase
& rImp
,
1619 const OUString
& rQName
,
1621 XMLTokenEnum eToken
) :
1622 XMLTransformerContext( rImp
, rQName
),
1623 m_aAttrQName( rImp
.GetNamespaceMap().GetQNameByKey( nPrefix
,
1624 GetXMLToken(eToken
)) )
1628 XMLTrackedChangesOASISTContext_Impl::~XMLTrackedChangesOASISTContext_Impl()
1632 void XMLTrackedChangesOASISTContext_Impl::StartElement(
1633 const Reference
< XAttributeList
>& rAttrList
)
1635 Reference
< XAttributeList
> xAttrList( rAttrList
);
1636 const Reference
< XPropertySet
> rPropSet
=
1637 GetTransformer().GetPropertySet();
1640 const sal_Char sRedlineProtectionKey
[] = "RedlineProtectionKey";
1641 OUString
aPropName(RTL_CONSTASCII_USTRINGPARAM(sRedlineProtectionKey
));
1642 Reference
< XPropertySetInfo
> xPropSetInfo(
1643 rPropSet
->getPropertySetInfo() );
1644 if( xPropSetInfo
.is() &&
1645 xPropSetInfo
->hasPropertyByName( aPropName
) )
1647 Any aAny
= rPropSet
->getPropertyValue( aPropName
);
1648 Sequence
< sal_Int8
> aKey
;
1650 if( aKey
.getLength() )
1652 OUStringBuffer aBuffer
;
1653 SvXMLUnitConverter::encodeBase64( aBuffer
, aKey
);
1654 XMLMutableAttributeList
*pMutableAttrList
=
1655 new XMLMutableAttributeList( xAttrList
);
1656 xAttrList
= pMutableAttrList
;
1657 pMutableAttrList
->AddAttribute( m_aAttrQName
,
1658 aBuffer
.makeStringAndClear() );
1662 XMLTransformerContext::StartElement( xAttrList
);
1665 // -----------------------------------------------------------------------------
1667 XMLTransformerContext
*Oasis2OOoTransformer::CreateUserDefinedContext(
1668 const TransformerAction_Impl
& rAction
,
1669 const OUString
& rQName
,
1670 sal_Bool bPersistent
)
1672 switch( rAction
.m_nActionType
)
1674 case XML_ETACTION_META
:
1675 return new XMLMetaTransformerContext( *this, rQName
);
1676 case XML_ETACTION_DOCUMENT
:
1677 return new XMLDocumentTransformerContext( *this, rQName
);
1678 case XML_ETACTION_BODY
:
1679 return new XMLBodyOASISTransformerContext_Impl( *this, rQName
);
1680 case XML_ETACTION_NOTES
:
1681 return new XMLNotesTransformerContext( *this, rQName
,
1682 static_cast< XMLTokenEnum
>( rAction
.m_nParam1
), bPersistent
);
1683 case XML_ETACTION_TABLE
:
1684 return new XMLTableTransformerContext_Impl( *this, rQName
);
1685 case XML_ETACTION_STYLE
:
1686 return new XMLStyleOASISTContext( *this, rQName
, bPersistent
);
1687 case XML_ETACTION_STYLE_RENAME
:
1688 return new XMLStyleOASISTContext( *this, rQName
,
1689 rAction
.GetQNamePrefixFromParam1(),
1690 rAction
.GetQNameTokenFromParam1(), bPersistent
);
1691 case XML_ETACTION_FRAME
:
1692 return new XMLFrameOASISTransformerContext( *this, rQName
);
1693 case XML_ETACTION_EVENT
:
1694 return new XMLEventOASISTransformerContext( *this, rQName
);
1695 case XML_ETACTION_DLG
:
1696 return new XMLDlgOASISTransformerContext( *this, rQName
);
1697 case XML_ETACTION_TAB_STOP
:
1698 return new XMLTabStopOASISTContext_Impl( *this, rQName
);
1699 case XML_ETACTION_FORM_CONTROL
:
1701 const XMLTransformerContext
*pCurrent
= GetCurrentContext();
1702 return new XMLControlOASISTransformerContext( *this, rQName
,
1703 pCurrent
? pCurrent
->HasQName( XML_NAMESPACE_FORM
,
1704 XML_FORM
) : sal_False
);
1706 case XML_ETACTION_FORM_PROPERTY
:
1707 return new XMLFormPropOASISTransformerContext( *this, rQName
,
1708 static_cast< XMLTokenEnum
>( rAction
.m_nParam1
) );
1709 case XML_ETACTION_CHART
:
1710 return new XMLChartOASISTransformerContext( *this, rQName
);
1711 case XML_ETACTION_CONFIG_ITEM
:
1712 return new XMLConfigItemTContext_Impl( *this, rQName
);
1713 case XML_ETACTION_TRACKED_CHANGES
:
1714 return new XMLTrackedChangesOASISTContext_Impl( *this, rQName
,
1715 rAction
.GetQNamePrefixFromParam1(),
1716 rAction
.GetQNameTokenFromParam1() );
1717 case XML_ETACTION_CHART_PLOT_AREA
:
1718 return new XMLChartPlotAreaOASISTContext( *this, rQName
);
1720 OSL_ENSURE( !this, "no user defined context found!" );
1724 // default is copying
1725 return new XMLTransformerContext( *this, rQName
);
1728 XMLTransformerActions
*Oasis2OOoTransformer::GetUserDefinedActions(
1731 XMLTransformerActions
*pActions
= 0;
1732 if( n
< MAX_OASIS_ACTIONS
)
1734 if( !m_aActions
[n
] )
1736 if( n
<MAX_OASIS_PROP_ACTIONS
)
1739 XMLStyleOASISTContext::CreateTransformerActions( n
);
1743 case OASIS_STYLE_ACTIONS
:
1744 m_aActions
[OASIS_STYLE_ACTIONS
] =
1745 new XMLTransformerActions( aStyleActionTable
);
1747 case OASIS_FONT_FACE_ACTIONS
:
1748 m_aActions
[OASIS_FONT_FACE_ACTIONS
] =
1749 new XMLTransformerActions( aFontFaceActionTable
);
1751 case OASIS_SHAPE_ACTIONS
:
1752 m_aActions
[OASIS_SHAPE_ACTIONS
] =
1753 new XMLTransformerActions( aShapeActionTable
);
1755 case OASIS_CONNECTOR_ACTIONS
:
1756 m_aActions
[OASIS_CONNECTOR_ACTIONS
] =
1757 new XMLTransformerActions( aConnectorActionTable
);
1759 case OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
:
1760 m_aActions
[OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
] =
1761 new XMLTransformerActions( aIndexEntryTabStopActionTable
);
1763 case OASIS_TAB_STOP_ACTIONS
:
1764 m_aActions
[OASIS_TAB_STOP_ACTIONS
] =
1765 new XMLTransformerActions( aTabStopActionTable
);
1767 case OASIS_LINENUMBERING_ACTIONS
:
1768 m_aActions
[OASIS_LINENUMBERING_ACTIONS
] =
1769 new XMLTransformerActions( aLineNumberingActionTable
);
1771 case OASIS_FOOTNOTE_SEP_ACTIONS
:
1772 m_aActions
[OASIS_FOOTNOTE_SEP_ACTIONS
] =
1773 new XMLTransformerActions( aFootnoteSepActionTable
);
1775 case OASIS_DROP_CAP_ACTIONS
:
1776 m_aActions
[OASIS_DROP_CAP_ACTIONS
] =
1777 new XMLTransformerActions( aDropCapActionTable
);
1779 case OASIS_COLUMNS_ACTIONS
:
1780 m_aActions
[OASIS_COLUMNS_ACTIONS
] =
1781 new XMLTransformerActions( aColumnsActionTable
);
1783 case OASIS_TEXT_VALUE_TYPE_ACTIONS
:
1784 m_aActions
[OASIS_TEXT_VALUE_TYPE_ACTIONS
] =
1785 new XMLTransformerActions( aTextValueTypeActionTable
);
1787 case OASIS_TABLE_VALUE_TYPE_ACTIONS
:
1788 m_aActions
[OASIS_TABLE_VALUE_TYPE_ACTIONS
] =
1789 new XMLTransformerActions( aTableValueTypeActionTable
);
1791 case OASIS_PARA_ACTIONS
:
1792 m_aActions
[OASIS_PARA_ACTIONS
] =
1793 new XMLTransformerActions( aParaActionTable
);
1795 case OASIS_LIST_STYLE_REF_ACTIONS
:
1796 m_aActions
[OASIS_LIST_STYLE_REF_ACTIONS
] =
1797 new XMLTransformerActions( aListStyleRefActionTable
);
1799 case OASIS_TEXT_STYLE_REF_ACTIONS
:
1800 m_aActions
[OASIS_TEXT_STYLE_REF_ACTIONS
] =
1801 new XMLTransformerActions( aTextStyleRefActionTable
);
1803 case OASIS_PARA_STYLE_REF_ACTIONS
:
1804 m_aActions
[OASIS_PARA_STYLE_REF_ACTIONS
] =
1805 new XMLTransformerActions( aParaStyleRefActionTable
);
1807 case OASIS_MASTER_PAGE_REF_ACTIONS
:
1808 m_aActions
[OASIS_MASTER_PAGE_REF_ACTIONS
] =
1809 new XMLTransformerActions( aMasterPageRefActionTable
);
1811 case OASIS_MAP_STYLE_REF_ACTIONS
:
1812 m_aActions
[OASIS_MAP_STYLE_REF_ACTIONS
] =
1813 new XMLTransformerActions( aMapStyleRefActionTable
);
1815 case OASIS_MASTER_PAGE_ACTIONS
:
1816 m_aActions
[OASIS_MASTER_PAGE_ACTIONS
] =
1817 new XMLTransformerActions( aMasterPageActionTable
);
1819 case OASIS_NOTES_ACTIONS
:
1820 m_aActions
[OASIS_NOTES_ACTIONS
] =
1821 new XMLTransformerActions( aNotesActionTable
);
1823 case OASIS_ANNOTATION_ACTIONS
:
1824 m_aActions
[OASIS_ANNOTATION_ACTIONS
] =
1825 new XMLTransformerActions( aAnnotationActionTable
);
1827 case OASIS_CHANGE_INFO_ACTIONS
:
1828 m_aActions
[OASIS_CHANGE_INFO_ACTIONS
] =
1829 new XMLTransformerActions( aChangeInfoActionTable
);
1831 case OASIS_FRAME_ELEM_ACTIONS
:
1832 m_aActions
[OASIS_FRAME_ELEM_ACTIONS
] =
1833 new XMLTransformerActions( aFrameActionTable
);
1835 case OASIS_BACKGROUND_IMAGE_ACTIONS
:
1836 m_aActions
[OASIS_BACKGROUND_IMAGE_ACTIONS
] =
1837 new XMLTransformerActions( aBackgroundImageActionTable
);
1839 case OASIS_DDE_CONNECTION_DECL_ACTIONS
:
1840 m_aActions
[OASIS_DDE_CONNECTION_DECL_ACTIONS
] =
1841 new XMLTransformerActions( aDDEConnectionDeclActionTable
);
1843 case OASIS_EVENT_ACTIONS
:
1844 m_aActions
[OASIS_EVENT_ACTIONS
] =
1845 new XMLTransformerActions( aEventActionTable
);
1847 case OASIS_DLG_ACTIONS
:
1848 m_aActions
[OASIS_DLG_ACTIONS
] =
1849 new XMLTransformerActions( aDlgActionTable
);
1851 case OASIS_FORM_CONTROL_ACTIONS
:
1852 m_aActions
[OASIS_FORM_CONTROL_ACTIONS
] =
1853 new XMLTransformerActions( aFormControlActionTable
);
1855 case OASIS_FORM_COLUMN_ACTIONS
:
1856 m_aActions
[OASIS_FORM_COLUMN_ACTIONS
] =
1857 new XMLTransformerActions( aFormColumnActionTable
);
1859 case OASIS_FORM_PROP_ACTIONS
:
1860 m_aActions
[OASIS_FORM_PROP_ACTIONS
] =
1861 new XMLTransformerActions( aFormPropActionTable
);
1863 case OASIS_XLINK_ACTIONS
:
1864 m_aActions
[OASIS_XLINK_ACTIONS
] =
1865 new XMLTransformerActions( aXLinkActionTable
);
1867 case OASIS_CONFIG_ITEM_SET_ACTIONS
:
1868 m_aActions
[OASIS_CONFIG_ITEM_SET_ACTIONS
] =
1869 new XMLTransformerActions( aConfigItemSetActionTable
);
1871 case OASIS_FORMULA_ACTIONS
:
1872 m_aActions
[OASIS_FORMULA_ACTIONS
] =
1873 new XMLTransformerActions( aFormulaActionTable
);
1875 case OASIS_CHART_ACTIONS
:
1876 m_aActions
[OASIS_CHART_ACTIONS
] =
1877 new XMLTransformerActions( aChartActionTable
);
1879 case OASIS_FORM_ACTIONS
:
1880 m_aActions
[OASIS_FORM_ACTIONS
] =
1881 new XMLTransformerActions( aFormActionTable
);
1883 case OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
:
1884 m_aActions
[OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
] =
1885 new XMLTransformerActions(
1886 aAlphabeticalIndexMarkActionTable
);
1888 case OASIS_CONTENT_VALIDATION_ACTIONS
:
1889 m_aActions
[OASIS_CONTENT_VALIDATION_ACTIONS
] =
1890 new XMLTransformerActions( aContentValidationActionTable
);
1891 case OASIS_DDE_CONV_MODE_ACTIONS
:
1892 m_aActions
[OASIS_DDE_CONV_MODE_ACTIONS
] =
1893 new XMLTransformerActions( aDDEConvModeActionTable
);
1895 case OASIS_DATAPILOT_MEMBER_ACTIONS
:
1896 m_aActions
[OASIS_DATAPILOT_MEMBER_ACTIONS
] =
1897 new XMLTransformerActions( aDataPilotMemberActionTable
);
1899 case OASIS_DATAPILOT_LEVEL_ACTIONS
:
1900 m_aActions
[OASIS_DATAPILOT_LEVEL_ACTIONS
] =
1901 new XMLTransformerActions( aDataPilotLevelActionTable
);
1903 case OASIS_SOURCE_SERVICE_ACTIONS
:
1904 m_aActions
[OASIS_SOURCE_SERVICE_ACTIONS
] =
1905 new XMLTransformerActions( aSourceServiceActionTable
);
1907 case OASIS_DRAW_AREA_POLYGON_ACTIONS
:
1908 m_aActions
[OASIS_DRAW_AREA_POLYGON_ACTIONS
] =
1909 new XMLTransformerActions( aShapeActionTable
);
1910 m_aActions
[OASIS_DRAW_AREA_POLYGON_ACTIONS
]
1911 ->Add( aDrawAreaPolygonActionTable
);
1913 case OASIS_SCRIPT_ACTIONS
:
1914 m_aActions
[OASIS_SCRIPT_ACTIONS
] =
1915 new XMLTransformerActions( aScriptActionTable
);
1917 case OASIS_DATETIME_ACTIONS
:
1918 m_aActions
[OASIS_DATETIME_ACTIONS
] =
1919 new XMLTransformerActions( aDateTimeActionTable
);
1921 // --> OD 2005-01-10 #i40011#, #i40015#
1922 case OASIS_TABLE_STYLE_REF_ACTIONS
:
1923 m_aActions
[OASIS_TABLE_STYLE_REF_ACTIONS
] =
1924 new XMLTransformerActions( aTableStyleRefActionTable
);
1927 case OASIS_ANIMATION_ACTIONS
:
1928 m_aActions
[OASIS_ANIMATION_ACTIONS
] =
1929 new XMLTransformerActions( aAnimationActionTable
);
1933 pActions
= m_aActions
[n
];
1939 OUString
Oasis2OOoTransformer::GetEventName( const OUString
& rName
,
1942 if( bForm
&& !m_pFormEventMap
)
1944 XMLEventOASISTransformerContext::CreateFormEventMap();
1946 m_pEventMap
= XMLEventOASISTransformerContext::CreateEventMap();
1948 OUString aMacroName
;
1949 sal_uInt16 nPrefix
=
1950 GetNamespaceMap().GetKeyByAttrName( rName
, &aMacroName
);
1951 return XMLEventOASISTransformerContext::GetEventName(
1952 nPrefix
, aMacroName
, *m_pEventMap
,
1953 bForm
? m_pFormEventMap
: 0 );
1956 Oasis2OOoTransformer::Oasis2OOoTransformer() throw() :
1957 XMLTransformerBase( aActionTable
, aTokenMap
),
1959 m_pFormEventMap( 0 )
1961 GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE
), GetXMLToken(XML_N_OFFICE
), XML_NAMESPACE_OFFICE
);
1962 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE
), GetXMLToken(XML_N_OFFICE_OOO
), XML_NAMESPACE_OFFICE
);
1964 GetNamespaceMap().Add( GetXMLToken(XML_NP_META
), GetXMLToken(XML_N_META
), XML_NAMESPACE_META
);
1965 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META
), GetXMLToken(XML_N_META_OOO
), XML_NAMESPACE_META
);
1967 GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE
), GetXMLToken(XML_N_STYLE
), XML_NAMESPACE_STYLE
);
1968 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE
), GetXMLToken(XML_N_STYLE_OOO
), XML_NAMESPACE_STYLE
);
1970 GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER
), GetXMLToken(XML_N_NUMBER
), XML_NAMESPACE_NUMBER
);
1971 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER
), GetXMLToken(XML_N_NUMBER_OOO
), XML_NAMESPACE_NUMBER
);
1973 GetNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG
), GetXMLToken(XML_N_CONFIG
), XML_NAMESPACE_CONFIG
);
1974 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG
), GetXMLToken(XML_N_CONFIG_OOO
), XML_NAMESPACE_CONFIG
);
1976 GetNamespaceMap().Add( GetXMLToken(XML_NP_TEXT
), GetXMLToken(XML_N_TEXT
), XML_NAMESPACE_TEXT
);
1977 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT
), GetXMLToken(XML_N_TEXT_OOO
), XML_NAMESPACE_TEXT
);
1979 GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE
), GetXMLToken(XML_N_TABLE
), XML_NAMESPACE_TABLE
);
1980 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE
), GetXMLToken(XML_N_TABLE_OOO
), XML_NAMESPACE_TABLE
);
1982 GetNamespaceMap().Add( GetXMLToken(XML_NP_DRAW
), GetXMLToken(XML_N_DRAW
), XML_NAMESPACE_DRAW
);
1983 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW
), GetXMLToken(XML_N_DRAW_OOO
), XML_NAMESPACE_DRAW
);
1985 GetNamespaceMap().Add( GetXMLToken(XML_NP_DR3D
), GetXMLToken(XML_N_DR3D
), XML_NAMESPACE_DR3D
);
1986 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D
), GetXMLToken(XML_N_DR3D_OOO
), XML_NAMESPACE_DR3D
);
1988 GetNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION
), GetXMLToken(XML_N_PRESENTATION
), XML_NAMESPACE_PRESENTATION
);
1989 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION
), GetXMLToken(XML_N_PRESENTATION_OOO
), XML_NAMESPACE_PRESENTATION
);
1991 GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART
), GetXMLToken(XML_N_CHART
), XML_NAMESPACE_CHART
);
1992 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART
), GetXMLToken(XML_N_CHART_OOO
), XML_NAMESPACE_CHART
);
1994 GetNamespaceMap().Add( GetXMLToken(XML_NP_FORM
), GetXMLToken(XML_N_FORM
), XML_NAMESPACE_FORM
);
1995 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM
), GetXMLToken(XML_N_FORM_OOO
), XML_NAMESPACE_FORM
);
1997 GetNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT
), GetXMLToken(XML_N_SCRIPT
), XML_NAMESPACE_SCRIPT
);
1998 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT
), GetXMLToken(XML_N_SCRIPT_OOO
), XML_NAMESPACE_SCRIPT
);
2000 GetNamespaceMap().Add( GetXMLToken(XML_NP_DLG
), GetXMLToken(XML_N_DLG
), XML_NAMESPACE_DLG
);
2001 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DLG
), GetXMLToken(XML_N_DLG
), XML_NAMESPACE_DLG
);
2003 GetNamespaceMap().Add( GetXMLToken(XML_NP_FO
), GetXMLToken(XML_N_FO_COMPAT
), XML_NAMESPACE_FO
);
2004 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO
), GetXMLToken(XML_N_FO
), XML_NAMESPACE_FO
);
2006 GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG
), GetXMLToken(XML_N_SVG_COMPAT
), XML_NAMESPACE_SVG
);
2007 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG
), GetXMLToken(XML_N_SVG
), XML_NAMESPACE_SVG
);
2010 for( sal_uInt16 i
=0; i
<MAX_OASIS_ACTIONS
; ++i
)
2014 Oasis2OOoTransformer::~Oasis2OOoTransformer() throw()
2016 for( sal_uInt16 i
=0; i
<MAX_OASIS_ACTIONS
; ++i
)
2017 delete m_aActions
[i
];
2018 XMLEventOASISTransformerContext::FlushEventMap( m_pEventMap
);
2019 XMLEventOASISTransformerContext::FlushEventMap( m_pFormEventMap
);
2022 ::com::sun::star::uno::Sequence
< sal_Int8
> static CreateUnoTunnelId()
2024 static osl::Mutex aCreateMutex
;
2025 Guard
<osl::Mutex
> aGuard( aCreateMutex
);
2026 Sequence
< sal_Int8
> aSeq( 16 );
2027 rtl_createUuid( (sal_uInt8
*)aSeq
.getArray(), 0, sal_True
);
2031 const Sequence
< sal_Int8
> & Oasis2OOoTransformer::getUnoTunnelId() throw()
2033 static Sequence
< sal_Int8
> aSeq
= ::CreateUnoTunnelId();
2038 sal_Int64 SAL_CALL
Oasis2OOoTransformer::getSomething( const Sequence
< sal_Int8
>& rId
)
2039 throw(RuntimeException
)
2041 if( rId
.getLength() == 16
2042 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
2043 rId
.getConstArray(), 16 ) )
2045 return reinterpret_cast< sal_Int64
>( this );
2049 return (sal_Int64
)0;
2054 OUString SAL_CALL
Oasis2OOoTransformer::getImplementationName()
2055 throw(RuntimeException
)
2057 return Oasis2OOoTransformer_getImplementationName();
2060 sal_Bool SAL_CALL
Oasis2OOoTransformer::supportsService( const OUString
& )
2061 throw(RuntimeException
)
2066 Sequence
< OUString
> SAL_CALL
Oasis2OOoTransformer::getSupportedServiceNames( )
2067 throw(RuntimeException
)
2069 Sequence
<OUString
> aSeq(0);
2073 // Service registration
2075 OUString SAL_CALL
Oasis2OOoTransformer_getImplementationName() throw()
2077 return OUString( RTL_CONSTASCII_USTRINGPARAM(
2078 "com.sun.star.comp.Oasis2OOoTransformer" ) );
2081 Sequence
< OUString
> SAL_CALL
Oasis2OOoTransformer_getSupportedServiceNames()
2084 const OUString
aServiceName( Oasis2OOoTransformer_getImplementationName() );
2085 const Sequence
< OUString
> aSeq( &aServiceName
, 1 );
2089 Reference
< XInterface
> SAL_CALL
Oasis2OOoTransformer_createInstance(
2090 const Reference
< XMultiServiceFactory
> &)
2093 OSL_TRACE("Creating Oasis2OOoTransformer");
2094 return (cppu::OWeakObject
*)new Oasis2OOoTransformer
;