1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <com/sun/star/beans/XPropertySetInfo.hpp>
21 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
22 #include <rtl/ustrbuf.hxx>
23 #include <sax/tools/converter.hxx>
24 #include <xmloff/nmspmap.hxx>
25 #include <xmloff/xmlnmspe.hxx>
26 #include <xmloff/xmltoken.hxx>
27 #include "DeepTContext.hxx"
28 #include "MetaTContext.hxx"
29 #include "DocumentTContext.hxx"
30 #include "NotesTContext.hxx"
31 #include "StyleOASISTContext.hxx"
32 #include "FrameOASISTContext.hxx"
33 #include "EventOASISTContext.hxx"
34 #include "DlgOASISTContext.hxx"
35 #include "ControlOASISTContext.hxx"
36 #include "FormPropOASISTContext.hxx"
37 #include "ChartOASISTContext.hxx"
38 #include "ChartPlotAreaOASISTContext.hxx"
39 #include "MutableAttrList.hxx"
40 #include "ElemTransformerAction.hxx"
41 #include "AttrTransformerAction.hxx"
42 #include "TransformerActions.hxx"
43 #include "FamilyType.hxx"
45 #include <comphelper/servicehelper.hxx>
46 #include "Oasis2OOo.hxx"
47 #include <cppuhelper/supportsservice.hxx>
49 using namespace ::osl
;
50 using namespace ::xmloff::token
;
51 using namespace ::com::sun::star::uno
;
52 using namespace ::com::sun::star::lang
;
53 using namespace ::com::sun::star::xml::sax
;
54 using namespace ::com::sun::star::beans
;
56 enum XMLUserDefinedTransformerAction
58 XML_ETACTION_META
=XML_ETACTION_USER_DEFINED
,
59 XML_ETACTION_DOCUMENT
,
64 XML_ETACTION_STYLE_RENAME
,
68 XML_ETACTION_TAB_STOP
,
69 XML_ETACTION_FORM_CONTROL
,
70 XML_ETACTION_FORM_PROPERTY
,
71 XML_ETACTION_CONFIG_ITEM
,
72 XML_ETACTION_TRACKED_CHANGES
,
74 XML_ETACTION_CHART_PLOT_AREA
77 #define ENTRY3( n, l, a, p1, p2, p3 ) \
78 { XML_NAMESPACE_##n, XML_##l, a, p1, p2, p3 }
79 #define ENTRY3QNQ( n, l, a, n1, l1, p2, n3, l3 ) \
80 ENTRY3( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), \
81 p2, XMLTransformerActionInit::QNameParam( n3, l3 ) )
83 #define ENTRY2( n, l, a, p1, p2 ) \
84 ENTRY3( n, l, a, p1, p2, 0 )
85 #define ENTRY2QN( n, l, a, n1, l1, p2 ) \
86 ENTRY2( n, l, a, XMLTransformerActionInit::QNameParam( n1, l1 ), p2 )
88 #define ENTRY1( n, l, a, p1 ) \
89 ENTRY3( n, l, a, p1, 0, 0 )
90 #define ENTRY1Q( n, l, a, p1, t1 ) \
91 ENTRY1( n, l, a, XMLTransformerActionInit::QNameParam( p1, t1 ) )
93 #define ENTRY0( n, l, a ) \
94 ENTRY3( n, l, a, 0, 0, 0 )
96 // BM: a macro to put two tokens into one sal_Int32 for the action
97 // XML_ATACTION_RENAME_ATTRIBUTE
98 #define RENAME_ENTRY( f, s ) \
99 (static_cast< sal_Int32 >(f) | (static_cast< sal_Int32 >(s) << 16))
101 static XMLTransformerActionInit aActionTable
[] =
103 // add office:class from <office:document> and <office:document-content>
104 ENTRY0( OFFICE
, DOCUMENT
, XML_ETACTION_DOCUMENT
),
105 ENTRY0( OFFICE
, DOCUMENT_CONTENT
, XML_ETACTION_DOCUMENT
),
106 ENTRY1Q( OOO
, AUTO_TEXT_EVENTS
, XML_ETACTION_RENAME_ELEM
,
107 XML_NAMESPACE_OFFICE
, XML_AUTO_TEXT_EVENTS
),
109 // add <meta:keywords>
110 ENTRY0( OFFICE
, META
, XML_ETACTION_META
),
112 // rename <office:scripts> to <office:script>
113 ENTRY1Q( OFFICE
, SCRIPTS
, XML_ETACTION_RENAME_ELEM
,
114 XML_NAMESPACE_OFFICE
, XML_SCRIPT
),
116 // rename <office:script> to <office:script-data> and process attributes
117 ENTRY2QN( OFFICE
, SCRIPT
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
118 XML_NAMESPACE_OFFICE
, XML_SCRIPT_DATA
,
119 OASIS_SCRIPT_ACTIONS
),
121 // rename <ooo:libraries> to <script:libraries>
122 ENTRY1Q( OOO
, LIBRARIES
, XML_ETACTION_RENAME_ELEM
,
123 XML_NAMESPACE_SCRIPT
, XML_LIBRARIES
),
125 // rename <ooo:library-linked> to <script:library-linked> and process attributes
126 ENTRY2QN( OOO
, LIBRARY_LINKED
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
127 XML_NAMESPACE_SCRIPT
, XML_LIBRARY_LINKED
,
128 OASIS_SCRIPT_ACTIONS
),
130 // rename <ooo:library-embedded> to <script:library-embedded> and process attributes
131 ENTRY2QN( OOO
, LIBRARY_EMBEDDED
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
132 XML_NAMESPACE_SCRIPT
, XML_LIBRARY_EMBEDDED
,
133 OASIS_SCRIPT_ACTIONS
),
135 // rename <ooo:module> to <script:module> and process attributes
136 ENTRY2QN( OOO
, MODULE
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
137 XML_NAMESPACE_SCRIPT
, XML_MODULE
,
138 OASIS_SCRIPT_ACTIONS
),
140 // rename <ooo:source-code> to <script:source-code>
141 ENTRY1Q( OOO
, SOURCE_CODE
, XML_ETACTION_RENAME_ELEM
,
142 XML_NAMESPACE_SCRIPT
, XML_SOURCE_CODE
),
144 ENTRY0( OFFICE
, BODY
, XML_ETACTION_BODY
),
146 // rename <office:font-face-decls> to <office:font-decl>,
147 // rename <style:font-face> to <style:font-decl>, process attrs
148 ENTRY1Q( OFFICE
, FONT_FACE_DECLS
, XML_ETACTION_RENAME_ELEM
,
149 XML_NAMESPACE_OFFICE
, XML_FONT_DECLS
),
150 ENTRY2QN( STYLE
, FONT_FACE
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
151 XML_NAMESPACE_STYLE
, XML_FONT_DECL
,
152 OASIS_FONT_FACE_ACTIONS
),
154 // remove genre element
155 ENTRY0( OFFICE
, TEXT
, XML_ETACTION_COPY_CONTENT
),
156 ENTRY0( OFFICE
, DRAWING
, XML_ETACTION_COPY_CONTENT
),
157 ENTRY0( OFFICE
, PRESENTATION
, XML_ETACTION_COPY_CONTENT
),
158 ENTRY0( OFFICE
, SPREADSHEET
, XML_ETACTION_COPY_CONTENT
),
159 ENTRY0( OFFICE
, CHART
, XML_ETACTION_COPY_CONTENT
),
160 ENTRY0( OFFICE
, IMAGE
, XML_ETACTION_COPY_CONTENT
),
162 // rename <style:page-layout> to <style:page-master>
163 // ENTRY1Q( STYLE, PAGE_LAYOUT, RENAME_ELEM,
164 // XML_NAMESPACE_STYLE, XML_PAGE_MASTER ),
165 ENTRY1( STYLE
, MASTER_PAGE
, XML_ETACTION_PROC_ATTRS
,
166 OASIS_MASTER_PAGE_ACTIONS
),
168 // merge <style:*-properties> into <style:properties> and do other
170 ENTRY1( STYLE
, STYLE
, XML_ETACTION_STYLE
,
171 XML_FAMILY_TYPE_END
),
172 ENTRY1( STYLE
, DEFAULT_STYLE
, XML_ETACTION_STYLE
,
173 XML_FAMILY_TYPE_END
),
174 ENTRY2QN( STYLE
, PAGE_LAYOUT
, XML_ETACTION_STYLE_RENAME
,
175 XML_NAMESPACE_STYLE
, XML_PAGE_MASTER
,
176 XML_FAMILY_TYPE_PAGE_LAYOUT
),
177 ENTRY1( NUMBER
, NUMBER_STYLE
, XML_ETACTION_STYLE
,
178 XML_FAMILY_TYPE_DATA
),
179 ENTRY1( NUMBER
, CURRENCY_STYLE
, XML_ETACTION_STYLE
,
180 XML_FAMILY_TYPE_DATA
),
181 ENTRY1( NUMBER
, PERCENTAGE_STYLE
, XML_ETACTION_STYLE
,
182 XML_FAMILY_TYPE_DATA
),
183 ENTRY1( NUMBER
, DATE_STYLE
, XML_ETACTION_STYLE
,
184 XML_FAMILY_TYPE_DATA
),
185 ENTRY1( NUMBER
, TIME_STYLE
, XML_ETACTION_STYLE
,
186 XML_FAMILY_TYPE_DATA
),
187 ENTRY1( NUMBER
, BOOLEAN_STYLE
, XML_ETACTION_STYLE
,
188 XML_FAMILY_TYPE_DATA
),
189 ENTRY1( NUMBER
, TEXT_STYLE
, XML_ETACTION_STYLE
,
190 XML_FAMILY_TYPE_DATA
),
191 ENTRY1( TEXT
, LIST_STYLE
, XML_ETACTION_STYLE
,
192 XML_FAMILY_TYPE_LIST
),
193 // ENTRY0( TEXT, OUTLINE_STYLE, STYLE ),
195 ENTRY1( STYLE
, HEADER_STYLE
, XML_ETACTION_STYLE
,
196 XML_FAMILY_TYPE_HEADER_FOOTER
),
197 ENTRY1( STYLE
, FOOTER_STYLE
, XML_ETACTION_STYLE
,
198 XML_FAMILY_TYPE_HEADER_FOOTER
),
199 ENTRY1( TEXT
, LIST_LEVEL_STYLE_NUMBER
, XML_ETACTION_STYLE
,
200 XML_FAMILY_TYPE_LIST
),
201 ENTRY1( TEXT
, LIST_LEVEL_STYLE_BULLET
, XML_ETACTION_STYLE
,
202 XML_FAMILY_TYPE_LIST
),
203 ENTRY1( TEXT
, LIST_LEVEL_STYLE_IMAGE
, XML_ETACTION_STYLE
,
204 XML_FAMILY_TYPE_LIST
),
205 ENTRY1( TEXT
, OUTLINE_LEVEL_STYLE
, XML_ETACTION_STYLE
,
206 XML_FAMILY_TYPE_LIST
),
207 ENTRY1( DRAW
, GRADIENT
, XML_ETACTION_STYLE
,
208 XML_FAMILY_TYPE_GRADIENT
),
209 ENTRY1( DRAW
, FILL_IMAGE
, XML_ETACTION_STYLE
,
210 XML_FAMILY_TYPE_FILL_IMAGE
),
211 ENTRY2QN( DRAW
, OPACITY
, XML_ETACTION_STYLE_RENAME
,
212 XML_NAMESPACE_DRAW
, XML_TRANSPARENCY
,
213 XML_FAMILY_TYPE_GRADIENT
),
214 ENTRY1( DRAW
, MARKER
, XML_ETACTION_STYLE
,
215 XML_FAMILY_TYPE_MARKER
),
216 ENTRY1( DRAW
, HATCH
, XML_ETACTION_STYLE
,
217 XML_FAMILY_TYPE_HATCH
),
218 ENTRY1( DRAW
, STROKE_DASH
, XML_ETACTION_STYLE
,
219 XML_FAMILY_TYPE_STROKE_DASH
),
221 // process <text:h/p>: process style-name attributes,
222 // rename <text:h>'s text:outline-level to text:level,
223 ENTRY1( TEXT
, H
, XML_ETACTION_PROC_ATTRS
, OASIS_PARA_ACTIONS
),
224 ENTRY1( TEXT
, P
, XML_ETACTION_PROC_ATTRS
, OASIS_PARA_ACTIONS
),
226 // process <test:list>'s text:style-name attributes
227 // rename <text:list> to <text:ordered-list> or <text:unordered-list>
228 // TODO: All list currenty are renamed to <text:ordered-list>
229 ENTRY2QN( TEXT
, LIST
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
230 XML_NAMESPACE_TEXT
, XML_ORDERED_LIST
,
231 OASIS_LIST_STYLE_REF_ACTIONS
),
233 // rename <text:note*> to <text:footnote*> or <text:endnote*>
234 ENTRY1( TEXT
, NOTES_CONFIGURATION
, XML_ETACTION_NOTES
,
235 XML_NOTES_CONFIGURATION
),
236 ENTRY1( TEXT
, NOTE
, XML_ETACTION_NOTES
, XML_NOTE
),
238 // rename <text:footnote> and <text:endnote> to <text:note>
239 ENTRY1( TEXT
, NOTE_REF
, XML_ETACTION_NOTES
, XML_NOTE_REF
),
241 // rename <text:tab> to <text:tab-stop>
242 ENTRY1Q( TEXT
, TAB
, XML_ETACTION_RENAME_ELEM
,
243 XML_NAMESPACE_TEXT
, XML_TAB_STOP
),
245 // replace <table:table tabke:is-sub-table> with <table:sub-table>
246 ENTRY0( TABLE
, TABLE
, XML_ETACTION_TABLE
),
248 // merge frame element
249 ENTRY0( DRAW
, FRAME
, XML_ETACTION_FRAME
),
252 ENTRY1Q( OFFICE
, EVENT_LISTENERS
, XML_ETACTION_RENAME_ELEM
,
253 XML_NAMESPACE_OFFICE
, XML_EVENTS
),
254 ENTRY0( SCRIPT
, EVENT_LISTENER
, XML_ETACTION_EVENT
),
255 ENTRY0( SCRIPT
, EVENT
, XML_ETACTION_EVENT
),
256 ENTRY0( PRESENTATION
, EVENT_LISTENER
, XML_ETACTION_EVENT
),
258 // process Basic dialogs
259 ENTRY0( DLG
, STYLE
, XML_ETACTION_DLG
),
261 // process length attributes
262 ENTRY1( DRAW
, RECT
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
263 ENTRY1( DRAW
, LINE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
264 ENTRY1( DRAW
, POLYLINE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
265 ENTRY1( DRAW
, POLYGON
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
266 ENTRY1( DRAW
, PATH
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
267 ENTRY1( DRAW
, CIRCLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
268 ENTRY1( DRAW
, ELLIPSE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
269 ENTRY1( DRAW
, CONNECTOR
, XML_ETACTION_PROC_ATTRS
, OASIS_CONNECTOR_ACTIONS
),
270 ENTRY1( DRAW
, CAPTION
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
271 ENTRY1( DRAW
, MEASURE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
272 ENTRY1( DRAW
, CONTROL
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
273 ENTRY1( DRAW
, PAGE_THUMBNAIL
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
274 ENTRY1( DRAW
, G
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
275 // ENTRY1( DRAW, FRAME, XML_ETACTION_PROC_ATTRS, OASIS_SHAPE_ACTIONS ),
276 ENTRY1( DRAW
, TEXT_BOX
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
277 ENTRY1( PRESENTATION
, PLACEHOLDER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
278 ENTRY1( DRAW
, CONTOUR_POLYGON
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
279 ENTRY1( DRAW
, CONTOUR_PATH
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
280 ENTRY1( DRAW
, AREA_RECTANGLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
281 ENTRY1( DRAW
, AREA_CIRCLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
282 ENTRY1( DRAW
, AREA_POLYGON
, XML_ETACTION_PROC_ATTRS
, OASIS_DRAW_AREA_POLYGON_ACTIONS
),
283 ENTRY1( DRAW
, GLUE_POINT
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
284 ENTRY1( DR3D
, SCENE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
285 ENTRY1( DR3D
, CUBE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
286 ENTRY1( DR3D
, SPHERE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
287 ENTRY1( DR3D
, EXTRUDE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
288 ENTRY1( DR3D
, ROTATE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
289 ENTRY1( CHART
, TITLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
290 ENTRY1( CHART
, SUBTITLE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
291 ENTRY1( CHART
, FOOTER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
292 ENTRY1( CHART
, LEGEND
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
293 ENTRY1( CHART
, WALL
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
294 ENTRY1( CHART
, FLOOR
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
295 ENTRY1( CHART
, AXIS
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
296 ENTRY1( CHART
, GRID
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
297 ENTRY1( CHART
, SERIES
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
298 ENTRY1( CHART
, DATA_POINT
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
299 ENTRY1( CHART
, MEAN_VALUE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
300 ENTRY1( CHART
, ERROR_INDICATOR
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
301 ENTRY1( CHART
, REGRESSION_CURVE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
302 ENTRY1( CHART
, STOCK_GAIN_MARKER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
303 ENTRY1( CHART
, STOCK_LOSS_MARKER
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
304 ENTRY1( CHART
, STOCK_RANGE_LINE
, XML_ETACTION_PROC_ATTRS
, OASIS_SHAPE_ACTIONS
),
306 ENTRY0( CHART
, CHART
, XML_ETACTION_CHART
),
307 ENTRY0( CHART
, PLOT_AREA
, XML_ETACTION_CHART_PLOT_AREA
),
309 ENTRY0( CONFIG
, CONFIG_ITEM
, XML_ETACTION_CONFIG_ITEM
),
310 ENTRY1Q( TEXT
, TRACKED_CHANGES
, XML_ETACTION_TRACKED_CHANGES
,
311 XML_NAMESPACE_TEXT
, XML_PROTECTION_KEY
),
312 ENTRY1Q( TABLE
, TRACKED_CHANGES
, XML_ETACTION_TRACKED_CHANGES
,
313 XML_NAMESPACE_TABLE
, XML_PROTECTION_KEY
),
315 ENTRY1( TEXT
, INDEX_ENTRY_TAB_STOP
, XML_ETACTION_PROC_ATTRS
,
316 OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
),
317 ENTRY0( STYLE
, TAB_STOP
, XML_ETACTION_TAB_STOP
),
318 ENTRY1( STYLE
, BACKGROUND_IMAGE
, XML_ETACTION_PROC_ATTRS
,
319 OASIS_BACKGROUND_IMAGE_ACTIONS
),
320 ENTRY1( TEXT
, LINENUMBERING_CONFIGURATION
, XML_ETACTION_PROC_ATTRS
,
321 OASIS_LINENUMBERING_ACTIONS
),
322 ENTRY1( STYLE
, FOOTNOTE_SEP
, XML_ETACTION_PROC_ATTRS
,
323 OASIS_FOOTNOTE_SEP_ACTIONS
),
324 ENTRY1( STYLE
, DROP_CAP
, XML_ETACTION_PROC_ATTRS
, OASIS_DROP_CAP_ACTIONS
),
325 ENTRY1( STYLE
, COLUMNS
, XML_ETACTION_PROC_ATTRS
, OASIS_COLUMNS_ACTIONS
),
326 ENTRY1( STYLE
, COLUMN
, XML_ETACTION_PROC_ATTRS
, OASIS_COLUMNS_ACTIONS
),
328 // process *:style-name attributes
329 ENTRY1( STYLE
, MAP
, XML_ETACTION_PROC_ATTRS
, OASIS_MAP_STYLE_REF_ACTIONS
),
330 ENTRY1( TEXT
, SPAN
, XML_ETACTION_PROC_ATTRS
, OASIS_TEXT_STYLE_REF_ACTIONS
),
331 ENTRY1( TEXT
, A
, XML_ETACTION_PROC_ATTRS
, OASIS_TEXT_STYLE_REF_ACTIONS
),
332 ENTRY1( TEXT
, RUBY_TEXT
, XML_ETACTION_PROC_ATTRS
,
333 OASIS_TEXT_STYLE_REF_ACTIONS
),
334 ENTRY1( TEXT
, TABLE_OF_CONTENT_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
335 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
336 ENTRY1( TEXT
, ILLUSTRATION_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
337 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
338 ENTRY1( TEXT
, TABLE_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
339 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
340 ENTRY1( TEXT
, OBJECT_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
341 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
342 ENTRY1( TEXT
, USER_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
343 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
344 ENTRY1( TEXT
, ALPHABETICAL_INDEX_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
345 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
346 ENTRY1( TEXT
, BIBLIOGRAPHY_ENTRY_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
347 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
348 ENTRY1( TEXT
, INDEX_SOURCE_STYLE
, XML_ETACTION_PROC_ATTRS
,
349 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
350 ENTRY1( TEXT
, INDEX_TITLE_TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
351 OASIS_PARA_STYLE_REF_ACTIONS
), /* generated entry */
352 ENTRY3QNQ( TEXT
, INDEX_ENTRY_CHAPTER
,
353 XML_ETACTION_RENAME_ELEM_PROC_ATTRS_COND
,
354 XML_NAMESPACE_TEXT
, XML_INDEX_ENTRY_CHAPTER_NUMBER
,
355 OASIS_TEXT_STYLE_REF_ACTIONS
,
356 XML_NAMESPACE_TEXT
, XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE
),
357 ENTRY1( TEXT
, INDEX_ENTRY_TEXT
, XML_ETACTION_PROC_ATTRS
,
358 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
359 ENTRY1( TEXT
, INDEX_ENTRY_PAGE_NUMBER
, XML_ETACTION_PROC_ATTRS
,
360 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
361 ENTRY1( TEXT
, INDEX_ENTRY_SPAN
, XML_ETACTION_PROC_ATTRS
,
362 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
363 ENTRY1( TEXT
, INDEX_ENTRY_BIBLIOGRAPHY
, XML_ETACTION_PROC_ATTRS
,
364 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
365 ENTRY1( TEXT
, INDEX_ENTRY_LINK_START
, XML_ETACTION_PROC_ATTRS
,
366 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
367 ENTRY1( TEXT
, INDEX_ENTRY_LINK_END
, XML_ETACTION_PROC_ATTRS
,
368 OASIS_TEXT_STYLE_REF_ACTIONS
), /* generated entry */
369 ENTRY1( DRAW
, PAGE
, XML_ETACTION_PROC_ATTRS
,
370 OASIS_MASTER_PAGE_REF_ACTIONS
), /* generated entry */
371 /* Conversion of attribute <table:style-name> for <table:table-row> and
372 <table:table-column> (#i40011#, #i40015#)
374 ENTRY1( TABLE
, TABLE_ROW
, XML_ETACTION_PROC_ATTRS
,
375 OASIS_TABLE_STYLE_REF_ACTIONS
),
376 ENTRY1( TABLE
, TABLE_COLUMN
, XML_ETACTION_PROC_ATTRS
,
377 OASIS_TABLE_STYLE_REF_ACTIONS
),
379 // rename office:value-* to *:value-*
380 ENTRY1( TEXT
, VARIABLE_DECL
, XML_ETACTION_PROC_ATTRS
,
381 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
382 ENTRY1( TEXT
, VARIABLE_SET
, XML_ETACTION_PROC_ATTRS
,
383 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
384 ENTRY1( TEXT
, VARIABLE_INPUT
, XML_ETACTION_PROC_ATTRS
,
385 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
386 ENTRY1( TEXT
, USER_FIELD_DECL
, XML_ETACTION_PROC_ATTRS
,
387 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
388 ENTRY1( TEXT
, EXPRESSION
, XML_ETACTION_PROC_ATTRS
,
389 OASIS_TEXT_VALUE_TYPE_ACTIONS
), /* generated entry */
390 ENTRY1( TEXT
, USER_DEFINED
, XML_ETACTION_PROC_ATTRS
,
391 OASIS_DATETIME_ACTIONS
), // Add OASIS_TEXT_VALUE_TYPE_ACTIONS if attrs are added to text:user-defined
392 ENTRY1( TABLE
, TABLE_CELL
, XML_ETACTION_PROC_ATTRS
,
393 OASIS_TABLE_VALUE_TYPE_ACTIONS
), /* generated entry */
394 ENTRY1( TABLE
, COVERED_TABLE_CELL
, XML_ETACTION_PROC_ATTRS
,
395 OASIS_TABLE_VALUE_TYPE_ACTIONS
), /* generated entry */
396 ENTRY1( TABLE
, CHANGE_TRACK_TABLE_CELL
, XML_ETACTION_PROC_ATTRS
,
397 OASIS_TABLE_VALUE_TYPE_ACTIONS
), /* generated entry */
398 // ENTRY1( FORM, PROPERTY, XML_ETACTION_PROC_ATTRS,
399 // OASIS_VALUE_TYPE_ACTIONS), /* TODO: generated entry */
400 // ENTRY1( FORM, LIST_PROPERTY, XML_ETACTION_PROC_ATTRS,
401 // OASIS_VALUE_TYPE_ACTIONS), /* generated entry */
403 ENTRY1( OFFICE
, ANNOTATION
, XML_ETACTION_MOVE_ELEMS_TO_ATTRS
,
404 OASIS_ANNOTATION_ACTIONS
), /* generated entry */
405 ENTRY1( OFFICE
, CHANGE_INFO
, XML_ETACTION_MOVE_ELEMS_TO_ATTRS
,
406 OASIS_CHANGE_INFO_ACTIONS
), /* generated entry */
408 ENTRY1( TEXT
, DDE_CONNECTION_DECL
, XML_ETACTION_PROC_ATTRS
,
409 OASIS_DDE_CONNECTION_DECL_ACTIONS
),
411 ENTRY0( FORM
, TEXT
, XML_ETACTION_FORM_CONTROL
),
412 ENTRY0( FORM
, TEXTAREA
, XML_ETACTION_FORM_CONTROL
),
413 ENTRY0( FORM
, FIXED_TEXT
, XML_ETACTION_FORM_CONTROL
),
414 ENTRY0( FORM
, FILE, XML_ETACTION_FORM_CONTROL
),
415 ENTRY0( FORM
, PASSWORD
, XML_ETACTION_FORM_CONTROL
),
416 ENTRY0( FORM
, FORMATTED_TEXT
, XML_ETACTION_FORM_CONTROL
),
417 ENTRY0( FORM
, BUTTON
, XML_ETACTION_FORM_CONTROL
),
418 ENTRY0( FORM
, IMAGE
, XML_ETACTION_FORM_CONTROL
),
419 ENTRY0( FORM
, CHECKBOX
, XML_ETACTION_FORM_CONTROL
),
420 ENTRY0( FORM
, RADIO
, XML_ETACTION_FORM_CONTROL
),
421 ENTRY0( FORM
, LISTBOX
, XML_ETACTION_FORM_CONTROL
),
422 ENTRY0( FORM
, COMBOBOX
, XML_ETACTION_FORM_CONTROL
),
423 ENTRY0( FORM
, FRAME
, XML_ETACTION_FORM_CONTROL
),
424 ENTRY0( FORM
, HIDDEN
, XML_ETACTION_FORM_CONTROL
),
425 ENTRY0( FORM
, IMAGE_FRAME
, XML_ETACTION_FORM_CONTROL
),
426 ENTRY0( FORM
, GRID
, XML_ETACTION_FORM_CONTROL
),
427 ENTRY0( FORM
, VALUE_RANGE
, XML_ETACTION_FORM_CONTROL
),
428 ENTRY0( FORM
, GENERIC_CONTROL
, XML_ETACTION_FORM_CONTROL
),
429 ENTRY1( FORM
, COLUMN
, XML_ETACTION_PROC_ATTRS
,
430 OASIS_FORM_COLUMN_ACTIONS
),
431 ENTRY1( FORM
, PROPERTY
, XML_ETACTION_FORM_PROPERTY
, XML_PROPERTY
),
432 ENTRY1( FORM
, LIST_PROPERTY
, XML_ETACTION_FORM_PROPERTY
,
434 ENTRY1( FORM
, LIST_VALUE
, XML_ETACTION_FORM_PROPERTY
, XML_LIST_VALUE
),
436 // process xlink:href
437 ENTRY1( META
, TEMPLATE
, XML_ETACTION_PROC_ATTRS
,
438 OASIS_XLINK_ACTIONS
), /* generated entry */
439 ENTRY1( META
, AUTO_RELOAD
, XML_ETACTION_PROC_ATTRS
,
440 OASIS_XLINK_ACTIONS
), /* generated entry */
441 ENTRY1( TEXT
, SECTION_SOURCE
, XML_ETACTION_PROC_ATTRS
,
442 OASIS_XLINK_ACTIONS
), /* generated entry */
443 ENTRY1( TEXT
, SCRIPT
, XML_ETACTION_PROC_ATTRS
,
444 OASIS_XLINK_ACTIONS
), /* generated entry */
445 ENTRY1( TEXT
, ALPHABETICAL_INDEX_AUTO_MARK_FILE
, XML_ETACTION_PROC_ATTRS
,
446 OASIS_XLINK_ACTIONS
), /* generated entry */
447 ENTRY1( TABLE
, TABLE_SOURCE
, XML_ETACTION_PROC_ATTRS
,
448 OASIS_XLINK_ACTIONS
), /* generated entry */
449 ENTRY1( TABLE
, CELL_RANGE_SOURCE
, XML_ETACTION_PROC_ATTRS
,
450 OASIS_XLINK_ACTIONS
), /* generated entry */
451 ENTRY1( DRAW
, A
, XML_ETACTION_PROC_ATTRS
,
452 OASIS_XLINK_ACTIONS
), /* generated entry */
453 ENTRY1( PRESENTATION
, SOUND
, XML_ETACTION_PROC_ATTRS
,
454 OASIS_XLINK_ACTIONS
), /* generated entry */
455 ENTRY1( FORM
, FORM
, XML_ETACTION_PROC_ATTRS
,
456 OASIS_FORM_ACTIONS
), /* generated entry */
457 // ENTRY1( SVG, FONT_FACE_URI, XML_ETACTION_PROC_ATTRS,
458 // OASIS_XLINK_ACTIONS ), /* generated entry */
459 // ENTRY1( SVG, DEFINITION_SRC, XML_ETACTION_PROC_ATTRS,
460 // OASIS_XLINK_ACTIONS ), /* generated entry */
461 ENTRY2QN( CHART
, SYMBOL_IMAGE
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
462 XML_NAMESPACE_STYLE
, XML_SYMBOL_IMAGE
,
463 OASIS_BACKGROUND_IMAGE_ACTIONS
),
464 // OASIS_XLINK_ACTIONS ), /* generated entry */
465 // events don't have real URIs
466 // ENTRY1( PRESENTATION, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
467 // OASIS_XLINK_ACTIONS ), /* generated entry */
468 // ENTRY1( SCRIPT, EVENT_LISTENER, XML_ETACTION_PROC_ATTRS,
469 // OASIS_XLINK_ACTIONS ), /* generated entry */
471 // add namespace prefix to name
472 ENTRY1( CONFIG
, CONFIG_ITEM_SET
, XML_ETACTION_PROC_ATTRS
,
473 OASIS_CONFIG_ITEM_SET_ACTIONS
),
475 // add namespace prefix to formula and condition
477 ENTRY1( TEXT
, SECTION
, XML_ETACTION_PROC_ATTRS
,
478 OASIS_FORMULA_ACTIONS
), /* generated entry */
480 ENTRY1( TEXT
, SEQUENCE
, XML_ETACTION_PROC_ATTRS
,
481 OASIS_FORMULA_ACTIONS
), /* generated entry */
483 ENTRY1( TEXT
, DATABASE_NEXT
, XML_ETACTION_PROC_ATTRS
,
484 OASIS_FORMULA_ACTIONS
), /* generated entry */
486 ENTRY2QN( TEXT
, DATABASE_ROW_SELECT
, XML_ETACTION_RENAME_ELEM_PROC_ATTRS
,
487 XML_NAMESPACE_TEXT
, XML_DATABASE_SELECT
,
488 OASIS_FORMULA_ACTIONS
), /* generated entry */
490 ENTRY1( TEXT
, CONDITIONAL_TEXT
, XML_ETACTION_PROC_ATTRS
,
491 OASIS_FORMULA_ACTIONS
), /* generated entry */
493 ENTRY1( TEXT
, HIDDEN_TEXT
, XML_ETACTION_PROC_ATTRS
,
494 OASIS_FORMULA_ACTIONS
), /* generated entry */
496 ENTRY1( TEXT
, HIDDEN_PARAGRAPH
, XML_ETACTION_PROC_ATTRS
,
497 OASIS_FORMULA_ACTIONS
), /* generated entry */
499 ENTRY1( TEXT
, TABLE_FORMULA
, XML_ETACTION_PROC_ATTRS
,
500 OASIS_FORMULA_ACTIONS
), /* generated entry */
502 // process table::content-validation
503 ENTRY1( TABLE
, CONTENT_VALIDATION
, XML_ETACTION_PROC_ATTRS
,
504 OASIS_CONTENT_VALIDATION_ACTIONS
),
506 // rename <table:dependencies> to <table:dependences>
507 ENTRY1Q( TABLE
, DEPENDENCIES
, XML_ETACTION_RENAME_ELEM
,
508 XML_NAMESPACE_TABLE
, XML_DEPENDENCES
),
509 ENTRY1Q( TABLE
, DEPENDENCY
, XML_ETACTION_RENAME_ELEM
,
510 XML_NAMESPACE_TABLE
, XML_DEPENDENCE
),
512 // process table::conversion-mode
513 ENTRY1( TABLE
, CONVERSION_MODE
, XML_ETACTION_PROC_ATTRS
,
514 OASIS_DDE_CONV_MODE_ACTIONS
),
516 // process table::data-pilot-member
517 ENTRY1( TABLE
, DATA_PILOT_MEMBER
, XML_ETACTION_PROC_ATTRS
,
518 OASIS_DATAPILOT_MEMBER_ACTIONS
),
520 // process table::data-pilot-level
521 ENTRY1( TABLE
, DATA_PILOT_LEVEL
, XML_ETACTION_PROC_ATTRS
,
522 OASIS_DATAPILOT_LEVEL_ACTIONS
),
524 // process table::source-service
525 ENTRY1( TABLE
, SOURCE_SERVICE
, XML_ETACTION_PROC_ATTRS
,
526 OASIS_SOURCE_SERVICE_ACTIONS
),
528 // entries for date time change (#i36576#)
529 ENTRY1( TEXT
, DATE
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
530 ENTRY1( TEXT
, CREATION_DATE
, XML_ETACTION_PROC_ATTRS
,
531 OASIS_DATETIME_ACTIONS
),
532 ENTRY1( TEXT
, TIME
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
533 ENTRY1( TEXT
, CREATION_TIME
, XML_ETACTION_PROC_ATTRS
,
534 OASIS_DATETIME_ACTIONS
),
535 ENTRY1( TEXT
, PRINT_TIME
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
536 ENTRY1( TEXT
, MODIFICATION_TIME
, XML_ETACTION_PROC_ATTRS
,
537 OASIS_DATETIME_ACTIONS
),
538 ENTRY1( TEXT
, EDITING_DURATION
, XML_ETACTION_PROC_ATTRS
,
539 OASIS_DATETIME_ACTIONS
),
540 ENTRY1( FORM
, TIME
, XML_ETACTION_PROC_ATTRS
, OASIS_DATETIME_ACTIONS
),
541 ENTRY1( PRESENTATION
, SETTINGS
, XML_ETACTION_PROC_ATTRS
,
542 OASIS_DATETIME_ACTIONS
),
544 // fix <text:alphabatical-index-mark text:main-etry>
545 ENTRY1( TEXT
, ALPHABETICAL_INDEX_MARK
, XML_ETACTION_PROC_ATTRS
,
546 OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
),
547 ENTRY1( TEXT
, ALPHABETICAL_INDEX_MARK_START
, XML_ETACTION_PROC_ATTRS
,
548 OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
),
550 // fix id strings in old animation elements
551 ENTRY1( PRESENTATION
, DIM
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
552 ENTRY1( PRESENTATION
, PLAY
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
553 ENTRY1( PRESENTATION
, SHOW_TEXT
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
554 ENTRY1( PRESENTATION
, SHOW_SHAPE
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
555 ENTRY1( PRESENTATION
, HIDE_TEXT
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
556 ENTRY1( PRESENTATION
, HIDE_SHAPE
, XML_ETACTION_PROC_ATTRS
, OASIS_ANIMATION_ACTIONS
),
558 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ETACTION_EOT
)
561 // XML_ETACTION_STYLE
562 static XMLTransformerActionInit aStyleActionTable
[] =
564 ENTRY0( STYLE
, FAMILY
, XML_ATACTION_STYLE_FAMILY
),
565 ENTRY1( STYLE
, NAME
, XML_ATACTION_DECODE_STYLE_NAME
,
566 XML_FAMILY_TYPE_END
),
567 ENTRY1( STYLE
, DISPLAY_NAME
, XML_ATACTION_STYLE_DISPLAY_NAME
,
568 XML_FAMILY_TYPE_END
),
569 ENTRY1( STYLE
, PARENT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
570 XML_FAMILY_TYPE_END
),
571 ENTRY1( STYLE
, NEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
572 XML_FAMILY_TYPE_END
),
573 ENTRY1( STYLE
, LIST_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
574 XML_FAMILY_TYPE_LIST
),
575 ENTRY1( STYLE
, MASTER_PAGE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
576 XML_FAMILY_TYPE_MASTER_PAGE
),
577 ENTRY0( STYLE
, DEFAULT_OUTLINE_LEVEL
, XML_ATACTION_REMOVE
),
578 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
579 XML_FAMILY_TYPE_TEXT
), // list level styles
580 ENTRY1( DRAW
, NAME
, XML_ATACTION_DECODE_STYLE_NAME
,
581 XML_FAMILY_TYPE_END
),
582 ENTRY1( DRAW
, DISPLAY_NAME
, XML_ATACTION_STYLE_DISPLAY_NAME
,
583 XML_FAMILY_TYPE_END
),
584 ENTRY0( DRAW
, DISTANCE
, XML_ATACTION_IN2INCH
),
585 ENTRY0( DRAW
, DOTS1_LENGTH
, XML_ATACTION_IN2INCH
),
586 ENTRY0( DRAW
, DOTS2_LENGTH
, XML_ATACTION_IN2INCH
),
587 ENTRY0( SVG
, WIDTH
, XML_ATACTION_IN2INCH
),
588 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_IN2INCH
),
589 ENTRY0( DRAW
, START
, XML_ATACTION_NEG_PERCENT
),
590 ENTRY0( DRAW
, END
, XML_ATACTION_NEG_PERCENT
),
591 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(true) ),
592 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
595 // OASIS_FRAME_ELEM_ACTIONS
596 static XMLTransformerActionInit aFrameActionTable
[] =
598 ENTRY0( DRAW
, TEXT_BOX
, XML_ETACTION_COPY
),
599 ENTRY0( DRAW
, IMAGE
, XML_ETACTION_COPY
),
600 ENTRY0( DRAW
, OBJECT
, XML_ETACTION_COPY
),
601 ENTRY0( DRAW
, OBJECT_OLE
, XML_ETACTION_COPY
),
602 ENTRY0( DRAW
, APPLET
, XML_ETACTION_COPY
),
603 ENTRY0( DRAW
, PLUGIN
, XML_ETACTION_COPY
),
604 ENTRY0( DRAW
, FLOATING_FRAME
, XML_ETACTION_COPY
),
605 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
608 // OASIS_EVENT_ELEM_ACTIONS
609 static XMLTransformerActionInit aEventActionTable
[] =
611 ENTRY0( XLINK
, HREF
, XML_ATACTION_HREF
),
612 ENTRY1( SCRIPT
, LANGUAGE
, XML_ATACTION_REMOVE_NAMESPACE_PREFIX
,
614 ENTRY0( SCRIPT
, EVENT_NAME
, XML_ATACTION_EVENT_NAME
),
615 ENTRY0( SCRIPT
, MACRO_NAME
, XML_ATACTION_MACRO_NAME
),
616 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
619 // OASIS_EVENT_ELEM_ACTIONS
620 static XMLTransformerActionInit aDlgActionTable
[] =
622 ENTRY0( DLG
, BORDER
, XML_ATACTION_DLG_BORDER
)
625 // action table for OASIS_MASTER_PAGE_ACTIONS
626 static XMLTransformerActionInit aMasterPageActionTable
[] =
628 ENTRY1( STYLE
, NAME
, XML_ATACTION_DECODE_STYLE_NAME
,
629 XML_FAMILY_TYPE_MASTER_PAGE
),
630 ENTRY1( STYLE
, DISPLAY_NAME
, XML_ATACTION_STYLE_DISPLAY_NAME
,
631 XML_FAMILY_TYPE_MASTER_PAGE
),
632 ENTRY1( STYLE
, NEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
633 XML_FAMILY_TYPE_MASTER_PAGE
),
634 ENTRY1Q( STYLE
, PAGE_LAYOUT_NAME
, XML_ATACTION_RENAME
,
635 XML_NAMESPACE_STYLE
, XML_PAGE_MASTER_NAME
),
636 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
639 // action table for OASIS_TEXT_STYLE_REF_ACTIONS
640 static XMLTransformerActionInit aTextStyleRefActionTable
[] =
642 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
643 XML_FAMILY_TYPE_TEXT
),
644 ENTRY1( TEXT
, VISITED_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
645 XML_FAMILY_TYPE_TEXT
),
646 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(false) ),
647 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
650 // action table for OASIS_PARA_STYLE_REF_ACTIONS
651 static XMLTransformerActionInit aParaStyleRefActionTable
[] =
653 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
654 XML_FAMILY_TYPE_PARAGRAPH
),
655 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
658 // action table for OASIS_LIST_STYLE_REF_ACTIONS
659 static XMLTransformerActionInit aListStyleRefActionTable
[] =
661 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
662 XML_FAMILY_TYPE_LIST
),
663 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
666 // action table for OASIS_MASTER_PAGE_REF_ACTIONS
667 static XMLTransformerActionInit aMasterPageRefActionTable
[] =
669 ENTRY1( DRAW
, MASTER_PAGE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
670 XML_FAMILY_TYPE_MASTER_PAGE
),
671 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
674 // action table for OASIS_MAP_STYLE_REF_ACTIONS
675 static XMLTransformerActionInit aMapStyleRefActionTable
[] =
677 ENTRY1( STYLE
, APPLY_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
678 XML_FAMILY_TYPE_END
),
679 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
682 // action table for OASIS_TABLE_STYLE_REF_ACTIONS (#i40011#, #i40015#)
683 static XMLTransformerActionInit aTableStyleRefActionTable
[] =
685 ENTRY1( TABLE
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
686 XML_FAMILY_TYPE_END
),
687 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
690 static XMLTransformerActionInit aFontFaceActionTable
[] =
692 ENTRY1Q( SVG
, FONT_FAMILY
, XML_ATACTION_RENAME
,
693 XML_NAMESPACE_FO
, XML_FONT_FAMILY
),
694 ENTRY1Q( STYLE
, FONT_ADORNMENTS
, XML_ATACTION_RENAME
,
695 XML_NAMESPACE_STYLE
, XML_FONT_STYLE_NAME
),
696 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
699 // action table for OASIS_PARA_ACTIONS
700 static XMLTransformerActionInit aParaActionTable
[] =
702 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
703 XML_FAMILY_TYPE_PARAGRAPH
),
704 ENTRY1( TEXT
, COND_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
705 XML_FAMILY_TYPE_PARAGRAPH
),
706 ENTRY1Q( TEXT
, OUTLINE_LEVEL
, XML_ATACTION_RENAME
,
707 XML_NAMESPACE_TEXT
, XML_LEVEL
),
708 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
711 // !!ATTENTION!! If you change something here, please also change
712 // aConnectorActionTable if appropriate
713 static XMLTransformerActionInit aShapeActionTable
[] =
715 ENTRY1( DRAW
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
716 XML_FAMILY_TYPE_GRAPHIC
),
717 ENTRY1( DRAW
, TEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
718 XML_FAMILY_TYPE_PARAGRAPH
),
719 ENTRY1( PRESENTATION
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
720 XML_FAMILY_TYPE_PRESENTATION
),
721 ENTRY0( SVG
, X
, XML_ATACTION_IN2INCH
),
722 ENTRY0( SVG
, Y
, XML_ATACTION_IN2INCH
),
723 ENTRY0( SVG
, X1
, XML_ATACTION_IN2INCH
),
724 ENTRY0( SVG
, Y1
, XML_ATACTION_IN2INCH
),
725 ENTRY0( SVG
, X2
, XML_ATACTION_IN2INCH
),
726 ENTRY0( SVG
, Y2
, XML_ATACTION_IN2INCH
),
727 ENTRY0( SVG
, CX
, XML_ATACTION_IN2INCH
),
728 ENTRY0( SVG
, CY
, XML_ATACTION_IN2INCH
),
729 ENTRY0( DRAW
, END_X
, XML_ATACTION_IN2INCH
),
730 ENTRY0( DRAW
, END_Y
, XML_ATACTION_IN2INCH
),
731 ENTRY0( SVG
, R
, XML_ATACTION_IN2INCH
),
732 ENTRY0( SVG
, RX
, XML_ATACTION_IN2INCH
),
733 ENTRY0( SVG
, RY
, XML_ATACTION_IN2INCH
),
734 ENTRY0( SVG
, WIDTH
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
735 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
736 ENTRY0( FO
, MIN_WIDTH
, XML_ATACTION_IN2INCH
),
737 ENTRY0( FO
, MIN_HEIGHT
, XML_ATACTION_IN2INCH
),
738 ENTRY0( FO
, MAX_WIDTH
, XML_ATACTION_IN2INCH
),
739 ENTRY0( FO
, MAX_HEIGHT
, XML_ATACTION_IN2INCH
),
740 ENTRY0( DRAW
, CORNER_RADIUS
, XML_ATACTION_IN2INCH
),
741 ENTRY0( DRAW
, LINE_SKEW
, XML_ATACTION_INS2INCHS
),
742 ENTRY0( DRAW
, CAPTION_POINT_X
, XML_ATACTION_IN2INCH
),
743 ENTRY0( DRAW
, CAPTION_POINT_Y
, XML_ATACTION_IN2INCH
),
744 ENTRY0( DR3D
, DISTANCE
, XML_ATACTION_IN2INCH
),
745 ENTRY0( DR3D
, FOCAL_LENGTH
, XML_ATACTION_IN2INCH
),
746 ENTRY1Q( DRAW
, CONTROL
, XML_ATACTION_RENAME
,
747 XML_NAMESPACE_FORM
, XML_ID
),
748 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(true) ),
750 // BM: needed by chart:legend. The legend needs also the draw actions. As
751 // there is no merge mechanism, all actions have to be in the same table
752 ENTRY2( CHART
, LEGEND_POSITION
, XML_ATACTION_RENAME_ATTRIBUTE
,
753 RENAME_ENTRY( XML_START
, XML_LEFT
),
754 RENAME_ENTRY( XML_END
, XML_RIGHT
)),
756 ENTRY0( DRAW
, ID
, XML_ATACTION_DECODE_ID
),
758 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
761 // OASIS_ANIMATION_ACTIONS
762 static XMLTransformerActionInit aAnimationActionTable
[] =
764 ENTRY0( DRAW
, SHAPE_ID
, XML_ATACTION_DECODE_ID
),
765 ENTRY0( PRESENTATION
, DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
766 ENTRY0( PRESENTATION
, PAUSE
, XML_ATACTION_RNG2ISO_DATETIME
),
768 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
771 // OOO_CONNECTOR_ACTIONS
772 static XMLTransformerActionInit aConnectorActionTable
[] =
774 ENTRY1( DRAW
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
775 XML_FAMILY_TYPE_GRAPHIC
),
776 ENTRY1( DRAW
, TEXT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
777 XML_FAMILY_TYPE_PARAGRAPH
),
778 ENTRY1( PRESENTATION
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
779 XML_FAMILY_TYPE_PRESENTATION
),
780 ENTRY0( SVG
, X1
, XML_ATACTION_IN2TWIPS
),
781 ENTRY0( SVG
, Y1
, XML_ATACTION_IN2TWIPS
),
782 ENTRY0( SVG
, X2
, XML_ATACTION_IN2TWIPS
),
783 ENTRY0( SVG
, Y2
, XML_ATACTION_IN2TWIPS
),
784 ENTRY0( DRAW
, END_X
, XML_ATACTION_IN2INCH
),
785 ENTRY0( DRAW
, END_Y
, XML_ATACTION_IN2INCH
),
786 ENTRY0( SVG
, WIDTH
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
787 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_SVG_WIDTH_HEIGHT_OASIS
),
788 ENTRY0( FO
, MIN_WIDTH
, XML_ATACTION_IN2INCH
),
789 ENTRY0( FO
, MIN_HEIGHT
, XML_ATACTION_IN2INCH
),
790 ENTRY0( FO
, MAX_WIDTH
, XML_ATACTION_IN2INCH
),
791 ENTRY0( FO
, MAX_HEIGHT
, XML_ATACTION_IN2INCH
),
792 ENTRY0( DRAW
, LINE_SKEW
, XML_ATACTION_INS2INCHS
),
793 ENTRY1Q( DRAW
, CONTROL
, XML_ATACTION_RENAME
,
794 XML_NAMESPACE_FORM
, XML_ID
),
795 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(true) ),
796 ENTRY0( DRAW
, START_SHAPE
, XML_ATACTION_DECODE_ID
),
797 ENTRY0( DRAW
, END_SHAPE
, XML_ATACTION_DECODE_ID
),
799 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
802 // OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
803 static XMLTransformerActionInit aIndexEntryTabStopActionTable
[] =
805 ENTRY0( STYLE
, POSITION
, XML_ATACTION_IN2INCH
),
806 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
807 XML_FAMILY_TYPE_TEXT
),
808 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
811 // OASIS_TAB_STOP_ACTIONS
812 static XMLTransformerActionInit aTabStopActionTable
[] =
814 ENTRY0( STYLE
, POSITION
, XML_ATACTION_IN2INCH
),
815 ENTRY1Q( STYLE
, LEADER_TEXT
, XML_ATACTION_RENAME
,
816 XML_NAMESPACE_STYLE
, XML_LEADER_CHAR
),
817 ENTRY0( STYLE
, LEADER_STYLE
, XML_ATACTION_REMOVE
),
818 ENTRY0( STYLE
, LEADER_TYPE
, XML_ATACTION_REMOVE
),
819 ENTRY0( STYLE
, LEADER_WIDTH
, XML_ATACTION_REMOVE
),
820 ENTRY0( STYLE
, LEADER_COLOR
, XML_ATACTION_REMOVE
),
821 ENTRY0( STYLE
, LEADER_TEXT_STYLE
, XML_ATACTION_REMOVE
),
822 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
825 // OASIS_LINENUMBERING_ACTIONS
826 static XMLTransformerActionInit aLineNumberingActionTable
[] =
828 ENTRY0( TEXT
, OFFSET
, XML_ATACTION_IN2INCH
),
829 ENTRY1( TEXT
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
830 XML_FAMILY_TYPE_TEXT
),
831 ENTRY1Q( TEXT
, COUNT_IN_TEXT_BOXES
, XML_ATACTION_RENAME
,
832 XML_NAMESPACE_TEXT
, XML_COUNT_IN_FLOATING_FRAMES
),
833 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
836 static XMLTransformerActionInit aFootnoteSepActionTable
[] =
838 ENTRY0( STYLE
, WIDTH
, XML_ATACTION_IN2INCH
),
839 ENTRY0( STYLE
, DISTANCE_BEFORE_SEP
, XML_ATACTION_IN2INCH
),
840 ENTRY0( STYLE
, DISTANCE_AFTER_SEP
, XML_ATACTION_IN2INCH
),
841 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
844 // OASIS_NOTES_ACTIONS (processed by special context)
845 static XMLTransformerActionInit aNotesActionTable
[] =
847 ENTRY0( TEXT
, NOTE_CLASS
, XML_ATACTION_STYLE_FAMILY
),
848 ENTRY1( TEXT
, CITATION_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
849 XML_FAMILY_TYPE_TEXT
),
850 ENTRY1( TEXT
, CITATION_BODY_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
851 XML_FAMILY_TYPE_TEXT
),
852 ENTRY1( TEXT
, DEFAULT_STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
853 XML_FAMILY_TYPE_PARAGRAPH
),
854 ENTRY1( TEXT
, MASTER_PAGE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
855 XML_FAMILY_TYPE_MASTER_PAGE
),
856 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
859 // OASIS_DROP_CAP_ACTIONS
860 static XMLTransformerActionInit aDropCapActionTable
[] =
862 ENTRY0( STYLE
, DISTANCE
, XML_ATACTION_IN2INCH
),
863 ENTRY1( STYLE
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
864 XML_FAMILY_TYPE_TEXT
),
865 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
868 static XMLTransformerActionInit aColumnsActionTable
[] =
870 ENTRY0( STYLE
, COLUMN_GAP
, XML_ATACTION_IN2INCH
),
871 ENTRY0( STYLE
, SPACE_BEFORE
, XML_ATACTION_REMOVE
),
872 ENTRY0( STYLE
, SPACE_AFTER
, XML_ATACTION_REMOVE
),
873 ENTRY1Q( FO
, START_INDENT
, XML_ATACTION_RENAME_IN2INCH
,
874 XML_NAMESPACE_FO
, XML_MARGIN_LEFT
),
875 ENTRY1Q( FO
, END_INDENT
, XML_ATACTION_RENAME_IN2INCH
,
876 XML_NAMESPACE_FO
, XML_MARGIN_RIGHT
),
877 ENTRY0( STYLE
, WIDTH
, XML_ATACTION_IN2INCH
),
878 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
881 // OASIS_TEXT_VALUE_TYPE_ACTIONS
882 static XMLTransformerActionInit aTextValueTypeActionTable
[] =
884 ENTRY1Q( OFFICE
, VALUE_TYPE
, XML_ATACTION_RENAME
,
885 XML_NAMESPACE_TEXT
, XML_VALUE_TYPE
),
886 ENTRY1Q( OFFICE
, VALUE
, XML_ATACTION_RENAME
,
887 XML_NAMESPACE_TEXT
, XML_VALUE
),
888 ENTRY1Q( OFFICE
, CURRENCY
, XML_ATACTION_RENAME
,
889 XML_NAMESPACE_TEXT
, XML_CURRENCY
),
890 ENTRY1Q( OFFICE
, DATE_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
891 XML_NAMESPACE_TEXT
, XML_DATE_VALUE
),
892 ENTRY1Q( OFFICE
, TIME_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
893 XML_NAMESPACE_TEXT
, XML_TIME_VALUE
),
894 ENTRY1Q( OFFICE
, BOOLEAN_VALUE
, XML_ATACTION_RENAME
,
895 XML_NAMESPACE_TEXT
, XML_BOOLEAN_VALUE
),
896 ENTRY1Q( OFFICE
, STRING_VALUE
, XML_ATACTION_RENAME
,
897 XML_NAMESPACE_TEXT
, XML_STRING_VALUE
),
898 ENTRY0( TEXT
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
899 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
902 // OASIS_TABLE_VALUE_TYPE_ACTIONS
903 static XMLTransformerActionInit aTableValueTypeActionTable
[] =
905 ENTRY1Q( OFFICE
, VALUE_TYPE
, XML_ATACTION_RENAME
,
906 XML_NAMESPACE_TABLE
, XML_VALUE_TYPE
),
907 ENTRY1Q( OFFICE
, VALUE
, XML_ATACTION_RENAME
,
908 XML_NAMESPACE_TABLE
, XML_VALUE
),
909 ENTRY1Q( OFFICE
, CURRENCY
, XML_ATACTION_RENAME
,
910 XML_NAMESPACE_TABLE
, XML_CURRENCY
),
911 ENTRY1Q( OFFICE
, DATE_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
912 XML_NAMESPACE_TABLE
, XML_DATE_VALUE
),
913 ENTRY1Q( OFFICE
, TIME_VALUE
, XML_ATACTION_RENAME_RNG2ISO_DATETIME
,
914 XML_NAMESPACE_TABLE
, XML_TIME_VALUE
),
915 ENTRY1Q( OFFICE
, BOOLEAN_VALUE
, XML_ATACTION_RENAME
,
916 XML_NAMESPACE_TABLE
, XML_BOOLEAN_VALUE
),
917 ENTRY1Q( OFFICE
, STRING_VALUE
, XML_ATACTION_RENAME
,
918 XML_NAMESPACE_TABLE
, XML_STRING_VALUE
),
919 ENTRY1( TABLE
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
920 XML_FAMILY_TYPE_TABLE_CELL
),
921 ENTRY0( TABLE
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
922 ENTRY1Q( TABLE
, CONTENT_VALIDATION_NAME
, XML_ATACTION_RENAME
,
923 XML_NAMESPACE_TABLE
, XML_VALIDATION_NAME
),
924 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
927 // action table for OASIS_ANNOTATION_ACTIONS
928 static XMLTransformerActionInit aAnnotationActionTable
[] =
930 ENTRY1Q( DC
, CREATOR
, XML_ETACTION_MOVE_TO_ATTR
,
931 XML_NAMESPACE_OFFICE
, XML_AUTHOR
),
932 ENTRY1Q( DC
, DATE
, XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME
,
933 XML_NAMESPACE_OFFICE
, XML_CREATE_DATE
),
934 ENTRY1Q( META
, DATE_STRING
, XML_ETACTION_MOVE_TO_ATTR
,
935 XML_NAMESPACE_OFFICE
, XML_CREATE_DATE_STRING
),
936 ENTRY0( TEXT
, P
, XML_ETACTION_EXTRACT_CHARACTERS
),
937 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ETACTION_EOT
)
940 // action table for OASIS_CHANGE_INFO_ACTIONS
941 static XMLTransformerActionInit aChangeInfoActionTable
[] =
943 ENTRY1Q( DC
, CREATOR
, XML_ETACTION_MOVE_TO_ATTR
,
944 XML_NAMESPACE_OFFICE
, XML_CHG_AUTHOR
),
945 ENTRY1Q( DC
, DATE
, XML_ETACTION_MOVE_TO_ATTR_RNG2ISO_DATETIME
,
946 XML_NAMESPACE_OFFICE
, XML_CHG_DATE_TIME
),
947 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ETACTION_EOT
)
950 // OASIS_BACKGROUND_IMAGE_ACTIONS
951 static XMLTransformerActionInit aBackgroundImageActionTable
[] =
953 ENTRY1Q( DRAW
, OPACITY
, XML_ATACTION_RENAME_NEG_PERCENT
,
954 XML_NAMESPACE_DRAW
, XML_TRANSPARENCY
),
955 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(true) ),
956 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
959 // OASIS_DDE_CONNECTION_DECL
960 static XMLTransformerActionInit aDDEConnectionDeclActionTable
[] =
962 ENTRY1Q( OFFICE
, NAME
, XML_ATACTION_RENAME
,
963 XML_NAMESPACE_TEXT
, XML_NAME
),
964 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
967 // OASIS_FORM_CONTROL_ACTIONS
968 static XMLTransformerActionInit aFormControlActionTable
[] =
970 ENTRY0( FORM
, NAME
, XML_ATACTION_MOVE_TO_ELEM
),
971 ENTRY2QN( FORM
, CONTROL_IMPLEMENTATION
,
972 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,
973 XML_NAMESPACE_FORM
, XML_SERVICE_NAME
,
975 ENTRY0( FORM
, ID
, XML_ATACTION_MOVE_TO_ELEM
),
976 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(false) ),
977 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
980 // OASIS_FORM_COLUMN_ACTIONS
981 static XMLTransformerActionInit aFormColumnActionTable
[] =
983 ENTRY1Q( FORM
, TEXT_STYLE_NAME
, XML_ATACTION_RENAME_DECODE_STYLE_NAME_REF
,
984 XML_NAMESPACE_FORM
, XML_COLUMN_STYLE_NAME
),
985 ENTRY2QN( FORM
, CONTROL_IMPLEMENTATION
,
986 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,
987 XML_NAMESPACE_FORM
, XML_SERVICE_NAME
,
989 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
992 // OASIS_FORM_PROP_ACTIONS
993 static XMLTransformerActionInit aFormPropActionTable
[] =
995 ENTRY1Q( OFFICE
, VALUE_TYPE
, XML_ATACTION_RENAME
,
996 XML_NAMESPACE_FORM
, XML_PROPERTY_TYPE
),
997 ENTRY0( OFFICE
, VALUE
, XML_ATACTION_REMOVE
),
998 ENTRY0( OFFICE
, STRING_VALUE
, XML_ATACTION_REMOVE
),
999 ENTRY0( OFFICE
, BOOLEAN_VALUE
, XML_ATACTION_REMOVE
),
1000 ENTRY0( OFFICE
, DATE_VALUE
, XML_ATACTION_REMOVE
),
1001 ENTRY0( OFFICE
, TIME_VALUE
, XML_ATACTION_REMOVE
),
1002 ENTRY0( OFFICE
, CURRENCY
, XML_ATACTION_REMOVE
),
1003 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1006 // OASIS_XLINK_ACTIONS
1007 static XMLTransformerActionInit aXLinkActionTable
[] =
1009 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(false) ),
1010 ENTRY0( TABLE
, REFRESH_DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
1011 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1014 // OASIS_CONFIG_ITEM_SET_ACTIONS
1015 static XMLTransformerActionInit aConfigItemSetActionTable
[] =
1017 ENTRY1( CONFIG
, NAME
, XML_ATACTION_REMOVE_NAMESPACE_PREFIX
,
1018 XML_NAMESPACE_OOO
),
1019 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1022 // OASIS_FORMULA_ACTIONS
1023 static XMLTransformerActionInit aFormulaActionTable
[] =
1025 ENTRY0( TEXT
, CONDITION
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1026 ENTRY0( TEXT
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1027 ENTRY0( TABLE
, CONDITION
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1028 ENTRY0( TABLE
, FORMULA
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1029 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1032 // OASIS_CONTENT_VALIDATION_ACTIONS
1033 static XMLTransformerActionInit aContentValidationActionTable
[] =
1035 ENTRY0( TABLE
, CONDITION
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1036 ENTRY0( TABLE
, DISPLAY_LIST
, XML_ATACTION_REMOVE
),
1037 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1040 // OASIS_DDE_CONV_MODE_ACTIONS
1041 static XMLTransformerActionInit aDDEConvModeActionTable
[] =
1043 ENTRY1Q( TABLE
, KEEP_TEXT
, XML_ATACTION_RENAME
,
1044 XML_NAMESPACE_TABLE
, XML_LET_TEXT
),
1045 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1048 // OASIS_DATAPILOT_MEMBER_ACTIONS
1049 static XMLTransformerActionInit aDataPilotMemberActionTable
[] =
1051 ENTRY1Q( TABLE
, SHOW_DETAILS
, XML_ATACTION_RENAME
,
1052 XML_NAMESPACE_TABLE
, XML_DISPLAY_DETAILS
),
1053 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1056 // OASIS_DATAPILOT_LEVEL_ACTIONS
1057 static XMLTransformerActionInit aDataPilotLevelActionTable
[] =
1059 ENTRY1Q( TABLE
, SHOW_EMPTY
, XML_ATACTION_RENAME
,
1060 XML_NAMESPACE_TABLE
, XML_DISPLAY_EMPTY
),
1061 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1064 // OASIS_SOURCE_SERVICE_ACTIONS
1065 static XMLTransformerActionInit aSourceServiceActionTable
[] =
1067 ENTRY1Q( TABLE
, USER_NAME
, XML_ATACTION_RENAME
,
1068 XML_NAMESPACE_TABLE
, XML_USERNAME
),
1069 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1072 // OASIS_CHART_ACTIONS
1073 static XMLTransformerActionInit aChartActionTable
[] =
1075 ENTRY0( CHART
, CLASS
, XML_ATACTION_REMOVE_ANY_NAMESPACE_PREFIX
),
1076 ENTRY1( DRAW
, STYLE_NAME
, XML_ATACTION_DECODE_STYLE_NAME_REF
,
1077 XML_FAMILY_TYPE_GRAPHIC
),
1078 ENTRY0( SVG
, WIDTH
, XML_ATACTION_IN2INCH
),
1079 ENTRY0( SVG
, HEIGHT
, XML_ATACTION_IN2INCH
),
1080 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1083 // OASIS_FORM_ACTIONS
1084 static XMLTransformerActionInit aFormActionTable
[] =
1086 ENTRY2QN( FORM
, CONTROL_IMPLEMENTATION
,
1087 XML_ATACTION_RENAME_REMOVE_NAMESPACE_PREFIX
,
1088 XML_NAMESPACE_FORM
, XML_SERVICE_NAME
,
1089 XML_NAMESPACE_OOO
),
1090 ENTRY1( XLINK
, HREF
, XML_ATACTION_URI_OASIS
, sal_uInt32(false) ),
1091 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1094 // OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
1095 static XMLTransformerActionInit aAlphabeticalIndexMarkActionTable
[] =
1097 ENTRY1Q( TEXT
, MAIN_ENTRY
, XML_ATACTION_RENAME
,
1098 XML_NAMESPACE_TEXT
, XML_MAIN_ETRY
),
1099 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1102 // OASIS_DRAW_AREA_POLYGON_ACTIONS (to be added to OASIS_SHAPE_ACTIONS)
1103 static XMLTransformerActionInit aDrawAreaPolygonActionTable
[] =
1105 ENTRY1Q( DRAW
, POINTS
, XML_ATACTION_RENAME
,
1106 XML_NAMESPACE_SVG
, XML_POINTS
),
1107 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1110 // OASIS_SCRIPT_ACTIONS
1111 static XMLTransformerActionInit aScriptActionTable
[] =
1113 ENTRY1( SCRIPT
, LANGUAGE
, XML_ATACTION_REMOVE_NAMESPACE_PREFIX
, XML_NAMESPACE_OOO
),
1114 ENTRY1Q( OOO
, NAME
, XML_ATACTION_RENAME
, XML_NAMESPACE_SCRIPT
, XML_NAME
),
1115 ENTRY1Q( OOO
, READONLY
, XML_ATACTION_RENAME
, XML_NAMESPACE_SCRIPT
, XML_READONLY
),
1116 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1119 // OASIS_DATETIME_ACTIONS
1120 static XMLTransformerActionInit aDateTimeActionTable
[] =
1122 ENTRY0( TEXT
, DATE_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1123 ENTRY0( TEXT
, TIME_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1124 ENTRY0( TEXT
, DATE_ADJUST
, XML_ATACTION_RNG2ISO_DATETIME
),
1125 ENTRY0( TEXT
, TIME_ADJUST
, XML_ATACTION_RNG2ISO_DATETIME
),
1126 ENTRY0( TEXT
, DURATION
, XML_ATACTION_RNG2ISO_DATETIME
),
1127 ENTRY0( OFFICE
, DATE_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1128 ENTRY0( OFFICE
, TIME_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1129 ENTRY0( FORM
, VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1130 ENTRY0( FORM
, CURRENT_VALUE
, XML_ATACTION_RNG2ISO_DATETIME
),
1131 ENTRY0( TABLE
, DATE_START
, XML_ATACTION_RNG2ISO_DATETIME
),
1132 ENTRY0( TABLE
, DATE_END
, XML_ATACTION_RNG2ISO_DATETIME
),
1133 ENTRY0( TABLE
, REFRESH_DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
1134 ENTRY0( PRESENTATION
, DELAY
, XML_ATACTION_RNG2ISO_DATETIME
),
1135 ENTRY0( PRESENTATION
, PAUSE
, XML_ATACTION_RNG2ISO_DATETIME
),
1136 ENTRY0( OFFICE
, TOKEN_INVALID
, XML_ATACTION_EOT
)
1139 static XMLTokenEnum aTokenMap
[] =
1141 XML_NONE
, XML_SOLID
, XML_DOTTED
, XML_DASH
, XML_LONG_DASH
, XML_DOT_DASH
,
1142 XML_DOT_DOT_DASH
, XML_WAVE
, XML_SMALL_WAVE
, XML_TOKEN_END
1145 class XMLTableTransformerContext_Impl
: public XMLTransformerContext
1147 OUString m_aElemQName
;
1150 TYPEINFO_OVERRIDE();
1152 XMLTableTransformerContext_Impl( XMLTransformerBase
& rTransformer
,
1153 const OUString
& rQName
);
1155 virtual ~XMLTableTransformerContext_Impl();
1157 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
1158 virtual void EndElement() SAL_OVERRIDE
;
1161 TYPEINIT1( XMLTableTransformerContext_Impl
, XMLTransformerContext
);
1163 XMLTableTransformerContext_Impl::XMLTableTransformerContext_Impl(
1164 XMLTransformerBase
& rImp
,
1165 const OUString
& rQName
) :
1166 XMLTransformerContext( rImp
, rQName
),
1167 m_aElemQName( rQName
)
1171 XMLTableTransformerContext_Impl::~XMLTableTransformerContext_Impl()
1175 void XMLTableTransformerContext_Impl::StartElement(
1176 const Reference
< XAttributeList
>& rAttrList
)
1178 Reference
< XAttributeList
> xAttrList( rAttrList
);
1180 XMLMutableAttributeList
*pMutableAttrList
= 0;
1182 sal_Int16 nAttrCount
= xAttrList
.is() ? xAttrList
->getLength() : 0;
1183 for( sal_Int16 i
=0; i
< nAttrCount
; i
++ )
1185 const OUString
& rAttrName
= xAttrList
->getNameByIndex( i
);
1186 OUString aLocalName
;
1187 sal_uInt16 nPrefix
=
1188 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName
,
1190 if( XML_NAMESPACE_TABLE
== nPrefix
)
1192 if ( IsXMLToken( aLocalName
, XML_IS_SUB_TABLE
) )
1194 const OUString
& rValue
= xAttrList
->getValueByIndex( i
);
1195 if( IsXMLToken( rValue
, XML_TRUE
) )
1197 m_aElemQName
= GetTransformer().GetNamespaceMap().GetQNameByKey(
1198 XML_NAMESPACE_TABLE
,
1199 ::xmloff::token::GetXMLToken( XML_SUB_TABLE
) );
1200 if ( !pMutableAttrList
)
1203 new XMLMutableAttributeList( xAttrList
);
1204 xAttrList
= pMutableAttrList
;
1206 pMutableAttrList
->RemoveAttributeByIndex( i
);
1208 // OD 2005-07-05 #i50521# - no break here for savety reason.
1210 // Convert attribute table:style-name for <table:table> (#i40011#, #i40015#)
1211 else if ( IsXMLToken( aLocalName
, XML_STYLE_NAME
) )
1213 const OUString
& rValue
= xAttrList
->getValueByIndex( i
);
1214 OUString
aAttrValue( rValue
);
1215 if( XMLTransformerBase::DecodeStyleName(aAttrValue
) )
1217 if ( !pMutableAttrList
)
1220 new XMLMutableAttributeList( xAttrList
);
1221 xAttrList
= pMutableAttrList
;
1223 pMutableAttrList
->SetValueByIndex( i
, aAttrValue
);
1226 else if( IsXMLToken( aLocalName
, XML_PRINT
) )
1228 if ( !pMutableAttrList
)
1231 new XMLMutableAttributeList( xAttrList
);
1232 xAttrList
= pMutableAttrList
;
1234 pMutableAttrList
->RemoveAttributeByIndex( i
);
1239 GetTransformer().GetDocHandler()->startElement( m_aElemQName
, xAttrList
);
1242 void XMLTableTransformerContext_Impl::EndElement()
1244 GetTransformer().GetDocHandler()->endElement( m_aElemQName
);
1247 class XMLBodyOASISTransformerContext_Impl
: public XMLTransformerContext
1252 TYPEINFO_OVERRIDE();
1254 XMLBodyOASISTransformerContext_Impl( XMLTransformerBase
& rTransformer
,
1255 const OUString
& rQName
);
1257 virtual ~XMLBodyOASISTransformerContext_Impl();
1259 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
1261 virtual XMLTransformerContext
*CreateChildContext( sal_uInt16 nPrefix
,
1262 const OUString
& rLocalName
,
1263 const OUString
& rQName
,
1264 const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
1265 virtual void EndElement() SAL_OVERRIDE
;
1268 TYPEINIT1( XMLBodyOASISTransformerContext_Impl
, XMLTransformerContext
);
1270 XMLBodyOASISTransformerContext_Impl::XMLBodyOASISTransformerContext_Impl(
1271 XMLTransformerBase
& rImp
,
1272 const OUString
& rQName
) :
1273 XMLTransformerContext( rImp
, rQName
),
1274 m_bFirstChild( false )
1278 XMLBodyOASISTransformerContext_Impl::~XMLBodyOASISTransformerContext_Impl()
1282 void XMLBodyOASISTransformerContext_Impl::StartElement(
1283 const Reference
< XAttributeList
>& )
1287 XMLTransformerContext
* XMLBodyOASISTransformerContext_Impl::CreateChildContext( sal_uInt16 nPrefix
,
1288 const OUString
& rLocalName
,
1289 const OUString
& rQName
,
1290 const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
)
1294 m_bFirstChild
= true;
1295 XMLTransformerContext::StartElement(xAttrList
);
1298 return XMLTransformerContext::CreateChildContext(nPrefix
, rLocalName
, rQName
, xAttrList
);
1301 void XMLBodyOASISTransformerContext_Impl::EndElement()
1304 XMLTransformerContext::StartElement(Reference
< XAttributeList
>());
1306 XMLTransformerContext::EndElement();
1309 class XMLTabStopOASISTContext_Impl
: public XMLPersElemContentTContext
1312 TYPEINFO_OVERRIDE();
1314 XMLTabStopOASISTContext_Impl( XMLTransformerBase
& rTransformer
,
1315 const OUString
& rQName
);
1317 virtual ~XMLTabStopOASISTContext_Impl();
1319 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
1322 TYPEINIT1( XMLTabStopOASISTContext_Impl
, XMLPersElemContentTContext
);
1324 XMLTabStopOASISTContext_Impl::XMLTabStopOASISTContext_Impl(
1325 XMLTransformerBase
& rImp
,
1326 const OUString
& rQName
) :
1327 XMLPersElemContentTContext( rImp
, rQName
)
1331 XMLTabStopOASISTContext_Impl::~XMLTabStopOASISTContext_Impl()
1335 void XMLTabStopOASISTContext_Impl::StartElement(
1336 const Reference
< XAttributeList
>& rAttrList
)
1338 XMLTransformerActions
*pActions
=
1339 GetTransformer().GetUserDefinedActions( OASIS_TAB_STOP_ACTIONS
);
1340 SAL_WARN_IF( NULL
== pActions
, "xmloff.transform", "got no actions" );
1342 sal_Unicode cStyleLeaderChar
= 0;
1343 sal_Int16 nLeaderText
= -1;
1344 Reference
< XAttributeList
> xAttrList( rAttrList
);
1345 XMLMutableAttributeList
*pMutableAttrList
= 0;
1346 sal_Int16 nAttrCount
= xAttrList
.is() ? xAttrList
->getLength() : 0;
1347 for( sal_Int16 i
=0; i
< nAttrCount
; i
++ )
1349 const OUString
& rAttrName
= xAttrList
->getNameByIndex( i
);
1350 OUString aLocalName
;
1351 sal_uInt16 nPrefix
=
1352 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName
,
1354 XMLTransformerActions::key_type
aKey( nPrefix
, aLocalName
);
1355 XMLTransformerActions::const_iterator aIter
=
1356 pActions
->find( aKey
);
1357 if( !(aIter
== pActions
->end() ) )
1359 if( !pMutableAttrList
)
1362 new XMLMutableAttributeList( xAttrList
);
1363 xAttrList
= pMutableAttrList
;
1365 const OUString
& rAttrValue
= xAttrList
->getValueByIndex( i
);
1366 switch( (*aIter
).second
.m_nActionType
)
1368 case XML_ATACTION_REMOVE
:
1369 if( IsXMLToken( aLocalName
, XML_LEADER_STYLE
) )
1371 if( IsXMLToken( rAttrValue
, XML_NONE
) )
1372 cStyleLeaderChar
= ' ';
1373 else if( IsXMLToken( rAttrValue
, XML_DOTTED
) )
1374 cStyleLeaderChar
= '.';
1376 cStyleLeaderChar
= 0;
1377 pMutableAttrList
->RemoveAttributeByIndex( i
);
1382 case XML_ATACTION_RENAME
:
1384 OUString
aNewAttrQName(
1385 GetTransformer().GetNamespaceMap().GetQNameByKey(
1386 (*aIter
).second
.GetQNamePrefixFromParam1(),
1387 ::xmloff::token::GetXMLToken(
1388 (*aIter
).second
.GetQNameTokenFromParam1()) ) );
1389 pMutableAttrList
->RenameAttributeByIndex( i
,
1392 if( IsXMLToken( aLocalName
, XML_LEADER_TEXT
) )
1394 if( rAttrValue
.getLength() > 1 )
1396 OUString
aAttrValue( rAttrValue
.copy( 0, 1 ) );
1397 pMutableAttrList
->SetValueByIndex( i
, aAttrValue
);
1402 case XML_ATACTION_IN2INCH
:
1404 OUString
aAttrValue( rAttrValue
);
1405 if( XMLTransformerBase::ReplaceSingleInWithInch(
1407 pMutableAttrList
->SetValueByIndex( i
, aAttrValue
);
1411 SAL_WARN( "xmloff.transform", "unknown action" );
1417 if( cStyleLeaderChar
&& ' ' != cStyleLeaderChar
)
1419 if( nLeaderText
!= -1 )
1421 OUString
aNewAttrQName(
1422 GetTransformer().GetNamespaceMap().GetQNameByKey(
1423 XML_NAMESPACE_STYLE
,
1424 ::xmloff::token::GetXMLToken( XML_LEADER_CHAR
) ) );
1425 pMutableAttrList
->AddAttribute( aNewAttrQName
,
1426 OUString( cStyleLeaderChar
) );
1431 if( nLeaderText
!= -1 )
1432 pMutableAttrList
->RemoveAttributeByIndex( nLeaderText
);
1435 XMLPersElemContentTContext::StartElement( xAttrList
);
1438 class XMLConfigItemTContext_Impl
: public XMLTransformerContext
1440 OUString m_aContent
;
1441 bool m_bIsRedlineProtectionKey
;
1447 TYPEINFO_OVERRIDE();
1449 XMLConfigItemTContext_Impl( XMLTransformerBase
& rTransformer
,
1450 const OUString
& rQName
);
1452 virtual ~XMLConfigItemTContext_Impl();
1454 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
1455 virtual void EndElement() SAL_OVERRIDE
;
1457 virtual void Characters( const OUString
& rChars
) SAL_OVERRIDE
;
1460 TYPEINIT1( XMLConfigItemTContext_Impl
, XMLTransformerContext
);
1462 XMLConfigItemTContext_Impl::XMLConfigItemTContext_Impl(
1463 XMLTransformerBase
& rImp
,
1464 const OUString
& rQName
) :
1465 XMLTransformerContext( rImp
, rQName
),
1466 m_bIsRedlineProtectionKey( false ),
1467 m_bIsCursorX( false ),
1468 m_bIsCursorY( false )
1472 XMLConfigItemTContext_Impl::~XMLConfigItemTContext_Impl()
1476 void XMLConfigItemTContext_Impl::StartElement(
1477 const Reference
< XAttributeList
>& rAttrList
)
1479 Reference
< XAttributeList
> xAttrList( rAttrList
);
1481 sal_Int16 nAttrCount
= xAttrList
.is() ? xAttrList
->getLength() : 0;
1482 for( sal_Int16 i
=0; i
< nAttrCount
; i
++ )
1484 const OUString
& rAttrName
= xAttrList
->getNameByIndex( i
);
1485 OUString aLocalName
;
1486 sal_uInt16 nPrefix
=
1487 GetTransformer().GetNamespaceMap().GetKeyByAttrName( rAttrName
,
1489 if( XML_NAMESPACE_CONFIG
== nPrefix
)
1491 if ( IsXMLToken( aLocalName
, XML_NAME
) )
1493 const OUString
& rValue
= xAttrList
->getValueByIndex( i
);
1494 if( rValue
== "RedlineProtectionKey" )
1495 m_bIsRedlineProtectionKey
= true;
1496 else if( rValue
== "CursorPositionX" )
1497 m_bIsCursorX
= true;
1498 else if( rValue
== "CursorPositionY" )
1499 m_bIsCursorY
= true;
1506 XMLTransformerContext::StartElement( xAttrList
);
1509 void XMLConfigItemTContext_Impl::Characters( const OUString
& rChars
)
1511 OUString
sChars(rChars
);
1512 if (m_bIsRedlineProtectionKey
)
1513 m_aContent
+= rChars
;
1514 else if (m_bIsCursorX
|| m_bIsCursorY
)
1516 sal_Int32 nPos
= rChars
.toInt32();
1517 if (m_bIsCursorX
&& nPos
> 255)
1519 else if (m_bIsCursorY
&& nPos
> 31999)
1522 sChars
= OUString::number(nPos
);
1525 XMLTransformerContext::Characters( sChars
);
1528 void XMLConfigItemTContext_Impl::EndElement()
1531 if( m_bIsRedlineProtectionKey
)
1533 const Reference
< XPropertySet
> rPropSet
=
1534 GetTransformer().GetPropertySet();
1537 const sal_Char sRedlineProtectionKey
[] = "RedlineProtectionKey";
1538 OUString
aPropName(sRedlineProtectionKey
);
1539 Reference
< XPropertySetInfo
> xPropSetInfo(
1540 rPropSet
->getPropertySetInfo() );
1541 if( xPropSetInfo
.is() &&
1542 xPropSetInfo
->hasPropertyByName( aPropName
) )
1544 Sequence
< sal_Int8
> aKey
;
1545 ::sax::Converter::decodeBase64( aKey
, m_aContent
);
1546 rPropSet
->setPropertyValue( aPropName
, makeAny( aKey
) );
1550 XMLTransformerContext::EndElement();
1553 class XMLTrackedChangesOASISTContext_Impl
: public XMLTransformerContext
1555 OUString m_aAttrQName
;
1559 TYPEINFO_OVERRIDE();
1561 XMLTrackedChangesOASISTContext_Impl( XMLTransformerBase
& rTransformer
,
1562 const OUString
& rQName
,
1564 XMLTokenEnum eToken
);
1566 virtual ~XMLTrackedChangesOASISTContext_Impl();
1568 virtual void StartElement( const ::com::sun::star::uno::Reference
< ::com::sun::star::xml::sax::XAttributeList
>& xAttrList
) SAL_OVERRIDE
;
1571 TYPEINIT1( XMLTrackedChangesOASISTContext_Impl
, XMLTransformerContext
);
1573 XMLTrackedChangesOASISTContext_Impl::XMLTrackedChangesOASISTContext_Impl(
1574 XMLTransformerBase
& rImp
,
1575 const OUString
& rQName
,
1577 XMLTokenEnum eToken
) :
1578 XMLTransformerContext( rImp
, rQName
),
1579 m_aAttrQName( rImp
.GetNamespaceMap().GetQNameByKey( nPrefix
,
1580 GetXMLToken(eToken
)) )
1584 XMLTrackedChangesOASISTContext_Impl::~XMLTrackedChangesOASISTContext_Impl()
1588 void XMLTrackedChangesOASISTContext_Impl::StartElement(
1589 const Reference
< XAttributeList
>& rAttrList
)
1591 Reference
< XAttributeList
> xAttrList( rAttrList
);
1592 const Reference
< XPropertySet
> rPropSet
=
1593 GetTransformer().GetPropertySet();
1596 const sal_Char sRedlineProtectionKey
[] = "RedlineProtectionKey";
1597 OUString
aPropName(sRedlineProtectionKey
);
1598 Reference
< XPropertySetInfo
> xPropSetInfo(
1599 rPropSet
->getPropertySetInfo() );
1600 if( xPropSetInfo
.is() &&
1601 xPropSetInfo
->hasPropertyByName( aPropName
) )
1603 Any aAny
= rPropSet
->getPropertyValue( aPropName
);
1604 Sequence
< sal_Int8
> aKey
;
1606 if( aKey
.getLength() )
1608 OUStringBuffer aBuffer
;
1609 ::sax::Converter::encodeBase64( aBuffer
, aKey
);
1610 XMLMutableAttributeList
*pMutableAttrList
=
1611 new XMLMutableAttributeList( xAttrList
);
1612 xAttrList
= pMutableAttrList
;
1613 pMutableAttrList
->AddAttribute( m_aAttrQName
,
1614 aBuffer
.makeStringAndClear() );
1618 XMLTransformerContext::StartElement( xAttrList
);
1621 XMLTransformerContext
*Oasis2OOoTransformer::CreateUserDefinedContext(
1622 const TransformerAction_Impl
& rAction
,
1623 const OUString
& rQName
,
1626 switch( rAction
.m_nActionType
)
1628 case XML_ETACTION_META
:
1629 return new XMLMetaTransformerContext( *this, rQName
);
1630 case XML_ETACTION_DOCUMENT
:
1631 return new XMLDocumentTransformerContext( *this, rQName
);
1632 case XML_ETACTION_BODY
:
1633 return new XMLBodyOASISTransformerContext_Impl( *this, rQName
);
1634 case XML_ETACTION_NOTES
:
1635 return new XMLNotesTransformerContext( *this, rQName
,
1636 static_cast< XMLTokenEnum
>( rAction
.m_nParam1
), bPersistent
);
1637 case XML_ETACTION_TABLE
:
1638 return new XMLTableTransformerContext_Impl( *this, rQName
);
1639 case XML_ETACTION_STYLE
:
1640 return new XMLStyleOASISTContext( *this, rQName
, bPersistent
);
1641 case XML_ETACTION_STYLE_RENAME
:
1642 return new XMLStyleOASISTContext( *this, rQName
,
1643 rAction
.GetQNamePrefixFromParam1(),
1644 rAction
.GetQNameTokenFromParam1(), bPersistent
);
1645 case XML_ETACTION_FRAME
:
1646 return new XMLFrameOASISTransformerContext( *this, rQName
);
1647 case XML_ETACTION_EVENT
:
1648 return new XMLEventOASISTransformerContext( *this, rQName
);
1649 case XML_ETACTION_DLG
:
1650 return new XMLDlgOASISTransformerContext( *this, rQName
);
1651 case XML_ETACTION_TAB_STOP
:
1652 return new XMLTabStopOASISTContext_Impl( *this, rQName
);
1653 case XML_ETACTION_FORM_CONTROL
:
1655 const XMLTransformerContext
*pCurrent
= GetCurrentContext();
1656 return new XMLControlOASISTransformerContext( *this, rQName
,
1657 pCurrent
&& pCurrent
->HasQName( XML_NAMESPACE_FORM
,
1660 case XML_ETACTION_FORM_PROPERTY
:
1661 return new XMLFormPropOASISTransformerContext( *this, rQName
,
1662 static_cast< XMLTokenEnum
>( rAction
.m_nParam1
) );
1663 case XML_ETACTION_CHART
:
1664 return new XMLChartOASISTransformerContext( *this, rQName
);
1665 case XML_ETACTION_CONFIG_ITEM
:
1666 return new XMLConfigItemTContext_Impl( *this, rQName
);
1667 case XML_ETACTION_TRACKED_CHANGES
:
1668 return new XMLTrackedChangesOASISTContext_Impl( *this, rQName
,
1669 rAction
.GetQNamePrefixFromParam1(),
1670 rAction
.GetQNameTokenFromParam1() );
1671 case XML_ETACTION_CHART_PLOT_AREA
:
1672 return new XMLChartPlotAreaOASISTContext( *this, rQName
);
1674 SAL_WARN( "xmloff.transform", "no user defined context found!" );
1678 // default is copying
1679 return new XMLTransformerContext( *this, rQName
);
1682 XMLTransformerActions
*Oasis2OOoTransformer::GetUserDefinedActions(
1685 XMLTransformerActions
*pActions
= 0;
1686 if( n
< MAX_OASIS_ACTIONS
)
1688 if( !m_aActions
[n
] )
1690 if( n
<MAX_OASIS_PROP_ACTIONS
)
1693 XMLStyleOASISTContext::CreateTransformerActions( n
);
1697 case OASIS_STYLE_ACTIONS
:
1698 m_aActions
[OASIS_STYLE_ACTIONS
] =
1699 new XMLTransformerActions( aStyleActionTable
);
1701 case OASIS_FONT_FACE_ACTIONS
:
1702 m_aActions
[OASIS_FONT_FACE_ACTIONS
] =
1703 new XMLTransformerActions( aFontFaceActionTable
);
1705 case OASIS_SHAPE_ACTIONS
:
1706 m_aActions
[OASIS_SHAPE_ACTIONS
] =
1707 new XMLTransformerActions( aShapeActionTable
);
1709 case OASIS_CONNECTOR_ACTIONS
:
1710 m_aActions
[OASIS_CONNECTOR_ACTIONS
] =
1711 new XMLTransformerActions( aConnectorActionTable
);
1713 case OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
:
1714 m_aActions
[OASIS_INDEX_ENTRY_TAB_STOP_ACTIONS
] =
1715 new XMLTransformerActions( aIndexEntryTabStopActionTable
);
1717 case OASIS_TAB_STOP_ACTIONS
:
1718 m_aActions
[OASIS_TAB_STOP_ACTIONS
] =
1719 new XMLTransformerActions( aTabStopActionTable
);
1721 case OASIS_LINENUMBERING_ACTIONS
:
1722 m_aActions
[OASIS_LINENUMBERING_ACTIONS
] =
1723 new XMLTransformerActions( aLineNumberingActionTable
);
1725 case OASIS_FOOTNOTE_SEP_ACTIONS
:
1726 m_aActions
[OASIS_FOOTNOTE_SEP_ACTIONS
] =
1727 new XMLTransformerActions( aFootnoteSepActionTable
);
1729 case OASIS_DROP_CAP_ACTIONS
:
1730 m_aActions
[OASIS_DROP_CAP_ACTIONS
] =
1731 new XMLTransformerActions( aDropCapActionTable
);
1733 case OASIS_COLUMNS_ACTIONS
:
1734 m_aActions
[OASIS_COLUMNS_ACTIONS
] =
1735 new XMLTransformerActions( aColumnsActionTable
);
1737 case OASIS_TEXT_VALUE_TYPE_ACTIONS
:
1738 m_aActions
[OASIS_TEXT_VALUE_TYPE_ACTIONS
] =
1739 new XMLTransformerActions( aTextValueTypeActionTable
);
1741 case OASIS_TABLE_VALUE_TYPE_ACTIONS
:
1742 m_aActions
[OASIS_TABLE_VALUE_TYPE_ACTIONS
] =
1743 new XMLTransformerActions( aTableValueTypeActionTable
);
1745 case OASIS_PARA_ACTIONS
:
1746 m_aActions
[OASIS_PARA_ACTIONS
] =
1747 new XMLTransformerActions( aParaActionTable
);
1749 case OASIS_LIST_STYLE_REF_ACTIONS
:
1750 m_aActions
[OASIS_LIST_STYLE_REF_ACTIONS
] =
1751 new XMLTransformerActions( aListStyleRefActionTable
);
1753 case OASIS_TEXT_STYLE_REF_ACTIONS
:
1754 m_aActions
[OASIS_TEXT_STYLE_REF_ACTIONS
] =
1755 new XMLTransformerActions( aTextStyleRefActionTable
);
1757 case OASIS_PARA_STYLE_REF_ACTIONS
:
1758 m_aActions
[OASIS_PARA_STYLE_REF_ACTIONS
] =
1759 new XMLTransformerActions( aParaStyleRefActionTable
);
1761 case OASIS_MASTER_PAGE_REF_ACTIONS
:
1762 m_aActions
[OASIS_MASTER_PAGE_REF_ACTIONS
] =
1763 new XMLTransformerActions( aMasterPageRefActionTable
);
1765 case OASIS_MAP_STYLE_REF_ACTIONS
:
1766 m_aActions
[OASIS_MAP_STYLE_REF_ACTIONS
] =
1767 new XMLTransformerActions( aMapStyleRefActionTable
);
1769 case OASIS_MASTER_PAGE_ACTIONS
:
1770 m_aActions
[OASIS_MASTER_PAGE_ACTIONS
] =
1771 new XMLTransformerActions( aMasterPageActionTable
);
1773 case OASIS_NOTES_ACTIONS
:
1774 m_aActions
[OASIS_NOTES_ACTIONS
] =
1775 new XMLTransformerActions( aNotesActionTable
);
1777 case OASIS_ANNOTATION_ACTIONS
:
1778 m_aActions
[OASIS_ANNOTATION_ACTIONS
] =
1779 new XMLTransformerActions( aAnnotationActionTable
);
1781 case OASIS_CHANGE_INFO_ACTIONS
:
1782 m_aActions
[OASIS_CHANGE_INFO_ACTIONS
] =
1783 new XMLTransformerActions( aChangeInfoActionTable
);
1785 case OASIS_FRAME_ELEM_ACTIONS
:
1786 m_aActions
[OASIS_FRAME_ELEM_ACTIONS
] =
1787 new XMLTransformerActions( aFrameActionTable
);
1789 case OASIS_BACKGROUND_IMAGE_ACTIONS
:
1790 m_aActions
[OASIS_BACKGROUND_IMAGE_ACTIONS
] =
1791 new XMLTransformerActions( aBackgroundImageActionTable
);
1793 case OASIS_DDE_CONNECTION_DECL_ACTIONS
:
1794 m_aActions
[OASIS_DDE_CONNECTION_DECL_ACTIONS
] =
1795 new XMLTransformerActions( aDDEConnectionDeclActionTable
);
1797 case OASIS_EVENT_ACTIONS
:
1798 m_aActions
[OASIS_EVENT_ACTIONS
] =
1799 new XMLTransformerActions( aEventActionTable
);
1801 case OASIS_DLG_ACTIONS
:
1802 m_aActions
[OASIS_DLG_ACTIONS
] =
1803 new XMLTransformerActions( aDlgActionTable
);
1805 case OASIS_FORM_CONTROL_ACTIONS
:
1806 m_aActions
[OASIS_FORM_CONTROL_ACTIONS
] =
1807 new XMLTransformerActions( aFormControlActionTable
);
1809 case OASIS_FORM_COLUMN_ACTIONS
:
1810 m_aActions
[OASIS_FORM_COLUMN_ACTIONS
] =
1811 new XMLTransformerActions( aFormColumnActionTable
);
1813 case OASIS_FORM_PROP_ACTIONS
:
1814 m_aActions
[OASIS_FORM_PROP_ACTIONS
] =
1815 new XMLTransformerActions( aFormPropActionTable
);
1817 case OASIS_XLINK_ACTIONS
:
1818 m_aActions
[OASIS_XLINK_ACTIONS
] =
1819 new XMLTransformerActions( aXLinkActionTable
);
1821 case OASIS_CONFIG_ITEM_SET_ACTIONS
:
1822 m_aActions
[OASIS_CONFIG_ITEM_SET_ACTIONS
] =
1823 new XMLTransformerActions( aConfigItemSetActionTable
);
1825 case OASIS_FORMULA_ACTIONS
:
1826 m_aActions
[OASIS_FORMULA_ACTIONS
] =
1827 new XMLTransformerActions( aFormulaActionTable
);
1829 case OASIS_CHART_ACTIONS
:
1830 m_aActions
[OASIS_CHART_ACTIONS
] =
1831 new XMLTransformerActions( aChartActionTable
);
1833 case OASIS_FORM_ACTIONS
:
1834 m_aActions
[OASIS_FORM_ACTIONS
] =
1835 new XMLTransformerActions( aFormActionTable
);
1837 case OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
:
1838 m_aActions
[OASIS_ALPHABETICAL_INDEX_MARK_ACTIONS
] =
1839 new XMLTransformerActions(
1840 aAlphabeticalIndexMarkActionTable
);
1842 case OASIS_CONTENT_VALIDATION_ACTIONS
:
1843 m_aActions
[OASIS_CONTENT_VALIDATION_ACTIONS
] =
1844 new XMLTransformerActions( aContentValidationActionTable
);
1846 case OASIS_DDE_CONV_MODE_ACTIONS
:
1847 m_aActions
[OASIS_DDE_CONV_MODE_ACTIONS
] =
1848 new XMLTransformerActions( aDDEConvModeActionTable
);
1850 case OASIS_DATAPILOT_MEMBER_ACTIONS
:
1851 m_aActions
[OASIS_DATAPILOT_MEMBER_ACTIONS
] =
1852 new XMLTransformerActions( aDataPilotMemberActionTable
);
1854 case OASIS_DATAPILOT_LEVEL_ACTIONS
:
1855 m_aActions
[OASIS_DATAPILOT_LEVEL_ACTIONS
] =
1856 new XMLTransformerActions( aDataPilotLevelActionTable
);
1858 case OASIS_SOURCE_SERVICE_ACTIONS
:
1859 m_aActions
[OASIS_SOURCE_SERVICE_ACTIONS
] =
1860 new XMLTransformerActions( aSourceServiceActionTable
);
1862 case OASIS_DRAW_AREA_POLYGON_ACTIONS
:
1863 m_aActions
[OASIS_DRAW_AREA_POLYGON_ACTIONS
] =
1864 new XMLTransformerActions( aShapeActionTable
);
1865 m_aActions
[OASIS_DRAW_AREA_POLYGON_ACTIONS
]
1866 ->Add( aDrawAreaPolygonActionTable
);
1868 case OASIS_SCRIPT_ACTIONS
:
1869 m_aActions
[OASIS_SCRIPT_ACTIONS
] =
1870 new XMLTransformerActions( aScriptActionTable
);
1872 case OASIS_DATETIME_ACTIONS
:
1873 m_aActions
[OASIS_DATETIME_ACTIONS
] =
1874 new XMLTransformerActions( aDateTimeActionTable
);
1876 // Bugdoc with table won't load correctly (#i40011#, #i40015#)
1877 case OASIS_TABLE_STYLE_REF_ACTIONS
:
1878 m_aActions
[OASIS_TABLE_STYLE_REF_ACTIONS
] =
1879 new XMLTransformerActions( aTableStyleRefActionTable
);
1881 case OASIS_ANIMATION_ACTIONS
:
1882 m_aActions
[OASIS_ANIMATION_ACTIONS
] =
1883 new XMLTransformerActions( aAnimationActionTable
);
1887 pActions
= m_aActions
[n
];
1893 OUString
Oasis2OOoTransformer::GetEventName( const OUString
& rName
,
1896 if( bForm
&& !m_pFormEventMap
)
1898 XMLEventOASISTransformerContext::CreateFormEventMap();
1900 m_pEventMap
= XMLEventOASISTransformerContext::CreateEventMap();
1902 OUString aMacroName
;
1903 sal_uInt16 nPrefix
=
1904 GetNamespaceMap().GetKeyByAttrName( rName
, &aMacroName
);
1905 return XMLEventOASISTransformerContext::GetEventName(
1906 nPrefix
, aMacroName
, *m_pEventMap
,
1907 bForm
? m_pFormEventMap
: 0 );
1910 Oasis2OOoTransformer::Oasis2OOoTransformer() throw() :
1911 XMLTransformerBase( aActionTable
, aTokenMap
),
1913 m_pFormEventMap( 0 )
1915 GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE
), GetXMLToken(XML_N_OFFICE
), XML_NAMESPACE_OFFICE
);
1916 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE
), GetXMLToken(XML_N_OFFICE_OOO
), XML_NAMESPACE_OFFICE
);
1918 GetNamespaceMap().Add( GetXMLToken(XML_NP_META
), GetXMLToken(XML_N_META
), XML_NAMESPACE_META
);
1919 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_META
), GetXMLToken(XML_N_META_OOO
), XML_NAMESPACE_META
);
1921 GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE
), GetXMLToken(XML_N_STYLE
), XML_NAMESPACE_STYLE
);
1922 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_STYLE
), GetXMLToken(XML_N_STYLE_OOO
), XML_NAMESPACE_STYLE
);
1924 GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER
), GetXMLToken(XML_N_NUMBER
), XML_NAMESPACE_NUMBER
);
1925 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER
), GetXMLToken(XML_N_NUMBER_OOO
), XML_NAMESPACE_NUMBER
);
1927 GetNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG
), GetXMLToken(XML_N_CONFIG
), XML_NAMESPACE_CONFIG
);
1928 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CONFIG
), GetXMLToken(XML_N_CONFIG_OOO
), XML_NAMESPACE_CONFIG
);
1930 GetNamespaceMap().Add( GetXMLToken(XML_NP_TEXT
), GetXMLToken(XML_N_TEXT
), XML_NAMESPACE_TEXT
);
1931 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TEXT
), GetXMLToken(XML_N_TEXT_OOO
), XML_NAMESPACE_TEXT
);
1933 GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE
), GetXMLToken(XML_N_TABLE
), XML_NAMESPACE_TABLE
);
1934 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_TABLE
), GetXMLToken(XML_N_TABLE_OOO
), XML_NAMESPACE_TABLE
);
1936 GetNamespaceMap().Add( GetXMLToken(XML_NP_DRAW
), GetXMLToken(XML_N_DRAW
), XML_NAMESPACE_DRAW
);
1937 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DRAW
), GetXMLToken(XML_N_DRAW_OOO
), XML_NAMESPACE_DRAW
);
1939 GetNamespaceMap().Add( GetXMLToken(XML_NP_DR3D
), GetXMLToken(XML_N_DR3D
), XML_NAMESPACE_DR3D
);
1940 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DR3D
), GetXMLToken(XML_N_DR3D_OOO
), XML_NAMESPACE_DR3D
);
1942 GetNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION
), GetXMLToken(XML_N_PRESENTATION
), XML_NAMESPACE_PRESENTATION
);
1943 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_PRESENTATION
), GetXMLToken(XML_N_PRESENTATION_OOO
), XML_NAMESPACE_PRESENTATION
);
1945 GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART
), GetXMLToken(XML_N_CHART
), XML_NAMESPACE_CHART
);
1946 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_CHART
), GetXMLToken(XML_N_CHART_OOO
), XML_NAMESPACE_CHART
);
1948 GetNamespaceMap().Add( GetXMLToken(XML_NP_FORM
), GetXMLToken(XML_N_FORM
), XML_NAMESPACE_FORM
);
1949 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FORM
), GetXMLToken(XML_N_FORM_OOO
), XML_NAMESPACE_FORM
);
1951 GetNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT
), GetXMLToken(XML_N_SCRIPT
), XML_NAMESPACE_SCRIPT
);
1952 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SCRIPT
), GetXMLToken(XML_N_SCRIPT_OOO
), XML_NAMESPACE_SCRIPT
);
1954 GetNamespaceMap().Add( GetXMLToken(XML_NP_DLG
), GetXMLToken(XML_N_DLG
), XML_NAMESPACE_DLG
);
1955 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_DLG
), GetXMLToken(XML_N_DLG
), XML_NAMESPACE_DLG
);
1957 GetNamespaceMap().Add( GetXMLToken(XML_NP_FO
), GetXMLToken(XML_N_FO_COMPAT
), XML_NAMESPACE_FO
);
1958 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_FO
), GetXMLToken(XML_N_FO
), XML_NAMESPACE_FO
);
1960 GetNamespaceMap().Add( GetXMLToken(XML_NP_SVG
), GetXMLToken(XML_N_SVG_COMPAT
), XML_NAMESPACE_SVG
);
1961 GetReplaceNamespaceMap().Add( GetXMLToken(XML_NP_SVG
), GetXMLToken(XML_N_SVG
), XML_NAMESPACE_SVG
);
1963 for( sal_uInt16 i
=0; i
<MAX_OASIS_ACTIONS
; ++i
)
1967 Oasis2OOoTransformer::~Oasis2OOoTransformer() throw()
1969 for( sal_uInt16 i
=0; i
<MAX_OASIS_ACTIONS
; ++i
)
1970 delete m_aActions
[i
];
1971 XMLEventOASISTransformerContext::FlushEventMap( m_pEventMap
);
1972 XMLEventOASISTransformerContext::FlushEventMap( m_pFormEventMap
);
1977 class theOasis2OOoTransformerUnoTunnelId
: public rtl::Static
< UnoTunnelIdInit
, theOasis2OOoTransformerUnoTunnelId
> {};
1980 const Sequence
< sal_Int8
> & Oasis2OOoTransformer::getUnoTunnelId() throw()
1982 return theOasis2OOoTransformerUnoTunnelId::get().getSeq();
1986 sal_Int64 SAL_CALL
Oasis2OOoTransformer::getSomething( const Sequence
< sal_Int8
>& rId
)
1987 throw(RuntimeException
, std::exception
)
1989 if( rId
.getLength() == 16
1990 && 0 == memcmp( getUnoTunnelId().getConstArray(),
1991 rId
.getConstArray(), 16 ) )
1993 return reinterpret_cast< sal_Int64
>( this );
1997 return (sal_Int64
)0;
2002 OUString SAL_CALL
Oasis2OOoTransformer::getImplementationName()
2003 throw(RuntimeException
, std::exception
)
2005 return Oasis2OOoTransformer_getImplementationName();
2008 sal_Bool SAL_CALL
Oasis2OOoTransformer::supportsService( const OUString
& ServiceName
)
2009 throw(RuntimeException
, std::exception
)
2011 return cppu::supportsService(this, ServiceName
);
2014 Sequence
< OUString
> SAL_CALL
Oasis2OOoTransformer::getSupportedServiceNames( )
2015 throw(RuntimeException
, std::exception
)
2017 Sequence
<OUString
> aSeq(0);
2021 // Service registration
2023 OUString SAL_CALL
Oasis2OOoTransformer_getImplementationName() throw()
2025 return OUString( "com.sun.star.comp.Oasis2OOoTransformer" );
2028 Sequence
< OUString
> SAL_CALL
Oasis2OOoTransformer_getSupportedServiceNames()
2031 const OUString
aServiceName( Oasis2OOoTransformer_getImplementationName() );
2032 const Sequence
< OUString
> aSeq( &aServiceName
, 1 );
2036 Reference
< XInterface
> SAL_CALL
Oasis2OOoTransformer_createInstance(
2037 const Reference
< XMultiServiceFactory
> &)
2040 SAL_INFO("xmloff.transform", "Creating Oasis2OOoTransformer");
2041 return (cppu::OWeakObject
*)new Oasis2OOoTransformer
;
2044 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */