diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2010-06-15 05:33:03 +0200 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2010-06-15 05:33:03 +0200 |
commit | fc156984589e119eabc10b60e828880c09e39707 (patch) | |
tree | 0c26fa4ceddc84a8001d229fdb367c8f66806d3c /xmloff | |
parent | 5895b4ff6a06e2e002aaa6c61a2faf0cb58ddc9e (diff) | |
parent | 634bd66a83cffb00d41d434e77c80eef06a0c813 (diff) |
calctabcolor: rebased to DEV300_m82.
Diffstat (limited to 'xmloff')
95 files changed, 2388 insertions, 3792 deletions
diff --git a/xmloff/inc/RDFaExportHelper.hxx b/xmloff/inc/RDFaExportHelper.hxx index 9dd23e230e01..f8e991060eea 100644 --- a/xmloff/inc/RDFaExportHelper.hxx +++ b/xmloff/inc/RDFaExportHelper.hxx @@ -53,8 +53,6 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XDocumentRepository> m_xRepository; - ::rtl::OUString m_RDFsLabel; - typedef ::std::map< ::rtl::OUString, ::rtl::OUString > BlankNodeMap_t; diff --git a/xmloff/inc/RDFaImportHelper.hxx b/xmloff/inc/RDFaImportHelper.hxx index 600a8a084cf2..030e1a840b9b 100644 --- a/xmloff/inc/RDFaImportHelper.hxx +++ b/xmloff/inc/RDFaImportHelper.hxx @@ -28,10 +28,12 @@ #ifndef RDFAIMPORTHELPER_HXX #define RDFAIMPORTHELPER_HXX -#include <com/sun/star/uno/Reference.h> - #include <vector> +#include <boost/shared_ptr.hpp> + +#include <com/sun/star/uno/Reference.h> + namespace rtl { class OUString; } @@ -46,6 +48,7 @@ class SvXMLImport; namespace xmloff { struct RDFaEntry; +struct ParsedRDFaAttributes; class SAL_DLLPRIVATE RDFaImportHelper { @@ -65,10 +68,23 @@ public: ~RDFaImportHelper(); - /** Add a RDFa statement; parameters are XML attribute values */ + /** Parse RDFa attributes */ + ::boost::shared_ptr<ParsedRDFaAttributes> ParseRDFa( + ::rtl::OUString const & i_rAbout, + ::rtl::OUString const & i_rProperty, + ::rtl::OUString const & i_rContent, + ::rtl::OUString const & i_rDatatype); + + /** Add a RDFa statement; must have been parsed with ParseRDFa */ void AddRDFa( ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable> - i_xObject, + const & i_xObject, + ::boost::shared_ptr<ParsedRDFaAttributes> & i_pRDFaAttributes); + + /** Parse and add a RDFa statement; parameters are XML attribute values */ + void ParseAndAddRDFa( + ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable> + const & i_xObject, ::rtl::OUString const & i_rAbout, ::rtl::OUString const & i_rProperty, ::rtl::OUString const & i_rContent, diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx index d6227754a5f2..49a471a31729 100644 --- a/xmloff/inc/SchXMLExport.hxx +++ b/xmloff/inc/SchXMLExport.hxx @@ -81,7 +81,7 @@ public: void SetProgress( sal_Int32 nPercentage ); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return maExportHelper.GetPropertySetMapper(); } + UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; // XServiceInfo ( : SvXMLExport ) virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ); diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 858371a1805b..7168b2b811a8 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -69,6 +69,8 @@ enum SchXMLChartElemTokenMap enum SchXMLPlotAreaElemTokenMap { + XML_TOK_PA_COORDINATE_REGION_EXT, + XML_TOK_PA_COORDINATE_REGION, XML_TOK_PA_AXIS, XML_TOK_PA_SERIES, XML_TOK_PA_WALL, diff --git a/xmloff/inc/xmlkywd.hxx b/xmloff/inc/xmlkywd.hxx deleted file mode 100644 index bce52d875b52..000000000000 --- a/xmloff/inc/xmlkywd.hxx +++ /dev/null @@ -1,1998 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _XMLOFF_XMLKYWD_HXX -#define _XMLOFF_XMLKYWD_HXX - -#include <tools/string.hxx> - -/* - * THIS FILE IS DEPRECATED. IT IS SUPERSEDED BY XMLTOKEN.HXX. - * - * Please use xmltoken.hxx / xmltoken.cxx from now on. - */ - - -/* if XML_DEFINE_KEYWORDS is defined the variables are - defined rather than declared. So this file MUST be included - WITHOUT this define. - - (Except the xmlkywd.cxx file that actually defines the - variables which sets this define.) - */ - -#ifndef XML_DEFINE_KEYWORDS -#define XML_CONSTASCII_ACTION( n, s ) extern sal_Char __FAR_DATA n[sizeof(s)] -#else -#define XML_CONSTASCII_ACTION( n, s ) sal_Char __FAR_DATA n[sizeof(s)] = s -#endif - -// common XML -XML_CONSTASCII_ACTION( sXML_CDATA, "CDATA" ); -XML_CONSTASCII_ACTION( sXML_WS, " " ); -XML_CONSTASCII_ACTION( sXML_xml, "xml" ); -XML_CONSTASCII_ACTION( sXML_xmlns, "xmlns" ); -XML_CONSTASCII_ACTION( sXML_xml_pi, "version=\"1.0\" encoding=\"UTF-8\"" ); -XML_CONSTASCII_ACTION( sXML_xml_doctype_prefix, "<!DOCTYPE " ); -XML_CONSTASCII_ACTION( sXML_xml_doctype_suffix, " PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">" ); - -// namespace prefixes and names -XML_CONSTASCII_ACTION( sXML_np_office, "office" ); -XML_CONSTASCII_ACTION( sXML_n_office, "http://openoffice.org/2000/office" ); -XML_CONSTASCII_ACTION( sXML_n_office_old, "http://sun.com/xmlns/staroffice/office" ); -XML_CONSTASCII_ACTION( sXML_np_meta, "meta" ); -XML_CONSTASCII_ACTION( sXML_n_meta, "http://openoffice.org/2000/meta" ); -XML_CONSTASCII_ACTION( sXML_n_meta_old, "http://sun.com/xmlns/staroffice/meta" ); -XML_CONSTASCII_ACTION( sXML_np_style, "style" ); -XML_CONSTASCII_ACTION( sXML_n_style, "http://openoffice.org/2000/style" ); -XML_CONSTASCII_ACTION( sXML_n_style_old, "http://sun.com/xmlns/staroffice/style" ); -XML_CONSTASCII_ACTION( sXML_np_number, "number" ); -XML_CONSTASCII_ACTION( sXML_n_number, "http://openoffice.org/2000/datastyle" ); -XML_CONSTASCII_ACTION( sXML_n_number_old, "http://sun.com/xmlns/staroffice/number" ); -XML_CONSTASCII_ACTION( sXML_np_text, "text" ); -XML_CONSTASCII_ACTION( sXML_n_text, "http://openoffice.org/2000/text" ); -XML_CONSTASCII_ACTION( sXML_n_text_old, "http://sun.com/xmlns/staroffice/text" ); -XML_CONSTASCII_ACTION( sXML_np_table, "table" ); -XML_CONSTASCII_ACTION( sXML_n_table, "http://openoffice.org/2000/table" ); -XML_CONSTASCII_ACTION( sXML_n_table_old, "http://sun.com/xmlns/staroffice/table" ); -XML_CONSTASCII_ACTION( sXML_np_draw, "draw" ); -XML_CONSTASCII_ACTION( sXML_n_draw, "http://openoffice.org/2000/drawing" ); -XML_CONSTASCII_ACTION( sXML_np_dr3d, "dr3d" ); -XML_CONSTASCII_ACTION( sXML_n_dr3d, "http://openoffice.org/2000/dr3d" ); -XML_CONSTASCII_ACTION( sXML_n_draw_old, "http://sun.com/xmlns/staroffice/draw" ); -XML_CONSTASCII_ACTION( sXML_np_presentation, "presentation" ); -XML_CONSTASCII_ACTION( sXML_n_presentation, "http://openoffice.org/2000/presentation" ); -XML_CONSTASCII_ACTION( sXML_n_presentation_old, "http://sun.com/xmlns/staroffice/presentation" ); -XML_CONSTASCII_ACTION( sXML_np_chart, "chart" ); -XML_CONSTASCII_ACTION( sXML_n_chart, "http://openoffice.org/2000/chart" ); -XML_CONSTASCII_ACTION( sXML_np_config, "config" ); -XML_CONSTASCII_ACTION( sXML_n_config, "http://openoffice.org/2001/config" ); -XML_CONSTASCII_ACTION( sXML_n_chart_old, "http://sun.com/xmlns/staroffice/chart" ); -XML_CONSTASCII_ACTION( sXML_np_fo, "fo" ); -XML_CONSTASCII_ACTION( sXML_n_fo_old, "http://www.w3.org/1999/XSL/Format/" ); -XML_CONSTASCII_ACTION( sXML_n_fo, "http://www.w3.org/1999/XSL/Format" ); -XML_CONSTASCII_ACTION( sXML_np_xlink, "xlink" ); -XML_CONSTASCII_ACTION( sXML_n_xlink, "http://www.w3.org/1999/xlink" ); -XML_CONSTASCII_ACTION( sXML_n_xlink_old, "http://www.w3.org/1999/xlink/namespace" ); -XML_CONSTASCII_ACTION( sXML_np_dc, "dc" ); -XML_CONSTASCII_ACTION( sXML_n_dc, "http://purl.org/dc/elements/1.1/" ); -XML_CONSTASCII_ACTION( sXML_np_svg, "svg" ); -XML_CONSTASCII_ACTION( sXML_n_svg, "http://www.w3.org/2000/svg" ); -XML_CONSTASCII_ACTION( sXML_namespace_form, "form" ); -XML_CONSTASCII_ACTION( sXML_url_form, "http://openoffice.org/2000/form" ); -XML_CONSTASCII_ACTION( sXML_namespace_script, "script" ); -XML_CONSTASCII_ACTION( sXML_url_script, "http://openoffice.org/2000/script" ); - -XML_CONSTASCII_ACTION( sXML_np_block_list, "block-list"); -XML_CONSTASCII_ACTION( sXML_n_block_list, "http://openoffice.org/2001/block-list" ); - -XML_CONSTASCII_ACTION( sXML_np_math, "math"); -XML_CONSTASCII_ACTION( sXML_n_math, "http://www.w3.org/1998/Math/MathML" ); - -XML_CONSTASCII_ACTION( sXML_np_versions_list, "VL"); -XML_CONSTASCII_ACTION( sXML_n_versions_list, "http://openoffice.org/2001/versions-list" ); - -// units -XML_CONSTASCII_ACTION( sXML_unit_mm, "mm" ); -XML_CONSTASCII_ACTION( sXML_unit_m, "m" ); -XML_CONSTASCII_ACTION( sXML_unit_km, "km" ); -XML_CONSTASCII_ACTION( sXML_unit_cm, "cm" ); -XML_CONSTASCII_ACTION( sXML_unit_pt, "pt" ); -XML_CONSTASCII_ACTION( sXML_unit_pc, "pc" ); -XML_CONSTASCII_ACTION( sXML_unit_foot, "ft" ); -XML_CONSTASCII_ACTION( sXML_unit_miles, "mi" ); -XML_CONSTASCII_ACTION( sXML_unit_inch, "inch" ); - -// any other -XML_CONSTASCII_ACTION( sXML_1, "1" ); -XML_CONSTASCII_ACTION( sXML_10, "10" ); -XML_CONSTASCII_ACTION( sXML_2, "2" ); -XML_CONSTASCII_ACTION( sXML_3, "3" ); -XML_CONSTASCII_ACTION( sXML_4, "4" ); -XML_CONSTASCII_ACTION( sXML_5, "5" ); -XML_CONSTASCII_ACTION( sXML_6, "6" ); -XML_CONSTASCII_ACTION( sXML_7, "7" ); -XML_CONSTASCII_ACTION( sXML_8, "8" ); -XML_CONSTASCII_ACTION( sXML_9, "9" ); -XML_CONSTASCII_ACTION( sXML_A, "A" ); -XML_CONSTASCII_ACTION( sXML_I, "I" ); -XML_CONSTASCII_ACTION( sXML_IBM437, "IBM437" ); -XML_CONSTASCII_ACTION( sXML_IBM850, "IBM850" ); -XML_CONSTASCII_ACTION( sXML_IBM860, "IBM860" ); -XML_CONSTASCII_ACTION( sXML_IBM861, "IBM861" ); -XML_CONSTASCII_ACTION( sXML_IBM863, "IBM863" ); -XML_CONSTASCII_ACTION( sXML_IBM865, "IBM865" ); -XML_CONSTASCII_ACTION( sXML_ISO_8859_1, "ISO-8859-1" ); -XML_CONSTASCII_ACTION( sXML_OLE2, "ole2" ); -XML_CONSTASCII_ACTION( sXML__colon, ":" ); -XML_CONSTASCII_ACTION( sXML__empty, "" ); -XML_CONSTASCII_ACTION( sXML__unknown_, "_unknown_" ); -XML_CONSTASCII_ACTION( sXML_a, "a" ); -XML_CONSTASCII_ACTION( sXML_abbreviated_name, "abbreviated-name" ); -XML_CONSTASCII_ACTION( sXML_above, "above" ); -XML_CONSTASCII_ACTION( sXML_abs, "abs" ); -XML_CONSTASCII_ACTION( sXML_accent, "accent" ); -XML_CONSTASCII_ACTION( sXML_accentunder, "accentunder" ); -XML_CONSTASCII_ACTION( sXML_acceptance_state, "acceptance-state" ); -XML_CONSTASCII_ACTION( sXML_accepted, "accepted" ); -XML_CONSTASCII_ACTION( sXML_action, "action" ); -XML_CONSTASCII_ACTION( sXML_active, "active" ); -XML_CONSTASCII_ACTION( sXML_active_split_range, "active-split-range" ); -XML_CONSTASCII_ACTION( sXML_active_table, "active-table" ); -XML_CONSTASCII_ACTION( sXML_actuate, "actuate" ); -XML_CONSTASCII_ACTION( sXML_add_in, "add-in" ); -XML_CONSTASCII_ACTION( sXML_add_in_name, "add-in-name" ); -XML_CONSTASCII_ACTION( sXML_address, "address" ); -XML_CONSTASCII_ACTION( sXML_adjustment, "adjustment" ); -XML_CONSTASCII_ACTION( sXML_algorithm, "algorithm" ); -XML_CONSTASCII_ACTION( sXML_align, "align" ); -XML_CONSTASCII_ACTION( sXML_all, "all" ); -XML_CONSTASCII_ACTION( sXML_allow_empty_cell, "allow-empty-cell" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index, "alphabetical-index" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_auto_mark_file, "alphabetical-index-auto-mark-file" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_entry_template, "alphabetical-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark, "alphabetical-index-mark" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark_end, "alphabetical-index-mark-end" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark_start, "alphabetical-index-mark-start" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_index_source, "alphabetical-index-source" ); -XML_CONSTASCII_ACTION( sXML_alphabetical_separators, "alphabetical-separators" ); -XML_CONSTASCII_ACTION( sXML_alternate, "alternate" ); -XML_CONSTASCII_ACTION( sXML_am_pm, "am-pm" ); -XML_CONSTASCII_ACTION( sXML_ambient_color, "ambient-color"); -XML_CONSTASCII_ACTION( sXML_anchor_page_number, "anchor-page-number" ); -XML_CONSTASCII_ACTION( sXML_anchor_type, "anchor-type" ); -XML_CONSTASCII_ACTION( sXML_and, "and" ); -XML_CONSTASCII_ACTION( sXML_animation, "animation" ); -XML_CONSTASCII_ACTION( sXML_animation_direction, "animation-direction" ); -XML_CONSTASCII_ACTION( sXML_animation_start_inside, "animation-start-inside" ); -XML_CONSTASCII_ACTION( sXML_animation_stop_inside, "animation-stop-inside" ); -XML_CONSTASCII_ACTION( sXML_animation_repeat, "animation-repeat" ); -XML_CONSTASCII_ACTION( sXML_animation_delay, "animation-delay" ); -XML_CONSTASCII_ACTION( sXML_animation_steps, "animation-steps" ); -XML_CONSTASCII_ACTION( sXML_annotation, "annotation" ); -XML_CONSTASCII_ACTION( sXML_annotations, "annotations" ); -XML_CONSTASCII_ACTION( sXML_annote, "annote" ); -XML_CONSTASCII_ACTION( sXML_applet, "applet"); -XML_CONSTASCII_ACTION( sXML_applet_name, "applet-name"); -XML_CONSTASCII_ACTION( sXML_application_data, "application-data"); -XML_CONSTASCII_ACTION( sXML_application_xml, "application-xml"); -XML_CONSTASCII_ACTION( sXML_apply, "apply" ); -XML_CONSTASCII_ACTION( sXML_apply_style_name, "apply-style-name" ); -XML_CONSTASCII_ACTION( sXML_aqua, "aqua" ); -XML_CONSTASCII_ACTION( sXML_arccos, "arccos" ); -XML_CONSTASCII_ACTION( sXML_archive, "archive" ); -XML_CONSTASCII_ACTION( sXML_arcsin, "arcsin" ); -XML_CONSTASCII_ACTION( sXML_arctan, "arctan" ); -XML_CONSTASCII_ACTION( sXML_area, "area" ); -XML_CONSTASCII_ACTION( sXML_area_circle, "area-circle" ); -XML_CONSTASCII_ACTION( sXML_area_polygon, "area-polygon" ); -XML_CONSTASCII_ACTION( sXML_area_rectangle, "area-rectangle" ); -XML_CONSTASCII_ACTION( sXML_article, "article" ); -XML_CONSTASCII_ACTION( sXML_as_char, "as-char" ); -XML_CONSTASCII_ACTION( sXML_ascending, "ascending"); -XML_CONSTASCII_ACTION( sXML_attached_axis, "attached-axis" ); -XML_CONSTASCII_ACTION( sXML_attractive, "attractive"); -XML_CONSTASCII_ACTION( sXML_author, "author" ); -XML_CONSTASCII_ACTION( sXML_author_initials, "author-initials" ); -XML_CONSTASCII_ACTION( sXML_author_name, "author-name" ); -XML_CONSTASCII_ACTION( sXML_auto, "auto" ); -XML_CONSTASCII_ACTION( sXML_auto_grow_height, "auto-grow-height" ); -XML_CONSTASCII_ACTION( sXML_auto_grow_width, "auto-grow-width" ); -XML_CONSTASCII_ACTION( sXML_auto_reload, "auto-reload" ); -XML_CONSTASCII_ACTION( sXML_auto_text, "auto-text" ); -XML_CONSTASCII_ACTION( sXML_auto_text_events, "auto-text-events" ); -XML_CONSTASCII_ACTION( sXML_auto_text_group, "auto-text-group" ); -XML_CONSTASCII_ACTION( sXML_auto_text_indent, "auto-text-indent" ); -XML_CONSTASCII_ACTION( sXML_up, "up" ); -XML_CONSTASCII_ACTION( sXML_auto_update, "auto-update" ); -XML_CONSTASCII_ACTION( sXML_automatic, "automatic"); -XML_CONSTASCII_ACTION( sXML_automatic_find_labels, "automatic-find-labels" ); -XML_CONSTASCII_ACTION( sXML_automatic_order, "automatic-order" ); -XML_CONSTASCII_ACTION( sXML_automatic_styles, "automatic-styles" ); -XML_CONSTASCII_ACTION( sXML_automatic_update, "automatic-update" ); -XML_CONSTASCII_ACTION( sXML_average, "average" ); -XML_CONSTASCII_ACTION( sXML_axis, "axis" ); -XML_CONSTASCII_ACTION( sXML_back_scale, "back-scale" ); -XML_CONSTASCII_ACTION( sXML_backface_culling, "backface-culling" ); -XML_CONSTASCII_ACTION( sXML_background, "background" ); -XML_CONSTASCII_ACTION( sXML_background_color, "background-color" ); -XML_CONSTASCII_ACTION( sXML_background_image, "background-image" ); -XML_CONSTASCII_ACTION( sXML_background_no_repeat, "no-repeat" ); -XML_CONSTASCII_ACTION( sXML_background_objects_visible, "background-objects-visible" ); -XML_CONSTASCII_ACTION( sXML_background_repeat, "repeat" ); -XML_CONSTASCII_ACTION( sXML_background_stretch, "stretch" ); -XML_CONSTASCII_ACTION( sXML_background_visible, "background-visible" ); -XML_CONSTASCII_ACTION( sXML_bar, "bar" ); -XML_CONSTASCII_ACTION( sXML_base64Binary, "base64Binary"); -XML_CONSTASCII_ACTION( sXML_base_cell_address, "base-cell-address"); -XML_CONSTASCII_ACTION( sXML_baseline, "baseline" ); -XML_CONSTASCII_ACTION( sXML_before_date_time, "before-date-time" ); -XML_CONSTASCII_ACTION( sXML_below , "below" ); -XML_CONSTASCII_ACTION( sXML_between_date_times, "between-date-times" ); -XML_CONSTASCII_ACTION( sXML_bevel , "bevel" ); -XML_CONSTASCII_ACTION( sXML_bibiliographic_type, "bibiliographic-type" ); -XML_CONSTASCII_ACTION( sXML_bibliography, "bibliography" ); -XML_CONSTASCII_ACTION( sXML_bibliography_configuration, "bibliography-configuration" ); -XML_CONSTASCII_ACTION( sXML_bibliography_data_field, "bibliography-data-field" ); -XML_CONSTASCII_ACTION( sXML_bibliography_entry_template, "bibliography-entry-template" ); -XML_CONSTASCII_ACTION( sXML_bibliography_mark, "bibliography-mark" ); -XML_CONSTASCII_ACTION( sXML_bibliography_source, "bibliography-source" ); -XML_CONSTASCII_ACTION( sXML_bibliography_type, "bibliography-type" ); -XML_CONSTASCII_ACTION( sXML_bind_styles_to_content, "bind-styles-to-content"); -XML_CONSTASCII_ACTION( sXML_bitmap , "bitmap" ); -XML_CONSTASCII_ACTION( sXML_black, "black" ); -XML_CONSTASCII_ACTION( sXML_blend, "blend" ); -XML_CONSTASCII_ACTION( sXML_blinking, "blinking" ); -XML_CONSTASCII_ACTION( sXML_block, "block" ); -XML_CONSTASCII_ACTION( sXML_block_list, "block-list" ); -XML_CONSTASCII_ACTION( sXML_blue , "blue" ); -XML_CONSTASCII_ACTION( sXML_body, "body" ); -XML_CONSTASCII_ACTION( sXML_bold, "bold" ); -XML_CONSTASCII_ACTION( sXML_book, "book" ); -XML_CONSTASCII_ACTION( sXML_booklet, "booklet" ); -XML_CONSTASCII_ACTION( sXML_bookmark, "bookmark" ); -XML_CONSTASCII_ACTION( sXML_bookmark_end, "bookmark-end" ); -XML_CONSTASCII_ACTION( sXML_bookmark_ref, "bookmark-ref" ); -XML_CONSTASCII_ACTION( sXML_bookmark_start, "bookmark-start" ); -XML_CONSTASCII_ACTION( sXML_booktitle, "booktitle" ); -XML_CONSTASCII_ACTION( sXML_boolean, "boolean"); -XML_CONSTASCII_ACTION( sXML_boolean_style, "boolean-style" ); -XML_CONSTASCII_ACTION( sXML_boolean_value, "boolean-value"); -XML_CONSTASCII_ACTION( sXML_border, "border" ); -XML_CONSTASCII_ACTION( sXML_border_bottom, "border-bottom" ); -XML_CONSTASCII_ACTION( sXML_border_color, "border-color" ); -XML_CONSTASCII_ACTION( sXML_border_left, "border-left" ); -XML_CONSTASCII_ACTION( sXML_border_line_width, "border-line-width" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_bottom, "border-line-width-bottom" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_left, "border-line-width-left" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_right, "border-line-width-right" ); -XML_CONSTASCII_ACTION( sXML_border_line_width_top, "border-line-width-top" ); -XML_CONSTASCII_ACTION( sXML_border_right, "border-right" ); -XML_CONSTASCII_ACTION( sXML_border_top, "border-top" ); -XML_CONSTASCII_ACTION( sXML_both, "both"); -XML_CONSTASCII_ACTION( sXML_bottom, "bottom" ); -XML_CONSTASCII_ACTION( sXML_bottom_percent, "bottom percent"); -XML_CONSTASCII_ACTION( sXML_bottom_values, "bottom values"); -XML_CONSTASCII_ACTION( sXML_break_after, "break-after" ); -XML_CONSTASCII_ACTION( sXML_break_before, "break-before" ); -XML_CONSTASCII_ACTION( sXML_break_inside, "break-inside" ); -XML_CONSTASCII_ACTION( sXML_bubble, "bubble" ); -XML_CONSTASCII_ACTION( sXML_bullet_char, "bullet-char" ); -XML_CONSTASCII_ACTION( sXML_bullet_relative_size, "bullet-relative-size" ); -XML_CONSTASCII_ACTION( sXML_buttons, "buttons"); -XML_CONSTASCII_ACTION( sXML_bvar, "bvar"); -XML_CONSTASCII_ACTION( sXML_c, "c" ); -XML_CONSTASCII_ACTION( sXML_cm, "cm" ); -XML_CONSTASCII_ACTION( sXML_calculation_settings, "calculation-settings" ); -XML_CONSTASCII_ACTION( sXML_calendar, "calendar" ); -XML_CONSTASCII_ACTION( sXML_capitalize_entries, "capitalize-entries" ); -XML_CONSTASCII_ACTION( sXML_caption, "caption" ); -XML_CONSTASCII_ACTION( sXML_caption_point_x, "caption-point-x" ); -XML_CONSTASCII_ACTION( sXML_caption_point_y, "caption-point-y" ); -XML_CONSTASCII_ACTION( sXML_caption_sequence_format, "caption-sequence-format" ); -XML_CONSTASCII_ACTION( sXML_caption_sequence_name, "caption-sequence-name" ); -XML_CONSTASCII_ACTION( sXML_case_sensitive, "case-sensitive"); -XML_CONSTASCII_ACTION( sXML_casemap_capitalize, "capitalize" ); -XML_CONSTASCII_ACTION( sXML_casemap_lowercase, "lowercase" ); -XML_CONSTASCII_ACTION( sXML_casemap_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_casemap_small_caps, "small-caps" ); -XML_CONSTASCII_ACTION( sXML_casemap_uppercase, "uppercase" ); -XML_CONSTASCII_ACTION( sXML_categories, "categories" ); -XML_CONSTASCII_ACTION( sXML_category, "category" ); -XML_CONSTASCII_ACTION( sXML_category_and_value, "category-and-value" ); -XML_CONSTASCII_ACTION( sXML_cell_address, "cell-address"); -XML_CONSTASCII_ACTION( sXML_cell_content_change, "cell-content-change"); -XML_CONSTASCII_ACTION( sXML_cell_content_deletion, "cell-content-deletion"); -XML_CONSTASCII_ACTION( sXML_cell_count, "cell-count"); -XML_CONSTASCII_ACTION( sXML_cell_protect, "cell-protect"); -XML_CONSTASCII_ACTION( sXML_cell_range_address, "cell-range-address"); -XML_CONSTASCII_ACTION( sXML_cell_range_address_list, "cell-range-address-list"); -XML_CONSTASCII_ACTION( sXML_cell_range_source, "cell-range-source"); -XML_CONSTASCII_ACTION( sXML_center, "center" ); -XML_CONSTASCII_ACTION( sXML_chain_next_name, "chain-next-name" ); -XML_CONSTASCII_ACTION( sXML_change, "change" ); -XML_CONSTASCII_ACTION( sXML_change_deletion, "change-deletion" ); -XML_CONSTASCII_ACTION( sXML_change_end, "change-end" ); -XML_CONSTASCII_ACTION( sXML_change_id, "change-id" ); -XML_CONSTASCII_ACTION( sXML_change_info, "change-info" ); -XML_CONSTASCII_ACTION( sXML_change_start, "change-start" ); -XML_CONSTASCII_ACTION( sXML_change_track_table_cell, "change-track-table-cell" ); -XML_CONSTASCII_ACTION( sXML_change_view_conditions, "change-view-conditions" ); -XML_CONSTASCII_ACTION( sXML_change_view_settings, "change-view-settings" ); -XML_CONSTASCII_ACTION( sXML_changed_region, "changed-region" ); -XML_CONSTASCII_ACTION( sXML_chapter, "chapter"); -XML_CONSTASCII_ACTION( sXML_char, "char" ); -XML_CONSTASCII_ACTION( sXML_character_count, "character-count" ); -XML_CONSTASCII_ACTION( sXML_chart, "chart" ); -XML_CONSTASCII_ACTION( sXML_charts, "charts" ); -XML_CONSTASCII_ACTION( sXML_chg_author, "chg-author" ); -XML_CONSTASCII_ACTION( sXML_chg_comment, "chg-comment" ); -XML_CONSTASCII_ACTION( sXML_chg_date_time, "chg-date-time" ); -XML_CONSTASCII_ACTION( sXML_ci, "ci" ); -XML_CONSTASCII_ACTION( sXML_circle, "circle" ); -XML_CONSTASCII_ACTION( sXML_citation_body_style_name, "citation-body-style-name" ); -XML_CONSTASCII_ACTION( sXML_citation_style_name, "citation-style-name" ); -XML_CONSTASCII_ACTION( sXML_class, "class" ); -XML_CONSTASCII_ACTION( sXML_class_id, "class-id" ); -XML_CONSTASCII_ACTION( sXML_clip, "clip" ); -XML_CONSTASCII_ACTION( sXML_clockwise, "clockwise" ); -XML_CONSTASCII_ACTION( sXML_close, "close" ); -XML_CONSTASCII_ACTION( sXML_close_horizontal, "close-horizontal" ); -XML_CONSTASCII_ACTION( sXML_close_vertical, "close-vertical" ); -XML_CONSTASCII_ACTION( sXML_cn, "cn" ); -XML_CONSTASCII_ACTION( sXML_code, "code" ); -XML_CONSTASCII_ACTION( sXML_codebase, "codebase" ); -XML_CONSTASCII_ACTION( sXML_collapse, "collapse" ); -XML_CONSTASCII_ACTION( sXML_color, "color" ); -XML_CONSTASCII_ACTION( sXML_color_inversion , "color-inversion" ); -XML_CONSTASCII_ACTION( sXML_color_mode , "color-mode" ); -XML_CONSTASCII_ACTION( sXML_column, "column" ); -XML_CONSTASCII_ACTION( sXML_column_count, "column-count" ); -XML_CONSTASCII_ACTION( sXML_column_gap, "column-gap" ); -XML_CONSTASCII_ACTION( sXML_column_name, "column-name" ); -XML_CONSTASCII_ACTION( sXML_column_sep, "column-sep" ); -XML_CONSTASCII_ACTION( sXML_column_width, "column-width" ); -XML_CONSTASCII_ACTION( sXML_columns, "columns" ); -XML_CONSTASCII_ACTION( sXML_columnsplit_auto, "auto" ); -XML_CONSTASCII_ACTION( sXML_columnsplit_avoid, "avoid" ); -XML_CONSTASCII_ACTION( sXML_combine_entries, "combine-entries" ); -XML_CONSTASCII_ACTION( sXML_combine_entries_with_dash, "combine-entries-with-dash" ); -XML_CONSTASCII_ACTION( sXML_combine_entries_with_pp, "combine-entries-with-pp" ); -XML_CONSTASCII_ACTION( sXML_comma_separated, "comma-separated" ); -XML_CONSTASCII_ACTION( sXML_command, "command" ); -XML_CONSTASCII_ACTION( sXML_comment, "comment" ); -XML_CONSTASCII_ACTION( sXML_compose, "compose" ); -XML_CONSTASCII_ACTION( sXML_cond_style_name, "cond-style-name" ); -XML_CONSTASCII_ACTION( sXML_condition, "condition" ); -XML_CONSTASCII_ACTION( sXML_condition_source, "condition-source"); -XML_CONSTASCII_ACTION( sXML_condition_source_range_address, "condition-source-range-address"); -XML_CONSTASCII_ACTION( sXML_conditional_text, "conditional-text" ); -XML_CONSTASCII_ACTION( sXML_cone, "cone" ); -XML_CONSTASCII_ACTION( sXML_conference, "conference" ); -XML_CONSTASCII_ACTION( sXML_config_item, "config-item" ); -XML_CONSTASCII_ACTION( sXML_config_item_map_indexed, "config-item-map-indexed" ); -XML_CONSTASCII_ACTION( sXML_config_item_map_named, "config-item-map-named" ); -XML_CONSTASCII_ACTION( sXML_config_item_map_entry, "config-item-map-entry" ); -XML_CONSTASCII_ACTION( sXML_config_item_set, "config-item-set" ); -XML_CONSTASCII_ACTION( sXML_configuration_settings, "configuration-settings" ); -XML_CONSTASCII_ACTION( sXML_conjugate, "conjugate" ); -XML_CONSTASCII_ACTION( sXML_connect_bars, "connect-bars" ); -XML_CONSTASCII_ACTION( sXML_connection_name, "connection-name" ); -XML_CONSTASCII_ACTION( sXML_connector, "connector" ); -XML_CONSTASCII_ACTION( sXML_consecutive_numbering, "consecutive-numbering" ); -XML_CONSTASCII_ACTION( sXML_consolidation, "consolidation" ); -XML_CONSTASCII_ACTION( sXML_constant, "constant" ); -XML_CONSTASCII_ACTION( sXML_contains_error, "contains-error"); -XML_CONSTASCII_ACTION( sXML_contains_header, "contains-header"); -XML_CONSTASCII_ACTION( sXML_content, "content" ); -XML_CONSTASCII_ACTION( sXML_content_validation, "content-validation"); -XML_CONSTASCII_ACTION( sXML_content_validation_name, "validation-name"); -XML_CONSTASCII_ACTION( sXML_content_validations, "content-validations"); -XML_CONSTASCII_ACTION( sXML_continue, "continue" ); -XML_CONSTASCII_ACTION( sXML_continue_numbering, "continue-numbering" ); -XML_CONSTASCII_ACTION( sXML_contour_path, "contour-path" ); -XML_CONSTASCII_ACTION( sXML_contour_polygon, "contour-polygon" ); -XML_CONSTASCII_ACTION( sXML_contrast , "contrast" ); -XML_CONSTASCII_ACTION( sXML_control, "control" ); -XML_CONSTASCII_ACTION( sXML_conversion_mode, "conversion-mode" ); -XML_CONSTASCII_ACTION( sXML_copy_back, "copy-back" ); -XML_CONSTASCII_ACTION( sXML_copy_formulas, "copy-formulas" ); -XML_CONSTASCII_ACTION( sXML_copy_outline_levels, "copy-outline-levels" ); -XML_CONSTASCII_ACTION( sXML_copy_results_only, "copy-results-only" ); -XML_CONSTASCII_ACTION( sXML_copy_styles, "copy-styles" ); -XML_CONSTASCII_ACTION( sXML_corner_radius , "corner-radius" ); -XML_CONSTASCII_ACTION( sXML_correct, "correct"); -XML_CONSTASCII_ACTION( sXML_cos, "cos" ); -XML_CONSTASCII_ACTION( sXML_cosh, "cosh" ); -XML_CONSTASCII_ACTION( sXML_cot, "cot" ); -XML_CONSTASCII_ACTION( sXML_coth, "coth" ); -XML_CONSTASCII_ACTION( sXML_count, "count" ); -XML_CONSTASCII_ACTION( sXML_count_empty_lines, "count-empty-lines" ); -XML_CONSTASCII_ACTION( sXML_count_in_floating_frames, "count-in-floating-frames" ); -XML_CONSTASCII_ACTION( sXML_counterclockwise, "counterclockwise" ); -XML_CONSTASCII_ACTION( sXML_countnums, "countnums" ); -XML_CONSTASCII_ACTION( sXML_country, "country" ); -XML_CONSTASCII_ACTION( sXML_country_asian, "country-asian" ); -XML_CONSTASCII_ACTION( sXML_country_complex, "country-complex" ); -XML_CONSTASCII_ACTION( sXML_covered_table_cell, "covered-table-cell" ); -XML_CONSTASCII_ACTION( sXML_create_date, "create-date" ); -XML_CONSTASCII_ACTION( sXML_create_date_string, "create-date-string" ); -XML_CONSTASCII_ACTION( sXML_creation_date, "creation-date" ); -XML_CONSTASCII_ACTION( sXML_creation_time, "creation-time" ); -XML_CONSTASCII_ACTION( sXML_creator, "creator" ); -XML_CONSTASCII_ACTION( sXML_crossedout_cross, "X" ); -XML_CONSTASCII_ACTION( sXML_crossedout_double, "double-line" ); -XML_CONSTASCII_ACTION( sXML_crossedout_none, "none" ); -XML_CONSTASCII_ACTION( sXML_crossedout_single, "single-line" ); -XML_CONSTASCII_ACTION( sXML_crossedout_slash, "slash" ); -XML_CONSTASCII_ACTION( sXML_crossedout_thick, "thick-line" ); -XML_CONSTASCII_ACTION( sXML_csc, "csc" ); -XML_CONSTASCII_ACTION( sXML_csch, "csch" ); -XML_CONSTASCII_ACTION( sXML_cube, "cube" ); -XML_CONSTASCII_ACTION( sXML_cuboid, "cuboid" ); -XML_CONSTASCII_ACTION( sXML_currency, "currency"); -XML_CONSTASCII_ACTION( sXML_currency_style, "currency-style" ); -XML_CONSTASCII_ACTION( sXML_currency_symbol, "currency-symbol" ); -XML_CONSTASCII_ACTION( sXML_current, "current" ); -XML_CONSTASCII_ACTION( sXML_current_value, "current-value" ); -XML_CONSTASCII_ACTION( sXML_cursor_position, "cursor-position" ); -XML_CONSTASCII_ACTION( sXML_cursor_position_x, "cursor-position-x" ); -XML_CONSTASCII_ACTION( sXML_cursor_position_y, "cursor-position-y" ); -XML_CONSTASCII_ACTION( sXML_custom1, "custom1" ); -XML_CONSTASCII_ACTION( sXML_custom2, "custom2" ); -XML_CONSTASCII_ACTION( sXML_custom3, "custom3" ); -XML_CONSTASCII_ACTION( sXML_custom4, "custom4" ); -XML_CONSTASCII_ACTION( sXML_custom5, "custom5" ); -XML_CONSTASCII_ACTION( sXML_cut_offs, "cut_offs" ); -XML_CONSTASCII_ACTION( sXML_cx, "cx" ); -XML_CONSTASCII_ACTION( sXML_cy, "cy" ); -XML_CONSTASCII_ACTION( sXML_cylinder, "cylinder" ); -XML_CONSTASCII_ACTION( sXML_d, "d" ); -XML_CONSTASCII_ACTION( sXML_dash, "dash" ); -XML_CONSTASCII_ACTION( sXML_dashed, "dashed" ); -XML_CONSTASCII_ACTION( sXML_data, "data"); -XML_CONSTASCII_ACTION( sXML_data_cell_range_address, "data-cell-range-address" ); -XML_CONSTASCII_ACTION( sXML_data_label_number, "data-label-number" ); -XML_CONSTASCII_ACTION( sXML_data_label_symbol, "data-label-symbol" ); -XML_CONSTASCII_ACTION( sXML_data_label_text, "data-label-text" ); -XML_CONSTASCII_ACTION( sXML_data_pilot_field, "data-pilot-field"); -XML_CONSTASCII_ACTION( sXML_data_pilot_level, "data-pilot-level"); -XML_CONSTASCII_ACTION( sXML_data_pilot_member, "data-pilot-member"); -XML_CONSTASCII_ACTION( sXML_data_pilot_members, "data-pilot-members"); -XML_CONSTASCII_ACTION( sXML_data_pilot_subtotal, "data-pilot-subtotal"); -XML_CONSTASCII_ACTION( sXML_data_pilot_subtotals, "data-pilot-subtotals"); -XML_CONSTASCII_ACTION( sXML_data_pilot_table, "data-pilot-table"); -XML_CONSTASCII_ACTION( sXML_data_pilot_tables, "data-pilot-tables"); -XML_CONSTASCII_ACTION( sXML_data_point, "data-point" ); -XML_CONSTASCII_ACTION( sXML_data_style, "data-style" ); -XML_CONSTASCII_ACTION( sXML_data_style_name, "data-style-name" ); -XML_CONSTASCII_ACTION( sXML_data_type, "data-type"); -XML_CONSTASCII_ACTION( sXML_database_display, "database-display" ); -XML_CONSTASCII_ACTION( sXML_database_name, "database-name"); -XML_CONSTASCII_ACTION( sXML_database_next, "database-next" ); -XML_CONSTASCII_ACTION( sXML_database_range, "database-range"); -XML_CONSTASCII_ACTION( sXML_database_ranges, "database-ranges"); -XML_CONSTASCII_ACTION( sXML_database_row_number, "database-row-number" ); -XML_CONSTASCII_ACTION( sXML_database_select, "database-select" ); -XML_CONSTASCII_ACTION( sXML_database_source_query, "database-source-query"); -XML_CONSTASCII_ACTION( sXML_database_source_sql, "database-source-sql"); -XML_CONSTASCII_ACTION( sXML_database_source_table, "database-source-table"); -XML_CONSTASCII_ACTION( sXML_date, "date" ); -XML_CONSTASCII_ACTION( sXML_datetime, "datetime" ); -XML_CONSTASCII_ACTION( sXML_date_adjust, "date-adjust" ); -XML_CONSTASCII_ACTION( sXML_date_style, "date-style" ); -XML_CONSTASCII_ACTION( sXML_date_time, "date-time" ); -XML_CONSTASCII_ACTION( sXML_date_value, "date-value"); -XML_CONSTASCII_ACTION( sXML_day, "day" ); -XML_CONSTASCII_ACTION( sXML_day_of_week, "day-of-week" ); -XML_CONSTASCII_ACTION( sXML_dde_application, "dde-application" ); -XML_CONSTASCII_ACTION( sXML_dde_connection, "dde-connection" ); -XML_CONSTASCII_ACTION( sXML_dde_connection_decl, "dde-connection-decl" ); -XML_CONSTASCII_ACTION( sXML_dde_connection_decls, "dde-connection-decls" ); -XML_CONSTASCII_ACTION( sXML_dde_item, "dde-item" ); -XML_CONSTASCII_ACTION( sXML_dde_link, "dde-link" ); -XML_CONSTASCII_ACTION( sXML_dde_links, "dde-links" ); -XML_CONSTASCII_ACTION( sXML_dde_source, "dde-source" ); -XML_CONSTASCII_ACTION( sXML_dde_topic, "dde-topic" ); -XML_CONSTASCII_ACTION( sXML_decimal_places, "decimal-places" ); -XML_CONSTASCII_ACTION( sXML_decimal_replacement, "decimal-replacement" ); -XML_CONSTASCII_ACTION( sXML_declare, "declare" ); -XML_CONSTASCII_ACTION( sXML_decorate_words_only, "decorate-words-only" ); -XML_CONSTASCII_ACTION( sXML_decorative, "decorative" ); -XML_CONSTASCII_ACTION( sXML_deep, "deep" ); -XML_CONSTASCII_ACTION( sXML_default, "default" ); -XML_CONSTASCII_ACTION( sXML_default_cell_style_name, "default-cell-style-name" ); -XML_CONSTASCII_ACTION( sXML_default_style, "default-style" ); -XML_CONSTASCII_ACTION( sXML_default_style_name, "default-style-name" ); -XML_CONSTASCII_ACTION( sXML_degree, "degree" ); -XML_CONSTASCII_ACTION( sXML_delay, "delay" ); -XML_CONSTASCII_ACTION( sXML_deletion, "deletion" ); -XML_CONSTASCII_ACTION( sXML_deletions, "deletions" ); -XML_CONSTASCII_ACTION( sXML_depth, "depth" ); -XML_CONSTASCII_ACTION( sXML_desc, "desc" ); -XML_CONSTASCII_ACTION( sXML_descending, "descending"); -XML_CONSTASCII_ACTION( sXML_description, "description" ); -XML_CONSTASCII_ACTION( sXML_detective, "detective" ); -XML_CONSTASCII_ACTION( sXML_determinant, "determinant" ); -XML_CONSTASCII_ACTION( sXML_diff, "diff"); -XML_CONSTASCII_ACTION( sXML_diffuse_color, "diffuse-color" ); -XML_CONSTASCII_ACTION( sXML_dependences, "dependences"); -XML_CONSTASCII_ACTION( sXML_dependence, "dependence"); -XML_CONSTASCII_ACTION( sXML_direction, "direction"); -XML_CONSTASCII_ACTION( sXML_disabled, "disabled" ); -XML_CONSTASCII_ACTION( sXML_disc, "disc" ); -XML_CONSTASCII_ACTION( sXML_display, "display" ); -XML_CONSTASCII_ACTION( sXML_display_border, "display-border"); -XML_CONSTASCII_ACTION( sXML_display_details, "display-details"); -XML_CONSTASCII_ACTION( sXML_display_duplicates, "display-duplicates"); -XML_CONSTASCII_ACTION( sXML_display_empty, "display-empty"); -XML_CONSTASCII_ACTION( sXML_display_filter_buttons, "display-filter-buttons"); -XML_CONSTASCII_ACTION( sXML_display_formula, "display-formula" ); -XML_CONSTASCII_ACTION( sXML_display_label, "display-label" ); -XML_CONSTASCII_ACTION( sXML_display_levels, "display-levels" ); -XML_CONSTASCII_ACTION( sXML_display_name, "display-name" ); -XML_CONSTASCII_ACTION( sXML_display_outline_level, "display-outline-level" ); -XML_CONSTASCII_ACTION( sXML_dissolve, "dissolve" ); -XML_CONSTASCII_ACTION( sXML_distance, "distance" ); -XML_CONSTASCII_ACTION( sXML_distribute_letter, "distribute-letter" ); -XML_CONSTASCII_ACTION( sXML_distribute_space, "distribute-space" ); -XML_CONSTASCII_ACTION( sXML_divide, "divide" ); -XML_CONSTASCII_ACTION( sXML_document, "document" ); -XML_CONSTASCII_ACTION( sXML_document_content, "document-content" ); -XML_CONSTASCII_ACTION( sXML_document_meta, "document-meta" ); -XML_CONSTASCII_ACTION( sXML_document_settings, "document-settings" ); -XML_CONSTASCII_ACTION( sXML_document_styles, "document-styles" ); -XML_CONSTASCII_ACTION( sXML_document_statistic, "document-statistic" ); -XML_CONSTASCII_ACTION( sXML_domain, "domain" ); -XML_CONSTASCII_ACTION( sXML_dot, "dot" ); -XML_CONSTASCII_ACTION( sXML_dotted, "dotted" ); -XML_CONSTASCII_ACTION( sXML_double, "double" ); -XML_CONSTASCII_ACTION( sXML_double_sided, "double-sided" ); -XML_CONSTASCII_ACTION( sXML_down, "down" ); -XML_CONSTASCII_ACTION( sXML_draft, "draft"); -XML_CONSTASCII_ACTION( sXML_draw, "draw" ); -XML_CONSTASCII_ACTION( sXML_draw_aspect, "ole-draw-aspect" ); -XML_CONSTASCII_ACTION( sXML_drawing, "drawing" ); -XML_CONSTASCII_ACTION( sXML_drawings, "drawings" ); -XML_CONSTASCII_ACTION( sXML_drawpool , "drawpool" ); -XML_CONSTASCII_ACTION( sXML_drop_cap, "drop-cap" ); -XML_CONSTASCII_ACTION( sXML_dynamic, "dynamic" ); -XML_CONSTASCII_ACTION( sXML_edge_rounding, "edge-rounding" ); -XML_CONSTASCII_ACTION( sXML_editable, "editable" ); -XML_CONSTASCII_ACTION( sXML_editing_cycles, "editing-cycles" ); -XML_CONSTASCII_ACTION( sXML_editing_duration, "editing-duration" ); -XML_CONSTASCII_ACTION( sXML_edition, "edition" ); -XML_CONSTASCII_ACTION( sXML_editor, "editor" ); -XML_CONSTASCII_ACTION( sXML_ellipse , "ellipse" ); -XML_CONSTASCII_ACTION( sXML_email, "email" ); -XML_CONSTASCII_ACTION( sXML_embed, "embed" ); -XML_CONSTASCII_ACTION( sXML_embedded_visible_area, "embedded-visible-area" ); -XML_CONSTASCII_ACTION( sXML_embossed, "embossed" ); -XML_CONSTASCII_ACTION( sXML_emissive_color, "emissive-color" ); -XML_CONSTASCII_ACTION( sXML_empty, "empty"); -XML_CONSTASCII_ACTION( sXML_enabled, "enabled" ); -XML_CONSTASCII_ACTION( sXML_encoding, "encoding" ); -XML_CONSTASCII_ACTION( sXML_end, "end" ); -XML_CONSTASCII_ACTION( sXML_end_angle, "end-angle" ); -XML_CONSTASCII_ACTION( sXML_end_cell_address, "end-cell-address" ); -XML_CONSTASCII_ACTION( sXML_end_color, "end-color" ); -XML_CONSTASCII_ACTION( sXML_end_column, "end-column" ); -XML_CONSTASCII_ACTION( sXML_end_intensity, "end-intensity" ); -XML_CONSTASCII_ACTION( sXML_end_position, "end-position" ); -XML_CONSTASCII_ACTION( sXML_end_row, "end-row" ); -XML_CONSTASCII_ACTION( sXML_end_table, "end-table" ); -XML_CONSTASCII_ACTION( sXML_end_x, "end-x" ); -XML_CONSTASCII_ACTION( sXML_end_y, "end-y" ); -XML_CONSTASCII_ACTION( sXML_endless, "endless" ); -XML_CONSTASCII_ACTION( sXML_endnote, "endnote" ); -XML_CONSTASCII_ACTION( sXML_endnote_body, "endnote-body" ); -XML_CONSTASCII_ACTION( sXML_endnote_citation, "endnote-citation" ); -XML_CONSTASCII_ACTION( sXML_endnote_ref, "endnote-ref" ); -XML_CONSTASCII_ACTION( sXML_endnotes_configuration, "endnotes-configuration"); -XML_CONSTASCII_ACTION( sXML_engraved, "engraved" ); -XML_CONSTASCII_ACTION( sXML_eq, "eq"); -XML_CONSTASCII_ACTION( sXML_equal_author, "equal-author"); -XML_CONSTASCII_ACTION( sXML_equal_comment, "equal-comment"); -XML_CONSTASCII_ACTION( sXML_equal_date, "equal-date"); -XML_CONSTASCII_ACTION( sXML_era, "era" ); -XML_CONSTASCII_ACTION( sXML_ergo_sum, "ergo-sum" ); -XML_CONSTASCII_ACTION( sXML_error_category, "error-category" ); -XML_CONSTASCII_ACTION( sXML_error_lower_indicator, "error-lower-indicator" ); -XML_CONSTASCII_ACTION( sXML_error_lower_limit, "error-lower-limit" ); -XML_CONSTASCII_ACTION( sXML_error_macro, "error-macro" ); -XML_CONSTASCII_ACTION( sXML_error_margin, "error-margin" ); -XML_CONSTASCII_ACTION( sXML_error_message, "error-message" ); -XML_CONSTASCII_ACTION( sXML_error_percentage, "error-percentage" ); -XML_CONSTASCII_ACTION( sXML_error_upper_indicator, "error-upper-indicator" ); -XML_CONSTASCII_ACTION( sXML_error_upper_limit, "error-upper-limit" ); -XML_CONSTASCII_ACTION( sXML_escapement_sub, "sub" ); -XML_CONSTASCII_ACTION( sXML_escapement_super, "super" ); -XML_CONSTASCII_ACTION( sXML_even_page, "even-page" ); -XML_CONSTASCII_ACTION( sXML_event, "event" ); -XML_CONSTASCII_ACTION( sXML_event_name, "event-name" ); -XML_CONSTASCII_ACTION( sXML_events, "events" ); -XML_CONSTASCII_ACTION( sXML_execute, "execute" ); -XML_CONSTASCII_ACTION( sXML_execute_macro, "execute-macro" ); -XML_CONSTASCII_ACTION( sXML_exists, "exists" ); -XML_CONSTASCII_ACTION( sXML_exp, "exp" ); -XML_CONSTASCII_ACTION( sXML_exponential, "exponential" ); -XML_CONSTASCII_ACTION( sXML_expression, "expression"); -XML_CONSTASCII_ACTION( sXML_extra, "extra"); -XML_CONSTASCII_ACTION( sXML_extrude, "extrude" ); -XML_CONSTASCII_ACTION( sXML_factorial, "factorial" ); -XML_CONSTASCII_ACTION( sXML_fade_from_bottom, "fade-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_fade_from_center, "fade-from-center" ); -XML_CONSTASCII_ACTION( sXML_fade_from_left, "fade-from-left" ); -XML_CONSTASCII_ACTION( sXML_fade_from_lowerleft, "fade-from-lowerleft" ); -XML_CONSTASCII_ACTION( sXML_fade_from_lowerright, "fade-from-lowerright" ); -XML_CONSTASCII_ACTION( sXML_fade_from_right, "fade-from-right" ); -XML_CONSTASCII_ACTION( sXML_fade_from_top, "fade-from-top" ); -XML_CONSTASCII_ACTION( sXML_fade_from_upperleft, "fade-from-upperleft" ); -XML_CONSTASCII_ACTION( sXML_fade_from_upperright, "fade-from-upperright" ); -XML_CONSTASCII_ACTION( sXML_fade_to_center, "fade-to-center" ); -XML_CONSTASCII_ACTION( sXML_fade_out, "fade-out" ); -XML_CONSTASCII_ACTION( sXML_false, "false" ); -XML_CONSTASCII_ACTION( sXML_family, "family" ); -XML_CONSTASCII_ACTION( sXML_fast, "fast" ); -XML_CONSTASCII_ACTION( sXML_field_number, "field-number"); -XML_CONSTASCII_ACTION( sXML_file_name, "file-name" ); -XML_CONSTASCII_ACTION( sXML_fill, "fill" ); -XML_CONSTASCII_ACTION( sXML_fill_color , "fill-color" ); -XML_CONSTASCII_ACTION( sXML_fill_gradient_name, "fill-gradient-name" ); -XML_CONSTASCII_ACTION( sXML_fill_hatch_name, "fill-hatch-name" ); -XML_CONSTASCII_ACTION( sXML_fill_hatch_solid, "fill-hatch-solid" ); -XML_CONSTASCII_ACTION( sXML_fill_image, "fill-image" ); -XML_CONSTASCII_ACTION( sXML_fill_image_height, "fill-image-height" ); -XML_CONSTASCII_ACTION( sXML_fill_image_name, "fill-image-name" ); -XML_CONSTASCII_ACTION( sXML_fill_image_width, "fill-image-width" ); -XML_CONSTASCII_ACTION( sXML_filter, "filter"); -XML_CONSTASCII_ACTION( sXML_filter_and, "filter-and"); -XML_CONSTASCII_ACTION( sXML_filter_condition, "filter-condition"); -XML_CONSTASCII_ACTION( sXML_filter_name, "filter-name" ); -XML_CONSTASCII_ACTION( sXML_filter_options, "filter-options" ); -XML_CONSTASCII_ACTION( sXML_filter_or, "filter-or"); -XML_CONSTASCII_ACTION( sXML_first_date_time, "first-date-time"); -XML_CONSTASCII_ACTION( sXML_first_page, "first-page"); -XML_CONSTASCII_ACTION( sXML_first_page_number, "first-page-number"); -XML_CONSTASCII_ACTION( sXML_fit_to_contour, "fit-to-contour"); -XML_CONSTASCII_ACTION( sXML_fit_to_size, "fit-to-size" ); -XML_CONSTASCII_ACTION( sXML_fix, "fix" ); -XML_CONSTASCII_ACTION( sXML_fixed, "fixed" ); -XML_CONSTASCII_ACTION( sXML_flat, "flat" ); -XML_CONSTASCII_ACTION( sXML_float, "float"); -XML_CONSTASCII_ACTION( sXML_floating_frame, "floating-frame"); -XML_CONSTASCII_ACTION( sXML_floor, "floor" ); -XML_CONSTASCII_ACTION( sXML_fn, "fn" ); -XML_CONSTASCII_ACTION( sXML_focal_length, "focal-length"); -XML_CONSTASCII_ACTION( sXML_font_char_width, "font-char-width" ); -XML_CONSTASCII_ACTION( sXML_font_charset, "font-charset" ); -XML_CONSTASCII_ACTION( sXML_font_charset_asian, "font-charset-asian" ); -XML_CONSTASCII_ACTION( sXML_font_charset_complex, "font-charset-complex" ); -XML_CONSTASCII_ACTION( sXML_font_color, "font-color" ); -XML_CONSTASCII_ACTION( sXML_font_decl, "font-decl" ); -XML_CONSTASCII_ACTION( sXML_font_decls, "font-decls" ); -XML_CONSTASCII_ACTION( sXML_font_family, "font-family" ); -XML_CONSTASCII_ACTION( sXML_font_family_asian, "font-family-asian" ); -XML_CONSTASCII_ACTION( sXML_font_family_complex, "font-family-complex" ); -XML_CONSTASCII_ACTION( sXML_font_family_generic, "font-family-generic" ); -XML_CONSTASCII_ACTION( sXML_font_family_generic_asian, "font-family-generic-asian" ); -XML_CONSTASCII_ACTION( sXML_font_family_generic_complex, "font-family-generic-complex" ); -XML_CONSTASCII_ACTION( sXML_font_kerning, "font-kerning" ); -XML_CONSTASCII_ACTION( sXML_font_name, "font-name" ); -XML_CONSTASCII_ACTION( sXML_font_name_asian, "font-name-asian" ); -XML_CONSTASCII_ACTION( sXML_font_name_complex, "font-name-complex" ); -XML_CONSTASCII_ACTION( sXML_font_pitch, "font-pitch" ); -XML_CONSTASCII_ACTION( sXML_font_pitch_asian, "font-pitch-asian" ); -XML_CONSTASCII_ACTION( sXML_font_pitch_complex, "font-pitch-complex" ); -XML_CONSTASCII_ACTION( sXML_font_relief, "font-relief" ); -XML_CONSTASCII_ACTION( sXML_font_size, "font-size" ); -XML_CONSTASCII_ACTION( sXML_font_size_asian, "font-size-asian" ); -XML_CONSTASCII_ACTION( sXML_font_size_complex, "font-size-complex" ); -XML_CONSTASCII_ACTION( sXML_font_size_rel, "font-size-rel" ); -XML_CONSTASCII_ACTION( sXML_font_size_rel_asian, "font-size-rel-asian" ); -XML_CONSTASCII_ACTION( sXML_font_size_rel_complex, "font-size-rel-complex" ); -XML_CONSTASCII_ACTION( sXML_font_style, "font-style" ); -XML_CONSTASCII_ACTION( sXML_font_style_asian, "font-style-asian" ); -XML_CONSTASCII_ACTION( sXML_font_style_complex, "font-style-complex" ); -XML_CONSTASCII_ACTION( sXML_font_style_name, "font-style-name" ); -XML_CONSTASCII_ACTION( sXML_font_style_name_asian, "font-style-name-asian" ); -XML_CONSTASCII_ACTION( sXML_font_style_name_complex, "font-style-name-complex" ); -XML_CONSTASCII_ACTION( sXML_font_variant, "font-variant" ); -XML_CONSTASCII_ACTION( sXML_font_weight, "font-weight" ); -XML_CONSTASCII_ACTION( sXML_font_weight_asian, "font-weight-asian" ); -XML_CONSTASCII_ACTION( sXML_font_weight_complex, "font-weight-complex" ); -XML_CONSTASCII_ACTION( sXML_font_width, "font-width" ); -XML_CONSTASCII_ACTION( sXML_font_word_line_mode, "font-word-line-mode" ); -XML_CONSTASCII_ACTION( sXML_fontfamily, "fontfamily" ); -XML_CONSTASCII_ACTION( sXML_fontsize, "fontsize" ); -XML_CONSTASCII_ACTION( sXML_fontstyle, "fontstyle" ); -XML_CONSTASCII_ACTION( sXML_fontweight, "fontweight" ); -XML_CONSTASCII_ACTION( sXML_fontwork_adjust, "fontwork-adjust" ); -XML_CONSTASCII_ACTION( sXML_fontwork_distance, "fontwork-distance" ); -XML_CONSTASCII_ACTION( sXML_fontwork_form, "fontwork-form" ); -XML_CONSTASCII_ACTION( sXML_fontwork_hide_form, "fontwork-hide-form" ); -XML_CONSTASCII_ACTION( sXML_fontwork_mirror, "fontwork-mirror" ); -XML_CONSTASCII_ACTION( sXML_fontwork_outline, "fontwork-outline" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow, "fontwork-shadow" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_color, "fontwork-shadow-color" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_offset_x, "fontwork-shadow-offset-x" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_offset_y, "fontwork-shadow-offset-y" ); -XML_CONSTASCII_ACTION( sXML_fontwork_shadow_transparence, "fontwork-shadow-transparence" ); -XML_CONSTASCII_ACTION( sXML_fontwork_start, "fontwork-start" ); -XML_CONSTASCII_ACTION( sXML_fontwork_style, "fontwork-style" ); -XML_CONSTASCII_ACTION( sXML_footer, "footer" ); -XML_CONSTASCII_ACTION( sXML_footer_left, "footer-left" ); -XML_CONSTASCII_ACTION( sXML_footer_style, "footer-style" ); -XML_CONSTASCII_ACTION( sXML_footnote, "footnote" ); -XML_CONSTASCII_ACTION( sXML_footnote_body, "footnote-body" ); -XML_CONSTASCII_ACTION( sXML_footnote_citation, "footnote-citation" ); -XML_CONSTASCII_ACTION( sXML_footnote_continuation_notice_backward, "footnote-continuation-notice-backward" ); -XML_CONSTASCII_ACTION( sXML_footnote_continuation_notice_forward, "footnote-continuation-notice-forward" ); -XML_CONSTASCII_ACTION( sXML_footnote_max_height, "footnote-max-height" ); -XML_CONSTASCII_ACTION( sXML_distance_after_sep, "distance-after-sep" ); -XML_CONSTASCII_ACTION( sXML_distance_before_sep, "distance-before-sep" ); -XML_CONSTASCII_ACTION( sXML_footnote_ref, "footnote-ref" ); -XML_CONSTASCII_ACTION( sXML_footnote_sep, "footnote-sep" ); -XML_CONSTASCII_ACTION( sXML_footnotes_configuration, "footnotes-configuration"); -XML_CONSTASCII_ACTION( sXML_footnotes_position, "footnotes-position" ); -XML_CONSTASCII_ACTION( sXML_forall, "forall" ); -XML_CONSTASCII_ACTION( sXML_force_manual, "force-manual" ); -XML_CONSTASCII_ACTION( sXML_foreground, "foreground" ); -XML_CONSTASCII_ACTION( sXML_foreign_object, "foreign-object" ); -XML_CONSTASCII_ACTION( sXML_format_change, "format-change" ); -XML_CONSTASCII_ACTION( sXML_format_source, "format-source" ); -XML_CONSTASCII_ACTION( sXML_forms, "forms" ); -XML_CONSTASCII_ACTION( sXML_formula, "formula"); -XML_CONSTASCII_ACTION( sXML_formula_hidden, "formula-hidden"); -XML_CONSTASCII_ACTION( sXML_formulas, "formulas"); -XML_CONSTASCII_ACTION( sXML_fraction, "fraction" ); -XML_CONSTASCII_ACTION( sXML_frame, "frame" ); -XML_CONSTASCII_ACTION( sXML_frame_content, "frame-content" ); -XML_CONSTASCII_ACTION( sXML_frame_display_scrollbar, "frame-display-scrollbar" ); -XML_CONSTASCII_ACTION( sXML_frame_display_border, "frame-display-border" ); -XML_CONSTASCII_ACTION( sXML_frame_margin_horizontal, "frame-margin-horizontal" ); -XML_CONSTASCII_ACTION( sXML_frame_margin_vertical, "frame-margin-vertical" ); -XML_CONSTASCII_ACTION( sXML_frame_end_margin, "frame-end-margin" ); -XML_CONSTASCII_ACTION( sXML_frame_name, "frame-name" ); -XML_CONSTASCII_ACTION( sXML_frame_start_margin, "frame-start-margin" ); -XML_CONSTASCII_ACTION( sXML_freeze, "freeze" ); -XML_CONSTASCII_ACTION( sXML_freeze_position, "freeze-position" ); -XML_CONSTASCII_ACTION( sXML_from_another_table, "from-another-table" ); -XML_CONSTASCII_ACTION( sXML_from_inside, "from-inside" ); -XML_CONSTASCII_ACTION( sXML_from_left, "from-left" ); -XML_CONSTASCII_ACTION( sXML_from_same_table, "from-same-table" ); -XML_CONSTASCII_ACTION( sXML_from_top, "from-top" ); -XML_CONSTASCII_ACTION( sXML_fuchsia, "fuchsia"); -XML_CONSTASCII_ACTION( sXML_full, "full" ); -XML_CONSTASCII_ACTION( sXML_full_screen, "full-screen" ); -XML_CONSTASCII_ACTION( sXML_function, "function"); -XML_CONSTASCII_ACTION( sXML_g , "g" ); -XML_CONSTASCII_ACTION( sXML_gamma , "gamma" ); -XML_CONSTASCII_ACTION( sXML_gap, "gap" ); -XML_CONSTASCII_ACTION( sXML_gap_width, "gap-width" ); -XML_CONSTASCII_ACTION( sXML_gcd, "gcd" ); -XML_CONSTASCII_ACTION( sXML_generator, "generator" ); -XML_CONSTASCII_ACTION( sXML_geq, "geq" ); -XML_CONSTASCII_ACTION( sXML_gouraud, "gouraud"); -XML_CONSTASCII_ACTION( sXML_gradient , "gradient" ); -XML_CONSTASCII_ACTION( sXML_gradient_angle, "angle" ); -XML_CONSTASCII_ACTION( sXML_gradient_border, "border" ); -XML_CONSTASCII_ACTION( sXML_gradient_step_count , "gradient-step-count" ); -XML_CONSTASCII_ACTION( sXML_gradient_style, "gradient-style" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_axial, "axial" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_ellipsoid, "ellipsoid" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_linear, "linear" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_radial, "radial" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_rectangular, "rectangular" ); -XML_CONSTASCII_ACTION( sXML_gradientstyle_square, "square" ); -XML_CONSTASCII_ACTION( sXML_grand_total, "grand-total"); -XML_CONSTASCII_ACTION( sXML_graphic , "graphic" ); -XML_CONSTASCII_ACTION( sXML_gray, "gray" ); -XML_CONSTASCII_ACTION( sXML_green , "green" ); -XML_CONSTASCII_ACTION( sXML_greyscale, "greyscale" ); -XML_CONSTASCII_ACTION( sXML_grid, "grid" ); -XML_CONSTASCII_ACTION( sXML_groove, "groove" ); -XML_CONSTASCII_ACTION( sXML_group_by_field_number, "group-by-field-number"); -XML_CONSTASCII_ACTION( sXML_group_name, "group-name" ); -XML_CONSTASCII_ACTION( sXML_grouping, "grouping" ); -XML_CONSTASCII_ACTION( sXML_gt, "gt" ); -XML_CONSTASCII_ACTION( sXML_h, "h" ); -XML_CONSTASCII_ACTION( sXML_hanging, "hanging" ); -XML_CONSTASCII_ACTION( sXML_has_persistent_data, "has-persistent-data"); -XML_CONSTASCII_ACTION( sXML_hatch , "hatch" ); -XML_CONSTASCII_ACTION( sXML_hatch_distance, "distance" ); -XML_CONSTASCII_ACTION( sXML_hatch_style, "style" ); -XML_CONSTASCII_ACTION( sXML_hatchstyle_double, "double" ); -XML_CONSTASCII_ACTION( sXML_hatchstyle_single, "single" ); -XML_CONSTASCII_ACTION( sXML_hatchstyle_triple, "triple" ); -XML_CONSTASCII_ACTION( sXML_header, "header" ); -XML_CONSTASCII_ACTION( sXML_header_left, "header-left" ); -XML_CONSTASCII_ACTION( sXML_header_style, "header-style" ); -XML_CONSTASCII_ACTION( sXML_headers, "headers" ); -XML_CONSTASCII_ACTION( sXML_height, "height" ); -XML_CONSTASCII_ACTION( sXML_help_file_name, "help-file-name" ); -XML_CONSTASCII_ACTION( sXML_help_id, "help-id" ); -XML_CONSTASCII_ACTION( sXML_help_message, "help-message" ); -XML_CONSTASCII_ACTION( sXML_hidden, "hidden" ); -XML_CONSTASCII_ACTION( sXML_hidden_and_protected, "hidden-and-protected"); -XML_CONSTASCII_ACTION( sXML_hidden_paragraph, "hidden-paragraph" ); -XML_CONSTASCII_ACTION( sXML_hidden_text, "hidden-text" ); -XML_CONSTASCII_ACTION( sXML_highlighted_range, "highlighted-range" ); -XML_CONSTASCII_ACTION( sXML_horizontal, "horizontal" ); -XML_CONSTASCII_ACTION( sXML_horizontal_lines, "horizontal-lines" ); -XML_CONSTASCII_ACTION( sXML_horizontal_on_left_pages, "horizontal-on-left-pages" ); -XML_CONSTASCII_ACTION( sXML_horizontal_on_right_pages, "horizontal-on-right-pages" ); -XML_CONSTASCII_ACTION( sXML_horizontal_pos, "horizontal-pos" ); -XML_CONSTASCII_ACTION( sXML_horizontal_rel, "horizontal-rel" ); -XML_CONSTASCII_ACTION( sXML_horizontal_scrollbar_width, "horizontal-scrollbar-width" ); -XML_CONSTASCII_ACTION( sXML_horizontal_segments, "horizontal-segments" ); -XML_CONSTASCII_ACTION( sXML_horizontal_split_mode, "horizontal-split-mode" ); -XML_CONSTASCII_ACTION( sXML_horizontal_split_position, "horizontal-split-position" ); -XML_CONSTASCII_ACTION( sXML_horizontal_stripes, "horizontal-stripes" ); -XML_CONSTASCII_ACTION( sXML_hours, "hours" ); -XML_CONSTASCII_ACTION( sXML_howpublished, "howpublished" ); -XML_CONSTASCII_ACTION( sXML_href, "href" ); -XML_CONSTASCII_ACTION( sXML_html, "html"); -XML_CONSTASCII_ACTION( sXML_hyperlink_behaviour, "hyperlink-behaviour" ); -XML_CONSTASCII_ACTION( sXML_hyphenate, "hyphenate" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_keep, "hyphenation-keep" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_ladder_count, "hyphenation-ladder-count" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_push_char_count, "hyphenation-push-char-count" ); -XML_CONSTASCII_ACTION( sXML_hyphenation_remain_char_count, "hyphenation-remain-char-count" ); -XML_CONSTASCII_ACTION( sXML_i, "i" ); -XML_CONSTASCII_ACTION( sXML_icon, "icon" ); -XML_CONSTASCII_ACTION( sXML_id, "id" ); -XML_CONSTASCII_ACTION( sXML_ident, "ident"); -XML_CONSTASCII_ACTION( sXML_identifier, "identifier" ); -XML_CONSTASCII_ACTION( sXML_identify_categories, "identify-categories"); -XML_CONSTASCII_ACTION( sXML_ideograph_alpha, "ideograph-alpha"); -XML_CONSTASCII_ACTION( sXML_ignore_case, "ignore-case" ); -XML_CONSTASCII_ACTION( sXML_ignore_empty_rows, "ignore-empty-rows"); -XML_CONSTASCII_ACTION( sXML_illustration_index, "illustration-index" ); -XML_CONSTASCII_ACTION( sXML_illustration_index_entry_template, "illustration-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_illustration_index_source, "illustration-index-source" ); -XML_CONSTASCII_ACTION( sXML_image, "image" ); -XML_CONSTASCII_ACTION( sXML_image_count, "image-count" ); -XML_CONSTASCII_ACTION( sXML_image_map, "image-map" ); -XML_CONSTASCII_ACTION( sXML_implies, "implies" ); -XML_CONSTASCII_ACTION( sXML_in, "in"); -XML_CONSTASCII_ACTION( sXML_in_range, "in-range"); -XML_CONSTASCII_ACTION( sXML_inbook, "inbook" ); -XML_CONSTASCII_ACTION( sXML_incollection, "incollection" ); -XML_CONSTASCII_ACTION( sXML_increment, "increment" ); -XML_CONSTASCII_ACTION( sXML_index, "index"); -XML_CONSTASCII_ACTION( sXML_index_body, "index-body"); -XML_CONSTASCII_ACTION( sXML_index_entry_bibliography, "index-entry-bibliography" ); -XML_CONSTASCII_ACTION( sXML_index_entry_chapter, "index-entry-chapter" ); -XML_CONSTASCII_ACTION( sXML_index_entry_chapter_number, "index-entry-chapter-number" ); -XML_CONSTASCII_ACTION( sXML_index_entry_link_end, "index-entry-link-end" ); -XML_CONSTASCII_ACTION( sXML_index_entry_link_start, "index-entry-link-start" ); -XML_CONSTASCII_ACTION( sXML_index_entry_page_number, "index-entry-page-number" ); -XML_CONSTASCII_ACTION( sXML_index_entry_span, "index-entry-span" ); -XML_CONSTASCII_ACTION( sXML_index_entry_tab_stop, "index-entry-tab-stop" ); -XML_CONSTASCII_ACTION( sXML_index_entry_template, "index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_index_entry_text, "index-entry-text" ); -XML_CONSTASCII_ACTION( sXML_index_name, "index-name" ); -XML_CONSTASCII_ACTION( sXML_index_scope, "index-scope" ); -XML_CONSTASCII_ACTION( sXML_index_source_style, "index-source-style" ); -XML_CONSTASCII_ACTION( sXML_index_source_styles, "index-source-styles" ); -XML_CONSTASCII_ACTION( sXML_index_title, "index-title" ); -XML_CONSTASCII_ACTION( sXML_index_title_template, "index-title-template" ); -XML_CONSTASCII_ACTION( sXML_information, "information" ); -XML_CONSTASCII_ACTION( sXML_initial_creator, "initial-creator" ); -XML_CONSTASCII_ACTION( sXML_inproceedings, "inproceedings" ); -XML_CONSTASCII_ACTION( sXML_insertion, "insertion" ); -XML_CONSTASCII_ACTION( sXML_insertion_cut_off, "insertion-cut-off" ); -XML_CONSTASCII_ACTION( sXML_inset, "inset" ); -XML_CONSTASCII_ACTION( sXML_inside, "inside" ); -XML_CONSTASCII_ACTION( sXML_institution, "institution" ); -XML_CONSTASCII_ACTION( sXML_int, "int" ); -XML_CONSTASCII_ACTION( sXML_intensity, "intensity" ); -XML_CONSTASCII_ACTION( sXML_intersect, "intersect" ); -XML_CONSTASCII_ACTION( sXML_interval, "interval" ); -XML_CONSTASCII_ACTION( sXML_interval_major, "interval-major" ); -XML_CONSTASCII_ACTION( sXML_interval_minor, "interval-minor" ); -XML_CONSTASCII_ACTION( sXML_into_english_number, "into-english-number" ); -XML_CONSTASCII_ACTION( sXML_inverse, "inverse" ); -XML_CONSTASCII_ACTION( sXML_is_active, "is-active"); -XML_CONSTASCII_ACTION( sXML_is_data_layout_field, "is-data-layout-field"); -XML_CONSTASCII_ACTION( sXML_is_hidden, "is-hidden" ); -XML_CONSTASCII_ACTION( sXML_is_selection, "is-selection"); -XML_CONSTASCII_ACTION( sXML_isbn, "isbn" ); -XML_CONSTASCII_ACTION( sXML_italic, "italic" ); -XML_CONSTASCII_ACTION( sXML_iteration, "iteration" ); -XML_CONSTASCII_ACTION( sXML_journal, "journal" ); -XML_CONSTASCII_ACTION( sXML_justified, "justified" ); -XML_CONSTASCII_ACTION( sXML_justify, "justify" ); -XML_CONSTASCII_ACTION( sXML_justify_single_word, "justify-single-word" ); -XML_CONSTASCII_ACTION( sXML_keep_with_next, "keep-with-next" ); -XML_CONSTASCII_ACTION( sXML_kerning_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_key, "key" ); -XML_CONSTASCII_ACTION( sXML_key1, "key1" ); -XML_CONSTASCII_ACTION( sXML_key2, "key2" ); -XML_CONSTASCII_ACTION( sXML_keyword, "keyword" ); -XML_CONSTASCII_ACTION( sXML_keywords, "keywords" ); -XML_CONSTASCII_ACTION( sXML_km, "km" ); -XML_CONSTASCII_ACTION( sXML_label, "label" ); -XML_CONSTASCII_ACTION( sXML_label_arrangement, "label-arrangement" ); -XML_CONSTASCII_ACTION( sXML_label_cell_address, "label-cell-address" ); -XML_CONSTASCII_ACTION( sXML_label_cell_range_address, "label-cell-range-address" ); -XML_CONSTASCII_ACTION( sXML_label_range, "label-range" ); -XML_CONSTASCII_ACTION( sXML_label_ranges, "label-ranges" ); -XML_CONSTASCII_ACTION( sXML_layer, "layer" ); -XML_CONSTASCII_ACTION( sXML_layer_set, "layer-set" ); -XML_CONSTASCII_ACTION( sXML_lambda, "lambda" ); -XML_CONSTASCII_ACTION( sXML_landscape, "landscape" ); -XML_CONSTASCII_ACTION( sXML_language, "language" ); -XML_CONSTASCII_ACTION( sXML_language_asian, "language-asian" ); -XML_CONSTASCII_ACTION( sXML_language_complex, "language-complex" ); -XML_CONSTASCII_ACTION( sXML_last_column_spanned, "last-column-spanned" ); -XML_CONSTASCII_ACTION( sXML_last_page, "last-page" ); -XML_CONSTASCII_ACTION( sXML_last_row_spanned, "last-row-spanned" ); -XML_CONSTASCII_ACTION( sXML_leader_char, "leader-char" ); -XML_CONSTASCII_ACTION( sXML_left, "left" ); -XML_CONSTASCII_ACTION( sXML_left_outside, "left-outside" ); -XML_CONSTASCII_ACTION( sXML_left_top_position, "left-top-position" ); -XML_CONSTASCII_ACTION( sXML_legend, "legend" ); -XML_CONSTASCII_ACTION( sXML_legend_position, "legend-position" ); -XML_CONSTASCII_ACTION( sXML_length, "length" ); -XML_CONSTASCII_ACTION( sXML_leq, "leq" ); -XML_CONSTASCII_ACTION( sXML_let_text, "let-text" ); -XML_CONSTASCII_ACTION( sXML_letter_kerning, "letter-kerning" ); -XML_CONSTASCII_ACTION( sXML_letter_spacing, "letter-spacing" ); -XML_CONSTASCII_ACTION( sXML_letters, "letters" ); -XML_CONSTASCII_ACTION( sXML_level, "level" ); -XML_CONSTASCII_ACTION( sXML_library, "library" ); -XML_CONSTASCII_ACTION( sXML_library_embedded, "library-embedded" ); -XML_CONSTASCII_ACTION( sXML_library_linked, "library-linked" ); -XML_CONSTASCII_ACTION( sXML_light, "light"); -XML_CONSTASCII_ACTION( sXML_lighting_mode, "lighting-mode"); -XML_CONSTASCII_ACTION( sXML_lime, "lime" ); -XML_CONSTASCII_ACTION( sXML_limit, "limit" ); -XML_CONSTASCII_ACTION( sXML_line, "line" ); -XML_CONSTASCII_ACTION( sXML_line_break, "line-break" ); -XML_CONSTASCII_ACTION( sXML_line_height, "line-height" ); -XML_CONSTASCII_ACTION( sXML_line_height_at_least, "line-height-at-least" ); -XML_CONSTASCII_ACTION( sXML_line_spacing, "line-spacing" ); -XML_CONSTASCII_ACTION( sXML_linear, "linear" ); -XML_CONSTASCII_ACTION( sXML_linenumbering_configuration, "linenumbering-configuration" ); -XML_CONSTASCII_ACTION( sXML_linenumbering_separator, "linenumbering-separator" ); -XML_CONSTASCII_ACTION( sXML_lines, "lines" ); -XML_CONSTASCII_ACTION( sXML_lines_used, "lines-used" ); -XML_CONSTASCII_ACTION( sXML_link_data_style_to_source, "link-data-style-to-source" ); -XML_CONSTASCII_ACTION( sXML_link_to_source_data, "link-to-source-data" ); -XML_CONSTASCII_ACTION( sXML_list, "list"); -XML_CONSTASCII_ACTION( sXML_list_block, "list-block" ); -XML_CONSTASCII_ACTION( sXML_list_header, "list-header" ); -XML_CONSTASCII_ACTION( sXML_list_info, "list-info" ); -XML_CONSTASCII_ACTION( sXML_list_item, "list-item" ); -XML_CONSTASCII_ACTION( sXML_list_level, "list-level" ); -XML_CONSTASCII_ACTION( sXML_list_level_style_bullet, "list-level-style-bullet" ); -XML_CONSTASCII_ACTION( sXML_list_level_style_image, "list-level-style-image" ); -XML_CONSTASCII_ACTION( sXML_list_level_style_number, "list-level-style-number" ); -XML_CONSTASCII_ACTION( sXML_list_name, "list-name" ); -XML_CONSTASCII_ACTION( sXML_list_style, "list-style" ); -XML_CONSTASCII_ACTION( sXML_list_style_name, "list-style-name" ); -XML_CONSTASCII_ACTION( sXML_ln, "ln" ); -XML_CONSTASCII_ACTION( sXML_locked, "locked" ); -XML_CONSTASCII_ACTION( sXML_log, "log" ); -XML_CONSTASCII_ACTION( sXML_logarithmic, "logarithmic" ); -XML_CONSTASCII_ACTION( sXML_logbase, "logbase" ); -XML_CONSTASCII_ACTION( sXML_long, "long" ); -XML_CONSTASCII_ACTION( sXML_lowlimit, "lowlimit" ); -XML_CONSTASCII_ACTION( sXML_lr_tb, "lr-tb" ); -XML_CONSTASCII_ACTION( sXML_lt, "lt"); -XML_CONSTASCII_ACTION( sXML_ltr, "ltr"); -XML_CONSTASCII_ACTION( sXML_luminance , "luminance" ); -XML_CONSTASCII_ACTION( sXML_macro_name, "macro-name"); -XML_CONSTASCII_ACTION( sXML_maction, "maction"); -XML_CONSTASCII_ACTION( sXML_main_entry_style_name, "main-entry-style-name" ); -XML_CONSTASCII_ACTION( sXML_major, "major" ); -XML_CONSTASCII_ACTION( sXML_maligngroup, "maligngroup"); -XML_CONSTASCII_ACTION( sXML_malignmark, "malignmark"); -XML_CONSTASCII_ACTION( sXML_manual, "manual" ); -XML_CONSTASCII_ACTION( sXML_map, "map" ); -XML_CONSTASCII_ACTION( sXML_margin_bottom, "margin-bottom" ); -XML_CONSTASCII_ACTION( sXML_margin_left, "margin-left" ); -XML_CONSTASCII_ACTION( sXML_margin_right, "margin-right" ); -XML_CONSTASCII_ACTION( sXML_margin_top, "margin-top" ); -XML_CONSTASCII_ACTION( sXML_margins, "margins" ); -XML_CONSTASCII_ACTION( sXML_marker, "marker" ); -XML_CONSTASCII_ACTION( sXML_marker_end , "marker-end" ); -XML_CONSTASCII_ACTION( sXML_marker_end_center , "marker-end-center" ); -XML_CONSTASCII_ACTION( sXML_marker_end_width , "marker-end-width" ); -XML_CONSTASCII_ACTION( sXML_marker_start , "marker-start" ); -XML_CONSTASCII_ACTION( sXML_marker_start_center , "marker-start-center" ); -XML_CONSTASCII_ACTION( sXML_marker_start_width , "marker-start-width" ); -XML_CONSTASCII_ACTION( sXML_maroon, "maroon" ); -XML_CONSTASCII_ACTION( sXML_master_page, "master-page" ); -XML_CONSTASCII_ACTION( sXML_master_page_name , "master-page-name" ); -XML_CONSTASCII_ACTION( sXML_master_styles, "master-styles" ); -XML_CONSTASCII_ACTION( sXML_mastersthesis, "mastersthesis" ); -XML_CONSTASCII_ACTION( sXML_match, "match"); -XML_CONSTASCII_ACTION( sXML_math, "math"); -XML_CONSTASCII_ACTION( sXML_matrix, "matrix"); -XML_CONSTASCII_ACTION( sXML_matrix_covered, "matrix-covered"); -XML_CONSTASCII_ACTION( sXML_matrixrow, "matrixrow"); -XML_CONSTASCII_ACTION( sXML_max, "max" ); -XML_CONSTASCII_ACTION( sXML_max_edge, "max-edge"); -XML_CONSTASCII_ACTION( sXML_max_height, "max-height"); -XML_CONSTASCII_ACTION( sXML_max_width, "max-width"); -XML_CONSTASCII_ACTION( sXML_maximum, "maximum" ); -XML_CONSTASCII_ACTION( sXML_maximum_difference, "maximum-difference" ); -XML_CONSTASCII_ACTION( sXML_may_break_between_rows, "may-break-between-rows" ); -XML_CONSTASCII_ACTION( sXML_may_script, "may-script" ); -XML_CONSTASCII_ACTION( sXML_mean, "mean" ); -XML_CONSTASCII_ACTION( sXML_mean_value, "mean-value" ); -XML_CONSTASCII_ACTION( sXML_measure, "measure" ); -XML_CONSTASCII_ACTION( sXML_measure_align, "measure-align" ); -XML_CONSTASCII_ACTION( sXML_measure_vertical_align, "measure-vertical-align" ); -XML_CONSTASCII_ACTION( sXML_median, "median" ); -XML_CONSTASCII_ACTION( sXML_medium, "medium" ); -XML_CONSTASCII_ACTION( sXML_merror, "merror" ); -XML_CONSTASCII_ACTION( sXML_message_type, "message-type" ); -XML_CONSTASCII_ACTION( sXML_meta, "meta" ); -XML_CONSTASCII_ACTION( sXML_mfenced, "mfenced" ); -XML_CONSTASCII_ACTION( sXML_mfrac, "mfrac" ); -XML_CONSTASCII_ACTION( sXML_mi, "mi" ); //MathML Math Identifier -XML_CONSTASCII_ACTION( sXML_middle, "middle" ); -XML_CONSTASCII_ACTION( sXML_mime_type, "mime-type" ); -XML_CONSTASCII_ACTION( sXML_min, "min" ); -XML_CONSTASCII_ACTION( sXML_min_denominator_digits, "min-denominator-digits" ); -XML_CONSTASCII_ACTION( sXML_min_edge, "min-edge"); -XML_CONSTASCII_ACTION( sXML_min_exponent_digits, "min-exponent-digits" ); -XML_CONSTASCII_ACTION( sXML_min_height, "min-height" ); -XML_CONSTASCII_ACTION( sXML_min_width, "min-width" ); -XML_CONSTASCII_ACTION( sXML_min_integer_digits, "min-integer-digits" ); -XML_CONSTASCII_ACTION( sXML_min_label_distance, "min-label-distance" ); -XML_CONSTASCII_ACTION( sXML_min_label_width, "min-label-width" ); -XML_CONSTASCII_ACTION( sXML_min_line_height, "min-line-height" ); -XML_CONSTASCII_ACTION( sXML_min_numerator_digits, "min-numerator-digits" ); -XML_CONSTASCII_ACTION( sXML_min_row_height, "min-row-height" ); -XML_CONSTASCII_ACTION( sXML_minimum, "minimum" ); -XML_CONSTASCII_ACTION( sXML_minor, "minor" ); -XML_CONSTASCII_ACTION( sXML_minus, "minus" ); -XML_CONSTASCII_ACTION( sXML_minutes, "minutes" ); -XML_CONSTASCII_ACTION( sXML_mirror, "mirror" ); -XML_CONSTASCII_ACTION( sXML_mirrored, "mirrored" ); -XML_CONSTASCII_ACTION( sXML_misc, "misc" ); -XML_CONSTASCII_ACTION( sXML_miter , "miter" ); -XML_CONSTASCII_ACTION( sXML_mmultiscripts, "mmultiscripts" ); -XML_CONSTASCII_ACTION( sXML_mm, "mm" ); -XML_CONSTASCII_ACTION( sXML_mn, "mn" ); -XML_CONSTASCII_ACTION( sXML_mo, "mo" ); -XML_CONSTASCII_ACTION( sXML_mode, "mode" ); -XML_CONSTASCII_ACTION( sXML_modern, "modern" ); -XML_CONSTASCII_ACTION( sXML_modification_date, "modification-date" ); -XML_CONSTASCII_ACTION( sXML_modification_time, "modification-time" ); -XML_CONSTASCII_ACTION( sXML_modulate, "modulate" ); -XML_CONSTASCII_ACTION( sXML_module, "module" ); -XML_CONSTASCII_ACTION( sXML_moment, "moment" ); -XML_CONSTASCII_ACTION( sXML_mono, "mono" ); -XML_CONSTASCII_ACTION( sXML_month, "month" ); -XML_CONSTASCII_ACTION( sXML_move_from_bottom, "move-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_move_from_left, "move-from-left" ); -XML_CONSTASCII_ACTION( sXML_move_from_right, "move-from-right" ); -XML_CONSTASCII_ACTION( sXML_move_from_top, "move-from-top" ); -XML_CONSTASCII_ACTION( sXML_move_protect, "move-protect" ); -XML_CONSTASCII_ACTION( sXML_mover, "mover" ); -XML_CONSTASCII_ACTION( sXML_movement, "movement" ); -XML_CONSTASCII_ACTION( sXML_movement_cut_off, "movement-cut-off" ); -XML_CONSTASCII_ACTION( sXML_mouse_as_pen, "mouse-as-pen" ); -XML_CONSTASCII_ACTION( sXML_mouse_visible, "mouse-visible" ); -XML_CONSTASCII_ACTION( sXML_mpadded, "mpadded"); -XML_CONSTASCII_ACTION( sXML_mphantom, "mphantom"); -XML_CONSTASCII_ACTION( sXML_mprescripts, "mprescripts"); -XML_CONSTASCII_ACTION( sXML_mroot, "mroot"); -XML_CONSTASCII_ACTION( sXML_mrow, "mrow"); -XML_CONSTASCII_ACTION( sXML_ms, "ms"); -XML_CONSTASCII_ACTION( sXML_mspace, "mspace"); -XML_CONSTASCII_ACTION( sXML_msqrt, "msqrt"); -XML_CONSTASCII_ACTION( sXML_mstyle, "mstyle"); -XML_CONSTASCII_ACTION( sXML_msub, "msub"); -XML_CONSTASCII_ACTION( sXML_msubsup, "msubsup"); -XML_CONSTASCII_ACTION( sXML_msup, "msup"); -XML_CONSTASCII_ACTION( sXML_mtable, "mtable"); -XML_CONSTASCII_ACTION( sXML_mtd, "mtd"); -XML_CONSTASCII_ACTION( sXML_mtext, "mtext"); -XML_CONSTASCII_ACTION( sXML_mtr, "mtr"); -XML_CONSTASCII_ACTION( sXML_multi_deletion_spanned, "multi-deletion-spanned"); -XML_CONSTASCII_ACTION( sXML_munder, "munder"); -XML_CONSTASCII_ACTION( sXML_munderover, "munderover"); -XML_CONSTASCII_ACTION( sXML_name, "name" ); -XML_CONSTASCII_ACTION( sXML_name_and_extension, "name-and-extension" ); -XML_CONSTASCII_ACTION( sXML_named_expression, "named-expression"); -XML_CONSTASCII_ACTION( sXML_named_expressions, "named-expressions"); -XML_CONSTASCII_ACTION( sXML_named_range, "named-range"); -XML_CONSTASCII_ACTION( sXML_navy, "navy"); -XML_CONSTASCII_ACTION( sXML_neq, "neq" ); -XML_CONSTASCII_ACTION( sXML_new, "new" ); -XML_CONSTASCII_ACTION( sXML_next, "next" ); -XML_CONSTASCII_ACTION( sXML_next_page, "next-page" ); -XML_CONSTASCII_ACTION( sXML_next_style_name, "next-style-name" ); -XML_CONSTASCII_ACTION( sXML_nohref, "nohref" ); -XML_CONSTASCII_ACTION( sXML_no_limit, "no-limit" ); -XML_CONSTASCII_ACTION( sXML_no_wrap, "no-wrap" ); -XML_CONSTASCII_ACTION( sXML_noempty, "!empty"); -XML_CONSTASCII_ACTION( sXML_nomatch, "!match"); -XML_CONSTASCII_ACTION( sXML_none, "none" ); -XML_CONSTASCII_ACTION( sXML_noprtsubset, "notprsubset" ); -XML_CONSTASCII_ACTION( sXML_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_normals_direction, "normals-direction" ); -XML_CONSTASCII_ACTION( sXML_normals_kind, "normals-kind" ); -XML_CONSTASCII_ACTION( sXML_not, "not" ); -XML_CONSTASCII_ACTION( sXML_not_equal_date, "not-equal-date" ); -XML_CONSTASCII_ACTION( sXML_note, "note" ); -XML_CONSTASCII_ACTION( sXML_notes, "notes" ); -XML_CONSTASCII_ACTION( sXML_notin, "notin" ); -XML_CONSTASCII_ACTION( sXML_notsubset, "notsubset" ); -XML_CONSTASCII_ACTION( sXML_null_date, "null-date" ); -XML_CONSTASCII_ACTION( sXML_null_year, "null-year" ); -XML_CONSTASCII_ACTION( sXML_num_format, "num-format" ); -XML_CONSTASCII_ACTION( sXML_num_letter_sync, "num-letter-sync" ); -XML_CONSTASCII_ACTION( sXML_num_prefix, "num-prefix" ); -XML_CONSTASCII_ACTION( sXML_num_suffix, "num-suffix" ); -XML_CONSTASCII_ACTION( sXML_number, "number" ); -XML_CONSTASCII_ACTION( sXML_number_and_name, "number-and-name" ); -XML_CONSTASCII_ACTION( sXML_number_columns_repeated, "number-columns-repeated" ); -XML_CONSTASCII_ACTION( sXML_number_columns_spanned, "number-columns-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_lines, "number-lines" ); -XML_CONSTASCII_ACTION( sXML_number_matrix_columns_spanned, "number-matrix-columns-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_matrix_rows_spanned, "number-matrix-rows-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_position, "number-position" ); -XML_CONSTASCII_ACTION( sXML_number_rows_repeated, "number-rows-repeated" ); -XML_CONSTASCII_ACTION( sXML_number_rows_spanned, "number-rows-spanned" ); -XML_CONSTASCII_ACTION( sXML_number_style, "number-style" ); -XML_CONSTASCII_ACTION( sXML_number_wrapped_paragraphs, "number-wrapped-paragraphs" ); -XML_CONSTASCII_ACTION( sXML_numbered_entries, "numbered-entries" ); -XML_CONSTASCII_ACTION( sXML_object, "object" ); -XML_CONSTASCII_ACTION( sXML_object_count, "object-count" ); -XML_CONSTASCII_ACTION( sXML_object_index, "object-index" ); -XML_CONSTASCII_ACTION( sXML_object_index_entry_template, "object-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_object_index_source, "object-index-source" ); -XML_CONSTASCII_ACTION( sXML_object_name, "object-name"); -XML_CONSTASCII_ACTION( sXML_object_ole, "object-ole" ); -XML_CONSTASCII_ACTION( sXML_objects, "objects" ); -XML_CONSTASCII_ACTION( sXML_odd_page, "odd-page" ); -XML_CONSTASCII_ACTION( sXML_offset, "offset" ); -XML_CONSTASCII_ACTION( sXML_olive, "olive" ); -XML_CONSTASCII_ACTION( sXML_online, "online" ); -XML_CONSTASCII_ACTION( sXML_online_text, "online-text" ); -XML_CONSTASCII_ACTION( sXML_onLoad, "onLoad" ); -XML_CONSTASCII_ACTION( sXML_onRequest, "onRequest" ); -XML_CONSTASCII_ACTION( sXML_on_update_keep_size, "on-update-keep-size"); -XML_CONSTASCII_ACTION( sXML_on_update_keep_styles, "on-update-keep-styles"); -XML_CONSTASCII_ACTION( sXML_opaque_background, "background" ); -XML_CONSTASCII_ACTION( sXML_opaque_foreground, "foreground" ); -XML_CONSTASCII_ACTION( sXML_open, "open" ); -XML_CONSTASCII_ACTION( sXML_open_horizontal, "open-horizontal" ); -XML_CONSTASCII_ACTION( sXML_open_vertical, "open-vertical" ); -XML_CONSTASCII_ACTION( sXML_operation, "operation"); -XML_CONSTASCII_ACTION( sXML_operator, "operator"); -XML_CONSTASCII_ACTION( sXML_optimal, "optimal"); -XML_CONSTASCII_ACTION( sXML_or, "or"); -XML_CONSTASCII_ACTION( sXML_order, "order"); -XML_CONSTASCII_ACTION( sXML_ordered_list, "ordered-list" ); -XML_CONSTASCII_ACTION( sXML_organizations, "organizations" ); -XML_CONSTASCII_ACTION( sXML_orientation, "orientation"); -XML_CONSTASCII_ACTION( sXML_orientation_landscape, "orientation-landscape" ); -XML_CONSTASCII_ACTION( sXML_orientation_portrait, "orientation-portrait" ); -XML_CONSTASCII_ACTION( sXML_origin, "origin" ); -XML_CONSTASCII_ACTION( sXML_orphans, "orphans" ); -XML_CONSTASCII_ACTION( sXML_outline_level, "outline-level" ); -XML_CONSTASCII_ACTION( sXML_outline_level_style, "outline-level-style" ); -XML_CONSTASCII_ACTION( sXML_outline_style, "outline-style" ); -XML_CONSTASCII_ACTION( sXML_outset, "outset" ); -XML_CONSTASCII_ACTION( sXML_outside, "outside" ); -XML_CONSTASCII_ACTION( sXML_overlap, "overlap" ); -XML_CONSTASCII_ACTION( sXML_p, "p" ); -XML_CONSTASCII_ACTION( sXML_package_name, "package-name" ); -XML_CONSTASCII_ACTION( sXML_padding, "padding" ); -XML_CONSTASCII_ACTION( sXML_padding_bottom, "padding-bottom" ); -XML_CONSTASCII_ACTION( sXML_padding_left, "padding-left" ); -XML_CONSTASCII_ACTION( sXML_padding_right, "padding-right" ); -XML_CONSTASCII_ACTION( sXML_padding_top, "padding-top" ); -XML_CONSTASCII_ACTION( sXML_page, "page" ); -XML_CONSTASCII_ACTION( sXML_page_adjust, "page-adjust" ); -XML_CONSTASCII_ACTION( sXML_page_breaks_on_group_change, "page-breaks-on-group-change"); -XML_CONSTASCII_ACTION( sXML_page_content, "page-content" ); -XML_CONSTASCII_ACTION( sXML_page_continuation_string, "page-continuation-string" ); -XML_CONSTASCII_ACTION( sXML_page_count, "page-count" ); -XML_CONSTASCII_ACTION( sXML_page_end_margin, "page-end-margin" ); -XML_CONSTASCII_ACTION( sXML_page_height, "page-height" ); -XML_CONSTASCII_ACTION( sXML_page_master, "page-master" ); -XML_CONSTASCII_ACTION( sXML_page_master_name, "page-master-name" ); -XML_CONSTASCII_ACTION( sXML_page_number, "page-number" ); -XML_CONSTASCII_ACTION( sXML_page_start_margin, "page-start-margin" ); -XML_CONSTASCII_ACTION( sXML_page_style_name, "page-style-name" ); -XML_CONSTASCII_ACTION( sXML_page_thumbnail, "page-thumbnail" ); -XML_CONSTASCII_ACTION( sXML_page_usage, "page-usage" ); -XML_CONSTASCII_ACTION( sXML_page_variable_get, "page-variable-get" ); -XML_CONSTASCII_ACTION( sXML_page_variable_set, "page-variable-set" ); -XML_CONSTASCII_ACTION( sXML_page_view_zoom_value, "page-view-zoom-value" ); -XML_CONSTASCII_ACTION( sXML_page_width, "page-width" ); -XML_CONSTASCII_ACTION( sXML_pages, "pages" ); -XML_CONSTASCII_ACTION( sXML_paper_tray_number, "paper-tray-number" ); -XML_CONSTASCII_ACTION( sXML_paragraph, "paragraph" ); -XML_CONSTASCII_ACTION( sXML_paragraph_content, "paragraph-content" ); -XML_CONSTASCII_ACTION( sXML_paragraph_count, "paragraph-count" ); -XML_CONSTASCII_ACTION( sXML_paragraph_end_margin, "paragraph-end-margin" ); -XML_CONSTASCII_ACTION( sXML_paragraph_start_margin, "paragraph-start-margin" ); -XML_CONSTASCII_ACTION( sXML_param, "param" ); -XML_CONSTASCII_ACTION( sXML_parallel, "parallel" ); -XML_CONSTASCII_ACTION( sXML_parent_style_name, "parent-style-name" ); -XML_CONSTASCII_ACTION( sXML_parse_sql_statement, "parse-sql-statement"); -XML_CONSTASCII_ACTION( sXML_parsed, "parsed" ); -XML_CONSTASCII_ACTION( sXML_pause, "pause" ); -XML_CONSTASCII_ACTION( sXML_partialdiff, "partialdiff"); -XML_CONSTASCII_ACTION( sXML_password, "password"); -XML_CONSTASCII_ACTION( sXML_passwort, "passwort"); -XML_CONSTASCII_ACTION( sXML_path , "path" ); -XML_CONSTASCII_ACTION( sXML_pending , "pending" ); -XML_CONSTASCII_ACTION( sXML_percentage, "percentage"); -XML_CONSTASCII_ACTION( sXML_percentage_style, "percentage-style" ); -XML_CONSTASCII_ACTION( sXML_perspective, "perspective"); -XML_CONSTASCII_ACTION( sXML_phdthesis, "phdthesis" ); -XML_CONSTASCII_ACTION( sXML_phong, "phong"); -XML_CONSTASCII_ACTION( sXML_pie_offset, "pie-offset" ); -XML_CONSTASCII_ACTION( sXML_placeholder, "placeholder" ); -XML_CONSTASCII_ACTION( sXML_placeholder_type, "placeholder-type" ); -XML_CONSTASCII_ACTION( sXML_placing, "placing" ); -XML_CONSTASCII_ACTION( sXML_plain_number, "plain-number" ); -XML_CONSTASCII_ACTION( sXML_plain_number_and_name, "plain-number-and-name" ); -XML_CONSTASCII_ACTION( sXML_plot_area, "plot-area" ); -XML_CONSTASCII_ACTION( sXML_plugin, "plugin" ); -XML_CONSTASCII_ACTION( sXML_plus, "plus" ); -XML_CONSTASCII_ACTION( sXML_points, "points" ); -XML_CONSTASCII_ACTION( sXML_polygon , "polygon" ); -XML_CONSTASCII_ACTION( sXML_polyline , "polyline" ); -XML_CONSTASCII_ACTION( sXML_polynomial, "polynomial" ); -XML_CONSTASCII_ACTION( sXML_pool_id, "pool-id" ); -XML_CONSTASCII_ACTION( sXML_portrait, "portrait" ); -XML_CONSTASCII_ACTION( sXML_position, "position" ); -XML_CONSTASCII_ACTION( sXML_position_bottom, "position-bottom" ); -XML_CONSTASCII_ACTION( sXML_position_left, "position-left" ); -XML_CONSTASCII_ACTION( sXML_position_right, "position-right" ); -XML_CONSTASCII_ACTION( sXML_position_top, "position-top" ); -XML_CONSTASCII_ACTION( sXML_posture_italic, "italic" ); -XML_CONSTASCII_ACTION( sXML_posture_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_posture_oblique, "oblique" ); -XML_CONSTASCII_ACTION( sXML_power, "power" ); -XML_CONSTASCII_ACTION( sXML_precision_as_shown, "precision-as-shown" ); -XML_CONSTASCII_ACTION( sXML_prefix, "prefix" ); -XML_CONSTASCII_ACTION( sXML_presentation, "presentation" ); -XML_CONSTASCII_ACTION( sXML_presentation_chart , "chart" ); -XML_CONSTASCII_ACTION( sXML_presentation_graphic , "graphic" ); -XML_CONSTASCII_ACTION( sXML_presentation_notes , "notes" ); -XML_CONSTASCII_ACTION( sXML_presentation_object , "object" ); -XML_CONSTASCII_ACTION( sXML_presentation_orgchart , "orgchart" ); -XML_CONSTASCII_ACTION( sXML_presentation_outline , "outline" ); -XML_CONSTASCII_ACTION( sXML_presentation_page , "page" ); -XML_CONSTASCII_ACTION( sXML_presentation_page_layout, "presentation-page-layout" ); -XML_CONSTASCII_ACTION( sXML_presentation_page_layout_name, "presentation-page-layout-name" ); -XML_CONSTASCII_ACTION( sXML_presentation_subtitle , "subtitle" ); -XML_CONSTASCII_ACTION( sXML_presentation_table , "table" ); -XML_CONSTASCII_ACTION( sXML_presentation_title , "title" ); -XML_CONSTASCII_ACTION( sXML_previous, "previous" ); -XML_CONSTASCII_ACTION( sXML_previous_page, "previous-page" ); -XML_CONSTASCII_ACTION( sXML_print, "print" ); -XML_CONSTASCII_ACTION( sXML_printable, "printable" ); -XML_CONSTASCII_ACTION( sXML_print_content, "print-content"); -XML_CONSTASCII_ACTION( sXML_print_date, "print-date" ); -XML_CONSTASCII_ACTION( sXML_print_orientation, "print-orientation"); -XML_CONSTASCII_ACTION( sXML_print_page_order, "print-page-order"); -XML_CONSTASCII_ACTION( sXML_print_range, "print-range"); -XML_CONSTASCII_ACTION( sXML_print_ranges, "print-ranges"); -XML_CONSTASCII_ACTION( sXML_print_time, "print-time" ); -XML_CONSTASCII_ACTION( sXML_printed_by, "printed-by" ); -XML_CONSTASCII_ACTION( sXML_proceedings, "proceedings" ); -XML_CONSTASCII_ACTION( sXML_product, "product" ); -XML_CONSTASCII_ACTION( sXML_projection, "projection"); -XML_CONSTASCII_ACTION( sXML_properties, "properties" ); -XML_CONSTASCII_ACTION( sXML_protect, "protect" ); -XML_CONSTASCII_ACTION( sXML_protect_content, "content" ); -XML_CONSTASCII_ACTION( sXML_protect_position, "position" ); -XML_CONSTASCII_ACTION( sXML_protect_size, "size" ); -XML_CONSTASCII_ACTION( sXML_protected, "protected" ); -XML_CONSTASCII_ACTION( sXML_protection_key, "protection-key" ); -XML_CONSTASCII_ACTION( sXML_prsubset, "prsubset" ); -XML_CONSTASCII_ACTION( sXML_publisher, "publisher" ); -XML_CONSTASCII_ACTION( sXML_punctuation_wrap, "punctuation-wrap" ); -XML_CONSTASCII_ACTION( sXML_purple, "purple" ); -XML_CONSTASCII_ACTION( sXML_pyramid, "pyramid" ); -XML_CONSTASCII_ACTION( sXML_quarter, "quarter" ); -XML_CONSTASCII_ACTION( sXML_query_name, "query-name"); -XML_CONSTASCII_ACTION( sXML_quo_vadis, "quo-vadis" ); -XML_CONSTASCII_ACTION( sXML_quotient, "quotient" ); -XML_CONSTASCII_ACTION( sXML_r, "r" ); -XML_CONSTASCII_ACTION( sXML_radar, "radar" ); -XML_CONSTASCII_ACTION( sXML_random, "random" ); -XML_CONSTASCII_ACTION( sXML_range_address, "range-address"); -XML_CONSTASCII_ACTION( sXML_range_usable_as, "range-usable-as"); -XML_CONSTASCII_ACTION( sXML_recreate_on_edit , "recreate-on-edit" ); -XML_CONSTASCII_ACTION( sXML_rect , "rect" ); -XML_CONSTASCII_ACTION( sXML_red , "red" ); -XML_CONSTASCII_ACTION( sXML_ref_name, "ref-name" ); -XML_CONSTASCII_ACTION( sXML_reference, "reference" ); -XML_CONSTASCII_ACTION( sXML_reference_end, "reference-end" ); -XML_CONSTASCII_ACTION( sXML_reference_format, "reference-format" ); -XML_CONSTASCII_ACTION( sXML_reference_mark, "reference-mark" ); -XML_CONSTASCII_ACTION( sXML_reference_mark_end, "reference-mark-end" ); -XML_CONSTASCII_ACTION( sXML_reference_mark_start, "reference-mark-start" ); -XML_CONSTASCII_ACTION( sXML_reference_ref, "reference-ref" ); -XML_CONSTASCII_ACTION( sXML_reference_start, "reference-start" ); -XML_CONSTASCII_ACTION( sXML_reference_type, "reference-type" ); -XML_CONSTASCII_ACTION( sXML_refresh_delay, "refresh-delay" ); -XML_CONSTASCII_ACTION( sXML_region_center, "region-center" ); -XML_CONSTASCII_ACTION( sXML_region_left, "region-left" ); -XML_CONSTASCII_ACTION( sXML_region_right, "region-right" ); -XML_CONSTASCII_ACTION( sXML_register_true, "register-true" ); -XML_CONSTASCII_ACTION( sXML_register_truth_ref_style_name, "register-truth-ref-style-name" ); -XML_CONSTASCII_ACTION( sXML_regression_type, "regression-type" ); -XML_CONSTASCII_ACTION( sXML_rejected, "rejected" ); -XML_CONSTASCII_ACTION( sXML_rejecting_change_id, "rejecting-change-id" ); -XML_CONSTASCII_ACTION( sXML_rejection, "rejection" ); -XML_CONSTASCII_ACTION( sXML_rel_column_width, "rel-column-width" ); -XML_CONSTASCII_ACTION( sXML_rel_height, "rel-height" ); -XML_CONSTASCII_ACTION( sXML_rel_width, "rel-width" ); -XML_CONSTASCII_ACTION( sXML_relative, "relative" ) ; -XML_CONSTASCII_ACTION( sXML_relative_tab_stop_position, "relative-tab-stop-position" ); -XML_CONSTASCII_ACTION( sXML_reln, "reln" ) ; -XML_CONSTASCII_ACTION( sXML_rem, "rem" ) ; -XML_CONSTASCII_ACTION( sXML_remove_dependents, "remove-dependents" ); -XML_CONSTASCII_ACTION( sXML_remove_precedents, "remove-precedents" ); -XML_CONSTASCII_ACTION( sXML_repeat, "repeat" ); -XML_CONSTASCII_ACTION( sXML_repeat_column, "repeat-column"); -XML_CONSTASCII_ACTION( sXML_repeat_row, "repeat-row"); -XML_CONSTASCII_ACTION( sXML_repeated, "repeated" ); -XML_CONSTASCII_ACTION( sXML_replace, "replace" ); -XML_CONSTASCII_ACTION( sXML_report_type, "report-type" ); -XML_CONSTASCII_ACTION( sXML_restart_on_page, "restart-on-page" ); -XML_CONSTASCII_ACTION( sXML_revision, "revision" ); -XML_CONSTASCII_ACTION( sXML_ridge, "ridge" ); -XML_CONSTASCII_ACTION( sXML_right, "right" ); -XML_CONSTASCII_ACTION( sXML_right_outside, "right-outside" ); -XML_CONSTASCII_ACTION( sXML_ring, "ring" ); -XML_CONSTASCII_ACTION( sXML_role, "role" ); -XML_CONSTASCII_ACTION( sXML_roll_from_bottom, "roll-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_roll_from_left, "roll-from-left" ); -XML_CONSTASCII_ACTION( sXML_roll_from_right, "roll-from-right" ); -XML_CONSTASCII_ACTION( sXML_roman, "roman" ); -XML_CONSTASCII_ACTION( sXML_root, "root" ); -XML_CONSTASCII_ACTION( sXML_rotate, "rotate" ); -XML_CONSTASCII_ACTION( sXML_rotation, "rotation" ); -XML_CONSTASCII_ACTION( sXML_rotation_align, "rotation-align" ); -XML_CONSTASCII_ACTION( sXML_rotation_angle, "rotation-angle" ); -XML_CONSTASCII_ACTION( sXML_round , "round" ); -XML_CONSTASCII_ACTION( sXML_row, "row"); -XML_CONSTASCII_ACTION( sXML_rows, "rows"); -XML_CONSTASCII_ACTION( sXML_row_height, "row-height" ); -XML_CONSTASCII_ACTION( sXML_row_number, "row-number" ); -XML_CONSTASCII_ACTION( sXML_ruby, "ruby" ); -XML_CONSTASCII_ACTION( sXML_ruby_align, "ruby-align" ); -XML_CONSTASCII_ACTION( sXML_ruby_base, "ruby-base" ); -XML_CONSTASCII_ACTION( sXML_ruby_position, "ruby-position" ); -XML_CONSTASCII_ACTION( sXML_ruby_text, "ruby-text" ); -XML_CONSTASCII_ACTION( sXML_run_through, "run-through" ); -XML_CONSTASCII_ACTION( sXML_rx, "rx" ); -XML_CONSTASCII_ACTION( sXML_ry, "ry" ); -XML_CONSTASCII_ACTION( sXML_s, "s" ); -XML_CONSTASCII_ACTION( sXML_scale, "scale" ); -XML_CONSTASCII_ACTION( sXML_scale_min, "scale-min" ); -XML_CONSTASCII_ACTION( sXML_scale_text, "scale-text" ); -XML_CONSTASCII_ACTION( sXML_scale_to, "scale-to" ); -XML_CONSTASCII_ACTION( sXML_scale_to_pages, "scale-to-pages" ); -XML_CONSTASCII_ACTION( sXML_scatter, "scatter" ); -XML_CONSTASCII_ACTION( sXML_scenario, "scenario" ); -XML_CONSTASCII_ACTION( sXML_scenario_ranges, "scenario-ranges" ); -XML_CONSTASCII_ACTION( sXML_scene, "scene"); -XML_CONSTASCII_ACTION( sXML_school, "school" ); -XML_CONSTASCII_ACTION( sXML_scientific_number, "scientific-number" ); -XML_CONSTASCII_ACTION( sXML_score_spaces, "score-spaces" ); -XML_CONSTASCII_ACTION( sXML_script, "script" ); -XML_CONSTASCII_ACTION( sXML_scroll, "scroll" ); -XML_CONSTASCII_ACTION( sXML_sdev, "sdev" ); -XML_CONSTASCII_ACTION( sXML_search_criteria_must_apply_to_whole_cell, "search-criteria-must-apply-to-whole-cell" ); -XML_CONSTASCII_ACTION( sXML_sec, "sec" ); -XML_CONSTASCII_ACTION( sXML_sech, "sech" ); -XML_CONSTASCII_ACTION( sXML_second_date_time, "second-date-time" ); -XML_CONSTASCII_ACTION( sXML_seconds, "seconds" ); -XML_CONSTASCII_ACTION( sXML_section, "section" ); -XML_CONSTASCII_ACTION( sXML_section_desc, "section-desc" ); -XML_CONSTASCII_ACTION( sXML_section_name, "section-name" ); -XML_CONSTASCII_ACTION( sXML_section_source, "section-source" ); -XML_CONSTASCII_ACTION( sXML_select_page, "select-page" ); -XML_CONSTASCII_ACTION( sXML_selector, "selector" ); -XML_CONSTASCII_ACTION( sXML_semantics, "semantics" ); -XML_CONSTASCII_ACTION( sXML_semi_automatic, "semi-automatic" ); -XML_CONSTASCII_ACTION( sXML_sender_city, "sender-city" ); -XML_CONSTASCII_ACTION( sXML_sender_company, "sender-company" ); -XML_CONSTASCII_ACTION( sXML_sender_country, "sender-country" ); -XML_CONSTASCII_ACTION( sXML_sender_email, "sender-email" ); -XML_CONSTASCII_ACTION( sXML_sender_fax, "sender-fax" ); -XML_CONSTASCII_ACTION( sXML_sender_firstname, "sender-firstname" ); -XML_CONSTASCII_ACTION( sXML_sender_initials, "sender-initials" ); -XML_CONSTASCII_ACTION( sXML_sender_lastname, "sender-lastname" ); -XML_CONSTASCII_ACTION( sXML_sender_phone_private, "sender-phone-private" ); -XML_CONSTASCII_ACTION( sXML_sender_phone_work, "sender-phone-work" ); -XML_CONSTASCII_ACTION( sXML_sender_position, "sender-position" ); -XML_CONSTASCII_ACTION( sXML_sender_postal_code, "sender-postal-code" ); -XML_CONSTASCII_ACTION( sXML_sender_state_or_province, "sender-state-or-province" ); -XML_CONSTASCII_ACTION( sXML_sender_street, "sender-street" ); -XML_CONSTASCII_ACTION( sXML_sender_title, "sender-title" ); -XML_CONSTASCII_ACTION( sXML_sep, "sep" ); -XML_CONSTASCII_ACTION( sXML_separation_character, "separation-character" ); -XML_CONSTASCII_ACTION( sXML_separator, "separator" ); -XML_CONSTASCII_ACTION( sXML_sequence, "sequence" ); -XML_CONSTASCII_ACTION( sXML_sequence_decl, "sequence-decl" ); -XML_CONSTASCII_ACTION( sXML_sequence_decls, "sequence-decls" ); -XML_CONSTASCII_ACTION( sXML_sequence_ref, "sequence-ref" ); -XML_CONSTASCII_ACTION( sXML_series, "series" ); -XML_CONSTASCII_ACTION( sXML_series_source, "series-source" ); -XML_CONSTASCII_ACTION( sXML_server_map, "server-map" ); -XML_CONSTASCII_ACTION( sXML_set, "set" ); -XML_CONSTASCII_ACTION( sXML_setdiff, "setdiff" ); -XML_CONSTASCII_ACTION( sXML_settings, "settings" ); -XML_CONSTASCII_ACTION( sXML_shade_mode, "shade-mode"); -XML_CONSTASCII_ACTION( sXML_shadow, "shadow" ); -XML_CONSTASCII_ACTION( sXML_shadow_color , "shadow-color" ); -XML_CONSTASCII_ACTION( sXML_shadow_offset_x , "shadow-offset-x" ); -XML_CONSTASCII_ACTION( sXML_shadow_offset_y , "shadow-offset-y" ); -XML_CONSTASCII_ACTION( sXML_shadow_slant, "shadow-slant"); -XML_CONSTASCII_ACTION( sXML_shadow_transparency , "shadow-transparency" ); -XML_CONSTASCII_ACTION( sXML_shape, "shape" ); -XML_CONSTASCII_ACTION( sXML_shapes, "shapes" ); -XML_CONSTASCII_ACTION( sXML_sheet_name, "sheet-name" ); -XML_CONSTASCII_ACTION( sXML_shininess, "shininess" ); -XML_CONSTASCII_ACTION( sXML_short, "short" ); -XML_CONSTASCII_ACTION( sXML_show, "show" ); -XML_CONSTASCII_ACTION( sXML_show_accepted_changes, "show-accepted-changes" ); -XML_CONSTASCII_ACTION( sXML_show_rejected_changes, "show-rejected-changes" ); -XML_CONSTASCII_ACTION( sXML_show_changes, "show-changes" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_author, "show-changes-by-author" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_author_name, "show-changes-by-author-name" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_comment, "show-changes-by-comment" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_comment_text, "show-changes-by-comment-text" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime, "show-changes-by-datetime" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_mode, "show-changes-by-datetime-mode" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_first_datetime, "show-changes-by-datetime-first-datetime" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_second_datetime, "show-changes-by-datetime-second-datetime" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_ranges, "show-changes-by-ranges" ); -XML_CONSTASCII_ACTION( sXML_show_changes_by_ranges_list, "show-changes-by-ranges-list" ); -XML_CONSTASCII_ACTION( sXML_show_logo, "show-logo" ); -XML_CONSTASCII_ACTION( sXML_show_unit, "show-unit" ); -XML_CONSTASCII_ACTION( sXML_shows, "shows" ); -XML_CONSTASCII_ACTION( sXML_side_by_side, "side-by-side" ); -XML_CONSTASCII_ACTION( sXML_silver, "silver" ); -XML_CONSTASCII_ACTION( sXML_simple, "simple" ); -XML_CONSTASCII_ACTION( sXML_sin, "sin" ); -XML_CONSTASCII_ACTION( sXML_since_date_time, "since-date-time" ); -XML_CONSTASCII_ACTION( sXML_since_save, "since-save" ); -XML_CONSTASCII_ACTION( sXML_sinh, "sinh" ); -XML_CONSTASCII_ACTION( sXML_size, "size" ); -XML_CONSTASCII_ACTION( sXML_size_protect, "size-protect" ); -XML_CONSTASCII_ACTION( sXML_slide, "slide" ); -XML_CONSTASCII_ACTION( sXML_slow, "slow" ); -XML_CONSTASCII_ACTION( sXML_soft_page_break, "soft-page-break" ); -XML_CONSTASCII_ACTION( sXML_solid, "solid" ); -XML_CONSTASCII_ACTION( sXML_solid_type, "solid-type" ); -XML_CONSTASCII_ACTION( sXML_sort, "sort"); -XML_CONSTASCII_ACTION( sXML_sort_ascending, "sort-ascending" ); -XML_CONSTASCII_ACTION( sXML_sort_by, "sort-by"); -XML_CONSTASCII_ACTION( sXML_sort_by_position, "sort-by-position" ); -XML_CONSTASCII_ACTION( sXML_sort_groups, "sort-groups"); -XML_CONSTASCII_ACTION( sXML_sort_key, "sort-key"); -XML_CONSTASCII_ACTION( sXML_sort_by_x_values, "sort-by-x-values" ); -XML_CONSTASCII_ACTION( sXML_source_cell_range, "source-cell-range"); -XML_CONSTASCII_ACTION( sXML_source_cell_range_addresses, "source-cell-range-addresses"); -XML_CONSTASCII_ACTION( sXML_source_field_name, "source-field-name"); -XML_CONSTASCII_ACTION( sXML_source_name, "source-name"); -XML_CONSTASCII_ACTION( sXML_source_range_address, "source-range-address"); -XML_CONSTASCII_ACTION( sXML_source_service, "source-service"); -XML_CONSTASCII_ACTION( sXML_space_before, "space-before" ); -XML_CONSTASCII_ACTION( sXML_span, "span" ); -XML_CONSTASCII_ACTION( sXML_specular, "specular"); -XML_CONSTASCII_ACTION( sXML_specular_color, "specular-color" ); -XML_CONSTASCII_ACTION( sXML_sphere, "sphere" ); -XML_CONSTASCII_ACTION( sXML_spiralin_left, "spiralin-left" ); -XML_CONSTASCII_ACTION( sXML_spiralin_right, "spiralin-right" ); -XML_CONSTASCII_ACTION( sXML_spiralout_left, "spiralout-left" ); -XML_CONSTASCII_ACTION( sXML_spiralout_right, "spiralout-right" ); -XML_CONSTASCII_ACTION( sXML_splines, "splines" ); -XML_CONSTASCII_ACTION( sXML_split, "split" ); -XML_CONSTASCII_ACTION( sXML_split_column, "split-column" ); -XML_CONSTASCII_ACTION( sXML_split_position, "split-position" ); -XML_CONSTASCII_ACTION( sXML_split_row, "split-row" ); -XML_CONSTASCII_ACTION( sXML_spreadsheet , "spreadsheet" ); -XML_CONSTASCII_ACTION( sXML_sql_statement, "sql-statement"); -XML_CONSTASCII_ACTION( sXML_stacked, "stacked" ); -XML_CONSTASCII_ACTION( sXML_stagger_even, "stagger-even" ); -XML_CONSTASCII_ACTION( sXML_stagger_odd, "stagger-odd" ); -XML_CONSTASCII_ACTION( sXML_standard, "standard" ); -XML_CONSTASCII_ACTION( sXML_standard_deviation, "standard-deviation" ); -XML_CONSTASCII_ACTION( sXML_starbasic, "starbasic" ); -XML_CONSTASCII_ACTION( sXML_start, "start" ); -XML_CONSTASCII_ACTION( sXML_start_color, "start-color" ); -XML_CONSTASCII_ACTION( sXML_start_column, "start-column" ); -XML_CONSTASCII_ACTION( sXML_start_intensity, "start-intensity" ); -XML_CONSTASCII_ACTION( sXML_start_numbering_at, "start-numbering-at" ); -XML_CONSTASCII_ACTION( sXML_start_page, "start-page" ); -XML_CONSTASCII_ACTION( sXML_start_position, "start-position" ); -XML_CONSTASCII_ACTION( sXML_start_row, "start-row" ); -XML_CONSTASCII_ACTION( sXML_start_table, "start-table" ); -XML_CONSTASCII_ACTION( sXML_start_value, "start-value" ); -XML_CONSTASCII_ACTION( sXML_start_with_navigator, "start-with-navigator" ); -XML_CONSTASCII_ACTION( sXML_statistics, "statistics" ); -XML_CONSTASCII_ACTION( sXML_status, "status" ); -XML_CONSTASCII_ACTION( sXML_stay_on_top, "stay-on-top" ); -XML_CONSTASCII_ACTION( sXML_stdev, "stdev" ); -XML_CONSTASCII_ACTION( sXML_stdevp, "stdevp" ); -XML_CONSTASCII_ACTION( sXML_steps, "steps" ); -XML_CONSTASCII_ACTION( sXML_stock, "stock" ); -XML_CONSTASCII_ACTION( sXML_stock_updown_bars, "stock-updown-bars" ); -XML_CONSTASCII_ACTION( sXML_stock_with_volume, "stock-with-volume" ); -XML_CONSTASCII_ACTION( sXML_stop, "stop" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_bottom, "stretch-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_left, "stretch-from-left" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_right, "stretch-from-right" ); -XML_CONSTASCII_ACTION( sXML_stretch_from_top, "stretch-from-top" ); -XML_CONSTASCII_ACTION( sXML_stretchy, "stretchy" ); -XML_CONSTASCII_ACTION( sXML_strict , "strict" ); -XML_CONSTASCII_ACTION( sXML_string, "string"); -XML_CONSTASCII_ACTION( sXML_string_value, "string-value"); -XML_CONSTASCII_ACTION( sXML_string_value_if_false, "string-value-if-false" ); -XML_CONSTASCII_ACTION( sXML_string_value_if_true, "string-value-if-true" ); -XML_CONSTASCII_ACTION( sXML_stroke , "stroke" ); -XML_CONSTASCII_ACTION( sXML_stroke_color , "stroke-color" ); -XML_CONSTASCII_ACTION( sXML_stroke_dash , "stroke-dash" ); -XML_CONSTASCII_ACTION( sXML_stroke_linejoin , "stroke-linejoin" ); -XML_CONSTASCII_ACTION( sXML_stroke_opacity, "stroke-opacity" ); -XML_CONSTASCII_ACTION( sXML_stroke_width, "stroke-width" ); -XML_CONSTASCII_ACTION( sXML_structure_protected, "structure-protected" ); -XML_CONSTASCII_ACTION( sXML_style, "style" ); -XML_CONSTASCII_ACTION( sXML_style_name, "style-name" ); -XML_CONSTASCII_ACTION( sXML_styles, "styles" ); -XML_CONSTASCII_ACTION( sXML_stylesheet, "stylesheet" ); -XML_CONSTASCII_ACTION( sXML_sub_table, "sub-table" ); -XML_CONSTASCII_ACTION( sXML_subject, "subject" ); -XML_CONSTASCII_ACTION( sXML_subset, "subset" ); -XML_CONSTASCII_ACTION( sXML_subtitle, "subtitle" ); -XML_CONSTASCII_ACTION( sXML_subtotal_field, "subtotal-field"); -XML_CONSTASCII_ACTION( sXML_subtotal_rule, "subtotal-rule"); -XML_CONSTASCII_ACTION( sXML_subtotal_rules, "subtotal-rules"); -XML_CONSTASCII_ACTION( sXML_suffix, "suffix" ); -XML_CONSTASCII_ACTION( sXML_sum, "sum" ); -XML_CONSTASCII_ACTION( sXML_swiss, "swiss" ); -XML_CONSTASCII_ACTION( sXML_symbol, "symbol" ); -XML_CONSTASCII_ACTION( sXML_symbol_height, "symbol-height" ); -XML_CONSTASCII_ACTION( sXML_symbol_image_name, "symbol-image-name" ); -XML_CONSTASCII_ACTION( sXML_symbol_width, "symbol-width" ); -XML_CONSTASCII_ACTION( sXML_system, "system" ); -XML_CONSTASCII_ACTION( sXML_tab_stop, "tab-stop" ); -XML_CONSTASCII_ACTION( sXML_tab_stops, "tab-stops" ); -XML_CONSTASCII_ACTION( sXML_table, "table" ); -XML_CONSTASCII_ACTION( sXML_tables, "tables" ); -XML_CONSTASCII_ACTION( sXML_table_background, "table-background" ); -XML_CONSTASCII_ACTION( sXML_table_cell, "table-cell" ); -XML_CONSTASCII_ACTION( sXML_table_centering, "table-centering" ); -XML_CONSTASCII_ACTION( sXML_table_column, "table-column" ); -XML_CONSTASCII_ACTION( sXML_table_column_group, "table-column-group" ); -XML_CONSTASCII_ACTION( sXML_table_columns, "table-columns" ); -XML_CONSTASCII_ACTION( sXML_table_count, "table-count" ); -XML_CONSTASCII_ACTION( sXML_table_header, "table-header" ); -XML_CONSTASCII_ACTION( sXML_table_header_columns, "table-header-columns" ); -XML_CONSTASCII_ACTION( sXML_table_header_rows, "table-header-rows" ); -XML_CONSTASCII_ACTION( sXML_table_index, "table-index" ); -XML_CONSTASCII_ACTION( sXML_table_index_entry_template, "table-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_table_index_source, "table-index-source" ); -XML_CONSTASCII_ACTION( sXML_table_name, "table-name"); -XML_CONSTASCII_ACTION( sXML_table_number_list, "table-number-list"); -XML_CONSTASCII_ACTION( sXML_table_of_content, "table-of-content" ); -XML_CONSTASCII_ACTION( sXML_table_of_content_entry_template, "table-of-content-entry-template" ); -XML_CONSTASCII_ACTION( sXML_table_of_content_source, "table-of-content-source" ); -XML_CONSTASCII_ACTION( sXML_table_page, "table-page" ); -XML_CONSTASCII_ACTION( sXML_table_row, "table-row" ); -XML_CONSTASCII_ACTION( sXML_table_row_group, "table-row-group" ); -XML_CONSTASCII_ACTION( sXML_table_rows, "table-rows" ); -XML_CONSTASCII_ACTION( sXML_table_source, "table-source" ); -XML_CONSTASCII_ACTION( sXML_table_view, "table-view" ); -XML_CONSTASCII_ACTION( sXML_tab_stop_distance, "tab-stop-distance" ); -XML_CONSTASCII_ACTION( sXML_tan, "tan" ); -XML_CONSTASCII_ACTION( sXML_tanh, "tanh" ); -XML_CONSTASCII_ACTION( sXML_target_cell_address, "target-cell-address"); -XML_CONSTASCII_ACTION( sXML_target_frame_name, "target-frame-name" ); -XML_CONSTASCII_ACTION( sXML_target_range_address, "target-range-address"); -XML_CONSTASCII_ACTION( sXML_tb_rl, "tb-rl" ); -XML_CONSTASCII_ACTION( sXML_teal, "teal" ); -XML_CONSTASCII_ACTION( sXML_techreport, "techreport" ); -XML_CONSTASCII_ACTION( sXML_template, "template" ); -XML_CONSTASCII_ACTION( sXML_template_name, "template-name" ); -XML_CONSTASCII_ACTION( sXML_tendsto, "tendsto" ); -XML_CONSTASCII_ACTION( sXML_tex_filter, "texture-filter" ); -XML_CONSTASCII_ACTION( sXML_tex_generation_mode_x, "texture-generation-mode-x" ); -XML_CONSTASCII_ACTION( sXML_tex_generation_mode_y, "texture-generation-mode-y" ); -XML_CONSTASCII_ACTION( sXML_tex_kind, "texture-kind" ); -XML_CONSTASCII_ACTION( sXML_tex_mode, "texture-mode" ); -XML_CONSTASCII_ACTION( sXML_text, "text" ); -XML_CONSTASCII_ACTION( sXML_text_align, "text-align" ); -XML_CONSTASCII_ACTION( sXML_text_align_last, "text-align-last" ); -XML_CONSTASCII_ACTION( sXML_text_align_source, "text-align-source" ); -XML_CONSTASCII_ACTION( sXML_text_autospace, "text-autospace" ); -XML_CONSTASCII_ACTION( sXML_text_background_color, "text-background-color" ); -XML_CONSTASCII_ACTION( sXML_text_blinking, "text-blinking" ); -XML_CONSTASCII_ACTION( sXML_text_box, "text-box" ); -XML_CONSTASCII_ACTION( sXML_text_combine, "text-combine" ); -XML_CONSTASCII_ACTION( sXML_text_combine_end_char, "text-combine-end-char" ); -XML_CONSTASCII_ACTION( sXML_text_combine_start_char, "text-combine-start-char" ); -XML_CONSTASCII_ACTION( sXML_text_content, "text-content" ); -XML_CONSTASCII_ACTION( sXML_text_crossing_out, "text-crossing-out" ); -XML_CONSTASCII_ACTION( sXML_text_emphasize, "text-emphasize" ); -XML_CONSTASCII_ACTION( sXML_text_global, "text-global" ); -XML_CONSTASCII_ACTION( sXML_text_indent, "text-indent" ); -XML_CONSTASCII_ACTION( sXML_text_input, "text-input" ); -XML_CONSTASCII_ACTION( sXML_text_outline, "text-outline" ); -XML_CONSTASCII_ACTION( sXML_text_position, "text-position" ); -XML_CONSTASCII_ACTION( sXML_text_rotation_angle, "text-rotation-angle" ); -XML_CONSTASCII_ACTION( sXML_text_rotation_scale, "text-rotation-scale" ); -XML_CONSTASCII_ACTION( sXML_text_scale, "text-scale" ); -XML_CONSTASCII_ACTION( sXML_text_shadow, "text-shadow" ); -XML_CONSTASCII_ACTION( sXML_text_style, "text-style" ); -XML_CONSTASCII_ACTION( sXML_text_transform, "text-transform" ); -XML_CONSTASCII_ACTION( sXML_text_underline, "text-underline" ); -XML_CONSTASCII_ACTION( sXML_text_underline_color, "text-underline-color" ); -XML_CONSTASCII_ACTION( sXML_textarea_horizontal_align, "textarea-horizontal-align" ); -XML_CONSTASCII_ACTION( sXML_textarea_vertical_align, "textarea-vertical-align" ); -XML_CONSTASCII_ACTION( sXML_textual, "textual" ); -XML_CONSTASCII_ACTION( sXML_thick, "thick" ); -XML_CONSTASCII_ACTION( sXML_thin, "thin" ); -XML_CONSTASCII_ACTION( sXML_three_dimensional, "three-dimensional" ); -XML_CONSTASCII_ACTION( sXML_thumbnail, "thumbnail" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_major_inner, "tick-marks-major-inner" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_major_outer, "tick-marks-major-outer" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_minor_inner, "tick-marks-minor-inner" ); -XML_CONSTASCII_ACTION( sXML_tick_marks_minor_outer, "tick-marks-minor-outer" ); -XML_CONSTASCII_ACTION( sXML_tile_repeat_offset, "tile-repeat-offset" ); -XML_CONSTASCII_ACTION( sXML_time, "time"); -XML_CONSTASCII_ACTION( sXML_time_adjust, "time-adjust" ); -XML_CONSTASCII_ACTION( sXML_time_style, "time-style" ); -XML_CONSTASCII_ACTION( sXML_time_value, "time-value"); -XML_CONSTASCII_ACTION( sXML_times, "times"); -XML_CONSTASCII_ACTION( sXML_title, "title" ); -XML_CONSTASCII_ACTION( sXML_to_another_table, "to-another-table" ); -XML_CONSTASCII_ACTION( sXML_toc_mark, "toc-mark" ); -XML_CONSTASCII_ACTION( sXML_toc_mark_end, "toc-mark-end" ); -XML_CONSTASCII_ACTION( sXML_toc_mark_start, "toc-mark-start" ); -XML_CONSTASCII_ACTION( sXML_top, "top" ); -XML_CONSTASCII_ACTION( sXML_top_percent, "top percent"); -XML_CONSTASCII_ACTION( sXML_top_values, "top values"); -XML_CONSTASCII_ACTION( sXML_trace_dependents, "trace-dependents" ); -XML_CONSTASCII_ACTION( sXML_trace_errors, "trace-errors" ); -XML_CONSTASCII_ACTION( sXML_trace_precedents, "trace-precedents" ); -XML_CONSTASCII_ACTION( sXML_track_changes, "track-changes" ); -XML_CONSTASCII_ACTION( sXML_tracked_changes, "tracked-changes" ); -XML_CONSTASCII_ACTION( sXML_tracked_changes_view_settings, "tracked-changes-view-settings" ); -XML_CONSTASCII_ACTION( sXML_transform , "transform" ); -XML_CONSTASCII_ACTION( sXML_transition_on_click, "transition-on-click" ); -XML_CONSTASCII_ACTION( sXML_transparency, "transparency" ); -XML_CONSTASCII_ACTION( sXML_transparency_name, "transparency-name" ); -XML_CONSTASCII_ACTION( sXML_transparent, "transparent" ); -XML_CONSTASCII_ACTION( sXML_transpose, "transpose" ); -XML_CONSTASCII_ACTION( sXML_true, "true" ); -XML_CONSTASCII_ACTION( sXML_truncate_on_overflow, "truncate-on-overflow" ); -XML_CONSTASCII_ACTION( sXML_ttb, "ttb"); -XML_CONSTASCII_ACTION( sXML_type, "type" ); -XML_CONSTASCII_ACTION( sXML_underline_bold, "bold" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dash, "bold-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dash, "bold-dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dot_dash, "bold-dot-dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_dotted, "bold-dotted" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_long_dash, "bold-long-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_bold_wave, "bold-wave" ); -XML_CONSTASCII_ACTION( sXML_underline_dash, "dash" ); -XML_CONSTASCII_ACTION( sXML_underline_dot_dash, "dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_dot_dot_dash, "dot-dot-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_dotted, "dotted" ); -XML_CONSTASCII_ACTION( sXML_underline_double, "double" ); -XML_CONSTASCII_ACTION( sXML_underline_double_wave, "double-wave" ); -XML_CONSTASCII_ACTION( sXML_underline_long_dash, "long-dash" ); -XML_CONSTASCII_ACTION( sXML_underline_none, "none" ); -XML_CONSTASCII_ACTION( sXML_underline_single, "single" ); -XML_CONSTASCII_ACTION( sXML_underline_small_wave, "small-wave" ); -XML_CONSTASCII_ACTION( sXML_underline_wave, "wave" ); -XML_CONSTASCII_ACTION( sXML_unformatted_text, "unformatted-text" ); -XML_CONSTASCII_ACTION( sXML_union, "union" ); -XML_CONSTASCII_ACTION( sXML_unit, "unit" ); -XML_CONSTASCII_ACTION( sXML_unordered_list, "unordered-list" ); -XML_CONSTASCII_ACTION( sXML_unpublished, "unpublished" ); -XML_CONSTASCII_ACTION( sXML_uplimit, "uplimit" ); -XML_CONSTASCII_ACTION( sXML_url, "url" ); -XML_CONSTASCII_ACTION( sXML_use_caption, "use-caption" ); -XML_CONSTASCII_ACTION( sXML_use_cell_protection, "use-cell-protection" ); -XML_CONSTASCII_ACTION( sXML_use_chart_objects, "use-chart-objects" ); -XML_CONSTASCII_ACTION( sXML_use_condition, "use-condition" ); -XML_CONSTASCII_ACTION( sXML_use_draw_objects, "use-draw-objects" ); -XML_CONSTASCII_ACTION( sXML_use_floating_frames, "use-floating-frames" ); -XML_CONSTASCII_ACTION( sXML_use_graphics, "use-graphics" ); -XML_CONSTASCII_ACTION( sXML_use_image_objects, "use-image-objects" ); -XML_CONSTASCII_ACTION( sXML_use_index_marks, "use-index-marks" ); -XML_CONSTASCII_ACTION( sXML_use_index_source_styles, "use-index-source-styles" ); -XML_CONSTASCII_ACTION( sXML_use_keys_as_entries, "use-keys-as-entries" ); -XML_CONSTASCII_ACTION( sXML_use_label, "use-label" ); -XML_CONSTASCII_ACTION( sXML_use_math_objects, "use-math-objects" ); -XML_CONSTASCII_ACTION( sXML_use_objects, "use-objects" ); -XML_CONSTASCII_ACTION( sXML_use_optimal_column_width, "use-optimal-column-width"); -XML_CONSTASCII_ACTION( sXML_use_optimal_row_height, "use-optimal-row-height"); -XML_CONSTASCII_ACTION( sXML_use_other_objects, "use-other-objects" ); -XML_CONSTASCII_ACTION( sXML_use_soft_page_breaks, "use-soft-page-breaks" ); -XML_CONSTASCII_ACTION( sXML_use_spreadsheet_objects, "use-spreadsheet-objects" ); -XML_CONSTASCII_ACTION( sXML_use_styles, "use-styles" ); -XML_CONSTASCII_ACTION( sXML_use_tables, "use-tables" ); -XML_CONSTASCII_ACTION( sXML_use_window_font_color, "use-window-font-color" ); -XML_CONSTASCII_ACTION( sXML_used_hierarchy, "used-hierarchy"); -XML_CONSTASCII_ACTION( sXML_user_defined, "user-defined" ); -XML_CONSTASCII_ACTION( sXML_user_field_decl, "user-field-decl" ); -XML_CONSTASCII_ACTION( sXML_user_field_decls, "user-field-decls" ); -XML_CONSTASCII_ACTION( sXML_user_field_get, "user-field-get" ); -XML_CONSTASCII_ACTION( sXML_user_field_input, "user-field-input" ); -XML_CONSTASCII_ACTION( sXML_user_index, "user-index" ); -XML_CONSTASCII_ACTION( sXML_user_index_entry_template, "user-index-entry-template" ); -XML_CONSTASCII_ACTION( sXML_user_index_mark, "user-index-mark" ); -XML_CONSTASCII_ACTION( sXML_user_index_mark_end, "user-index-mark-end" ); -XML_CONSTASCII_ACTION( sXML_user_index_mark_start, "user-index-mark-start" ); -XML_CONSTASCII_ACTION( sXML_user_index_source, "user-index-source" ); -XML_CONSTASCII_ACTION( sXML_user_transformed, "user-transformed" ); -XML_CONSTASCII_ACTION( sXML_username, "username"); -XML_CONSTASCII_ACTION( sXML_value, "value"); -XML_CONSTASCII_ACTION( sXML_value_type, "value-type"); -XML_CONSTASCII_ACTION( sXML_values_cell_range_address, "values-cell-range-address" ); -XML_CONSTASCII_ACTION( sXML_var, "var" ); -XML_CONSTASCII_ACTION( sXML_variable, "variable" ); -XML_CONSTASCII_ACTION( sXML_variable_decl, "variable-decl" ); -XML_CONSTASCII_ACTION( sXML_variable_decls, "variable-decls" ); -XML_CONSTASCII_ACTION( sXML_variable_get, "variable-get" ); -XML_CONSTASCII_ACTION( sXML_variable_input, "variable-input" ); -XML_CONSTASCII_ACTION( sXML_variable_set, "variable-set" ); -XML_CONSTASCII_ACTION( sXML_variance, "variance" ); -XML_CONSTASCII_ACTION( sXML_varp, "varp" ); -XML_CONSTASCII_ACTION( sXML_vector, "vector" ); -XML_CONSTASCII_ACTION( sXML_verb, "verb" ); -XML_CONSTASCII_ACTION( sXML_version, "version" ); -XML_CONSTASCII_ACTION( sXML_version_entry, "version-entry" ); -XML_CONSTASCII_ACTION( sXML_version_list, "version-list" ); -XML_CONSTASCII_ACTION( sXML_vertical, "vertical" ); -XML_CONSTASCII_ACTION( sXML_vertical_align, "vertical-align" ); -XML_CONSTASCII_ACTION( sXML_vertical_lines, "vertical-lines" ); -XML_CONSTASCII_ACTION( sXML_vertical_pos, "vertical-pos" ); -XML_CONSTASCII_ACTION( sXML_vertical_rel, "vertical-rel" ); -XML_CONSTASCII_ACTION( sXML_vertical_segments, "vertical-segments" ); -XML_CONSTASCII_ACTION( sXML_vertical_split_mode, "vertical-split-mode" ); -XML_CONSTASCII_ACTION( sXML_vertical_split_position, "vertical-split-position" ); -XML_CONSTASCII_ACTION( sXML_vertical_stripes, "vertical-stripes" ); -XML_CONSTASCII_ACTION( sXML_view, "view" ); -XML_CONSTASCII_ACTION( sXML_viewBox, "viewBox" ); -XML_CONSTASCII_ACTION( sXML_view_id, "view-id" ); -XML_CONSTASCII_ACTION( sXML_view_settings, "view-settings" ); -XML_CONSTASCII_ACTION( sXML_visibility, "visibility" ); -XML_CONSTASCII_ACTION( sXML_visible, "visible" ); -XML_CONSTASCII_ACTION( sXML_visible_area, "visible-area" ); -XML_CONSTASCII_ACTION( sXML_visible_area_height, "visible-area-height" ); -XML_CONSTASCII_ACTION( sXML_visible_area_left, "visible-area-left" ); -XML_CONSTASCII_ACTION( sXML_visible_area_top, "visible-area-top" ); -XML_CONSTASCII_ACTION( sXML_visible_area_width, "visible-area-width" ); -XML_CONSTASCII_ACTION( sXML_visited_style_name, "visited-style-name" ); -XML_CONSTASCII_ACTION( sXML_volatile, "volatile" ); -XML_CONSTASCII_ACTION( sXML_volume, "volume" ); -XML_CONSTASCII_ACTION( sXML_vpn, "vpn"); -XML_CONSTASCII_ACTION( sXML_vrp, "vrp"); -XML_CONSTASCII_ACTION( sXML_vup, "vup"); -XML_CONSTASCII_ACTION( sXML_wall, "wall" ); -XML_CONSTASCII_ACTION( sXML_warning, "warning" ); -XML_CONSTASCII_ACTION( sXML_watermark, "watermark" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_bottom, "wavyline-from-bottom" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_left, "wavyline-from-left" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_right, "wavyline-from-right" ); -XML_CONSTASCII_ACTION( sXML_wavyline_from_top, "wavyline-from-top" ); -XML_CONSTASCII_ACTION( sXML_week_of_year, "week-of-year" ); -XML_CONSTASCII_ACTION( sXML_weight_bold, "bold" ); -XML_CONSTASCII_ACTION( sXML_weight_normal, "normal" ); -XML_CONSTASCII_ACTION( sXML_white, "white" ); -XML_CONSTASCII_ACTION( sXML_whole_page, "whole-page" ); -XML_CONSTASCII_ACTION( sXML_widows, "widows" ); -XML_CONSTASCII_ACTION( sXML_width, "width" ); -XML_CONSTASCII_ACTION( sXML_word, "word" ); -XML_CONSTASCII_ACTION( sXML_word_count, "word-count" ); -XML_CONSTASCII_ACTION( sXML_wrap, "wrap" ); -XML_CONSTASCII_ACTION( sXML_wrap_contour, "wrap-contour" ); -XML_CONSTASCII_ACTION( sXML_wrap_contour_mode, "wrap-contour-mode" ); -XML_CONSTASCII_ACTION( sXML_wrap_option, "wrap-option" ); -XML_CONSTASCII_ACTION( sXML_writing_mode, "writing-mode" ); -XML_CONSTASCII_ACTION( sXML_www, "www" ); -XML_CONSTASCII_ACTION( sXML_x, "x" ); -XML_CONSTASCII_ACTION( sXML_x1, "x1" ); -XML_CONSTASCII_ACTION( sXML_x2, "x2" ); -XML_CONSTASCII_ACTION( sXML_x_mac_roman, "x-mac-roman" ); -XML_CONSTASCII_ACTION( sXML_x_symbol, "x-symbol" ); -XML_CONSTASCII_ACTION( sXML_x_system, "x-system" ); -XML_CONSTASCII_ACTION( sXML_xor, "xor" ); -XML_CONSTASCII_ACTION( sXML_y, "y" ); -XML_CONSTASCII_ACTION( sXML_y1, "y1" ); -XML_CONSTASCII_ACTION( sXML_y2, "y2" ); -XML_CONSTASCII_ACTION( sXML_year, "year" ); -XML_CONSTASCII_ACTION( sXML_yellow, "yellow" ); -XML_CONSTASCII_ACTION( sXML_zero_values, "zero-values" ); -XML_CONSTASCII_ACTION( sXML_zindex, "z-index" ); -XML_CONSTASCII_ACTION( sXML_zoom_type, "zoom-type" ); -XML_CONSTASCII_ACTION( sXML_zoom_value, "zoom-value" ); - -XML_CONSTASCII_ACTION( sXML_start_shape, "start-shape"); -XML_CONSTASCII_ACTION( sXML_start_glue_point, "start-glue-point"); -XML_CONSTASCII_ACTION( sXML_end_shape, "end-shape"); -XML_CONSTASCII_ACTION( sXML_end_glue_point, "end-glue-point"); -XML_CONSTASCII_ACTION( sXML_line_number, "line-number"); -XML_CONSTASCII_ACTION( sXML_line_skew, "line-skew"); -XML_CONSTASCII_ACTION( sXML_curve, "curve" ); -XML_CONSTASCII_ACTION( sXML_start_line_spacing_horizontal, "start-line-spacing-horizontal" ); -XML_CONSTASCII_ACTION( sXML_start_line_spacing_vertical, "start-line-spacing-vertical" ); -XML_CONSTASCII_ACTION( sXML_end_line_spacing_horizontal, "end-line-spacing-horizontal" ); -XML_CONSTASCII_ACTION( sXML_end_line_spacing_vertical, "end-line-spacing-vertical" ); -XML_CONSTASCII_ACTION( sXML_line_distance, "line-distance" ); -XML_CONSTASCII_ACTION( sXML_guide_overhang, "guide-overhang" ); -XML_CONSTASCII_ACTION( sXML_guide_distance, "guide-distance" ); -XML_CONSTASCII_ACTION( sXML_start_guide, "start-guide" ); -XML_CONSTASCII_ACTION( sXML_end_guide, "end-guide" ); - -XML_CONSTASCII_ACTION( sXML_dots1, "dots1" ); -XML_CONSTASCII_ACTION( sXML_dots1_length, "dots1-length" ); -XML_CONSTASCII_ACTION( sXML_dots2, "dots2" ); -XML_CONSTASCII_ACTION( sXML_dots2_length, "dots2-length" ); -XML_CONSTASCII_ACTION( sXML_enable_numbering, "enable-numbering" ); - -XML_CONSTASCII_ACTION( sXML_top_left, "top-left" ); -XML_CONSTASCII_ACTION( sXML_top_right, "top-right" ); -XML_CONSTASCII_ACTION( sXML_bottom_left, "bottom-left" ); -XML_CONSTASCII_ACTION( sXML_bottom_right, "bottom-right" ); - -XML_CONSTASCII_ACTION( sXML_fill_image_ref_point, "fill-image-ref-point" ); -XML_CONSTASCII_ACTION( sXML_fill_image_ref_point_x, "fill-image-ref-point-x" ); -XML_CONSTASCII_ACTION( sXML_fill_image_ref_point_y, "fill-image-ref-point-y" ); - -XML_CONSTASCII_ACTION( sXML_from_right, "from-right" ); -XML_CONSTASCII_ACTION( sXML_from_bottom, "from-bottom" ); -XML_CONSTASCII_ACTION( sXML_from_center, "from-center" ); -XML_CONSTASCII_ACTION( sXML_from_upper_left, "from-upper-left" ); -XML_CONSTASCII_ACTION( sXML_from_upper_right, "from-upper-right" ); -XML_CONSTASCII_ACTION( sXML_from_lower_left, "from-lower-left" ); -XML_CONSTASCII_ACTION( sXML_from_lower_right, "from-lower-right" ); -XML_CONSTASCII_ACTION( sXML_to_left, "to-left" ); -XML_CONSTASCII_ACTION( sXML_to_top, "to-top" ); -XML_CONSTASCII_ACTION( sXML_to_right, "to-right" ); -XML_CONSTASCII_ACTION( sXML_to_bottom, "to-bottom" ); -XML_CONSTASCII_ACTION( sXML_to_upper_left, "to-upper-left" ); -XML_CONSTASCII_ACTION( sXML_to_upper_right, "to-upper-right" ); -XML_CONSTASCII_ACTION( sXML_to_lower_right, "to-lower-right" ); -XML_CONSTASCII_ACTION( sXML_to_lower_left, "to-lower-left" ); -XML_CONSTASCII_ACTION( sXML_to_center, "to-center" ); -XML_CONSTASCII_ACTION( sXML_counter_clockwise, "counter-clockwise" ); - -XML_CONSTASCII_ACTION( sXML_fade, "fade" ); -XML_CONSTASCII_ACTION( sXML_move, "move" ); -XML_CONSTASCII_ACTION( sXML_stripes, "stripes" ); -XML_CONSTASCII_ACTION( sXML_spiral_inward_left, "spiral-inward-left" ); -XML_CONSTASCII_ACTION( sXML_spiral_inward_right, "spiral-inward-right" ); -XML_CONSTASCII_ACTION( sXML_spiral_outward_left, "spiral-outward-left" ); -XML_CONSTASCII_ACTION( sXML_spiral_outward_right, "spiral-outward-right" ); -XML_CONSTASCII_ACTION( sXML_spiral, "spiral" ); -XML_CONSTASCII_ACTION( sXML_spiral_in, "spiral-in" ); -XML_CONSTASCII_ACTION( sXML_spiral_out, "spiral-out" ); -XML_CONSTASCII_ACTION( sXML_wavyline, "wavyline" ); -XML_CONSTASCII_ACTION( sXML_laser, "laser" ); -XML_CONSTASCII_ACTION( sXML_appear, "appear" ); -XML_CONSTASCII_ACTION( sXML_hide, "hide" ); -XML_CONSTASCII_ACTION( sXML_move_short, "move-short" ); -XML_CONSTASCII_ACTION( sXML_checkerboard, "checkerboard" ); -XML_CONSTASCII_ACTION( sXML_stretch, "stretch" ); - -XML_CONSTASCII_ACTION( sXML_shape_id, "shape-id" ); -XML_CONSTASCII_ACTION( sXML_effect, "effect" ); -XML_CONSTASCII_ACTION( sXML_speed, "speed" ); -XML_CONSTASCII_ACTION( sXML_start_scale, "start-scale" ); -XML_CONSTASCII_ACTION( sXML_show_shape, "show-shape" ); -XML_CONSTASCII_ACTION( sXML_show_text, "show-text" ); -XML_CONSTASCII_ACTION( sXML_hide_shape, "hide-shape" ); -XML_CONSTASCII_ACTION( sXML_hide_text, "hide-text" ); -XML_CONSTASCII_ACTION( sXML_dim, "dim" ); -XML_CONSTASCII_ACTION( sXML_sound, "sound" ); -XML_CONSTASCII_ACTION( sXML_play_full, "play-full" ); -XML_CONSTASCII_ACTION( sXML_path_id, "path-id" ); - -XML_CONSTASCII_ACTION( sXML_animations, "animations" ); - -XML_CONSTASCII_ACTION( sXML_kind, "kind" ); -XML_CONSTASCII_ACTION( sXML_start_angle, "start-angle" ); -XML_CONSTASCII_ACTION( sXML_cut, "cut" ); -XML_CONSTASCII_ACTION( sXML_arc, "arc" ); - -XML_CONSTASCII_ACTION( sXML_upright, "upright" ); -XML_CONSTASCII_ACTION( sXML_slant_x, "slant-x" ); -XML_CONSTASCII_ACTION( sXML_slant_y, "slant-y" ); -XML_CONSTASCII_ACTION( sXML_autosize, "autosize" ); -XML_CONSTASCII_ACTION( sXML_slant, "slant" ); -XML_CONSTASCII_ACTION( sXML_topcircle, "top-circle" ); -XML_CONSTASCII_ACTION( sXML_bottomcircle, "bottom-circle" ); -XML_CONSTASCII_ACTION( sXML_leftcircle, "left-circle" ); -XML_CONSTASCII_ACTION( sXML_rightcircle, "right-circle" ); -XML_CONSTASCII_ACTION( sXML_toparc, "top-arc" ); -XML_CONSTASCII_ACTION( sXML_bottomarc, "bottom-arc" ); -XML_CONSTASCII_ACTION( sXML_leftarc, "left-arc" ); -XML_CONSTASCII_ACTION( sXML_rightarc, "right-arc" ); -XML_CONSTASCII_ACTION( sXML_button1, "button1" ); -XML_CONSTASCII_ACTION( sXML_button2, "button2" ); -XML_CONSTASCII_ACTION( sXML_button3, "button3" ); -XML_CONSTASCII_ACTION( sXML_button4, "button4" ); - -XML_CONSTASCII_ACTION( sXML_caption_type, "caption-type" ); -XML_CONSTASCII_ACTION( sXML_caption_angle_type, "caption-angle-type" ); -XML_CONSTASCII_ACTION( sXML_caption_angle, "caption-angle" ); -XML_CONSTASCII_ACTION( sXML_caption_gap, "caption-gap" ); -XML_CONSTASCII_ACTION( sXML_caption_escape_direction, "caption-escape-direction" ); -XML_CONSTASCII_ACTION( sXML_caption_escape, "caption-escape" ); -XML_CONSTASCII_ACTION( sXML_caption_line_length, "caption-line-length" ); -XML_CONSTASCII_ACTION( sXML_caption_fit_line_length, "caption-fit-line-length" ); -XML_CONSTASCII_ACTION( sXML_free, "free" ); - -XML_CONSTASCII_ACTION( sXML_straight_line, "straight-line" ); -XML_CONSTASCII_ACTION( sXML_angled_line, "angled-line" ); -XML_CONSTASCII_ACTION( sXML_angled_connector_line, "angled-connector-line" ); - -XML_CONSTASCII_ACTION( sXML_data_source_has_labels, "data-source-has-labels" ); - -XML_CONSTASCII_ACTION( sXML_play, "play" ); -XML_CONSTASCII_ACTION( sXML_handout_master, "handout-master" ); - -XML_CONSTASCII_ACTION( sXML_escape_direction, "escape-direction" ); -XML_CONSTASCII_ACTION( sXML_glue_point, "glue-point" ); - -XML_CONSTASCII_ACTION( sXML_text_style_name, "text-style-name" ); - -XML_CONSTASCII_ACTION( sXML_sort_algorithm, "sort-algorithm" ); -XML_CONSTASCII_ACTION( sXML_roll_from_top, "roll-from-top" ); - -XML_CONSTASCII_ACTION( sXML_script_data, "script-data" ); -XML_CONSTASCII_ACTION( sXML_libraries, "libraries" ); -XML_CONSTASCII_ACTION( sXML_source_code, "source-code" ); -XML_CONSTASCII_ACTION( sXML_readonly, "readonly" ); - -XML_CONSTASCII_ACTION( sXML_page_continuation, "page-continuation" ); - -XML_CONSTASCII_ACTION( sXML_contains, "contains" ); -XML_CONSTASCII_ACTION( sXML_does_not_contain, "does-not-contain" ); -XML_CONSTASCII_ACTION( sXML_begins_with, "begins-with" ); -XML_CONSTASCII_ACTION( sXML_does_not_begin_with, "does-not-begin-with" ); -XML_CONSTASCII_ACTION( sXML_ends_with, "ends-with" ); -XML_CONSTASCII_ACTION( sXML_does_not_end_with, "does-not-end-with" ); - -#endif diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx index 49c484a1ab17..e7891b36ef17 100644 --- a/xmloff/inc/xmlnmspe.hxx +++ b/xmloff/inc/xmlnmspe.hxx @@ -87,8 +87,9 @@ const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key; XML_NAMESPACE_EXT( OFFICE, 37U ) XML_NAMESPACE_EXT( TABLE, 38U ) +XML_NAMESPACE_EXT( CHART, 39U ) -#define _XML_OLD_NAMESPACE_BASE 39U +#define _XML_OLD_NAMESPACE_BASE 40U // namespaces used in the technical preview (SO 5.2) XML_OLD_NAMESPACE( FO, 0U ) diff --git a/xmloff/inc/xmloff/SchXMLExportHelper.hxx b/xmloff/inc/xmloff/SchXMLExportHelper.hxx index 64f579a7c252..bf60d44d63fd 100644 --- a/xmloff/inc/xmloff/SchXMLExportHelper.hxx +++ b/xmloff/inc/xmloff/SchXMLExportHelper.hxx @@ -40,41 +40,9 @@ #include <queue> #include <vector> -namespace com { namespace sun { namespace star { - namespace chart { - class XDiagram; - class XChartDocument; - struct ChartSeriesAddress; - } - namespace chart2 { - class XDiagram; - class XChartDocument; - class XDataSeries; - namespace data - { - class XDataProvider; - class XDataSequence; - } - } - namespace drawing { - class XShape; - class XShapes; - } - namespace task { - class XStatusIndicator; - } - namespace frame { - class XModel; - } - namespace xml { - namespace sax { - class XAttributeList; -}}}}} - class SvXMLAutoStylePoolP; -class XMLChartExportPropertyMapper; class SvXMLExport; -class XMLPropertyHandlerFactory; +class SchXMLExportHelper_Impl; /** With this class you can export a <chart:chart> element containing its data as <table:table> element or without internal table. In @@ -84,153 +52,22 @@ class XMLPropertyHandlerFactory; class XMLOFF_DLLPUBLIC SchXMLExportHelper : public UniRefBase { public: - // first: data sequence for label, second: data sequence for values. - typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >, - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair; - typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont; - -private: - SvXMLExport& mrExport; - SvXMLAutoStylePoolP& mrAutoStylePool; - UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory; - UniReference< XMLPropertySetMapper > mxPropertySetMapper; - UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; - - rtl::OUString msTableName; - rtl::OUStringBuffer msStringBuffer; - rtl::OUString msString; - - // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) - sal_Bool mbHasSeriesLabels; - sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false - sal_Bool mbRowSourceColumns; - rtl::OUString msChartAddress; - rtl::OUString msTableNumberList; - ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping; - - rtl::OUString msCLSID; - - ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes; - - tDataSequenceCont m_aDataSequencesToExport; - rtl::OUString maCategoriesRange; - - /** first parseDocument: collect autostyles and store names in this queue - second parseDocument: export content and use names from this queue - */ - ::std::queue< ::rtl::OUString > maAutoStyleNameQueue; - SAL_DLLPRIVATE void CollectAutoStyle( - const std::vector< XMLPropertyState >& aStates ); - SAL_DLLPRIVATE void AddAutoStyleAttribute( - const std::vector< XMLPropertyState >& aStates ); - - SAL_DLLPRIVATE SvXMLAutoStylePoolP& GetAutoStylePoolP() - { return mrAutoStylePool; } - - /// if bExportContent is false the auto-styles are collected - SAL_DLLPRIVATE void parseDocument( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument >& rChartDoc, - sal_Bool bExportContent, - sal_Bool bIncludeTable = sal_False ); - SAL_DLLPRIVATE void exportTable(); - SAL_DLLPRIVATE void exportPlotArea( - com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram, - com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent, - sal_Bool bIncludeTable ); - SAL_DLLPRIVATE void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, - const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, - sal_Bool bExportContent ); - - SAL_DLLPRIVATE void exportSeries( - const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent, - sal_Bool bHasTwoYAxes ); - SAL_DLLPRIVATE void exportCandleStickSeries( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, - sal_Bool bJapaneseCandleSticks, - sal_Bool bExportContent ); - SAL_DLLPRIVATE void exportDataPoints( - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProperties, - sal_Int32 nSeriesLength, - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDiagram > & xDiagram, - sal_Bool bExportContent ); - SAL_DLLPRIVATE void exportRegressionCurve( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XDataSeries > & xSeries, - const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > & xSeriesProp, - const ::com::sun::star::awt::Size & rPageSize, - sal_Bool bExportContent ); - - /// add svg position as attribute for current element - SAL_DLLPRIVATE void addPosition( const ::com::sun::star::awt::Point & rPosition ); - SAL_DLLPRIVATE void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - /// add svg size as attribute for current element - SAL_DLLPRIVATE void addSize( const ::com::sun::star::awt::Size & rSize ); - SAL_DLLPRIVATE void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); - /// fills the member msString with the appropriate String (i.e. "A3") - SAL_DLLPRIVATE void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); - /// exports a string as a paragraph element - SAL_DLLPRIVATE void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); - SAL_DLLPRIVATE void exportErrorBarRanges(); - - SAL_DLLPRIVATE SchXMLExportHelper(SchXMLExportHelper &); // not defined - SAL_DLLPRIVATE void operator =(SchXMLExportHelper &); // not defined - -public: SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ); virtual ~SchXMLExportHelper(); - // auto-styles - /// parse chart and collect all auto-styles used in current pool - void collectAutoStyles( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument > rChartDoc ); - /// write the styles collected into the current pool as <style:style> elements - void exportAutoStyles(); - - /** export the <chart:chart> element corresponding to rChartDoc - if bIncludeTable is true, the chart data is exported as <table:table> - element (inside the chart element). - - Otherwise the external references stored in the chart document are used - for writing the corresponding attributes at series - - All attributes contained in xAttrList are written at the chart element, - which ist the outer element of a chart. So these attributes can easily - be parsed again by the container - */ - void exportChart( com::sun::star::uno::Reference< - com::sun::star::chart::XChartDocument > rChartDoc, - sal_Bool bIncludeTable ); - /// returns the string corresponding to the current FileFormat CLSID for Chart const rtl::OUString& getChartCLSID(); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const { return mxPropertySetMapper; } - - void SetChartRangeAddress( const ::rtl::OUString& rAddress ) - { msChartAddress = rAddress; } - void SetTableNumberList( const ::rtl::OUString& rList ) - { msTableNumberList = rList; } - - void InitRangeSegmentationProperties( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > & xChartDoc ); +private: + SchXMLExportHelper(); // not defined + SchXMLExportHelper(SchXMLExportHelper &); // not defined + void operator =(SchXMLExportHelper &); // not defined - ::com::sun::star::awt::Size getPageSize( - const ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const; +private: + SchXMLExportHelper_Impl* m_pImpl; + friend class SchXMLExport; }; #endif // _XMLOFF_SCH_XMLEXPORTHELPER_HXX_ diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx index 1b30658ef89c..b12f93f0b8b2 100644 --- a/xmloff/inc/xmloff/shapeexport.hxx +++ b/xmloff/inc/xmloff/shapeexport.hxx @@ -111,7 +111,8 @@ enum XmlShapeType XmlShapeTypePresPageShape, // "com.sun.star.presentation.PageShape" XmlShapeTypePresOLE2Shape, // "com.sun.star.presentation.OLE2Shape" XmlShapeTypePresChartShape, // "com.sun.star.presentation.ChartShape" - XmlShapeTypePresSheetShape, // "com.sun.star.presentation.OLE2Shape" + XmlShapeTypePresSheetShape, // "com.sun.star.presentation.CalcShape" + XmlShapeTypePresTableShape, // "com.sun.star.presentation.TableShape" XmlShapeTypePresOrgChartShape, // "com.sun.star.presentation.OrgChartShape" XmlShapeTypePresNotesShape, // "com.sun.star.presentation.NotesShape" XmlShapeTypeHandoutShape, // "com.sun.star.presentation.HandoutShape" @@ -121,8 +122,9 @@ enum XmlShapeType XmlShapeTypePresSlideNumberShape, // "com.sun.star.presentation.SlideNumberShape" XmlShapeTypePresDateTimeShape, // "com.sun.star.presentation.DateTimeShape" - XmlShapeTypeDrawCustomShape, // "com.sun.star.draw.CustomShape" - XmlShapeTypeDrawMediaShape, // "com.sun.star.draw.MediaShape" + XmlShapeTypeDrawCustomShape, // "com.sun.star.drawing.CustomShape" + XmlShapeTypeDrawMediaShape, // "com.sun.star.drawing.MediaShape" + XmlShapeTypePresMediaShape, // "com.sun.star.presentation.MediaShape" XmlShapeTypeDrawTableShape, // "com.sun.star.drawing.TableShape" diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index 2cdbaffbbde3..75310d90f0ae 100644 --- a/xmloff/inc/xmloff/txtimp.hxx +++ b/xmloff/inc/xmloff/txtimp.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _XMLOFF_TEXTIMP_HXX_ -#define _XMLOFF_TEXTIMP_HXX_ +#ifndef XMLOFF_TEXTIMP_HXX +#define XMLOFF_TEXTIMP_HXX #include "sal/config.h" #include "xmloff/dllapi.h" @@ -33,13 +33,11 @@ #include <com/sun/star/uno/Reference.h> #include <map> -#include <vector> #include <memory> #include <boost/utility.hpp> +#include <boost/shared_ptr.hpp> #include <tools/list.hxx> -#include <xmloff/xmlictxt.hxx> -#include <xmloff/xmlimppr.hxx> #include <xmloff/xmltkmap.hxx> // functional.hxx is obsolete and should be replaced by its comphelper @@ -47,34 +45,44 @@ #include <comphelper/stl_types.hxx> #include <xmloff/uniref.hxx> + // --> OD 2008-04-25 #refactorlists# class XMLTextListsHelper; // <-- -#include <com/sun/star/text/XFormField.hpp> - - +class SvXMLImportContext; +class SvXMLTokenMap; +class SvXMLImportPropertyMapper; +class SvXMLNamespaceMap; class SvXMLImport; class SvXMLStylesContext; class XMLTextListBlockContext; class SvxXMLListStyleContext; class XMLPropStyleContext; class SvI18NMap; -class SvStringsDtor; class XMLSectionImportContext; class XMLFontStylesContext; template<class A> class XMLPropertyBackpatcher; class XMLEventsImportContext; +namespace xmloff { + struct ParsedRDFaAttributes; +} + namespace com { namespace sun { namespace star { -namespace text { class XText; class XTextCursor; class XTextRange; class XTextContent; } +namespace text { + class XText; + class XTextCursor; + class XTextRange; + class XTextContent; + class XFormField; +} namespace frame { class XModel; } namespace container { class XNameContainer; class XIndexReplace; class XNameAccess; } namespace beans { class XPropertySet; } namespace xml { namespace sax { class XAttributeList; } } namespace util { struct DateTime; } namespace lang { class XMultiServiceFactory; } -namespace ucb { class XAnyCompare; } } } } enum SwXMLTextElemTokens @@ -254,11 +262,11 @@ enum XMLTextPAttrTokens XML_TOK_TEXT_P_PROPERTY, XML_TOK_TEXT_P_CONTENT, XML_TOK_TEXT_P_DATATYPE, + XML_TOK_TEXT_P_TEXTID, XML_TOK_TEXT_P_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME, XML_TOK_TEXT_P_LEVEL, XML_TOK_TEXT_P_CLASS_NAMES, - XML_TOK_TEXT_P_ID, XML_TOK_TEXT_P_IS_LIST_HEADER, XML_TOK_TEXT_P_RESTART_NUMBERING, XML_TOK_TEXT_P_START_VALUE, @@ -378,127 +386,13 @@ DECLARE_LIST( XMLSectionList_Impl, XMLSectionImportContext* ) class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase, private boost::noncopyable { - ::std::auto_ptr<SvXMLTokenMap> pTextElemTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextPElemTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextPAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextFieldAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextNumberedParagraphAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextListBlockAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextListBlockElemTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextFrameAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextContourAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextHyperlinkAttrTokenMap; - ::std::auto_ptr<SvXMLTokenMap> pTextMasterPageElemTokenMap; - ::std::auto_ptr<SvStringsDtor> pPrevFrmNames; - ::std::auto_ptr<SvStringsDtor> pNextFrmNames; - - // --> OD 2008-04-25 #refactorlists# - ::std::auto_ptr<XMLTextListsHelper> mpTextListsHelper; - // <-- - - SvXMLImportContextRef xAutoStyles; - SvXMLImportContextRef xFontDecls; - - XMLSectionList_Impl aSectionList; - - UniReference < SvXMLImportPropertyMapper > xParaImpPrMap; - UniReference < SvXMLImportPropertyMapper > xTextImpPrMap; - UniReference < SvXMLImportPropertyMapper > xFrameImpPrMap; - UniReference < SvXMLImportPropertyMapper > xSectionImpPrMap; - UniReference < SvXMLImportPropertyMapper > xRubyImpPrMap; - - ::std::auto_ptr<SvI18NMap> pRenameMap; - // --> OD 2006-10-12 #i69629# - change and extend data structure: - // - data structure contains candidates of paragraph styles, which - // will be assigned to the outline style - // - data structure contains more than one candidate for each list level - // of the outline style -// ::rtl::OUString *pOutlineStyles; - ::std::vector< ::rtl::OUString >* mpOutlineStylesCandidates; - // <-- - - /// start ranges for open bookmarks - ::std::map< ::rtl::OUString, - // start range, xml:id - ::std::pair< - ::com::sun::star::uno::Reference< - ::com::sun::star::text::XTextRange>, - ::rtl::OUString>, - ::comphelper::UStringLess> aBookmarkStartRanges; - - typedef ::std::vector< ::rtl::OUString> BookmarkVector_t; - BookmarkVector_t aBookmarkVector; - - /// backpatcher for references to footnotes and endnotes - XMLPropertyBackpatcher<sal_Int16> * pFootnoteBackpatcher; - - /// backpatchers for references to sequences - XMLPropertyBackpatcher<sal_Int16> * pSequenceIdBackpatcher; - - XMLPropertyBackpatcher< ::rtl::OUString> * pSequenceNameBackpatcher; - - /// name of the last 'open' redline that started between paragraphs - ::rtl::OUString sOpenRedlineIdentifier; - - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XText > xText; - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextCursor > xCursor; - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextRange > xCursorAsRange; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xParaStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xTextStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xNumStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xFrameStyles; - ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer > xPageStyles; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XIndexReplace > xChapterNumbering; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess > xTextFrames; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess > xGraphics; - ::com::sun::star::uno::Reference< - ::com::sun::star::container::XNameAccess > xObjects; - ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory; - - SvXMLImport& rSvXMLImport; - - sal_Bool bInsertMode : 1; - sal_Bool bStylesOnlyMode : 1; - sal_Bool bBlockMode : 1; - sal_Bool bProgress : 1; - sal_Bool bOrganizerMode : 1; - sal_Bool bBodyContentStarted : 1; - - // #107848# - // One more flag to remember if we are inside a deleted redline section - sal_Bool bInsideDeleteContext : 1; - - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextElemTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextPElemTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextPAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextFrameAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextContourAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextHyperlinkAttrTokenMap(); - SAL_DLLPRIVATE SvXMLTokenMap *_GetTextMasterPageElemTokenMap(); - - // clean up backpatchers; to be called only by destructor - // Code is implemented in XMLPropertyBackpatcher.cxx - SAL_DLLPRIVATE void _FinitBackpatcher(); - - typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> field_name_type_t; - typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > field_param_t; - typedef ::std::vector< field_param_t > field_params_t; - typedef ::std::pair< field_name_type_t, field_params_t > field_stack_item_t; - typedef ::std::stack< field_stack_item_t > field_stack_t; - - field_stack_t aFieldStack; +private: + struct Impl; + ::std::auto_ptr<Impl> m_pImpl; + /// ugly, but implementation of this is in XMLPropertyBackpatcher.cxx + struct BackpatcherImpl; + ::boost::shared_ptr<BackpatcherImpl> m_pBackpatcherImpl; + ::boost::shared_ptr<BackpatcherImpl> MakeBackpatcherImpl(); protected: virtual SvXMLImportContext *CreateTableChildContext( @@ -515,46 +409,13 @@ protected: public: - const ::rtl::OUString sParaStyleName; - const ::rtl::OUString sCharStyleName; - const ::rtl::OUString sHeadingStyleName; - const ::rtl::OUString sNumberingLevel; - const ::rtl::OUString sNumberingStartValue; - const ::rtl::OUString sNumberingRules; - const ::rtl::OUString sParaIsNumberingRestart; - const ::rtl::OUString sNumberingIsNumber; - const ::rtl::OUString sCurrentPresentation; - const ::rtl::OUString sSequenceNumber; - const ::rtl::OUString sSourceName; - const ::rtl::OUString sChainNextName; - const ::rtl::OUString sChainPrevName; - const ::rtl::OUString sHyperLinkURL; - const ::rtl::OUString sHyperLinkName; - const ::rtl::OUString sHyperLinkTarget; - const ::rtl::OUString sUnvisitedCharStyleName; - const ::rtl::OUString sVisitedCharStyleName; - const ::rtl::OUString sTextFrame; - const ::rtl::OUString sPageDescName; - const ::rtl::OUString sServerMap; - const ::rtl::OUString sHyperLinkEvents; - const ::rtl::OUString sContent; - const ::rtl::OUString sServiceCombinedCharacters; - const ::rtl::OUString sNumberingStyleName; - // --> OD 2008-04-23 #refactorlists# - const ::rtl::OUString sPropNameDefaultListId; - const ::rtl::OUString sPropNameListId; - const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei - // <-- - - ::rtl::OUString sCellParaStyleDefault; XMLTextImportHelper( - const ::com::sun::star::uno::Reference < - ::com::sun::star::frame::XModel>& rModel, + ::com::sun::star::uno::Reference < + ::com::sun::star::frame::XModel> const& rModel, SvXMLImport& rImport, - sal_Bool bInsertM = sal_False, sal_Bool bStylesOnlyM = sal_False, - sal_Bool bProgress = sal_False, - sal_Bool bBlockMode = sal_False, - sal_Bool bOrganizerMode = sal_False ); + bool const bInsertMode = false, bool const bStylesOnlyMode = false, + bool const bProgress = false, bool const bBlockMode = false, + bool const bOrganizerMode = false); ~XMLTextImportHelper(); @@ -575,36 +436,33 @@ public: ::com::sun::star::xml::sax::XAttributeList > & xAttrList, XMLTextType eType = XML_TEXT_TYPE_SHAPE ); - inline const SvXMLTokenMap& GetTextElemTokenMap(); - inline const SvXMLTokenMap& GetTextPElemTokenMap(); - inline const SvXMLTokenMap& GetTextPAttrTokenMap(); - inline const SvXMLTokenMap& GetTextFrameAttrTokenMap(); - inline const SvXMLTokenMap& GetTextContourAttrTokenMap(); - inline const SvXMLTokenMap& GetTextHyperlinkAttrTokenMap(); - inline const SvXMLTokenMap& GetTextMasterPageElemTokenMap(); + SvXMLTokenMap const& GetTextElemTokenMap(); + SvXMLTokenMap const& GetTextPElemTokenMap(); + SvXMLTokenMap const& GetTextPAttrTokenMap(); + SvXMLTokenMap const& GetTextFrameAttrTokenMap(); + SvXMLTokenMap const& GetTextContourAttrTokenMap(); + SvXMLTokenMap const& GetTextHyperlinkAttrTokenMap(); + SvXMLTokenMap const& GetTextMasterPageElemTokenMap(); const SvXMLTokenMap& GetTextNumberedParagraphAttrTokenMap(); const SvXMLTokenMap& GetTextListBlockAttrTokenMap(); const SvXMLTokenMap& GetTextListBlockElemTokenMap(); const SvXMLTokenMap& GetTextFieldAttrTokenMap(); // impl: txtfldi.cxx - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XText > & GetText() { return xText; } - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextCursor > & GetCursor() { return xCursor; } - ::com::sun::star::uno::Reference < - ::com::sun::star::text::XTextRange > & GetCursorAsRange() - { - return xCursorAsRange; - } + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XText > & GetText(); + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextCursor > & GetCursor(); + ::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextRange > & GetCursorAsRange(); - sal_Bool IsInsertMode() { return bInsertMode; } - sal_Bool IsStylesOnlyMode() { return bStylesOnlyMode; } - sal_Bool IsBlockMode() { return bBlockMode; } - sal_Bool IsOrganizerMode() { return bOrganizerMode; } - sal_Bool IsProgress() { return bProgress; } + bool IsInsertMode() const; + bool IsStylesOnlyMode() const; + bool IsBlockMode() const; + bool IsOrganizerMode() const; + bool IsProgress() const; - XMLSectionList_Impl& GetSectionList() { return aSectionList; } + XMLSectionList_Impl & GetSectionList(); ::rtl::OUString ConvertStarFonts( const ::rtl::OUString& rChars, const ::rtl::OUString& rStyleName, @@ -686,41 +544,25 @@ public: XMLPropStyleContext* FindPageMaster( const ::rtl::OUString& rName ) const; - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetParaStyles() const - { - return xParaStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetTextStyles() const - { - return xTextStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetNumberingStyles() const - { - return xNumStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetFrameStyles() const - { - return xFrameStyles; - } - - const ::com::sun::star::uno::Reference < - ::com::sun::star::container::XNameContainer>& GetPageStyles() const - { - return xPageStyles; - } + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & GetParaStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & GetTextStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & + GetNumberingStyles() const; const ::com::sun::star::uno::Reference< - ::com::sun::star::container::XIndexReplace >& GetChapterNumbering() const - { - return xChapterNumbering; - } + ::com::sun::star::container::XNameContainer> & GetFrameStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XNameContainer> & GetPageStyles() const; + + const ::com::sun::star::uno::Reference< + ::com::sun::star::container::XIndexReplace > & + GetChapterNumbering() const; sal_Bool HasFrameByName( const ::rtl::OUString& rName ) const; void ConnectFrameChains( const ::rtl::OUString& rFrmName, @@ -728,16 +570,17 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& rFrmPropSet ); - const UniReference < SvXMLImportPropertyMapper >& - GetParaImportPropertySetMapper() const { return xParaImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetTextImportPropertySetMapper() const { return xTextImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetFrameImportPropertySetMapper() const { return xFrameImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetSectionImportPropertySetMapper() const { return xSectionImpPrMap; } - const UniReference < SvXMLImportPropertyMapper >& - GetRubyImportPropertySetMapper() const { return xRubyImpPrMap; } + UniReference< SvXMLImportPropertyMapper > const& + GetParaImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetTextImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetFrameImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetSectionImportPropertySetMapper() const; + UniReference< SvXMLImportPropertyMapper > const& + GetRubyImportPropertySetMapper() const; + static SvXMLImportPropertyMapper *CreateShapeExtPropMapper(SvXMLImport&); static SvXMLImportPropertyMapper *CreateCharExtPropMapper(SvXMLImport&, XMLFontStylesContext *pFontDecls = NULL); static SvXMLImportPropertyMapper *CreateParaExtPropMapper(SvXMLImport&, XMLFontStylesContext *pFontDecls = NULL); @@ -757,14 +600,18 @@ public: const ::rtl::OUString sName, const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange> & rRange, - const ::rtl::OUString & i_rXmlId); + ::rtl::OUString const& i_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & + i_rpRDFaAttributes); /// process the start of a range reference sal_Bool FindAndRemoveBookmarkStartRange( const ::rtl::OUString sName, ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange> & o_rRange, - ::rtl::OUString& o_rXmlId); + ::rtl::OUString & o_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & + o_rpRDFaAttributes); ::rtl::OUString FindActiveBookmarkName(); ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetRangeFor(::rtl::OUString &sName); @@ -889,13 +736,13 @@ public: // #107848# // Access methods to the inside_deleted_section flag (redlining) - void SetInsideDeleteContext(sal_Bool bNew) { bInsideDeleteContext = bNew; } - sal_Bool IsInsideDeleteContext() const { return bInsideDeleteContext; } + void SetInsideDeleteContext(bool const bNew); + bool IsInsideDeleteContext() const; - SvXMLImport& GetXMLImport() { return rSvXMLImport;} + SvXMLImport & GetXMLImport(); // --> OD 2008-04-25 #refactorlists# - XMLTextListsHelper& GetTextListHelper() { return *mpTextListsHelper; } + XMLTextListsHelper & GetTextListHelper(); // <-- // forwards to TextListHelper; these are used in many places @@ -903,62 +750,9 @@ public: void PushListContext(XMLTextListBlockContext *i_pListBlock = 0); /// pop the list context stack void PopListContext(); -}; - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextElemTokenMap() -{ - if( !pTextElemTokenMap.get() ) - pTextElemTokenMap.reset( _GetTextElemTokenMap() ); - - return *pTextElemTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextPElemTokenMap() -{ - if( !pTextPElemTokenMap.get() ) - pTextPElemTokenMap.reset( _GetTextPElemTokenMap() ); - - return *pTextPElemTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextPAttrTokenMap() -{ - if( !pTextPAttrTokenMap.get() ) - pTextPAttrTokenMap.reset( _GetTextPAttrTokenMap() ); - - return *pTextPAttrTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextFrameAttrTokenMap() -{ - if( !pTextFrameAttrTokenMap.get() ) - pTextFrameAttrTokenMap.reset( _GetTextFrameAttrTokenMap() ); - - return *pTextFrameAttrTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextContourAttrTokenMap() -{ - if( !pTextContourAttrTokenMap.get() ) - pTextContourAttrTokenMap.reset( _GetTextContourAttrTokenMap() ); - - return *pTextContourAttrTokenMap; -} -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextHyperlinkAttrTokenMap() -{ - if( !pTextHyperlinkAttrTokenMap.get() ) - pTextHyperlinkAttrTokenMap.reset( _GetTextHyperlinkAttrTokenMap() ); - - return *pTextHyperlinkAttrTokenMap; -} - -inline const SvXMLTokenMap& XMLTextImportHelper::GetTextMasterPageElemTokenMap() -{ - if( !pTextMasterPageElemTokenMap.get() ) - pTextMasterPageElemTokenMap.reset( _GetTextMasterPageElemTokenMap() ); - - return *pTextMasterPageElemTokenMap; -} + void SetCellParaStyleDefault(::rtl::OUString const& rNewValue); + ::rtl::OUString const& GetCellParaStyleDefault(); +}; #endif diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 0459fcc7b13a..03903f38a331 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -590,6 +590,12 @@ public: /// name of stream in package, e.g., "content.xml" ::rtl::OUString GetStreamName() const; + // FIXME: this is only for legacy stuff that has not yet been adapted + // to implement XMetadatable; this can write duplicate IDs! + /// add xml:id and legacy namespace id + void SAL_DLLPRIVATE AddAttributeIdLegacy( + sal_uInt16 const nLegacyPrefix, ::rtl::OUString const& rValue); + /// add xml:id attribute (for RDF metadata) void AddAttributeXmlId(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> const & i_xIfc); diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx index 44e5357ebbdd..871703bf9ed7 100644 --- a/xmloff/inc/xmloff/xmlimp.hxx +++ b/xmloff/inc/xmloff/xmlimp.hxx @@ -77,6 +77,10 @@ class XMLErrors; class StyleMap; class String; +namespace xmloff { + class RDFaImportHelper; +} + #define IMPORT_META 0x0001 #define IMPORT_STYLES 0x0002 #define IMPORT_MASTERSTYLES 0x0004 @@ -432,6 +436,9 @@ public: ::rtl::OUString const & i_rContent, ::rtl::OUString const & i_rDatatype); + /// do not dllexport this; only for advanced cases (bookmark-start) + SAL_DLLPRIVATE ::xmloff::RDFaImportHelper & GetRDFaImportHelper(); + // #i31958# XForms helper method // (to be implemented by applications suporting XForms) virtual void initXForms(); diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx index 3d781b513aa1..c927da425d20 100644 --- a/xmloff/inc/xmloff/xmltoken.hxx +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -3096,6 +3096,11 @@ namespace xmloff { namespace token { XML_ENDS_WITH, XML_DOES_NOT_END_WITH, + //chart + XML_NP_CHART_EXT, + XML_N_CHART_EXT, + XML_COORDINATE_REGION, + XML_TOKEN_END }; diff --git a/xmloff/prj/d.lst b/xmloff/prj/d.lst index 0b51b0dd97cb..7784bca0474f 100644 --- a/xmloff/prj/d.lst +++ b/xmloff/prj/d.lst @@ -21,7 +21,6 @@ mkdir: %_DEST%\inc%_EXT%\xmloff ..\inc\xmloff\xmlement.hxx %_DEST%\inc%_EXT%\xmloff\xmlement.hxx ..\inc\xmloff\xmlictxt.hxx %_DEST%\inc%_EXT%\xmloff\xmlictxt.hxx ..\inc\xmloff\xmlimp.hxx %_DEST%\inc%_EXT%\xmloff\xmlimp.hxx -..\inc\xmlkywd.hxx %_DEST%\inc%_EXT%\xmloff\xmlkywd.hxx ..\inc\xmloff\xmlmetae.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetae.hxx ..\inc\xmloff\xmlmetai.hxx %_DEST%\inc%_EXT%\xmloff\xmlmetai.hxx ..\inc\xmloff\xmlscripti.hxx %_DEST%\inc%_EXT%\xmloff\xmlscripti.hxx diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index aa61a2449680..c73533f4e4e8 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -1,26 +1,26 @@ --o xmloff.Chart.XMLContentExporter --o xmloff.Chart.XMLContentImporter --o xmloff.Chart.XMLExporter --o xmloff.Chart.XMLImporter --o xmloff.Chart.XMLStylesExporter --o xmloff.Chart.XMLStylesImporter +#111102# -o xmloff.Chart.XMLContentExporter +#111102# -o xmloff.Chart.XMLContentImporter +#111102# -o xmloff.Chart.XMLExporter +#111102# -o xmloff.Chart.XMLImporter +#111102# -o xmloff.Chart.XMLStylesExporter +#111102# -o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter -o xmloff.Draw.XMLImporter -o xmloff.Draw.XMLMetaExporter --o xmloff.Draw.XMLMetaImporter --o xmloff.Draw.XMLSettingsExporter --o xmloff.Draw.XMLSettingsImporter +#i111200 -o xmloff.Draw.XMLMetaImporter +#i111287 -o xmloff.Draw.XMLSettingsExporter +#i111287 -o xmloff.Draw.XMLSettingsImporter #i87695 -o xmloff.Draw.XMLStylesExporter -o xmloff.Draw.XMLStylesImporter --o xmloff.Impress.XMLContentExporter +#i111224 -o xmloff.Impress.XMLContentExporter -o xmloff.Impress.XMLContentImporter -o xmloff.Impress.XMLExporter --o xmloff.Impress.XMLImporter +#i111111# -o xmloff.Impress.XMLImporter -o xmloff.Impress.XMLMetaExporter -o xmloff.Impress.XMLMetaImporter --o xmloff.Impress.XMLSettingsExporter --o xmloff.Impress.XMLSettingsImporter +#i111287 -o xmloff.Impress.XMLSettingsExporter +#i111287 -o xmloff.Impress.XMLSettingsImporter #i87695 -o xmloff.Impress.XMLStylesExporter -o xmloff.Impress.XMLStylesImporter diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 9940f99d9f7a..c4abc4172959 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -41,9 +41,7 @@ #include <tools/globname.hxx> #include <sot/clsids.hxx> -#ifndef _SVTOOLS_NMSPMAP_HXX #include <xmloff/nmspmap.hxx> -#endif #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/families.hxx> @@ -78,6 +76,7 @@ #include <com/sun/star/chart/X3DDisplay.hpp> #include <com/sun/star/chart/XStatisticDisplay.hpp> #include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp> +#include <com/sun/star/chart/XDiagramPositioning.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XDiagram.hpp> @@ -118,6 +117,161 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::std::vector; +// ======================================== +// class SchXMLExportHelper_Impl +// ======================================== + +class SchXMLExportHelper_Impl +{ +public: + // first: data sequence for label, second: data sequence for values. + typedef ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence >, + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > > tLabelValuesDataPair; + typedef ::std::vector< tLabelValuesDataPair > tDataSequenceCont; + +public: + SchXMLExportHelper_Impl( SvXMLExport& rExport, + SvXMLAutoStylePoolP& rASPool ); + + virtual ~SchXMLExportHelper_Impl(); + + // auto-styles + /// parse chart and collect all auto-styles used in current pool + void collectAutoStyles( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument > rChartDoc ); + + /// write the styles collected into the current pool as <style:style> elements + void exportAutoStyles(); + + /** export the <chart:chart> element corresponding to rChartDoc + if bIncludeTable is true, the chart data is exported as <table:table> + element (inside the chart element). + + Otherwise the external references stored in the chart document are used + for writing the corresponding attributes at series + + All attributes contained in xAttrList are written at the chart element, + which ist the outer element of a chart. So these attributes can easily + be parsed again by the container + */ + void exportChart( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument > rChartDoc, + sal_Bool bIncludeTable ); + + UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; + + void SetChartRangeAddress( const ::rtl::OUString& rAddress ) + { msChartAddress = rAddress; } + void SetTableNumberList( const ::rtl::OUString& rList ) + { msTableNumberList = rList; } + + void InitRangeSegmentationProperties( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument > & xChartDoc ); + + ::com::sun::star::awt::Size getPageSize( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument > & xChartDoc ) const; + + /** first parseDocument: collect autostyles and store names in this queue + second parseDocument: export content and use names from this queue + */ + ::std::queue< ::rtl::OUString > maAutoStyleNameQueue; + void CollectAutoStyle( + const std::vector< XMLPropertyState >& aStates ); + void AddAutoStyleAttribute( + const std::vector< XMLPropertyState >& aStates ); + + SvXMLAutoStylePoolP& GetAutoStylePoolP() + { return mrAutoStylePool; } + + /// if bExportContent is false the auto-styles are collected + void parseDocument( com::sun::star::uno::Reference< + com::sun::star::chart::XChartDocument >& rChartDoc, + sal_Bool bExportContent, + sal_Bool bIncludeTable = sal_False ); + void exportTable(); + void exportPlotArea( + com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > xDiagram, + com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > xNewDiagram, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent, + sal_Bool bIncludeTable ); + void exportCoordinateRegion( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram >& xDiagram ); + void exportAxes( const com::sun::star::uno::Reference< com::sun::star::chart::XDiagram > & xDiagram, + const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, + sal_Bool bExportContent ); + + void exportSeries( + const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent, + sal_Bool bHasTwoYAxes ); + void exportCandleStickSeries( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > > & aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Bool bJapaneseCandleSticks, + sal_Bool bExportContent ); + void exportDataPoints( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & xSeriesProperties, + sal_Int32 nSeriesLength, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDiagram > & xDiagram, + sal_Bool bExportContent ); + void exportRegressionCurve( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > & xSeries, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & xSeriesProp, + const ::com::sun::star::awt::Size & rPageSize, + sal_Bool bExportContent ); + + /// add svg position as attribute for current element + void addPosition( const ::com::sun::star::awt::Point & rPosition ); + void addPosition( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + /// add svg size as attribute for current element + void addSize( const ::com::sun::star::awt::Size & rSize ); + void addSize( com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xShape ); + /// fills the member msString with the appropriate String (i.e. "A3") + void getCellAddress( sal_Int32 nCol, sal_Int32 nRow ); + /// exports a string as a paragraph element + void exportText( const ::rtl::OUString& rText, bool bConvertTabsLFs = false ); + void exportErrorBarRanges(); + + SchXMLExportHelper_Impl(SchXMLExportHelper_Impl &); // not defined + void operator =(SchXMLExportHelper_Impl &); // not defined + +public: + SvXMLExport& mrExport; + SvXMLAutoStylePoolP& mrAutoStylePool; + UniReference< XMLPropertyHandlerFactory > mxPropertyHandlerFactory; + UniReference< XMLPropertySetMapper > mxPropertySetMapper; + UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; + + rtl::OUString msTableName; + rtl::OUStringBuffer msStringBuffer; + rtl::OUString msString; + + // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) + sal_Bool mbHasSeriesLabels; + sal_Bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false + sal_Bool mbRowSourceColumns; + rtl::OUString msChartAddress; + rtl::OUString msTableNumberList; + ::com::sun::star::uno::Sequence< sal_Int32 > maSequenceMapping; + + rtl::OUString msCLSID; + + ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > mxAdditionalShapes; + + tDataSequenceCont m_aDataSequencesToExport; + rtl::OUString maCategoriesRange; +}; + namespace { Reference< uno::XComponentContext > lcl_getComponentContext() @@ -356,7 +510,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( const Sequence< Reference< chart2::data::XLabeledDataSequence > > & aSeqCnt, const OUString & rRole, const Reference< chart2::XChartDocument > & xDoc, - SchXMLExportHelper::tDataSequenceCont & rOutSequencesToExport ) + SchXMLExportHelper_Impl::tDataSequenceCont & rOutSequencesToExport ) { tLabelAndValueRange aResult; @@ -373,7 +527,7 @@ tLabelAndValueRange lcl_getLabelAndValueRangeByRole( aResult.second = lcl_ConvertRange( xValueSeq->getSourceRangeRepresentation(), xDoc ); if( xLabelSeq.is() || xValueSeq.is()) - rOutSequencesToExport.push_back( SchXMLExportHelper::tLabelValuesDataPair( xLabelSeq, xValueSeq )); + rOutSequencesToExport.push_back( SchXMLExportHelper_Impl::tLabelValuesDataPair( xLabelSeq, xValueSeq )); } return aResult; @@ -455,10 +609,10 @@ OUString lcl_getLabelString( const Reference< chart2::data::XDataSequence > & xL } sal_Int32 lcl_getMaxSequenceLength( - const SchXMLExportHelper::tDataSequenceCont & rContainer ) + const SchXMLExportHelper_Impl::tDataSequenceCont & rContainer ) { sal_Int32 nResult = 0; - for( SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( rContainer.begin()); + for( SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( rContainer.begin()); aIt != rContainer.end(); ++aIt ) { if( aIt->second.is()) @@ -573,7 +727,7 @@ template< class T > }; -typedef ::std::map< sal_Int32, SchXMLExportHelper::tLabelValuesDataPair > +typedef ::std::map< sal_Int32, SchXMLExportHelper_Impl::tLabelValuesDataPair > lcl_DataSequenceMap; struct lcl_SequenceToMapElement : @@ -596,7 +750,7 @@ struct lcl_SequenceToMapElement : }; void lcl_ReorderInternalSequencesAccordingToTheirRangeName( - SchXMLExportHelper::tDataSequenceCont & rInOutSequences ) + SchXMLExportHelper_Impl::tDataSequenceCont & rInOutSequences ) { lcl_DataSequenceMap aIndexSequenceMap; ::std::transform( rInOutSequences.begin(), rInOutSequences.end(), @@ -613,7 +767,7 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName( // fill empty columns for( ; nIndex < aIt->first; ++nIndex ) rInOutSequences.push_back( - SchXMLExportHelper::tDataSequenceCont::value_type( 0, 0 )); + SchXMLExportHelper_Impl::tDataSequenceCont::value_type( 0, 0 )); OSL_ASSERT( nIndex == aIt->first ); rInOutSequences.push_back( aIt->second ); } @@ -621,7 +775,7 @@ void lcl_ReorderInternalSequencesAccordingToTheirRangeName( lcl_TableData lcl_getDataForLocalTable( - const SchXMLExportHelper::tDataSequenceCont & aSequencesToExport, + const SchXMLExportHelper_Impl::tDataSequenceCont & aSequencesToExport, const Reference< chart::XComplexDescriptionAccess >& xComplexDescriptionAccess, const OUString& rCategoriesRange, bool bSeriesFromColumns, @@ -643,13 +797,18 @@ lcl_TableData lcl_getDataForLocalTable( aResult.aComplexRowDescriptions = xComplexDescriptionAccess->getComplexRowDescriptions(); } - SchXMLExportHelper::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); - SchXMLExportHelper::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); - SchXMLExportHelper::tDataSequenceCont::const_iterator aIt( aBegin ); + SchXMLExportHelper_Impl::tDataSequenceCont::size_type nNumSequences = aSequencesToExport.size(); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aBegin( aSequencesToExport.begin()); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aEnd( aSequencesToExport.end()); + SchXMLExportHelper_Impl::tDataSequenceCont::const_iterator aIt( aBegin ); size_t nMaxSequenceLength( lcl_getMaxSequenceLength( aSequencesToExport )); - nMaxSequenceLength = std::max( nMaxSequenceLength, size_t( aSimpleCategories.getLength() ) ); + size_t nCategoriesLength( aSimpleCategories.getLength() ); + if( nCategoriesLength > nMaxSequenceLength ) + { + aSimpleCategories.realloc(nMaxSequenceLength);//#i110617# + nCategoriesLength = nMaxSequenceLength; + } size_t nNumColumns( bSeriesFromColumns ? nNumSequences : nMaxSequenceLength ); size_t nNumRows( bSeriesFromColumns ? nMaxSequenceLength : nNumSequences ); @@ -829,7 +988,53 @@ struct SchXMLDataPointStruct // class SchXMLExportHelper // ======================================== -SchXMLExportHelper::SchXMLExportHelper( +SchXMLExportHelper::SchXMLExportHelper( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) + : m_pImpl( new SchXMLExportHelper_Impl( rExport, rASPool ) ) +{ +} + +SchXMLExportHelper::~SchXMLExportHelper() +{ + delete m_pImpl; +} + +const OUString& SchXMLExportHelper::getChartCLSID() +{ + return m_pImpl->msCLSID; +} + +UniReference< XMLPropertySetMapper > SchXMLExportHelper_Impl::GetPropertySetMapper() const +{ + return mxPropertySetMapper; +} + +void SchXMLExportHelper_Impl::exportAutoStyles() +{ + if( mxExpPropMapper.is()) + { + //ToDo: when embedded in calc/writer this is not necessary because the + // numberformatter is shared between both documents + mrExport.exportAutoDataStyles(); + + // export chart auto styles + mrAutoStylePool.exportXML( + XML_STYLE_FAMILY_SCH_CHART_ID + , mrExport.GetDocHandler(), + mrExport.GetMM100UnitConverter(), + mrExport.GetNamespaceMap() + ); + + // export auto styles for additional shapes + mrExport.GetShapeExport()->exportAutoStyles(); + // and for text in additional shapes + mrExport.GetTextParagraphExport()->exportTextAutoStyles(); + } +} + +// private methods +// --------------- + +SchXMLExportHelper_Impl::SchXMLExportHelper_Impl( SvXMLExport& rExport, SvXMLAutoStylePoolP& rASPool ) : mrExport( rExport ), @@ -898,56 +1103,22 @@ SchXMLExportHelper::SchXMLExportHelper( String( 'T' )); } -SchXMLExportHelper::~SchXMLExportHelper() {} - -const OUString& SchXMLExportHelper::getChartCLSID() +SchXMLExportHelper_Impl::~SchXMLExportHelper_Impl() { - return msCLSID; -} - -void SchXMLExportHelper::exportAutoStyles() -{ - if( mxExpPropMapper.is()) - { - //ToDo: when embedded in calc/writer this is not necessary because the - // numberformatter is shared between both documents - mrExport.exportAutoDataStyles(); - - // export chart auto styles - mrAutoStylePool.exportXML( - XML_STYLE_FAMILY_SCH_CHART_ID - , mrExport.GetDocHandler(), - mrExport.GetMM100UnitConverter(), - mrExport.GetNamespaceMap() - ); - - // export auto styles for additional shapes - mrExport.GetShapeExport()->exportAutoStyles(); - // and for text in additional shapes - mrExport.GetTextParagraphExport()->exportTextAutoStyles(); - } } -void SchXMLExportHelper::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc ) +void SchXMLExportHelper_Impl::collectAutoStyles( Reference< chart::XChartDocument > rChartDoc ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::collectAutoStyles" ); - parseDocument( rChartDoc, sal_False ); } -void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartDoc, +void SchXMLExportHelper_Impl::exportChart( Reference< chart::XChartDocument > rChartDoc, sal_Bool bIncludeTable ) { - RTL_LOGFILE_CONTEXT_AUTHOR( aLogContext, "xmloff", "bm", "::SchXMLExportHelper::exportChart" ); - parseDocument( rChartDoc, sal_True, bIncludeTable ); DBG_ASSERT( maAutoStyleNameQueue.empty(), "There are still remaining autostyle names in the queue" ); } - -// private methods -// --------------- - ::rtl::OUString lcl_GetStringFromNumberSequence( const ::com::sun::star::uno::Sequence< sal_Int32 >& rSequenceMapping, bool bRemoveOneFromEachIndex /*should be true if having categories*/ ) { const sal_Int32* pArray = rSequenceMapping.getConstArray(); @@ -972,7 +1143,7 @@ void SchXMLExportHelper::exportChart( Reference< chart::XChartDocument > rChartD } /// if bExportContent is false the auto-styles are collected -void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rChartDoc, +void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& rChartDoc, sal_Bool bExportContent, sal_Bool bIncludeTable ) { @@ -1084,6 +1255,7 @@ void SchXMLExportHelper::parseDocument( Reference< chart::XChartDocument >& rCha aDataProviderURL = OUString( RTL_CONSTASCII_USTRINGPARAM( "." ) ); } mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, aDataProviderURL ); + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); } OUString sChartType( xDiagram->getDiagramType() ); @@ -1421,7 +1593,7 @@ void lcl_exportComplexLabel( const Sequence< OUString >& rComplexLabel, SvXMLExp } } -void SchXMLExportHelper::exportTable() +void SchXMLExportHelper_Impl::exportTable() { // table element // ------------- @@ -1520,8 +1692,11 @@ void SchXMLExportHelper::exportTable() // to allow a correct re-association when copying via clipboard if( !bHasOwnData && aColumnDescriptions_RangeIter != aColumnDescriptions_RangeEnd ) { - if( (*aColumnDescriptions_RangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aColumnDescriptions_RangeIter ); + if ((*aColumnDescriptions_RangeIter).getLength()) + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aColumnDescriptions_RangeIter); + } ++aColumnDescriptions_RangeIter; } exportText( *aIt ); @@ -1553,7 +1728,10 @@ void SchXMLExportHelper::exportTable() // write the original range name as id into the local table // to allow a correct re-association when copying via clipboard if( !bHasOwnData && aRowDescriptions_RangeIter != aRowDescriptions_RangeEnd ) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aRowDescriptions_RangeIter++ ); + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aRowDescriptions_RangeIter++); + } exportText( *aRowDescriptionsIter ); ++aRowDescriptionsIter; if( nC < nComplexCount ) @@ -1575,8 +1753,11 @@ void SchXMLExportHelper::exportTable() if( ( !bHasOwnData && aDataRangeIter != aDataRangeEndIter ) && ( mbRowSourceColumns || (aColIt == aRowIt->begin())) ) { - if( (*aDataRangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aDataRangeIter ); + if ((*aDataRangeIter).getLength()) + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aDataRangeIter); + } ++aDataRangeIter; } exportText( msString, false ); // do not convert tabs and lfs @@ -1589,7 +1770,7 @@ void SchXMLExportHelper::exportTable() OSL_ASSERT( bHasOwnData || (aRowDescriptions_RangeIter == aRowDescriptions_RangeEnd) ); } -void SchXMLExportHelper::exportPlotArea( +void SchXMLExportHelper_Impl::exportPlotArea( Reference< chart::XDiagram > xDiagram, Reference< chart2::XDiagram > xNewDiagram, const awt::Size & rPageSize, @@ -1749,9 +1930,12 @@ void SchXMLExportHelper::exportPlotArea( } } - // element + // plot-area element pElPlotArea = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_PLOT_AREA, sal_True, sal_True ); + //inner position rectangle element + exportCoordinateRegion( xDiagram ); + // light sources (inside plot area element) if( bIs3DChart && rShapeExport.is()) @@ -1912,7 +2096,27 @@ void SchXMLExportHelper::exportPlotArea( delete pElPlotArea; } -void SchXMLExportHelper::exportAxes( +void SchXMLExportHelper_Impl::exportCoordinateRegion( const uno::Reference< chart::XDiagram >& xDiagram ) +{ + const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); + if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older + return; + if( nCurrentODFVersion != SvtSaveOptions::ODFVER_LATEST )//export only if extensions are enabled //#i100778# todo: change this dependent on fileformat evolution + return; + + Reference< chart::XDiagramPositioning > xDiaPos( xDiagram, uno::UNO_QUERY ); + DBG_ASSERT( xDiaPos.is(), "Invalid xDiaPos as parameter" ); + if( !xDiaPos.is() ) + return; + + awt::Rectangle aRect( xDiaPos->calculateDiagramPositionExcludingAxes() ); + addPosition( awt::Point(aRect.X,aRect.Y) ); + addSize( awt::Size(aRect.Width,aRect.Height) ); + + SvXMLElementExport aCoordinateRegion( mrExport, XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, sal_True, sal_True );//#i100778# todo: change to chart namespace in future - dependent on fileformat +} + +void SchXMLExportHelper_Impl::exportAxes( const Reference< chart::XDiagram > & xDiagram, const Reference< chart2::XDiagram > & xNewDiagram, sal_Bool bExportContent ) @@ -2514,7 +2718,7 @@ void SchXMLExportHelper::exportAxes( } } -void SchXMLExportHelper::exportSeries( +void SchXMLExportHelper_Impl::exportSeries( const Reference< chart2::XDiagram > & xNewDiagram, const awt::Size & rPageSize, sal_Bool bExportContent, @@ -2883,7 +3087,7 @@ void SchXMLExportHelper::exportSeries( } } -void SchXMLExportHelper::exportRegressionCurve( +void SchXMLExportHelper_Impl::exportRegressionCurve( const Reference< chart2::XDataSeries > & xSeries, const Reference< beans::XPropertySet > & xSeriesProp, const awt::Size & rPageSize, @@ -2990,7 +3194,7 @@ void SchXMLExportHelper::exportRegressionCurve( } } -void SchXMLExportHelper::exportCandleStickSeries( +void SchXMLExportHelper_Impl::exportCandleStickSeries( const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, const Reference< chart2::XDiagram > & xDiagram, sal_Bool bJapaneseCandleSticks, @@ -3108,7 +3312,7 @@ void SchXMLExportHelper::exportCandleStickSeries( } } -void SchXMLExportHelper::exportDataPoints( +void SchXMLExportHelper_Impl::exportDataPoints( const uno::Reference< beans::XPropertySet > & xSeriesProperties, sal_Int32 nSeriesLength, const uno::Reference< chart2::XDiagram > & xDiagram, @@ -3356,7 +3560,7 @@ void SchXMLExportHelper::exportDataPoints( } -void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) +void SchXMLExportHelper_Impl::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) { msStringBuffer.append( (sal_Unicode)'.' ); if( nCol < 26 ) @@ -3376,7 +3580,7 @@ void SchXMLExportHelper::getCellAddress( sal_Int32 nCol, sal_Int32 nRow ) msStringBuffer.append( nRow + (sal_Int32)1 ); } -void SchXMLExportHelper::addPosition( const awt::Point & rPosition ) +void SchXMLExportHelper_Impl::addPosition( const awt::Point & rPosition ) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rPosition.X ); msString = msStringBuffer.makeStringAndClear(); @@ -3387,13 +3591,13 @@ void SchXMLExportHelper::addPosition( const awt::Point & rPosition ) mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_Y, msString ); } -void SchXMLExportHelper::addPosition( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addPosition( Reference< drawing::XShape > xShape ) { if( xShape.is()) addPosition( xShape->getPosition()); } -void SchXMLExportHelper::addSize( const awt::Size & rSize ) +void SchXMLExportHelper_Impl::addSize( const awt::Size & rSize ) { mrExport.GetMM100UnitConverter().convertMeasure( msStringBuffer, rSize.Width ); msString = msStringBuffer.makeStringAndClear(); @@ -3404,13 +3608,13 @@ void SchXMLExportHelper::addSize( const awt::Size & rSize ) mrExport.AddAttribute( XML_NAMESPACE_SVG, XML_HEIGHT, msString ); } -void SchXMLExportHelper::addSize( Reference< drawing::XShape > xShape ) +void SchXMLExportHelper_Impl::addSize( Reference< drawing::XShape > xShape ) { if( xShape.is()) addSize( xShape->getSize() ); } -awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const +awt::Size SchXMLExportHelper_Impl::getPageSize( const Reference< chart2::XChartDocument > & xChartDoc ) const { awt::Size aSize( 8000, 7000 ); uno::Reference< embed::XVisualObject > xVisualObject( xChartDoc, uno::UNO_QUERY ); @@ -3421,13 +3625,13 @@ awt::Size SchXMLExportHelper::getPageSize( const Reference< chart2::XChartDocume return aSize; } -void SchXMLExportHelper::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) +void SchXMLExportHelper_Impl::CollectAutoStyle( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) maAutoStyleNameQueue.push( GetAutoStylePoolP().Add( XML_STYLE_FAMILY_SCH_CHART_ID, aStates )); } -void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates ) +void SchXMLExportHelper_Impl::AddAutoStyleAttribute( const std::vector< XMLPropertyState >& aStates ) { if( !aStates.empty() ) { @@ -3438,7 +3642,7 @@ void SchXMLExportHelper::AddAutoStyleAttribute( const std::vector< XMLPropertySt } } -void SchXMLExportHelper::exportText( const OUString& rText, bool bConvertTabsLFs ) +void SchXMLExportHelper_Impl::exportText( const OUString& rText, bool bConvertTabsLFs ) { SchXMLTools::exportText( mrExport, rText, bConvertTabsLFs ); } @@ -3455,6 +3659,8 @@ SchXMLExport::SchXMLExport( maAutoStylePool( *this ), maExportHelper( *this, maAutoStylePool ) { + if( getDefaultVersion() == SvtSaveOptions::ODFVER_LATEST ) + _GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); } @@ -3471,7 +3677,7 @@ SchXMLExport::~SchXMLExport() sal_uInt32 SchXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) { Reference< chart2::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY ); - maExportHelper.InitRangeSegmentationProperties( xChartDoc ); + maExportHelper.m_pImpl->InitRangeSegmentationProperties( xChartDoc ); return SvXMLExport::exportDoc( eClass ); } @@ -3494,8 +3700,8 @@ void SchXMLExport::_ExportAutoStyles() Reference< chart::XChartDocument > xChartDoc( GetModel(), uno::UNO_QUERY ); if( xChartDoc.is()) { - maExportHelper.collectAutoStyles( xChartDoc ); - maExportHelper.exportAutoStyles(); + maExportHelper.m_pImpl->collectAutoStyles( xChartDoc ); + maExportHelper.m_pImpl->exportAutoStyles(); } else { @@ -3544,13 +3750,13 @@ void SchXMLExport::_ExportContent() aAny = xProp->getPropertyValue( OUString::createFromAscii( "ChartRangeAddress" )); aAny >>= sChartAddress; - maExportHelper.SetChartRangeAddress( sChartAddress ); + maExportHelper.m_pImpl->SetChartRangeAddress( sChartAddress ); OUString sTableNumberList; aAny = xProp->getPropertyValue( OUString::createFromAscii( "TableNumberList" )); aAny >>= sTableNumberList; - maExportHelper.SetTableNumberList( sTableNumberList ); + maExportHelper.m_pImpl->SetTableNumberList( sTableNumberList ); // do not include own table if there are external addresses bIncludeTable = (sChartAddress.getLength() == 0); @@ -3563,7 +3769,7 @@ void SchXMLExport::_ExportContent() } } } - maExportHelper.exportChart( xChartDoc, bIncludeTable ); + maExportHelper.m_pImpl->exportChart( xChartDoc, bIncludeTable ); } else { @@ -3578,7 +3784,12 @@ void SchXMLExport::SetProgress( sal_Int32 nPercentage ) mxStatusIndicator->setValue( nPercentage ); } -void SchXMLExportHelper::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) +UniReference< XMLPropertySetMapper > SchXMLExport::GetPropertySetMapper() const +{ + return maExportHelper.m_pImpl->GetPropertySetMapper(); +} + +void SchXMLExportHelper_Impl::InitRangeSegmentationProperties( const Reference< chart2::XChartDocument > & xChartDoc ) { if( xChartDoc.is()) try diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 6afbaecb551c..587070202c9c 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -281,6 +281,8 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() { static __FAR_DATA SvXMLTokenMapEntry aPlotAreaElemTokenMap[] = { + { XML_NAMESPACE_CHART_EXT, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION_EXT }, + { XML_NAMESPACE_CHART, XML_COORDINATE_REGION, XML_TOK_PA_COORDINATE_REGION }, { XML_NAMESPACE_CHART, XML_AXIS, XML_TOK_PA_AXIS }, { XML_NAMESPACE_CHART, XML_SERIES, XML_TOK_PA_SERIES }, { XML_NAMESPACE_CHART, XML_WALL, XML_TOK_PA_WALL }, @@ -657,6 +659,7 @@ SchXMLImport::SchXMLImport( SvXMLImport( xServiceFactory, nImportFlags ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); mbIsGraphicLoadOnDemandSupported = false; } @@ -670,6 +673,7 @@ SchXMLImport::SchXMLImport( : SvXMLImport( xServiceFactory, xModel, rGrfContainer ) { GetNamespaceMap().Add( GetXMLToken(XML_NP_XLINK), GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); + GetNamespaceMap().Add( GetXMLToken(XML_NP_CHART_EXT), GetXMLToken(XML_N_CHART_EXT), XML_NAMESPACE_CHART_EXT); // get status indicator (if requested) if( bShowProgress ) diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 646d82e4ab79..972bc9016d4f 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -60,6 +60,7 @@ void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttr { sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; rtl::OUString aValue; + bool bHaveXmlId( false ); for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -67,11 +68,20 @@ void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttr rtl::OUString aLocalName; USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); - if( nPrefix == XML_NAMESPACE_TEXT && - IsXMLToken( aLocalName, XML_ID ) ) + if (IsXMLToken(aLocalName, XML_ID)) { - (*mpId) = xAttrList->getValueByIndex( i ); - break; // we only need this attribute + if (nPrefix == XML_NAMESPACE_XML) + { + (*mpId) = xAttrList->getValueByIndex( i ); + bHaveXmlId = true; + } + if (nPrefix == XML_NAMESPACE_TEXT) + { // text:id shall be ignored if xml:id exists + if (!bHaveXmlId) + { + (*mpId) = xAttrList->getValueByIndex( i ); + } + } } } } diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index 53a32b9193e5..61dab1fb52cb 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -61,6 +61,7 @@ #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <com/sun/star/chart/X3DDisplay.hpp> #include <com/sun/star/chart/XStatisticDisplay.hpp> +#include <com/sun/star/chart/XDiagramPositioning.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> @@ -199,8 +200,8 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( mnSeries( 0 ), m_aGlobalSeriesImportInfo( rAllRangeAddressesAvailable ), maSceneImportHelper( rImport ), - mbHasSize(false), - mbHasPosition(false), + m_aOuterPositioning( rImport ), + m_aInnerPositioning( rImport ), mbPercentStacked(false), m_bAxisPositionAttributeImported(false), m_rXLinkHRefAttributeToIndicateDataProvider(rXLinkHRefAttributeToIndicateDataProvider), @@ -296,15 +297,6 @@ SchXMLPlotAreaContext::~SchXMLPlotAreaContext() void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - uno::Any aTransMatrixAny; - - // initialize size and position - uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY ); - bool bHasSizeWidth = false; - bool bHasSizeHeight = false; - bool bHasPositionX = false; - bool bHasPositionY = false; - // parse attributes sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; const SvXMLTokenMap& rAttrTokenMap = mrImportHelper.GetPlotAreaAttrTokenMap(); @@ -320,20 +312,10 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri switch( rAttrTokenMap.Get( nPrefix, aLocalName )) { case XML_TOK_PA_X: - GetImport().GetMM100UnitConverter().convertMeasure( maPosition.X, aValue ); - bHasPositionX = true; - break; case XML_TOK_PA_Y: - GetImport().GetMM100UnitConverter().convertMeasure( maPosition.Y, aValue ); - bHasPositionY = true; - break; case XML_TOK_PA_WIDTH: - GetImport().GetMM100UnitConverter().convertMeasure( maSize.Width, aValue ); - bHasSizeWidth = true; - break; case XML_TOK_PA_HEIGHT: - GetImport().GetMM100UnitConverter().convertMeasure( maSize.Height, aValue ); - bHasSizeHeight = true; + m_aOuterPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue ); break; case XML_TOK_PA_STYLE_NAME: msAutoStyleName = aValue; @@ -369,9 +351,6 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri } } - mbHasSize = bHasSizeWidth && bHasSizeHeight; - mbHasPosition = bHasPositionX && bHasPositionY; - if( ! mxNewDoc.is()) { uno::Reference< beans::XPropertySet > xDocProp( mrImportHelper.GetChartDocument(), uno::UNO_QUERY ); @@ -426,14 +405,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Lines")), pPropStyleContext, pStylesCtxt ); //handle automatic position and size - bool bAutoSize = false; - bool bAutoPosition = false; - SchXMLTools::getPropertyFromContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= bAutoSize; - SchXMLTools::getPropertyFromContext( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= bAutoPosition; - mbHasSize = mbHasSize && !bAutoSize; - mbHasPosition = mbHasPosition && !bAutoPosition; + m_aOuterPositioning.readAutomaticPositioningProperties( pPropStyleContext, pStylesCtxt ); //correct default starting angle for old 3D pies if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_0( GetImport().GetModel() ) ) @@ -548,6 +520,13 @@ SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( switch( rTokenMap.Get( nPrefix, rLocalName )) { + case XML_TOK_PA_COORDINATE_REGION_EXT: + case XML_TOK_PA_COORDINATE_REGION: + { + pContext = new SchXMLCoordinateRegionContext( GetImport(), nPrefix, rLocalName, m_aInnerPositioning ); + } + break; + case XML_TOK_PA_AXIS: { bool bAddMissingXAxisForNetCharts = false; @@ -711,13 +690,22 @@ void SchXMLPlotAreaContext::EndElement() } // set changed size and position after properties (esp. 3d) - uno::Reference< drawing::XShape > xDiaShape( mxDiagram, uno::UNO_QUERY ); - if( xDiaShape.is()) + + uno::Reference< chart::XDiagramPositioning > xDiaPos( mxDiagram, uno::UNO_QUERY ); + if( xDiaPos.is()) { - if( mbHasSize ) - xDiaShape->setSize( maSize ); - if( mbHasPosition ) - xDiaShape->setPosition( maPosition ); + if( !m_aOuterPositioning.isAutomatic() ) + { + if( m_aInnerPositioning.hasPosSize() ) + xDiaPos->setDiagramPositionExcludingAxes( m_aInnerPositioning.getRectangle() ); + else if( m_aOuterPositioning.hasPosSize() ) + { + if( SchXMLTools::isDocumentGeneratedWithOpenOfficeOlderThan3_3( GetImport().GetModel() ) ) //old version of OOo did write a wrong rectangle for the diagram size + xDiaPos->setDiagramPositionIncludingAxesAndAxisTitles( m_aOuterPositioning.getRectangle() ); + else + xDiaPos->setDiagramPositionIncludingAxes( m_aOuterPositioning.getRectangle() ); + } + } } CorrectAxisPositions(); @@ -1271,6 +1259,10 @@ void SchXMLAxisContext::CreateAxis() // set properties if( xProp.is()) { + // #i109879# the line color is black as default, in the model it is a light gray + xProp->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LineColor" )), + uno::makeAny( COL_BLACK )); + xProp->setPropertyValue( rtl::OUString::createFromAscii( "DisplayLabels" ), aFalseBool ); // #88077# AutoOrigin 'on' is default @@ -1677,6 +1669,134 @@ void SchXMLCategoriesContext::StartElement( const uno::Reference< xml::sax::XAtt // ======================================== +SchXMLPositonAttributesHelper::SchXMLPositonAttributesHelper( SvXMLImport& rImporter ) + : m_rImport( rImporter ) + , m_aPosition(0,0) + , m_aSize(0,0) + , m_bHasSizeWidth( false ) + , m_bHasSizeHeight( false ) + , m_bHasPositionX( false ) + , m_bHasPositionY( false ) + , m_bAutoSize( false ) + , m_bAutoPosition( false ) +{ +} + +SchXMLPositonAttributesHelper::~SchXMLPositonAttributesHelper() +{ +} + +bool SchXMLPositonAttributesHelper::hasSize() const +{ + return m_bHasSizeWidth && m_bHasSizeHeight; +} +bool SchXMLPositonAttributesHelper::hasPosition() const +{ + return m_bHasPositionX && m_bHasPositionY; +} +bool SchXMLPositonAttributesHelper::hasPosSize() const +{ + return hasPosition() && hasSize(); +} +bool SchXMLPositonAttributesHelper::isAutomatic() const +{ + return m_bAutoSize || m_bAutoPosition; +} +awt::Point SchXMLPositonAttributesHelper::getPosition() const +{ + return m_aPosition; +} +awt::Size SchXMLPositonAttributesHelper::getSize() const +{ + return m_aSize; +} +awt::Rectangle SchXMLPositonAttributesHelper::getRectangle() const +{ + return awt::Rectangle( m_aPosition.X, m_aPosition.Y, m_aSize.Width, m_aSize.Height ); +} + +bool SchXMLPositonAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) +{ + //returns true if the attribute was proccessed + bool bReturn = true; + + if( XML_NAMESPACE_SVG == nPrefix ) + { + if( IsXMLToken( rLocalName, XML_X ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.X, rValue ); + m_bHasPositionX = true; + } + else if( IsXMLToken( rLocalName, XML_Y ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aPosition.Y, rValue ); + m_bHasPositionY = true; + } + else if( IsXMLToken( rLocalName, XML_WIDTH ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Width, rValue ); + m_bHasSizeWidth = true; + } + else if( IsXMLToken( rLocalName, XML_HEIGHT ) ) + { + m_rImport.GetMM100UnitConverter().convertMeasure( m_aSize.Height, rValue ); + m_bHasSizeHeight = true; + } + else + bReturn = false; + } + else + bReturn = false; + + return bReturn; +} + + +void SchXMLPositonAttributesHelper::readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ) +{ + if( pPropStyleContext && pStylesCtxt ) + { + //handle automatic position and size + SchXMLTools::getPropertyFromContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticSize")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoSize; + SchXMLTools::getPropertyFromContext( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutomaticPosition")), pPropStyleContext, pStylesCtxt ) >>= m_bAutoPosition; + } +} + +// ======================================== + +SchXMLCoordinateRegionContext::SchXMLCoordinateRegionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ) + : SvXMLImportContext( rImport, nPrefix, rLocalName ) + , m_rPositioning( rPositioning ) +{ +} + +SchXMLCoordinateRegionContext::~SchXMLCoordinateRegionContext() +{ +} + +void SchXMLCoordinateRegionContext::StartElement( const uno::Reference< xml::sax::XAttributeList >& xAttrList ) +{ + // parse attributes + sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; + + for( sal_Int16 i = 0; i < nAttrCount; i++ ) + { + rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); + rtl::OUString aLocalName; + rtl::OUString aValue = xAttrList->getValueByIndex( i ); + USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + m_rPositioning.readPositioningAttribute( nPrefix, aLocalName, aValue ); + } +} + +// ======================================== + SchXMLWallFloorContext::SchXMLWallFloorContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 56aa3e78c814..1f0de466dcb1 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -66,6 +66,43 @@ private: SchXML3DSceneAttributesHelper(); }; +// ---------------------------------------- + +class SchXMLPositonAttributesHelper +{ +public: + SchXMLPositonAttributesHelper( SvXMLImport& rImporter ); + ~SchXMLPositonAttributesHelper(); + + bool readPositioningAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ); + void readAutomaticPositioningProperties( XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); + + bool hasPosSize() const; + bool isAutomatic() const; + ::com::sun::star::awt::Rectangle getRectangle() const; + + +private: + bool hasSize() const; + bool hasPosition() const; + ::com::sun::star::awt::Size getSize() const; + ::com::sun::star::awt::Point getPosition() const; + + SvXMLImport& m_rImport; + + ::com::sun::star::awt::Point m_aPosition; + ::com::sun::star::awt::Size m_aSize; + + bool m_bHasSizeWidth; + bool m_bHasSizeHeight; + bool m_bHasPositionX; + bool m_bHasPositionY; + sal_Bool m_bAutoSize; + sal_Bool m_bAutoPosition; +}; + +// ---------------------------------------- + class SchXMLPlotAreaContext : public SvXMLImportContext { public: @@ -110,10 +147,8 @@ private: GlobalSeriesImportInfo m_aGlobalSeriesImportInfo; SchXML3DSceneAttributesHelper maSceneImportHelper; - ::com::sun::star::awt::Size maSize; - ::com::sun::star::awt::Point maPosition; - bool mbHasSize; - bool mbHasPosition; + SchXMLPositonAttributesHelper m_aOuterPositioning;//including axes and axes titles + SchXMLPositonAttributesHelper m_aInnerPositioning;//excluding axes and axes titles bool mbPercentStacked; bool m_bAxisPositionAttributeImported; ::rtl::OUString msAutoStyleName; @@ -216,6 +251,23 @@ public: // ---------------------------------------- +class SchXMLCoordinateRegionContext : public SvXMLImportContext +{ +public: + SchXMLCoordinateRegionContext( + SvXMLImport& rImport + , sal_uInt16 nPrefix + , const rtl::OUString& rLocalName + , SchXMLPositonAttributesHelper& rPositioning ); + virtual ~SchXMLCoordinateRegionContext(); + virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); + +private: + SchXMLPositonAttributesHelper& m_rPositioning; +}; + +// ---------------------------------------- + class SchXMLWallFloorContext : public SvXMLImportContext { public: diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index 91c2bc1b9b4a..86e9693ee225 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -39,7 +39,6 @@ #include <com/sun/star/chart2/XRegressionCurve.hpp> #include <com/sun/star/chart2/data/XDataSink.hpp> #include <com/sun/star/chart2/data/XDataReceiver.hpp> -#include <com/sun/star/chart2/data/XRangeXMLConversion.hpp> #include <com/sun/star/chart/ChartAxisAssign.hpp> #include <com/sun/star/chart/ChartSymbolType.hpp> @@ -78,15 +77,6 @@ using ::rtl::OUStringBuffer; namespace { -OUString lcl_ConvertRange( const ::rtl::OUString & rRange, const Reference< chart2::data::XDataProvider >& xDataProvider ) -{ - OUString aResult = rRange; - Reference< chart2::data::XRangeXMLConversion > xConversion( xDataProvider, uno::UNO_QUERY ); - if( xConversion.is()) - aResult = xConversion->convertRangeFromXML( rRange ); - return aResult; -} - class SchXMLDomain2Context : public SvXMLImportContext { private: @@ -232,7 +222,7 @@ void lcl_insertErrorBarLSequencesToMap( Reference< chart2::data::XLabeledDataSequence > lcl_createAndAddSequenceToSeries( const rtl::OUString& rRole , const rtl::OUString& rRange - , const Reference< chart2::data::XDataProvider >& xDataProvider + , const Reference< chart2::XChartDocument >& xChartDoc , const Reference< chart2::XDataSeries >& xSeries ) { Reference< chart2::data::XLabeledDataSequence > xLabeledSeq; @@ -240,27 +230,14 @@ Reference< chart2::data::XLabeledDataSequence > lcl_createAndAddSequenceToSeries Reference< chart2::data::XDataSource > xSeriesSource( xSeries,uno::UNO_QUERY ); Reference< chart2::data::XDataSink > xSeriesSink( xSeries, uno::UNO_QUERY ); - if( !(rRange.getLength() && xDataProvider.is() && xSeriesSource.is() && xSeriesSink.is()) ) + if( !(rRange.getLength() && xChartDoc.is() && xSeriesSource.is() && xSeriesSink.is()) ) return xLabeledSeq; // create a new sequence xLabeledSeq = SchXMLTools::GetNewLabeledDataSequence(); // set values at the new sequence - Reference< chart2::data::XDataSequence > xSeq; - try - { - xSeq.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( rRange, xDataProvider ))); - SchXMLTools::setXMLRangePropertyAtDataSequence( xSeq, rRange ); - } - catch( const lang::IllegalArgumentException & ex ) - { - (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + - ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); - } - + Reference< chart2::data::XDataSequence > xSeq = SchXMLTools::CreateDataSequence( rRange, xChartDoc ); Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); if( xSeqProp.is()) xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( rRole)); @@ -336,10 +313,6 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib bool bHasRange = false; bool bHasLabelRange = false; - Reference< chart2::data::XRangeXMLConversion > xRangeConversion; - if( mxNewDoc.is()) - xRangeConversion.set( mxNewDoc->getDataProvider(), uno::UNO_QUERY ); - for( sal_Int16 i = 0; i < nAttrCount; i++ ) { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); @@ -401,123 +374,93 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib try { OSL_ASSERT( mxNewDoc.is()); - if( mxNewDoc.is()) - { - if( m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable && ! bHasRange ) - m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable = sal_False; + if( m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable && ! bHasRange ) + m_rGlobalSeriesImportInfo.rbAllRangeAddressesAvailable = sal_False; - Reference< chart2::data::XDataProvider > xDataProvider( mxNewDoc->getDataProvider() ); - if( xDataProvider.is()) + bool bIsCandleStick = maGlobalChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); + if( maSeriesChartTypeName.getLength() ) + { + bIsCandleStick = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); + } + else + { + if( bIsCandleStick + && m_bStockHasVolume + && mnSeriesIndex == 0 ) { - bool bIsCandleStick = maGlobalChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); - if( maSeriesChartTypeName.getLength() ) - { - bIsCandleStick = maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.CandleStickChartType")); - } - else - { - if( bIsCandleStick - && m_bStockHasVolume - && mnSeriesIndex == 0 ) - { - maSeriesChartTypeName = OUString::createFromAscii( "com.sun.star.chart2.ColumnChartType" ); - bIsCandleStick = false; - } - else - { - maSeriesChartTypeName = maGlobalChartTypeName; - } - } - if( ! mrGlobalChartTypeUsedBySeries ) - mrGlobalChartTypeUsedBySeries = (maSeriesChartTypeName.equals( maGlobalChartTypeName )); - sal_Int32 nCoordinateSystemIndex = 0;//so far we can only import one coordinate system - m_xSeries.set( - mrImportHelper.GetNewDataSeries( mxNewDoc, nCoordinateSystemIndex, maSeriesChartTypeName, ! mrGlobalChartTypeUsedBySeries )); - Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( - SchXMLTools::GetNewLabeledDataSequence()); - - if( bIsCandleStick ) - { - // set default color for range-line to black (before applying styles) - Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); - if( xSeriesProp.is()) - xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Color")), - uno::makeAny( sal_Int32( 0x000000 ))); // black - } - else if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.PieChartType"))) - { - //@todo: this property should be saved - Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); - if( xSeriesProp.is()) - xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VaryColorsByPoint")), - uno::makeAny( true )); - } + maSeriesChartTypeName = OUString::createFromAscii( "com.sun.star.chart2.ColumnChartType" ); + bIsCandleStick = false; + } + else + { + maSeriesChartTypeName = maGlobalChartTypeName; + } + } + if( ! mrGlobalChartTypeUsedBySeries ) + mrGlobalChartTypeUsedBySeries = (maSeriesChartTypeName.equals( maGlobalChartTypeName )); + sal_Int32 nCoordinateSystemIndex = 0;//so far we can only import one coordinate system + m_xSeries.set( + mrImportHelper.GetNewDataSeries( mxNewDoc, nCoordinateSystemIndex, maSeriesChartTypeName, ! mrGlobalChartTypeUsedBySeries )); + Reference< chart2::data::XLabeledDataSequence > xLabeledSeq( + SchXMLTools::GetNewLabeledDataSequence()); + + if( bIsCandleStick ) + { + // set default color for range-line to black (before applying styles) + Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); + if( xSeriesProp.is()) + xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Color")), + uno::makeAny( sal_Int32( 0x000000 ))); // black + } + else if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.PieChartType"))) + { + //@todo: this property should be saved + Reference< beans::XPropertySet > xSeriesProp( m_xSeries, uno::UNO_QUERY ); + if( xSeriesProp.is()) + xSeriesProp->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VaryColorsByPoint")), + uno::makeAny( true )); + } - // values - Reference< chart2::data::XDataSequence > xSeq; - if( bHasRange ) - try - { - xSeq.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( m_aSeriesRange, xDataProvider ))); - SchXMLTools::setXMLRangePropertyAtDataSequence( xSeq, m_aSeriesRange ); - } - catch( const lang::IllegalArgumentException & ex ) - { - (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + - ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); - } + // values + Reference< chart2::data::XDataSequence > xSeq; + if( bHasRange ) + xSeq = SchXMLTools::CreateDataSequence( m_aSeriesRange, mxNewDoc ); - Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); - if( xSeqProp.is()) - { - OUString aMainRole( OUString::createFromAscii("values-y") ); - if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType") ) ) - aMainRole = OUString::createFromAscii("values-size"); - xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( aMainRole )); - } - xLabeledSeq->setValues( xSeq ); + Reference< beans::XPropertySet > xSeqProp( xSeq, uno::UNO_QUERY ); + if( xSeqProp.is()) + { + OUString aMainRole( OUString::createFromAscii("values-y") ); + if( maSeriesChartTypeName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.chart2.BubbleChartType") ) ) + aMainRole = OUString::createFromAscii("values-size"); + xSeqProp->setPropertyValue(OUString::createFromAscii("Role"), uno::makeAny( aMainRole )); + } + xLabeledSeq->setValues( xSeq ); - // register for setting local data if external data provider is not present - maPostponedSequences.insert( - tSchXMLLSequencesPerIndex::value_type( - tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq )); + // register for setting local data if external data provider is not present + maPostponedSequences.insert( + tSchXMLLSequencesPerIndex::value_type( + tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_VALUES ), xLabeledSeq )); - // label - if( bHasLabelRange ) - { - try - { - Reference< chart2::data::XDataSequence > xLabelSequence( - xDataProvider->createDataSequenceByRangeRepresentation( - lcl_ConvertRange( m_aSeriesLabelRange, xDataProvider ))); - xLabeledSeq->setLabel( xLabelSequence ); - SchXMLTools::setXMLRangePropertyAtDataSequence( xLabelSequence, m_aSeriesLabelRange ); - } - catch( const lang::IllegalArgumentException & ex ) - { - (void)ex; // avoid warning for pro build - OSL_ENSURE( false, ::rtl::OUStringToOString( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IllegalArgumentException caught, Message: " )) + - ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr()); - } - } + // label + if( bHasLabelRange ) + { + Reference< chart2::data::XDataSequence > xLabelSequence = + SchXMLTools::CreateDataSequence( m_aSeriesLabelRange, mxNewDoc ); + xLabeledSeq->setLabel( xLabelSequence ); + } - // Note: Even if we have no label, we have to register the label - // for creation, because internal data always has labels. If - // they don't exist in the original, auto-generated labels are - // used for the internal data. - maPostponedSequences.insert( - tSchXMLLSequencesPerIndex::value_type( - tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_LABEL ), xLabeledSeq )); + // Note: Even if we have no label, we have to register the label + // for creation, because internal data always has labels. If + // they don't exist in the original, auto-generated labels are + // used for the internal data. + maPostponedSequences.insert( + tSchXMLLSequencesPerIndex::value_type( + tSchXMLIndexWithPart( m_rGlobalSeriesImportInfo.nCurrentDataIndex, SCH_XML_PART_LABEL ), xLabeledSeq )); - Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( &xLabeledSeq, 1 ); - Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW ); - xSink->setData( aSeq ); - } - } + Sequence< Reference< chart2::data::XLabeledDataSequence > > aSeq( &xLabeledSeq, 1 ); + Reference< chart2::data::XDataSink > xSink( m_xSeries, uno::UNO_QUERY_THROW ); + xSink->setData( aSeq ); } catch( uno::Exception & ex ) { @@ -662,15 +605,11 @@ void SchXMLSeries2Context::EndElement() } } - Reference< chart2::data::XDataProvider > xDataProvider; - if ( mxNewDoc.is() ) { - xDataProvider = mxNewDoc->getDataProvider(); - } for( std::vector< DomainInfo >::reverse_iterator aIt( aDomainInfos.rbegin() ); aIt!= aDomainInfos.rend(); ++aIt ) { DomainInfo aDomainInfo( *aIt ); Reference< chart2::data::XLabeledDataSequence > xLabeledSeq = - lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange, xDataProvider, m_xSeries ); + lcl_createAndAddSequenceToSeries( aDomainInfo.aRole, aDomainInfo.aRange, mxNewDoc, m_xSeries ); if( xLabeledSeq.is() ) { // register for setting local data if external data provider is not present diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index 6ba9a49e4502..d82970858ebe 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -161,6 +161,11 @@ struct lcl_ApplyCellToData : public ::std::unary_function< SchXMLCell, void > ++m_nIndex; } + sal_Int32 getCurrentIndex() const + { + return m_nIndex; + } + private: Sequence< double > & m_rData; sal_Int32 m_nIndex; @@ -865,7 +870,12 @@ void SchXMLTableHelper::applyTableToInternalDataProvider( lcl_ApplyCellToComplexLabel( rRow.front(), aComplexRowDescriptions[nRow] ); // values - ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( aDataInRows[nRow] )); + Sequence< double >& rTargetRow = aDataInRows[nRow]; + lcl_ApplyCellToData aApplyCellToData = ::std::for_each( rRow.begin() + nColOffset, rRow.end(), lcl_ApplyCellToData( rTargetRow ) ); + double fNaN = 0.0; + ::rtl::math::setNan( &fNaN ); + for( sal_Int32 nCurrentIndex = aApplyCellToData.getCurrentIndex(); nCurrentIndex<nNumColumns; nCurrentIndex++ ) + rTargetRow[nCurrentIndex] = fNaN;//#i110615# } } } diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index f5059f979b63..582e5aead326 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -133,20 +133,25 @@ sal_Int32 lcl_getBuildIDFromGenerator( const ::rtl::OUString& rGenerator ) return nBuildId; } +OUString lcl_ConvertRange( const ::rtl::OUString & rRange, const Reference< chart2::data::XDataProvider >& xDataProvider ) +{ + OUString aResult = rRange; + Reference< chart2::data::XRangeXMLConversion > xRangeConversion( xDataProvider, uno::UNO_QUERY ); + if( xRangeConversion.is()) + aResult = xRangeConversion->convertRangeFromXML( rRange ); + return aResult; +} + Reference< chart2::data::XDataSequence > lcl_createNewSequenceFromCachedXMLRange( const Reference< chart2::data::XDataSequence >& xSeq, const Reference< chart2::data::XDataProvider >& xDataProvider ) { Reference< chart2::data::XDataSequence > xRet; OUString aRange; - Reference< chart2::data::XRangeXMLConversion > xRangeConversion( xDataProvider, uno::UNO_QUERY ); - if( xRangeConversion.is() ) + if( xSeq.is() && SchXMLTools::getXMLRangePropertyFromDataSequence( xSeq, aRange, /* bClearProp = */ true ) ) { - if( xSeq.is() && SchXMLTools::getXMLRangePropertyFromDataSequence( xSeq, aRange, /* bClearProp = */ true ) ) - { - xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( - xRangeConversion->convertRangeFromXML( aRange )) ); - SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ), - Reference< beans::XPropertySet >( xRet, uno::UNO_QUERY )); - } + xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( + lcl_ConvertRange( aRange, xDataProvider )) ); + SchXMLTools::copyProperties( Reference< beans::XPropertySet >( xSeq, uno::UNO_QUERY ), + Reference< beans::XPropertySet >( xRet, uno::UNO_QUERY )); } return xRet; } @@ -385,6 +390,53 @@ Reference< chart2::data::XLabeledDataSequence > GetNewLabeledDataSequence() return xResult; } +Reference< chart2::data::XDataSequence > CreateDataSequence( + const OUString & rRange, + const Reference< chart2::XChartDocument >& xChartDoc ) +{ + Reference< chart2::data::XDataSequence > xRet; + + if( !xChartDoc.is() ) + { + DBG_ERROR( "need a chart document" ); + return xRet; + } + + Reference< chart2::data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() ); + if( !xDataProvider.is() ) + { + DBG_ERROR( "need a data provider" ); + return xRet; + } + + try + { + xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( rRange, xDataProvider ))); + SchXMLTools::setXMLRangePropertyAtDataSequence( xRet, rRange ); + } + catch( const lang::IllegalArgumentException & ) + { + DBG_ERROR( "could not create data sequence" ); + } + + if( !xRet.is() && !xChartDoc->hasInternalDataProvider() ) + { + //#i103911# switch to internal data in case the parent cannot provide the requested data + xChartDoc->createInternalDataProvider( sal_True /* bCloneExistingData */ ); + xDataProvider = xChartDoc->getDataProvider(); + try + { + xRet.set( xDataProvider->createDataSequenceByRangeRepresentation( lcl_ConvertRange( rRange, xDataProvider ))); + SchXMLTools::setXMLRangePropertyAtDataSequence( xRet, rRange ); + } + catch( const lang::IllegalArgumentException & ) + { + DBG_ERROR( "could not create data sequence" ); + } + } + return xRet; +} + void CreateCategories( const uno::Reference< chart2::data::XDataProvider > & xDataProvider, const uno::Reference< chart2::XChartDocument > & xNewDoc, @@ -705,6 +757,29 @@ void setBuildIDAtImportInfo( uno::Reference< frame::XModel > xModel, Reference< SvXMLMetaDocumentContext::setBuildId( aGenerator, xImportInfo ); } +bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const uno::Reference< frame::XModel >& xChartModel ) +{ + bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan3_0( xChartModel ); + if( !bResult ) + { + ::rtl::OUString aGenerator( lcl_getGeneratorFromModel(xChartModel) ); + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/3") ) ) != -1 ) + { + if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/300m") ) ) != -1 ) + { + sal_Int32 nBuilId = lcl_getBuildIDFromGenerator( lcl_getGeneratorFromModel(xChartModel) ); + if( nBuilId>0 && nBuilId<9491 ) //9491 is build id of dev300m76 + bResult= true; + } + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/310m") ) ) != -1 ) + bResult= true; + else if( aGenerator.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org_project/320m") ) ) != -1 ) + bResult= true; + } + } + return bResult; +} + bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const uno::Reference< frame::XModel >& xChartModel ) { bool bResult = isDocumentGeneratedWithOpenOfficeOlderThan2_3( xChartModel ); diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx index 35ac3ff72f1b..bcc39ae3d114 100644 --- a/xmloff/source/chart/SchXMLTools.hxx +++ b/xmloff/source/chart/SchXMLTools.hxx @@ -54,6 +54,7 @@ namespace SchXMLTools bool isDocumentGeneratedWithOpenOfficeOlderThan2_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan2_4( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); bool isDocumentGeneratedWithOpenOfficeOlderThan3_0( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); + bool isDocumentGeneratedWithOpenOfficeOlderThan3_3( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel); void setBuildIDAtImportInfo( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > xModel , ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xImportInfo ); @@ -87,6 +88,11 @@ namespace SchXMLTools ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > GetNewLabeledDataSequence(); + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > CreateDataSequence( + const ::rtl::OUString& rRange, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartDocument >& xChartDoc ); + void CreateCategories( const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataProvider > & xDataProvider, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > & xNewDoc, diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx index 6e3129f48d71..593e2d1f29e6 100644 --- a/xmloff/source/core/RDFaExportHelper.cxx +++ b/xmloff/source/core/RDFaExportHelper.cxx @@ -95,11 +95,6 @@ RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport) OSL_ENSURE(xRS.is(), "AddRDFa: model is no rdf::XRepositorySupplier"); if (!xRS.is()) throw uno::RuntimeException(); m_xRepository.set(xRS->getRDFRepository(), uno::UNO_QUERY_THROW); - - const uno::Reference<rdf::XURI> xLabel( - rdf::URI::createKnown(m_rExport.GetComponentContext(), - rdf::URIs::RDFS_LABEL)); - m_RDFsLabel = xLabel->getStringValue(); } ::rtl::OUString @@ -128,19 +123,21 @@ RDFaExportHelper::AddRDFa( { try { - uno::Sequence<rdf::Statement> stmts( - m_xRepository->getStatementRDFa(i_xMetadatable) ); + beans::Pair< uno::Sequence<rdf::Statement>, sal_Bool > const + RDFaResult( m_xRepository->getStatementRDFa(i_xMetadatable) ); + + uno::Sequence<rdf::Statement> const & rStatements( RDFaResult.First ); - if (0 == stmts.getLength()) + if (0 == rStatements.getLength()) { return; // no RDFa } // all stmts have the same subject, so we only handle first one - const uno::Reference<rdf::XURI> xSubjectURI(stmts[0].Subject, - uno::UNO_QUERY); - const uno::Reference<rdf::XBlankNode> xSubjectBNode(stmts[0].Subject, + const uno::Reference<rdf::XURI> xSubjectURI(rStatements[0].Subject, uno::UNO_QUERY); + const uno::Reference<rdf::XBlankNode> xSubjectBNode( + rStatements[0].Subject, uno::UNO_QUERY); if (!xSubjectURI.is() && !xSubjectBNode.is()) { throw uno::RuntimeException(); @@ -154,47 +151,31 @@ RDFaExportHelper::AddRDFa( .makeStringAndClear() ); - rdf::Statement* const iter - ( ::std::partition( ::comphelper::stl_begin(stmts), - ::comphelper::stl_end(stmts), - ::boost::bind(&::rtl::OUString::equals, m_RDFsLabel, - ::boost::bind(&rdf::XNode::getStringValue, - ::boost::bind(&rdf::Statement::Predicate, _1))) ) ); - - if (iter != ::comphelper::stl_end(stmts)) + const uno::Reference<rdf::XLiteral> xContent( + rStatements[0].Object, uno::UNO_QUERY_THROW ); + const uno::Reference<rdf::XURI> xDatatype(xContent->getDatatype()); + if (xDatatype.is()) { - // from iter to end, all stmts should have same object - const uno::Reference<rdf::XLiteral> xContent( - (*iter).Object, uno::UNO_QUERY_THROW ); - const uno::Reference<rdf::XURI> xDatatype(xContent->getDatatype()); - if (xDatatype.is()) - { - const ::rtl::OUString datatype( - makeCURIE(&m_rExport, xDatatype) ); - m_rExport.AddAttribute(XML_NAMESPACE_XHTML, - token::XML_DATATYPE, datatype); - } - if (iter != ::comphelper::stl_begin(stmts)) // there is rdfs:label - { - m_rExport.AddAttribute(XML_NAMESPACE_XHTML, token::XML_CONTENT, - xContent->getValue()); - } + const ::rtl::OUString datatype( + makeCURIE(&m_rExport, xDatatype) ); + m_rExport.AddAttribute(XML_NAMESPACE_XHTML, + token::XML_DATATYPE, datatype); } - else + if (RDFaResult.Second) // there is xhtml:content { - OSL_ENSURE(false,"invalid RDFa: every property is rdfs:label"); - return; + m_rExport.AddAttribute(XML_NAMESPACE_XHTML, token::XML_CONTENT, + xContent->getValue()); } ::rtl::OUStringBuffer property; ::comphelper::intersperse( ::boost::make_transform_iterator( - iter, // omit RDFsLabel predicates! + ::comphelper::stl_begin(rStatements), ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), // argh, this must be the same type :( ::boost::make_transform_iterator( - ::comphelper::stl_end(stmts), + ::comphelper::stl_end(rStatements), ::boost::bind(&makeCURIE, &m_rExport, ::boost::bind(&rdf::Statement::Predicate, _1))), ::comphelper::OUStringBufferAppender(property), diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx index 4dbf840fd343..611889497812 100644 --- a/xmloff/source/core/RDFaImportHelper.cxx +++ b/xmloff/source/core/RDFaImportHelper.cxx @@ -126,28 +126,39 @@ public: void InsertRDFaEntry(struct RDFaEntry const & i_rEntry); }; -/** store metadatable object and its RDFa attributes */ -struct SAL_DLLPRIVATE RDFaEntry +/** store parsed RDFa attributes */ +struct SAL_DLLPRIVATE ParsedRDFaAttributes { - uno::Reference<rdf::XMetadatable> m_xObject; ::rtl::OUString m_About; ::std::vector< ::rtl::OUString > m_Properties; ::rtl::OUString m_Content; ::rtl::OUString m_Datatype; - RDFaEntry(uno::Reference<rdf::XMetadatable> i_xObject, + ParsedRDFaAttributes( ::rtl::OUString const & i_rAbout, ::std::vector< ::rtl::OUString > const & i_rProperties, ::rtl::OUString const & i_rContent, ::rtl::OUString const & i_rDatatype) - : m_xObject(i_xObject) - , m_About(i_rAbout) + : m_About(i_rAbout) , m_Properties(i_rProperties) , m_Content(i_rContent) , m_Datatype(i_rDatatype) { } }; +/** store metadatable object and its RDFa attributes */ +struct SAL_DLLPRIVATE RDFaEntry +{ + uno::Reference<rdf::XMetadatable> m_xObject; + ::boost::shared_ptr<ParsedRDFaAttributes> m_pRDFaAttributes; + + RDFaEntry(uno::Reference<rdf::XMetadatable> const & i_xObject, + ::boost::shared_ptr<ParsedRDFaAttributes> const& i_pRDFaAttributes) + : m_xObject(i_xObject) + , m_pRDFaAttributes(i_pRDFaAttributes) + { } +}; + //////////////////////////////////////////////////////////////////////////// @@ -344,7 +355,7 @@ void RDFaInserter::InsertRDFaEntry( if (!i_rEntry.m_xObject.is()) return; const uno::Reference< rdf::XResource > xSubject( - MakeResource( i_rEntry.m_About ) ); + MakeResource( i_rEntry.m_pRDFaAttributes->m_About ) ); if (!xSubject.is()) { return; // invalid @@ -352,13 +363,15 @@ void RDFaInserter::InsertRDFaEntry( ::comphelper::SequenceAsVector< uno::Reference< rdf::XURI > > predicates; - predicates.reserve(i_rEntry.m_Properties.size()); + predicates.reserve(i_rEntry.m_pRDFaAttributes->m_Properties.size()); ::std::remove_copy_if( - ::boost::make_transform_iterator(i_rEntry.m_Properties.begin(), + ::boost::make_transform_iterator( + i_rEntry.m_pRDFaAttributes->m_Properties.begin(), ::boost::bind(&RDFaInserter::MakeURI, this, _1)), // argh, this must be the same type :( - ::boost::make_transform_iterator(i_rEntry.m_Properties.end(), + ::boost::make_transform_iterator( + i_rEntry.m_pRDFaAttributes->m_Properties.end(), ::boost::bind(&RDFaInserter::MakeURI, this, _1)), ::std::back_inserter(predicates), ref_is_null() ); @@ -375,9 +388,9 @@ void RDFaInserter::InsertRDFaEntry( } uno::Reference<rdf::XURI> xDatatype; - if (i_rEntry.m_Datatype.getLength()) + if (i_rEntry.m_pRDFaAttributes->m_Datatype.getLength()) { - xDatatype = MakeURI( i_rEntry.m_Datatype ); + xDatatype = MakeURI( i_rEntry.m_pRDFaAttributes->m_Datatype ); } try @@ -386,7 +399,8 @@ void RDFaInserter::InsertRDFaEntry( // this must be done _after_ importing the whole XML file, // to prevent collision between generated ids and ids in the file m_xRepository->setStatementRDFa(xSubject, predicates.getAsConstList(), - i_rEntry.m_xObject, i_rEntry.m_Content, xDatatype); + i_rEntry.m_xObject, + i_rEntry.m_pRDFaAttributes->m_Content, xDatatype); } catch (uno::Exception &) { @@ -405,9 +419,8 @@ RDFaImportHelper::~RDFaImportHelper() { } -void -RDFaImportHelper::AddRDFa( - uno::Reference<rdf::XMetadatable> i_xObject, +::boost::shared_ptr<ParsedRDFaAttributes> +RDFaImportHelper::ParseRDFa( ::rtl::OUString const & i_rAbout, ::rtl::OUString const & i_rProperty, ::rtl::OUString const & i_rContent, @@ -416,25 +429,58 @@ RDFaImportHelper::AddRDFa( if (!i_rProperty.getLength()) { OSL_TRACE("AddRDFa: invalid input: xhtml:property empty"); - return; - } - if (!i_xObject.is()) - { - OSL_ENSURE(false, "AddRDFa: invalid arg: null textcontent"); - return; + return ::boost::shared_ptr<ParsedRDFaAttributes>(); } // must parse CURIEs here: need namespace declaration context RDFaReader reader(GetImport()); const ::rtl::OUString about( reader.ReadURIOrSafeCURIE(i_rAbout) ); - if (!about.getLength()) return; + if (!about.getLength()) { + return ::boost::shared_ptr<ParsedRDFaAttributes>(); + } const ::std::vector< ::rtl::OUString > properties( reader.ReadCURIEs(i_rProperty) ); - if (!properties.size()) return; + if (!properties.size()) { + return ::boost::shared_ptr<ParsedRDFaAttributes>(); + } const ::rtl::OUString datatype( i_rDatatype.getLength() ? reader.ReadCURIE(i_rDatatype) : ::rtl::OUString() ); - m_RDFaEntries.push_back(RDFaEntry(i_xObject, - about, properties, i_rContent, datatype)); + return ::boost::shared_ptr<ParsedRDFaAttributes>( + new ParsedRDFaAttributes(about, properties, i_rContent, datatype)); +} + +void +RDFaImportHelper::AddRDFa( + uno::Reference<rdf::XMetadatable> const & i_xObject, + ::boost::shared_ptr<ParsedRDFaAttributes> & i_pRDFaAttributes) +{ + if (!i_xObject.is()) + { + OSL_ENSURE(false, "AddRDFa: invalid arg: null textcontent"); + return; + } + if (!i_pRDFaAttributes.get()) + { + OSL_ENSURE(false, "AddRDFa: invalid arg: null RDFa attributes"); + return; + } + m_RDFaEntries.push_back(RDFaEntry(i_xObject, i_pRDFaAttributes)); +} + +void +RDFaImportHelper::ParseAndAddRDFa( + uno::Reference<rdf::XMetadatable> const & i_xObject, + ::rtl::OUString const & i_rAbout, + ::rtl::OUString const & i_rProperty, + ::rtl::OUString const & i_rContent, + ::rtl::OUString const & i_rDatatype) +{ + ::boost::shared_ptr<ParsedRDFaAttributes> pAttributes( + ParseRDFa(i_rAbout, i_rProperty, i_rContent, i_rDatatype) ); + if (pAttributes.get()) + { + AddRDFa(i_xObject, pAttributes); + } } void RDFaImportHelper::InsertRDFa( diff --git a/xmloff/source/core/makefile.mk b/xmloff/source/core/makefile.mk index b881f9610fbc..4d663d3218d8 100644 --- a/xmloff/source/core/makefile.mk +++ b/xmloff/source/core/makefile.mk @@ -38,12 +38,6 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk .INCLUDE: $(PRJ)$/util$/makefile.pmk -# --- to build xmlkywd.obj in obj, too ----------------------------- - -OBJFILES = $(OBJ)$/xmlkywd.obj -LIB2TARGET =$(LB)$/xmlkywd.lib -LIB2OBJFILES =$(OBJFILES) - # --- Files -------------------------------------------------------- SLOFILES = \ @@ -59,7 +53,6 @@ SLOFILES = \ $(SLO)$/xmlexp.obj \ $(SLO)$/xmlictxt.obj \ $(SLO)$/xmlimp.obj \ - $(SLO)$/xmlkywd.obj \ $(SLO)$/xmltkmap.obj \ $(SLO)$/xmltoken.obj \ $(SLO)$/xmluconv.obj \ diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 4c52cc2ce4cb..c10ac0a23c03 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -2535,6 +2535,22 @@ SvtSaveOptions::ODFDefaultVersion SvXMLExport::getDefaultVersion() const } void +SvXMLExport::AddAttributeIdLegacy( + sal_uInt16 const nLegacyPrefix, ::rtl::OUString const& rValue) +{ + switch (getDefaultVersion()) { + case SvtSaveOptions::ODFVER_011: // fall thru + case SvtSaveOptions::ODFVER_010: break; + default: // ODF 1.2: xml:id + AddAttribute(XML_NAMESPACE_XML, XML_ID, rValue); + } + // in ODF 1.1 this was form:id, anim:id, draw:id, or text:id + // backward compatibility: in ODF 1.2 write _both_ id attrs + AddAttribute(nLegacyPrefix, XML_ID, rValue); + // FIXME: this function simply assumes that rValue is unique +} + +void SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) { // check version >= 1.2 diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 6a7dcf496722..597a1d50b0f9 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -38,7 +38,6 @@ #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/XMLFontStylesContext.hxx> #include <xmloff/xmlictxt.hxx> @@ -110,6 +109,7 @@ sal_Char __READONLY_DATA sXML_np__number[] = "_number"; sal_Char __READONLY_DATA sXML_np__svg[] = "_svg"; sal_Char __READONLY_DATA sXML_np__chart[] = "_chart"; sal_Char __READONLY_DATA sXML_np__math[] = "_math"; +sal_Char __READONLY_DATA sXML_np__form[] = "_form"; sal_Char __READONLY_DATA sXML_np__script[] = "_script"; sal_Char __READONLY_DATA sXML_np__config[] = "_config"; sal_Char __READONLY_DATA sXML_np__db[] = "_db"; @@ -293,7 +293,7 @@ void SvXMLImport::_InitCtor() mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__math) ), GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH ); - mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_namespace_form) ), + mpNamespaceMap->Add(OUString(RTL_CONSTASCII_USTRINGPARAM( sXML_np__form )), GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM ); mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__script) ), @@ -675,7 +675,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, } } else if( ( rAttrName.getLength() >= 5 ) && - ( rAttrName.compareToAscii( sXML_xmlns, 5 ) == 0 ) && + ( rAttrName.compareTo( GetXMLToken(XML_XMLNS), 5 ) == 0 ) && ( rAttrName.getLength() == 5 || ':' == rAttrName[5] ) ) { if( !pRewindMap ) @@ -1985,6 +1985,16 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc, } } +SAL_DLLPRIVATE ::xmloff::RDFaImportHelper & +SvXMLImport::GetRDFaImportHelper() +{ + if (!mpImpl->mpRDFaHelper.get()) + { + mpImpl->mpRDFaHelper.reset( new ::xmloff::RDFaImportHelper(*this) ); + } + return *mpImpl->mpRDFaHelper; +} + void SvXMLImport::AddRDFa(uno::Reference<rdf::XMetadatable> i_xObject, ::rtl::OUString const & i_rAbout, @@ -1994,11 +2004,8 @@ SvXMLImport::AddRDFa(uno::Reference<rdf::XMetadatable> i_xObject, { // N.B.: we only get called if i_xObject had xhtml:about attribute // (an empty attribute value is valid) - if (!mpImpl->mpRDFaHelper.get()) - { - mpImpl->mpRDFaHelper.reset( new ::xmloff::RDFaImportHelper(*this) ); - } - mpImpl->mpRDFaHelper->AddRDFa(i_xObject, + ::xmloff::RDFaImportHelper & rRDFaHelper( GetRDFaImportHelper() ); + rRDFaHelper.ParseAndAddRDFa(i_xObject, i_rAbout, i_rProperty, i_rContent, i_rDatatype); } diff --git a/xmloff/source/core/xmlkywd.cxx b/xmloff/source/core/xmlkywd.cxx deleted file mode 100644 index 87ce105d456e..000000000000 --- a/xmloff/source/core/xmlkywd.cxx +++ /dev/null @@ -1,38 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_xmloff.hxx" - -#ifndef _XMLOFF_XMLKYWD_HXX -#define XML_DEFINE_KEYWORDS -#include "xmlkywd.hxx" -#undef XML_DEFINE_KEYWORDS -#endif - - - diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx index d1662d0dd831..6ede01dae3ec 100644 --- a/xmloff/source/core/xmltoken.cxx +++ b/xmloff/source/core/xmltoken.cxx @@ -3097,6 +3097,10 @@ namespace xmloff { namespace token { TOKEN( "ends-with", XML_ENDS_WITH ), TOKEN( "does-not-end-with", XML_DOES_NOT_END_WITH ), + TOKEN( "chartooo", XML_NP_CHART_EXT ), + TOKEN( "http://openoffice.org/2010/chart", XML_N_CHART_EXT ), + TOKEN( "coordinate-region", XML_COORDINATE_REGION ), + #if OSL_DEBUG_LEVEL > 0 { 0, NULL, NULL, XML_TOKEN_END } #else diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index c6d63511cbd6..4eb607e0403b 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -33,7 +33,6 @@ #include <xmloff/xmlimp.hxx> #include <xmloff/xmltoken.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/XMLBase64ImportContext.hxx> #include "XMLReplacementImageContext.hxx" diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 7ebcef8ffde4..eaf83444114c 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -28,24 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateColor_HPP_ #include <com/sun/star/animations/XAnimateColor.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateSet_HPP_ #include <com/sun/star/animations/XAnimateSet.hpp> -#endif #include <com/sun/star/animations/XCommand.hpp> #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateMotion_HPP_ #include <com/sun/star/animations/XAnimateMotion.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateTransform_HPP_ #include <com/sun/star/animations/XAnimateTransform.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XTransitionFilter_HPP_ #include <com/sun/star/animations/XTransitionFilter.hpp> -#endif #include <com/sun/star/animations/XIterateContainer.hpp> #include <com/sun/star/animations/XAudio.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> @@ -64,19 +54,12 @@ #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/presentation/EffectNodeType.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_EffectPresetClass_HPP_ #include <com/sun/star/presentation/EffectPresetClass.hpp> -#endif -#ifndef _COM_SUN_STAR_PRESENTATION_ParagraphTarget_HPP_ #include <com/sun/star/presentation/ParagraphTarget.hpp> -#endif #include <com/sun/star/presentation/TextAnimationType.hpp> #include <com/sun/star/presentation/ShapeAnimationSubType.hpp> #include <com/sun/star/presentation/EffectCommands.hpp> - -#ifndef _COM_SUN_STAR_DRAWING_XShape_HPP_ #include <com/sun/star/drawing/XShape.hpp> -#endif #include <tools/debug.hxx> #include <tools/time.hxx> @@ -780,7 +763,10 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod const OUString& rExportIdentifier = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xNode ); if( rExportIdentifier.getLength() ) - mrExport.AddAttribute( XML_NAMESPACE_ANIMATION, XML_ID, rExportIdentifier ); + { + mrExport.AddAttributeIdLegacy( + XML_NAMESPACE_ANIMATION, rExportIdentifier); + } Any aTemp( xNode->getBegin() ); if( aTemp.hasValue() ) diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 4fc6bc93302b..17bba5170c79 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -47,18 +47,14 @@ #include <com/sun/star/animations/XAudio.hpp> #include <com/sun/star/animations/ValuePair.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_EffectPresetClass_HPP_ #include <com/sun/star/presentation/EffectPresetClass.hpp> -#endif #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/XTextRangeCompare.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_ParagraphTarget_HPP_ #include <com/sun/star/presentation/ParagraphTarget.hpp> -#endif #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/animations/EventTrigger.hpp> @@ -237,7 +233,8 @@ enum AnimationNodeAttributes ANA_IterateType, ANA_IterateInterval, ANA_Formula, - ANA_ID, + ANA_ANIMID, + ANA_XMLID, ANA_Group_Id, ANA_Command, ANA_Volume @@ -294,8 +291,8 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM { XML_NAMESPACE_ANIMATION, XML_ITERATE_TYPE, (sal_uInt16)ANA_IterateType }, { XML_NAMESPACE_ANIMATION, XML_ITERATE_INTERVAL, (sal_uInt16)ANA_IterateInterval }, { XML_NAMESPACE_ANIMATION, XML_FORMULA, (sal_uInt16)ANA_Formula }, - { XML_NAMESPACE_ANIMATION, XML_ID, (sal_uInt16)ANA_ID }, - { XML_NAMESPACE_XML, XML_ID, (sal_uInt16)ANA_ID }, + { XML_NAMESPACE_ANIMATION, XML_ID, (sal_uInt16)ANA_ANIMID }, + { XML_NAMESPACE_XML, XML_ID, (sal_uInt16)ANA_XMLID }, { XML_NAMESPACE_PRESENTATION, XML_GROUP_ID, (sal_uInt16)ANA_Group_Id }, { XML_NAMESPACE_ANIMATION, XML_AUDIO_LEVEL, (sal_uInt16)ANA_Volume }, { XML_NAMESPACE_ANIMATION, XML_COMMAND, (sal_uInt16)ANA_Command }, @@ -808,6 +805,8 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : std::list< NamedValue > aUserData; XMLTokenEnum meAttributeName = XML_TOKEN_INVALID; OUString aFrom, aBy, aTo, aValues; + bool bHaveXmlId( false ); + OUString sXmlId; const sal_Int16 nCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_uInt16 nEnum; @@ -1054,13 +1053,15 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } break; - case ANA_ID: + case ANA_ANIMID: { - if( rValue.getLength() ) - { - Reference< XInterface > xRef( mxNode, UNO_QUERY ); - GetImport().getInterfaceToIdentifierMapper().registerReference( rValue, xRef ); - } + if (!bHaveXmlId) { sXmlId = rValue; } + } + break; + case ANA_XMLID: + { + sXmlId = rValue; + bHaveXmlId = true; } break; @@ -1251,6 +1252,13 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } } + if (sXmlId.getLength()) + { + Reference< XInterface > const xRef( mxNode, UNO_QUERY ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + sXmlId, xRef ); + } + sal_Int32 nUserDataCount = aUserData.size(); if( nUserDataCount ) { diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index eae1925e4105..9dac5b4cd469 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -323,8 +323,9 @@ const XMLPropertyMapEntry aXMLSDPresPageProps[] = DPMAP( "FillStyle", XML_NAMESPACE_DRAW, XML_FILL, XML_SD_TYPE_FILLSTYLE, 0 ), DPMAP( "FillColor", XML_NAMESPACE_DRAW, XML_FILL_COLOR, XML_TYPE_COLOR, 0 ), DPMAP( "FillGradientName", XML_NAMESPACE_DRAW, XML_FILL_GRADIENT_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLGRADIENTNAME ), - DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER16, 0 ), + DPMAP( "FillGradientStepCount", XML_NAMESPACE_DRAW, XML_GRADIENT_STEP_COUNT, XML_TYPE_NUMBER, 0 ), DPMAP( "FillHatchName", XML_NAMESPACE_DRAW, XML_FILL_HATCH_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLHATCHNAME ), + GMAP( "FillBackground", XML_NAMESPACE_DRAW, XML_FILL_HATCH_SOLID, XML_TYPE_BOOL, 0 ), DPMAP( "FillBitmapName", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLBITMAPNAME ), DPMAP( "FillTransparenceGradientName", XML_NAMESPACE_DRAW, XML_OPACITY_NAME, XML_TYPE_STYLENAME|MID_FLAG_NO_PROPERTY_IMPORT, CTF_FILLTRANSNAME ), DPMAP( "FillBitmapSizeX", XML_NAMESPACE_DRAW, XML_FILL_IMAGE_WIDTH, XML_SD_TYPE_FILLBITMAPSIZE|MID_FLAG_MULTI_PROPERTY, 0 ), diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index bc6f72abd2b0..249ce18331d9 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2011,7 +2011,9 @@ void SdXMLExport::_ExportContent() // write draw:id const OUString aPageId = getInterfaceToIdentifierMapper().getIdentifier( xDrawPage ); if( aPageId.getLength() != 0 ) - AddAttribute ( XML_NAMESPACE_DRAW, XML_ID, aPageId ); + { + AddAttributeIdLegacy(XML_NAMESPACE_DRAW, aPageId); + } // write page SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, XML_PAGE, sal_True, sal_True); diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 8ec97697b138..76942cf817db 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -665,8 +665,8 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap() { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME }, { XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME }, { XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME }, - { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_ID }, - { XML_NAMESPACE_XML, XML_ID, XML_TOK_DRAWPAGE_ID }, + { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_DRAWID }, + { XML_NAMESPACE_XML, XML_ID, XML_TOK_DRAWPAGE_XMLID }, { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_DRAWPAGE_HREF }, { XML_NAMESPACE_PRESENTATION, XML_USE_HEADER_NAME, XML_TOK_DRAWPAGE_USE_HEADER_NAME }, { XML_NAMESPACE_PRESENTATION, XML_USE_FOOTER_NAME, XML_TOK_DRAWPAGE_USE_FOOTER_NAME }, diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 1c0b883c9b59..d1cd0df80563 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -130,7 +130,8 @@ enum SdXMLDrawPageAttrTokenMap XML_TOK_DRAWPAGE_STYLE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME, - XML_TOK_DRAWPAGE_ID, + XML_TOK_DRAWPAGE_DRAWID, + XML_TOK_DRAWPAGE_XMLID, XML_TOK_DRAWPAGE_HREF, XML_TOK_DRAWPAGE_USE_HEADER_NAME, XML_TOK_DRAWPAGE_USE_FOOTER_NAME, diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 709677c6ae07..20c7879416cf 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -27,7 +27,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + +#include <memory> + #include "unointerfacetouniqueidentifiermapper.hxx" +#include <com/sun/star/presentation/ClickAction.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> #include <com/sun/star/container/XChild.hpp> #include <com/sun/star/text/XText.hpp> @@ -43,9 +47,7 @@ #include <xmloff/xmluconv.hxx> #include "PropertySetMerger.hxx" -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include "sdxmlexp_impl.hxx" #include <xmloff/families.hxx> @@ -75,6 +77,8 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper ) : mrExport( rExp ), mnNextUniqueShapeId(1), + maShapesInfos(), + maCurrentShapesIter(maShapesInfos.end()), mbExportLayer( sal_False ), // #88546# init to FALSE mbHandleProgressBar( sal_False ), @@ -467,6 +471,7 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap mrExport.getInterfaceToIdentifierMapper().registerReference( xConnection ); break; } + case XmlShapeTypePresTableShape: case XmlShapeTypeDrawTableShape: { try @@ -538,6 +543,38 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } sal_Int32 nZIndex = 0; uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY ); + + + ::std::auto_ptr< SvXMLElementExport > mpHyperlinkElement; + + // export hyperlinks with <a><shape/></a>. Currently only in draw since draw + // does not support document events + if( xSet.is() && (GetExport().GetModelType() == SvtModuleOptions::E_DRAW) ) try + { + presentation::ClickAction eAction = presentation::ClickAction_NONE; + xSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("OnClick"))) >>= eAction; + + if( (eAction == presentation::ClickAction_DOCUMENT) || + (eAction == presentation::ClickAction_BOOKMARK) ) + { + OUString sURL; + xSet->getPropertyValue(msBookmark) >>= sURL; + + if( sURL.getLength() ) + { + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL ); + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); + mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED ); + mpHyperlinkElement.reset( new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_A, sal_True, sal_True) ); + } + } + } + catch( uno::Exception& ) + { + DBG_ERROR("XMLShapeExport::exportShape(): exception during hyperlink export"); + } + + if( xSet.is() ) xSet->getPropertyValue(msZIndex) >>= nZIndex; @@ -639,7 +676,9 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape uno::Reference< uno::XInterface > xRef( xShape, uno::UNO_QUERY ); const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRef ); if( rShapeId.getLength() ) - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_ID, rShapeId ); + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_DRAW, rShapeId); + } } // -------------------------- @@ -759,6 +798,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape break; } + case XmlShapeTypePresTableShape: case XmlShapeTypeDrawTableShape: { ImpExportTableShape( xShape, aShapeInfo.meShapeType, nFeatures, pRefPoint ); @@ -828,6 +868,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape break; } + case XmlShapeTypePresMediaShape: case XmlShapeTypeDrawMediaShape: { ImpExportMediaShape( xShape, aShapeInfo.meShapeType, nFeatures, pRefPoint ); @@ -845,6 +886,8 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape } } + mpHyperlinkElement.reset(); + // #97489# #97111# // if there was an error and no element for the shape was exported // we need to clear the attribute list or the attributes will be @@ -1085,7 +1128,7 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x // get info about presentation shape uno::Reference <beans::XPropertySet> xPropSet(xShape, uno::UNO_QUERY); - if(xPropSet.is()) + if(xPropSet.is()) try { rtl::OUString sCLSID; if(xPropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("CLSID"))) >>= sCLSID) @@ -1097,16 +1140,22 @@ void XMLShapeExport::ImpCalcShapeType(const uno::Reference< drawing::XShape >& x } } } + catch( uno::Exception& ) + { + DBG_ERROR( "XMLShapeExport::ImpCalcShapeType(), expected ole shape to have the CLSID property?" ); + } } else if(aType.EqualsAscii("Chart", 26, 5)) { eShapeType = XmlShapeTypePresChartShape; } else if(aType.EqualsAscii("OrgChart", 26, 8)) { eShapeType = XmlShapeTypePresOrgChartShape; } - else if(aType.EqualsAscii("TableShape", 26, 10)) { eShapeType = XmlShapeTypePresSheetShape; } + else if(aType.EqualsAscii("CalcShape", 26, 9)) { eShapeType = XmlShapeTypePresSheetShape; } + else if(aType.EqualsAscii("TableShape", 26, 10)) { eShapeType = XmlShapeTypePresTableShape; } else if(aType.EqualsAscii("Notes", 26, 5)) { eShapeType = XmlShapeTypePresNotesShape; } else if(aType.EqualsAscii("HandoutShape", 26, 12)) { eShapeType = XmlShapeTypeHandoutShape; } else if(aType.EqualsAscii("HeaderShape", 26, 11)) { eShapeType = XmlShapeTypePresHeaderShape; } else if(aType.EqualsAscii("FooterShape", 26, 11)) { eShapeType = XmlShapeTypePresFooterShape; } else if(aType.EqualsAscii("SlideNumberShape", 26, 16)) { eShapeType = XmlShapeTypePresSlideNumberShape; } else if(aType.EqualsAscii("DateTimeShape", 26, 13)) { eShapeType = XmlShapeTypePresDateTimeShape; } + else if(aType.EqualsAscii("MediaShape", 26, 10)) { eShapeType = XmlShapeTypePresMediaShape; } } } } diff --git a/xmloff/source/draw/shapeexport2.cxx b/xmloff/source/draw/shapeexport2.cxx index fb1d15f57350..d13b5e24e2db 100644 --- a/xmloff/source/draw/shapeexport2.cxx +++ b/xmloff/source/draw/shapeexport2.cxx @@ -31,7 +31,6 @@ #include <com/sun/star/text/XText.hpp> #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/drawing/CircleKind.hpp> #include <com/sun/star/drawing/ConnectorType.hpp> #include <com/sun/star/drawing/XControlShape.hpp> @@ -1247,27 +1246,6 @@ void XMLShapeExport::ImpExportChartShape( SvXMLAttributeList* pAttrList ) { ImpExportOLE2Shape( xShape, eShapeType, nFeatures, pRefPoint, pAttrList ); -/* - // Transformation - ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); - - uno::Reference< chart::XChartDocument > xChartDoc; - if( !bIsEmptyPresObj ) - xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Model") ) ) >>= xChartDoc; - - if( xChartDoc.is() ) - { - // export chart data if the flag is not set (default) - sal_Bool bExportOwnData = ( nFeatures & SEF_EXPORT_NO_CHART_DATA ) == 0; - mrExport.GetChartExport()->exportChart( xChartDoc, bExportOwnData ); - } - else - { - // write chart object (fake for now, replace later) - SvXMLElementExport aOBJ(mrExport, XML_NAMESPACE_CHART, XML_CHART, sal_True, sal_True); - } - } -*/ } ////////////////////////////////////////////////////////////////////////////// @@ -1996,7 +1974,7 @@ void XMLShapeExport::ImpExportPluginShape( void XMLShapeExport::ImpExportMediaShape( const uno::Reference< drawing::XShape >& xShape, - XmlShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) + XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint) { const uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); if(xPropSet.is()) @@ -2004,6 +1982,9 @@ void XMLShapeExport::ImpExportMediaShape( // Transformation ImpExportNewTrans(xPropSet, nFeatures, pRefPoint); + if(eShapeType == XmlShapeTypePresMediaShape) + ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_OBJECT) ); + sal_Bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); // #86116#/#92210# SvXMLElementExport aElem( mrExport, XML_NAMESPACE_DRAW, XML_FRAME, bCreateNewline, sal_True ); diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx index 710d343ba42c..3f52fcd50084 100644 --- a/xmloff/source/draw/shapeexport4.cxx +++ b/xmloff/source/draw/shapeexport4.cxx @@ -1095,7 +1095,7 @@ void XMLShapeExport::ImpExportCustomShape( } } -void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType /*eShapeType*/, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint ) +void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint ) { uno::Reference< beans::XPropertySet > xPropSet(xShape, uno::UNO_QUERY); uno::Reference< container::XNamed > xNamed(xShape, uno::UNO_QUERY); @@ -1109,8 +1109,8 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape sal_Bool bIsEmptyPresObj = sal_False; // presentation settings -// if(eShapeType == XmlShapeTypePresTableShape) -// bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) ); + if(eShapeType == XmlShapeTypePresTableShape) + bIsEmptyPresObj = ImpExportPresentationAttributes( xPropSet, GetXMLToken(XML_PRESENTATION_TABLE) ); const bool bCreateNewline( (nFeatures & SEF_EXPORT_NO_WS) == 0 ); const bool bExportEmbedded(0 != (mrExport.getExportFlags() & EXPORT_EMBEDDED)); diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 9b5290254b46..af5fef0ff9dc 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -62,6 +62,9 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, : SdXMLGenericPageContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ) , mbHadSMILNodes( false ) { + bool bHaveXmlId( false ); + OUString sXmlId; + sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) @@ -109,13 +112,17 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, maUseDateTimeDeclName = sValue; break; } - - case XML_TOK_DRAWPAGE_ID: + case XML_TOK_DRAWPAGE_DRAWID: { - uno::Reference< uno::XInterface > xRef( rShapes.get() ); - GetImport().getInterfaceToIdentifierMapper().registerReference( sValue, xRef ); - break; + if (!bHaveXmlId) { sXmlId = sValue; } } + break; + case XML_TOK_DRAWPAGE_XMLID: + { + sXmlId = sValue; + bHaveXmlId = true; + } + break; case XML_TOK_DRAWPAGE_HREF: { maHREF = sValue; @@ -124,6 +131,12 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, } } + if (sXmlId.getLength()) + { + uno::Reference< uno::XInterface > const xRef( rShapes.get() ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + sXmlId, xRef ); + } GetImport().GetShapeImport()->startPage( rShapes ); uno::Reference< drawing::XDrawPage > xShapeDrawPage(rShapes, uno::UNO_QUERY); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index f4e7c1466ecd..f1bf683b57e9 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -372,31 +372,46 @@ void SdXMLShapeContext::EndElement() if( msHyperlink.getLength() != 0 ) try { - Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY_THROW ); - Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW ); + const OUString sBookmark( RTL_CONSTASCII_USTRINGPARAM( "Bookmark" ) ); - uno::Sequence< beans::PropertyValue > aProperties( 3 ); - aProperties[0].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); - aProperties[0].Handle = -1; - aProperties[0].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM("Presentation") ); - aProperties[0].State = beans::PropertyState_DIRECT_VALUE; + Reference< XEventsSupplier > xEventsSupplier( mxShape, UNO_QUERY ); + if( xEventsSupplier.is() ) + { + const OUString sEventType( RTL_CONSTASCII_USTRINGPARAM( "EventType" ) ); + const OUString sClickAction( RTL_CONSTASCII_USTRINGPARAM( "ClickAction" ) ); + + Reference< XNameReplace > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW ); + + uno::Sequence< beans::PropertyValue > aProperties( 3 ); + aProperties[0].Name = sEventType; + aProperties[0].Handle = -1; + aProperties[0].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM("Presentation") ); + aProperties[0].State = beans::PropertyState_DIRECT_VALUE; - aProperties[1].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "ClickAction" ) ); - aProperties[1].Handle = -1; - aProperties[1].Value <<= ::com::sun::star::presentation::ClickAction_DOCUMENT; - aProperties[1].State = beans::PropertyState_DIRECT_VALUE; + aProperties[1].Name = sClickAction; + aProperties[1].Handle = -1; + aProperties[1].Value <<= ::com::sun::star::presentation::ClickAction_DOCUMENT; + aProperties[1].State = beans::PropertyState_DIRECT_VALUE; - aProperties[2].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "Bookmark" ) ); - aProperties[2].Handle = -1; - aProperties[2].Value <<= msHyperlink; - aProperties[2].State = beans::PropertyState_DIRECT_VALUE; + aProperties[2].Name = sBookmark; + aProperties[2].Handle = -1; + aProperties[2].Value <<= msHyperlink; + aProperties[2].State = beans::PropertyState_DIRECT_VALUE; - const OUString sAPIEventName( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); - xEvents->replaceByName( sAPIEventName, Any( aProperties ) ); + const OUString sAPIEventName( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); + xEvents->replaceByName( sAPIEventName, Any( aProperties ) ); + } + else + { + // in draw use the Bookmark property + Reference< beans::XPropertySet > xSet( mxShape, UNO_QUERY_THROW ); + xSet->setPropertyValue( sBookmark, Any( msHyperlink ) ); + xSet->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ), Any( ::com::sun::star::presentation::ClickAction_DOCUMENT ) ); + } } catch( Exception& ) { - DBG_ERROR("xmloff::SdXMLShapeContext::EndElement(), exception caught!"); + DBG_ERROR("xmloff::SdXMLShapeContext::EndElement(), exception caught while setting hyperlink!"); } if( mxLockable.is() ) @@ -761,6 +776,7 @@ void SdXMLShapeContext::SetThumbnail() // this is called from the parent group for each unparsed attribute in the attribute list void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) { + bool bHaveXmlId( false ); if( XML_NAMESPACE_DRAW == nPrefix ) { if( IsXMLToken( rLocalName, XML_ZINDEX ) ) @@ -769,7 +785,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr } else if( IsXMLToken( rLocalName, XML_ID ) ) { - maShapeId = rValue; + if (!bHaveXmlId) { maShapeId = rValue; }; } else if( IsXMLToken( rLocalName, XML_NAME ) ) { @@ -862,6 +878,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr if( IsXMLToken( rLocalName, XML_ID ) ) { maShapeId = rValue; + bHaveXmlId = true; } } } @@ -2548,7 +2565,7 @@ void SdXMLObjectShapeContext::StartElement( const ::com::sun::star::uno::Referen } else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) ) { - pService = "com.sun.star.presentation.TableShape"; + pService = "com.sun.star.presentation.CalcShape"; } else if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) ) { @@ -2905,8 +2922,21 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen const char* pService; + sal_Bool bIsPresShape = sal_False; + if( mbMedia ) + { pService = "com.sun.star.drawing.MediaShape"; + + bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported(); + if( bIsPresShape ) + { + if( IsXMLToken( maPresentationClass, XML_PRESENTATION_OBJECT ) ) + { + pService = "com.sun.star.presentation.MediaShape"; + } + } + } else pService = "com.sun.star.drawing.PluginShape"; @@ -2916,6 +2946,23 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen { SetLayer(); + if(bIsPresShape) + { + uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY ); + if(xProps.is()) + { + uno::Reference< beans::XPropertySetInfo > xPropsInfo( xProps->getPropertySetInfo() ); + if( xPropsInfo.is() ) + { + if( !mbIsPlaceholder && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ))) + xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsEmptyPresentationObject") ), ::cppu::bool2any( sal_False ) ); + + if( mbIsUserTransformed && xPropsInfo->hasPropertyByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent") ))) + xProps->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("IsPlaceholderDependent") ), ::cppu::bool2any( sal_False ) ); + } + } + } + // set pos, size, shear and rotate SetTransformation(); GetImport().GetShapeImport()->finishShape( mxShape, mxAttrList, mxShapes ); @@ -3539,8 +3586,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc { const char* pService = "com.sun.star.drawing.TableShape"; - sal_Bool bIsPresShape = sal_False; //maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported(); -/* + sal_Bool bIsPresShape = maPresentationClass.getLength() && GetImport().GetShapeImport()->IsPresentationShapesSupported(); if( bIsPresShape ) { if( IsXMLToken( maPresentationClass, XML_PRESENTATION_TABLE ) ) @@ -3548,7 +3594,7 @@ void SdXMLTableShapeContext::StartElement( const ::com::sun::star::uno::Referenc pService = "com.sun.star.presentation.TableShape"; } } -*/ + AddShape( pService ); if( mxShape.is() ) @@ -3668,7 +3714,7 @@ void SdXMLTableShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl:: SvXMLImportContext* SdXMLTableShapeContext::CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - if( mxTableImportContext.Is() ) + if( mxTableImportContext.Is() && (nPrefix == XML_NAMESPACE_TABLE) ) return mxTableImportContext->CreateChildContext(nPrefix, rLocalName, xAttrList); else return SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 9baf402e5ea7..115b06c4c2ad 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -313,10 +313,8 @@ namespace xmloff if (CCA_CONTROL_ID & m_nIncludeCommon) { OSL_ENSURE(m_sControlId.getLength(), "OControlExport::exportInnerAttributes: have no control id for the control!"); - AddAttribute( - OAttributeMetaData::getCommonControlAttributeNamespace(CCA_CONTROL_ID), - OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID), - m_sControlId); + m_rContext.getGlobalContext().AddAttributeIdLegacy( + XML_NAMESPACE_FORM, m_sControlId); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_CONTROL_ID; @@ -693,7 +691,7 @@ namespace xmloff if (m_nIncludeCommon & CCA_TARGET_LOCATION) { - exportTargetLocationAttribute(); + exportTargetLocationAttribute(false); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_TARGET_LOCATION; @@ -2035,6 +2033,9 @@ namespace xmloff OAttributeMetaData::getFormAttributeNamespace(eStringPropertyIds[i]), OAttributeMetaData::getFormAttributeName(eStringPropertyIds[i]), aStringPropertyNames[i]); + + // #i112082# xlink:type is added as part of exportTargetLocationAttribute + // now export the data source name or databaselocation or connection resource ::rtl::OUString sPropValue; m_xProps->getPropertyValue( PROPERTY_DATASOURCENAME ) >>= sPropValue; @@ -2134,7 +2135,7 @@ namespace xmloff // the target frame exportTargetFrameAttribute(); // the target URL - exportTargetLocationAttribute(); + exportTargetLocationAttribute(true); // #i110911# add type attribute (for form, but not for control) // master fields exportStringSequenceAttribute( diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index a39576bd2184..b946c4a20941 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -586,12 +586,21 @@ namespace xmloff //--------------------------------------------------------------------- void OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { - static const sal_Char* pControlIdAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID); static const sal_Char* pLinkedCellAttributeName = OAttributeMetaData::getBindingAttributeName(BA_LINKED_CELL); - if ( !m_sControlId.getLength() && _rLocalName.equalsAscii( pControlIdAttributeName ) ) + if (IsXMLToken(_rLocalName, XML_ID)) { // it's the control id - m_sControlId = _rValue; + if (XML_NAMESPACE_XML == _nNamespaceKey) + { + m_sControlId = _rValue; + } + else if (XML_NAMESPACE_FORM == _nNamespaceKey) + { + if (!m_sControlId.getLength()) + { + m_sControlId = _rValue; + } + } } else if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) { // it's the address of a spreadsheet cell diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index fbe388a6a81a..0e2ef69ab9f8 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -53,7 +53,7 @@ namespace xmloff case CCA_NAME: return "name"; case CCA_SERVICE_NAME: return "control-implementation"; case CCA_BUTTON_TYPE: return "button-type"; - case CCA_CONTROL_ID: return "id"; +// disabled(AddAttributeIdLegacy) case CCA_CONTROL_ID: return "id"; case CCA_CURRENT_SELECTED: return "current-selected"; case CCA_CURRENT_VALUE: return "current-value"; case CCA_DISABLED: return "disabled"; diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 1586c9a7a439..2a485566cf9d 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -420,7 +420,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty) + void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType) { DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString ); @@ -433,6 +433,10 @@ namespace xmloff ,OAttributeMetaData::getCommonControlAttributeName(_nProperty) , sTargetLocation); + // #i110911# add xlink:type="simple" if required + if (_bAddType) + AddAttribute(XML_NAMESPACE_XLINK, token::XML_TYPE, token::XML_SIMPLE); + exportedProperty(_sPropertyName); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 5e1f683e339d..ab17912e4df4 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -69,7 +69,7 @@ namespace xmloff StringSet m_aRemainingProps; // see examinePersistence - void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty); + void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); protected: IFormsExportContext& m_rContext; @@ -230,8 +230,10 @@ namespace xmloff <p>The value of this attribute is extracted from the TargetURL property of the object given.</p> <p>The property needs a special handling because the URL's need to be made relative</p> + + <p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p> */ - inline void exportTargetLocationAttribute() { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION); } + inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); } /** add the form:image attribute to the export context. @@ -239,7 +241,7 @@ namespace xmloff <p>The property needs a special handling because the URL's need to be made relative</p> */ - inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA); } + inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); } /** flag the style properties as 'already exported' diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 597798f01ce7..45fa2f5b4744 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -363,7 +363,7 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl implPushBackPropertyValue( aNewValue ); } #if OSL_DEBUG_LEVEL > 0 - else + else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form> { ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 3515dcf96010..1c44db963944 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -116,7 +116,7 @@ namespace xmloff void OValuePropertiesMetaData::getValueLimitPropertyNames(sal_Int16 _nFormComponentType, sal_Char const * & _rpMinValuePropertyName, sal_Char const * & _rpMaxValuePropertyName) { - _rpMinValuePropertyName = _rpMinValuePropertyName = NULL; + _rpMinValuePropertyName = _rpMaxValuePropertyName = NULL; switch (_nFormComponentType) { case FormComponentType::DATEFIELD: diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index 8aa0a4054821..aab4686339ba 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -475,7 +475,9 @@ SvXMLMetaExport::startElement(const ::rtl::OUString & i_rName, } // finally, start the element - mrExport.StartElement(i_rName, sal_True); //FIXME:whitespace? + // #i107240# no whitespace here, because the DOM may already contain + // whitespace, which is not cleared when loading and thus accumulates. + mrExport.StartElement(i_rName, (m_level > 1) ? sal_False : sal_True); ++m_level; } diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index 724b6b0d2337..e04467d1e491 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.cxx @@ -75,6 +75,9 @@ void XMLScriptExportHandler::Export( OUString sTmp; rValues[i].Value >>= sTmp; rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sTmp); + + // #i110911# xlink:type="simple" is required + rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE); } // else: disregard } diff --git a/xmloff/source/style/WordWrapPropertyHdl.cxx b/xmloff/source/style/WordWrapPropertyHdl.cxx index 86792847b2c3..f3717b95c9cd 100644 --- a/xmloff/source/style/WordWrapPropertyHdl.cxx +++ b/xmloff/source/style/WordWrapPropertyHdl.cxx @@ -29,7 +29,6 @@ #include "precompiled_xmloff.hxx" #include <xmloff/xmlimp.hxx> #include <xmloff/WordWrapPropertyHdl.hxx> -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> #include <comphelper/extract.hxx> diff --git a/xmloff/source/style/XMLClipPropertyHandler.cxx b/xmloff/source/style/XMLClipPropertyHandler.cxx index 35b5c166a991..f90e3346c1ba 100644 --- a/xmloff/source/style/XMLClipPropertyHandler.cxx +++ b/xmloff/source/style/XMLClipPropertyHandler.cxx @@ -32,7 +32,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/text/GraphicCrop.hpp> #include <xmloff/xmluconv.hxx> -#include <xmlkywd.hxx> #include <xmloff/xmltoken.hxx> using ::rtl::OUString; @@ -77,7 +76,7 @@ sal_Bool XMLClipPropertyHandler::importXML( const OUString& rStrImpValue, uno::A sal_Bool bRet = sal_False; sal_Int32 nLen = rStrImpValue.getLength(); if( nLen > 6 && - 0 == rStrImpValue.compareToAscii( sXML_rect, 4 ) && + 0 == rStrImpValue.compareTo( GetXMLToken(XML_RECT), 4 ) && rStrImpValue[4] == '(' && rStrImpValue[nLen-1] == ')' ) { diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index 68f77790ac49..dcc81ccf9f89 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -27,18 +27,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + #include <tools/debug.hxx> #include <svl/cntnrsrt.hxx> #include <tools/fontenum.hxx> + #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include <xmloff/xmlexp.hxx> #include <xmloff/XMLFontAutoStylePool.hxx> + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 37b8aa2196f3..49dd6ddac91e 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -28,25 +28,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _COM_SUN_STAR_AWT_FONTFAMILY_HPP #include <com/sun/star/awt/FontFamily.hpp> -#endif -#ifndef _COM_SUN_STAR_AWT_FONTPITCH_HPP #include <com/sun/star/awt/FontPitch.hpp> -#endif + +#include <rtl/logfile.hxx> + #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include <xmloff/xmlimp.hxx> #include <xmloff/maptype.hxx> - -#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX #include <xmloff/XMLFontStylesContext.hxx> -#endif -#include <rtl/logfile.hxx> + + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/XMLRectangleMembersHandler.cxx b/xmloff/source/style/XMLRectangleMembersHandler.cxx index 07334f2137db..acd53e2dfd4e 100644 --- a/xmloff/source/style/XMLRectangleMembersHandler.cxx +++ b/xmloff/source/style/XMLRectangleMembersHandler.cxx @@ -48,11 +48,6 @@ XMLRectangleMembersHdl::XMLRectangleMembersHdl( sal_Int32 nType ) { } - sal_Int32 X; - sal_Int32 Y; - sal_Int32 Width; - sal_Int32 Height; - XMLRectangleMembersHdl::~XMLRectangleMembersHdl() { } diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx index 7e7ceb961c36..027bebdb8075 100644 --- a/xmloff/source/style/adjushdl.cxx +++ b/xmloff/source/style/adjushdl.cxx @@ -35,10 +35,6 @@ #include <com/sun/star/style/ParagraphAdjust.hpp> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using namespace ::com::sun::star; using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx index 476a9a0a97e9..df02a6504bac 100644 --- a/xmloff/source/style/backhdl.cxx +++ b/xmloff/source/style/backhdl.cxx @@ -34,10 +34,6 @@ #include <com/sun/star/uno/Any.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/bordrhdl.cxx b/xmloff/source/style/bordrhdl.cxx index cddf587184b6..5611bbd1f472 100644 --- a/xmloff/source/style/bordrhdl.cxx +++ b/xmloff/source/style/bordrhdl.cxx @@ -34,10 +34,6 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> - -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif #include <com/sun/star/table/BorderLine.hpp> using ::rtl::OUString; diff --git a/xmloff/source/style/breakhdl.cxx b/xmloff/source/style/breakhdl.cxx index 0ebe3af8a385..d95cd2e5e91a 100644 --- a/xmloff/source/style/breakhdl.cxx +++ b/xmloff/source/style/breakhdl.cxx @@ -34,10 +34,6 @@ #include <com/sun/star/style/BreakType.hpp> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/cdouthdl.cxx b/xmloff/source/style/cdouthdl.cxx index f314a2b813f0..c5f764cf9ac4 100644 --- a/xmloff/source/style/cdouthdl.cxx +++ b/xmloff/source/style/cdouthdl.cxx @@ -32,15 +32,9 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> -#ifndef _COM_SUN_STAR_AWT_FONTSTRIKEOUT_HPP #include <com/sun/star/awt/FontStrikeout.hpp> -#endif #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/chrhghdl.cxx b/xmloff/source/style/chrhghdl.cxx index a3076ca4c864..1a70696583d2 100644 --- a/xmloff/source/style/chrhghdl.cxx +++ b/xmloff/source/style/chrhghdl.cxx @@ -35,10 +35,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/chrlohdl.cxx b/xmloff/source/style/chrlohdl.cxx index b1b0a01d93f8..06778d67576f 100644 --- a/xmloff/source/style/chrlohdl.cxx +++ b/xmloff/source/style/chrlohdl.cxx @@ -34,10 +34,6 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> - -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif #include <com/sun/star/lang/Locale.hpp> using ::rtl::OUString; diff --git a/xmloff/source/style/csmaphdl.cxx b/xmloff/source/style/csmaphdl.cxx index 023153eda552..0a29de364bce 100644 --- a/xmloff/source/style/csmaphdl.cxx +++ b/xmloff/source/style/csmaphdl.cxx @@ -32,14 +32,8 @@ #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/style/CaseMap.hpp> - - #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx index 337ff5cdbb60..548f867d6606 100644 --- a/xmloff/source/style/escphdl.cxx +++ b/xmloff/source/style/escphdl.cxx @@ -35,10 +35,6 @@ #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index 04e0b36609cd..89ad6e9db8b8 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -28,18 +28,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include <fonthdl.hxx> -#endif #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/uno/Any.hxx> #include <tools/fontenum.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif #include <tools/string.hxx> using ::rtl::OUString; diff --git a/xmloff/source/style/fonthdl.hxx b/xmloff/source/style/fonthdl.hxx index 49d027579af3..18ddae73af14 100644 --- a/xmloff/source/style/fonthdl.hxx +++ b/xmloff/source/style/fonthdl.hxx @@ -25,8 +25,8 @@ * ************************************************************************/ -#ifndef _XMLOFF_PROPERTYHANDLER_FONTYPES_HXX -#define _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#ifndef XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#define XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include <xmloff/xmlprhdl.hxx> @@ -79,4 +79,4 @@ public: }; -#endif // _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#endif // XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx index dd47749d205b..6ea6221a0b27 100644 --- a/xmloff/source/style/lspachdl.cxx +++ b/xmloff/source/style/lspachdl.cxx @@ -37,10 +37,6 @@ #include <com/sun/star/style/LineSpacing.hpp> #include <com/sun/star/style/LineSpacingMode.hpp> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx index 28cda4eba8b6..b0885b539d4b 100644 --- a/xmloff/source/style/postuhdl.cxx +++ b/xmloff/source/style/postuhdl.cxx @@ -35,10 +35,6 @@ #include <com/sun/star/awt/FontSlant.hpp> #include <tools/fontenum.hxx> -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif - using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index af5448040896..27af64469daf 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -27,10 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + #include <com/sun/star/drawing/ColorMode.hpp> #include <com/sun/star/text/HorizontalAdjust.hpp> #include <com/sun/star/text/WritingMode2.hpp> + #include <tools/debug.hxx> + #include <xmloff/prhdlfac.hxx> #include <xmloff/xmltypes.hxx> #include <xmloff/xmltoken.hxx> @@ -39,9 +42,7 @@ #include <xmloff/XMLConstantsPropertyHandler.hxx> #include "cdouthdl.hxx" #include "csmaphdl.hxx" -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include "kernihdl.hxx" #include <postuhdl.hxx> #include "shadwhdl.hxx" diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index 5292b92d4128..cb666d899fb7 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -39,7 +39,6 @@ //#include "xmlitmap.hxx" #endif #include <xmloff/xmluconv.hxx> -#include "xmlkywd.hxx" #include <xmloff/attrlist.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/xmlexppr.hxx> diff --git a/xmloff/source/style/undlihdl.cxx b/xmloff/source/style/undlihdl.cxx index bbe9eea647b3..226ae3207e50 100644 --- a/xmloff/source/style/undlihdl.cxx +++ b/xmloff/source/style/undlihdl.cxx @@ -34,13 +34,7 @@ #include <com/sun/star/uno/Any.hxx> -#ifndef _COM_SUN_STAR_AWT_FONTUNDERLINE_HPP #include <com/sun/star/awt/FontUnderline.hpp> -#endif - -#ifndef _XMLOFF_XMLEMENT_HXX -#include <xmloff/xmlelement.hxx> -#endif using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index e81e73cf90b2..812071ff1b03 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -40,7 +40,6 @@ #include <xmloff/xmlimppr.hxx> #include <xmloff/xmlimp.hxx> -#include "xmlkywd.hxx" #include "unoatrcn.hxx" #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 681fff7ea229..5bc581c7af0b 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -27,15 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/ustrbuf.hxx> -#include <tools/debug.hxx> -#include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" -#include <xmloff/xmltoken.hxx> -#include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX -#include "fonthdl.hxx" -#endif + #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/style/XStyle.hpp> @@ -52,11 +44,22 @@ // <-- #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> + +#include <rtl/ustrbuf.hxx> + +#include <tools/debug.hxx> + +#include <xmloff/nmspmap.hxx> +#include "xmlnmspe.hxx" +#include <xmloff/xmltoken.hxx> +#include <xmloff/xmluconv.hxx> +#include "fonthdl.hxx" #include "XMLTextListAutoStylePool.hxx" #include <xmloff/xmlnume.hxx> #include <xmloff/xmlexp.hxx> #include <tools/fontenum.hxx> + using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -294,9 +297,12 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, OUStringBuffer sTmp; sTmp.append( nLevel + 1 ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() ); - if( sTextStyleName.getLength() > 0 ) + // #i110694#: no style-name on list-level-style-image + if ((sTextStyleName.getLength() > 0) && (NumberingType::BITMAP != eType)) + { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, GetExport().EncodeStyleName( sTextStyleName ) ); + } if( sPrefix.getLength() > 0 ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sPrefix ); if( sSuffix.getLength() > 0 ) diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index d223ba19db05..a192baa2216b 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -2149,7 +2149,7 @@ sal_Bool lcl_IsAtEnd( rtl::OUStringBuffer& rBuffer, const String& rToken ) if ( nTokLen > nBufLen ) return sal_False; - sal_Int32 nStartPos = nTokLen - nBufLen; + sal_Int32 nStartPos = nBufLen - nTokLen; for ( xub_StrLen nTokPos = 0; nTokPos < nTokLen; nTokPos++ ) if ( rToken.GetChar( nTokPos ) != rBuffer.charAt( nStartPos + nTokPos ) ) return sal_False; diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index d64c22be0179..7306c7d5f0de 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -27,16 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/ustrbuf.hxx> -#include <tools/urlobj.hxx> -#include <tools/debug.hxx> -#include <tools/fontenum.hxx> -#include <xmloff/xmltkmap.hxx> -#include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" -#include <xmloff/xmlimp.hxx> -#include <xmloff/XMLBase64ImportContext.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/awt/Size.hpp> @@ -51,26 +42,33 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/io/XOutputStream.hpp> + +#include <rtl/ustrbuf.hxx> + +#include <tools/urlobj.hxx> +#include <tools/debug.hxx> +#include <tools/fontenum.hxx> + +#include <xmloff/xmltkmap.hxx> +#include <xmloff/nmspmap.hxx> +#include "xmlnmspe.hxx" +#include <xmloff/xmlimp.hxx> +#include <xmloff/XMLBase64ImportContext.hxx> #include <xmloff/xmltoken.hxx> #include "i18nmap.hxx" #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif -#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX #include <xmloff/XMLFontStylesContext.hxx> -#endif -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include <xmloff/maptype.hxx> - #include <xmloff/xmlnumi.hxx> #define _SVSTDARR_USHORTS #include <svl/svstdarr.hxx> + + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 7affab134134..ad3a1f96752f 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -353,6 +353,8 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) // get the current row Reference< XCellRange > xCellRange( xIndexAccess->getByIndex(rowIndex), UNO_QUERY_THROW ); + OUString sDefaultCellStyle; + // table:style-name if( pTableInfo.get() ) { @@ -360,11 +362,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) const OUString sStyleName( pTableInfo->maRowStyleMap[xKey] ); if( sStyleName.getLength() ) mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName ); - } - const OUString sDefaultCellStyle( pTableInfo->maDefaultRowCellStyles[rowIndex] ); - if( sDefaultCellStyle.getLength() ) - mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle ); + sDefaultCellStyle = pTableInfo->maDefaultRowCellStyles[rowIndex]; + if( sDefaultCellStyle.getLength() ) + mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle ); + } // write row element SvXMLElementExport tableRowElement( mrExport, XML_NAMESPACE_TABLE, XML_TABLE_ROW, sal_True, sal_True ); diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 7e46c66442f4..52e4ccc8e048 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -68,6 +68,7 @@ void XMLChangedRegionImportContext::StartElement( const Reference<XAttributeList> & xAttrList) { // process attributes: id + bool bHaveXmlId( false ); sal_Int16 nLength = xAttrList->getLength(); for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++) { @@ -77,11 +78,19 @@ void XMLChangedRegionImportContext::StartElement( &sLocalName ); const OUString sValue = xAttrList->getValueByIndex(nAttr); - if ( XML_NAMESPACE_TEXT == nPrefix ) + if (XML_NAMESPACE_XML == nPrefix) { - if( IsXMLToken( sLocalName, XML_ID ) ) + if (IsXMLToken(sLocalName, XML_ID)) { sID = sValue; + bHaveXmlId = true; + } + } + else if (XML_NAMESPACE_TEXT == nPrefix) + { + if (IsXMLToken(sLocalName, XML_ID)) + { + if (!bHaveXmlId) { sID = sValue; } } else if( IsXMLToken( sLocalName, XML_MERGE_LAST_PARAGRAPH ) ) { diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index daf0703803d7..ad9f7ce10d7a 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -50,14 +50,11 @@ #include <xmloff/txtimp.hxx> #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/prstylei.hxx> #include "xmlerror.hxx" #include <xmloff/xmluconv.hxx> -#include <tools/debug.hxx> #include <rtl/ustring.hxx> -#include <tools/debug.hxx> using namespace ::com::sun::star::uno; @@ -85,15 +82,15 @@ static const sal_Char* aIndexServiceMap[] = "com.sun.star.text.IllustrationsIndex" }; -static const sal_Char* aIndexSourceElementMap[] = +static const XMLTokenEnum aIndexSourceElementMap[] = { - sXML_table_of_content_source, - sXML_alphabetical_index_source, - sXML_table_index_source, - sXML_object_index_source, - sXML_bibliography_source, - sXML_user_index_source, - sXML_illustration_index_source + XML_TABLE_OF_CONTENT_SOURCE, + XML_ALPHABETICAL_INDEX_SOURCE, + XML_TABLE_INDEX_SOURCE, + XML_OBJECT_INDEX_SOURCE, + XML_BIBLIOGRAPHY_SOURCE, + XML_USER_INDEX_SOURCE, + XML_ILLUSTRATION_INDEX_SOURCE }; SvXMLEnumMapEntry __READONLY_DATA aIndexTypeMap[] = @@ -117,7 +114,6 @@ XMLIndexTOCContext::XMLIndexTOCContext( , sTitle(RTL_CONSTASCII_USTRINGPARAM("Title")) , sIsProtected(RTL_CONSTASCII_USTRINGPARAM("IsProtected")) , sName(RTL_CONSTASCII_USTRINGPARAM("Name")) -, pSourceElementName(NULL) , bValid(sal_False) { if (XML_NAMESPACE_TEXT == nPrfx) @@ -126,13 +122,12 @@ XMLIndexTOCContext::XMLIndexTOCContext( if (SvXMLUnitConverter::convertEnum(nTmp, rLocalName, aIndexTypeMap)) { // check for array index: - DBG_ASSERT(nTmp < (sizeof(aIndexServiceMap)/sizeof(sal_Char*)), "index out of range"); - DBG_ASSERT(sizeof(aIndexServiceMap) == + OSL_ENSURE(nTmp < (sizeof(aIndexServiceMap)/sizeof(sal_Char*)), "index out of range"); + OSL_ENSURE(sizeof(aIndexServiceMap) == sizeof(aIndexSourceElementMap), "service and source element maps must be same size"); - eIndexType = (enum IndexTypeEnum)nTmp; - pSourceElementName = aIndexSourceElementMap[eIndexType]; + eIndexType = static_cast<IndexTypeEnum>(nTmp); bValid = sal_True; } } @@ -201,10 +196,6 @@ void XMLIndexTOCContext::StartElement( OUString::createFromAscii(aIndexServiceMap[eIndexType])); if( xIfc.is() ) { - - // xml:id for RDF metadata - GetImport().SetXmlId(xIfc, sXmlId); - // get Property set Reference<XPropertySet> xPropSet(xIfc, UNO_QUERY); xTOCPropertySet = xPropSet; @@ -246,6 +237,9 @@ void XMLIndexTOCContext::StartElement( return; } + // xml:id for RDF metadata + GetImport().SetXmlId(xIfc, sXmlId); + // b) insert marker and move cursor rImport->InsertString(sMarker); rImport->GetCursor()->goLeft(2, sal_False); @@ -326,7 +320,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( xBodyContextRef = pContext; } } - else if (0 == rLocalName.compareToAscii(pSourceElementName)) + else if (IsXMLToken(rLocalName, aIndexSourceElementMap[eIndexType])) { // instantiate source context for the appropriate index type switch (eIndexType) @@ -367,7 +361,7 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( break; default: - DBG_ERROR("index type not implemented"); + OSL_ENSURE(false, "index type not implemented"); break; } } diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx b/xmloff/source/text/XMLIndexTOCContext.hxx index accaca5a3c53..66f045a5467d 100644 --- a/xmloff/source/text/XMLIndexTOCContext.hxx +++ b/xmloff/source/text/XMLIndexTOCContext.hxx @@ -73,9 +73,6 @@ class XMLIndexTOCContext : public SvXMLImportContext enum IndexTypeEnum eIndexType; - /** source element name (for CreateChildContext) */ - const sal_Char* pSourceElementName; - sal_Bool bValid; SvXMLImportContextRef xBodyContextRef; diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx index 45c5f63c6ec7..364096ad8185 100644 --- a/xmloff/source/text/XMLPropertyBackpatcher.cxx +++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx @@ -30,9 +30,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/uno/Reference.h> -#ifndef _RTL_USTRING #include <rtl/ustring.hxx> -#endif #include <tools/debug.hxx> #include "XMLPropertyBackpatcher.hxx" #include <xmloff/txtimp.hxx> // XMLTextImportHelper partially implemented here @@ -206,7 +204,34 @@ void XMLPropertyBackpatcher<A>::SetDefault() template class XMLPropertyBackpatcher<sal_Int16>; template class XMLPropertyBackpatcher<OUString>; +struct SAL_DLLPRIVATE XMLTextImportHelper::BackpatcherImpl +{ + /// backpatcher for references to footnotes and endnotes + ::std::auto_ptr< XMLPropertyBackpatcher<sal_Int16> > + m_pFootnoteBackpatcher; + + /// backpatchers for references to sequences + ::std::auto_ptr< XMLPropertyBackpatcher<sal_Int16> > + m_pSequenceIdBackpatcher; + + ::std::auto_ptr< XMLPropertyBackpatcher< ::rtl::OUString> > + m_pSequenceNameBackpatcher; +}; + +::boost::shared_ptr<XMLTextImportHelper::BackpatcherImpl> +XMLTextImportHelper::MakeBackpatcherImpl() +{ + // n.b.: the shared_ptr stores the dtor! + return ::boost::shared_ptr<BackpatcherImpl>(new BackpatcherImpl); +} + +static ::rtl::OUString const& GetSequenceNumber() +{ + static ::rtl::OUString s_SequenceNumber( + RTL_CONSTASCII_USTRINGPARAM("SequenceNumber")); + return s_SequenceNumber; +} // // XMLTextImportHelper @@ -224,32 +249,34 @@ template class XMLPropertyBackpatcher<OUString>; XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetFootnoteBP() { - if (NULL == pFootnoteBackpatcher) + if (!m_pBackpatcherImpl->m_pFootnoteBackpatcher.get()) { - pFootnoteBackpatcher = - new XMLPropertyBackpatcher<sal_Int16>(sSequenceNumber); + m_pBackpatcherImpl->m_pFootnoteBackpatcher.reset( + new XMLPropertyBackpatcher<sal_Int16>(GetSequenceNumber())); } - return *pFootnoteBackpatcher; + return *m_pBackpatcherImpl->m_pFootnoteBackpatcher; } XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetSequenceIdBP() { - if (NULL == pSequenceIdBackpatcher) + if (!m_pBackpatcherImpl->m_pSequenceIdBackpatcher.get()) { - pSequenceIdBackpatcher = - new XMLPropertyBackpatcher<sal_Int16>(sSequenceNumber); + m_pBackpatcherImpl->m_pSequenceIdBackpatcher.reset( + new XMLPropertyBackpatcher<sal_Int16>(GetSequenceNumber())); } - return *pSequenceIdBackpatcher; + return *m_pBackpatcherImpl->m_pSequenceIdBackpatcher; } XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP() { - if (NULL == pSequenceNameBackpatcher) + static ::rtl::OUString s_SourceName( + RTL_CONSTASCII_USTRINGPARAM("SourceName")); + if (!m_pBackpatcherImpl->m_pSequenceNameBackpatcher.get()) { - pSequenceNameBackpatcher = - new XMLPropertyBackpatcher<OUString>(sSourceName); + m_pBackpatcherImpl->m_pSequenceNameBackpatcher.reset( + new XMLPropertyBackpatcher<OUString>(s_SourceName)); } - return *pSequenceNameBackpatcher; + return *m_pBackpatcherImpl->m_pSequenceNameBackpatcher; } void XMLTextImportHelper::InsertFootnoteID( @@ -283,9 +310,3 @@ void XMLTextImportHelper::ProcessSequenceReference( GetSequenceNameBP().SetProperty(xPropSet, sXMLId); } -void XMLTextImportHelper::_FinitBackpatcher() -{ - delete pFootnoteBackpatcher; - delete pSequenceIdBackpatcher; - delete pSequenceNameBackpatcher; -} diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index d4ab361f1688..67970330f3ef 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -374,7 +374,7 @@ void XMLRedlineExport::ExportChangedRegion( const Reference<XPropertySet> & rPropSet) { // Redline-ID - rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_ID, GetRedlineID(rPropSet) ); + rExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, GetRedlineID(rPropSet)); // merge-last-paragraph Any aAny = rPropSet->getPropertyValue(sMergeLastPara); diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx index 2129c54ad874..7cf96abea2e2 100644 --- a/xmloff/source/text/XMLSectionExport.cxx +++ b/xmloff/source/text/XMLSectionExport.cxx @@ -28,7 +28,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" #include "XMLSectionExport.hxx" -#include <tools/debug.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> @@ -53,7 +52,6 @@ #include <com/sun/star/text/XTextFieldsSupplier.hpp> #include <com/sun/star/text/XChapterNumberingSupplier.hpp> #include <com/sun/star/text/ChapterFormat.hpp> //i90246 -#include "xmlkywd.hxx" #include <xmloff/xmltoken.hxx> #include "xmlnmspe.hxx" #include <xmloff/families.hxx> @@ -306,7 +304,7 @@ void XMLSectionExport::ExportSectionEnd( break; default: - DBG_ERROR("unknown index type"); + OSL_ENSURE(false, "unknown index type"); // default: skip index! break; } @@ -332,7 +330,7 @@ void XMLSectionExport::ExportSectionEnd( } else { - DBG_ERROR("Need element name!"); + OSL_ENSURE(false, "Need element name!"); } } // else: autostyles -> ignore @@ -376,7 +374,7 @@ void XMLSectionExport::ExportIndexStart( default: // skip index - DBG_ERROR("unknown index type"); + OSL_ENSURE(false, "unknown index type"); break; } } @@ -809,15 +807,15 @@ void XMLSectionExport::ExportBaseIndexStart( GetExport().StartElement( XML_NAMESPACE_TEXT, eElement, sal_False ); } -static const sal_Char* aTypeSourceElementNameMap[] = +static const XMLTokenEnum aTypeSourceElementNameMap[] = { - sXML_table_of_content_source, // TOC - sXML_table_index_source, // table index - sXML_illustration_index_source, // illustration index - sXML_object_index_source, // object index - sXML_user_index_source, // user index - sXML_alphabetical_index_source, // alphabetical index - sXML_bibliography_source // bibliography + XML_TABLE_OF_CONTENT_SOURCE, // TOC + XML_TABLE_INDEX_SOURCE, // table index + XML_ILLUSTRATION_INDEX_SOURCE, // illustration index + XML_OBJECT_INDEX_SOURCE, // object index + XML_USER_INDEX_SOURCE, // user index + XML_ALPHABETICAL_INDEX_SOURCE, // alphabetical index + XML_BIBLIOGRAPHY_SOURCE // bibliography }; void XMLSectionExport::ExportBaseIndexSource( @@ -825,8 +823,8 @@ void XMLSectionExport::ExportBaseIndexSource( const Reference<XPropertySet> & rPropertySet) { // check type - DBG_ASSERT(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); - DBG_ASSERT(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); + OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); + OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); Any aAny; @@ -854,8 +852,9 @@ void XMLSectionExport::ExportBaseIndexSource( // the index source element (all indices) SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT, - aTypeSourceElementNameMap[ - eType - TEXT_SECTION_TYPE_TOC], + GetXMLToken( + aTypeSourceElementNameMap[ + eType - TEXT_SECTION_TYPE_TOC]), sal_True, sal_True); // scope for title template (all indices) @@ -918,15 +917,15 @@ void XMLSectionExport::ExportBaseIndexSource( void XMLSectionExport::ExportBaseIndexBody( SectionTypeEnum - #ifdef DBG_UTIL + #if OSL_DEBUG_LEVEL > 0 eType #endif , const Reference<XPropertySet> &) { // type not used; checked anyway. - DBG_ASSERT(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); - DBG_ASSERT(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); + OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); + OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); // export start only @@ -969,23 +968,23 @@ void XMLSectionExport::ExportTableAndIllustrationIndexSourceAttributes( // map index of LevelFormats to attribute value; // level 0 is always the header -static const sal_Char* aLevelNameTOCMap[] = - { NULL, sXML_1, sXML_2, sXML_3, sXML_4, sXML_5, sXML_6, sXML_7, - sXML_8, sXML_9, sXML_10, NULL }; -static const sal_Char* aLevelNameTableMap[] = - { NULL, "", NULL }; -static const sal_Char* aLevelNameAlphaMap[] = - { NULL, sXML_separator, sXML_1, sXML_2, sXML_3, NULL }; -static const sal_Char* aLevelNameBibliographyMap[] = - { NULL, sXML_article, sXML_book, sXML_booklet, sXML_conference, - sXML_custom1, sXML_custom2, sXML_custom3, sXML_custom4, - sXML_custom5, sXML_email, sXML_inbook, sXML_incollection, - sXML_inproceedings, sXML_journal, - sXML_manual, sXML_mastersthesis, sXML_misc, sXML_phdthesis, - sXML_proceedings, sXML_techreport, sXML_unpublished, sXML_www, - NULL }; - -static const sal_Char** aTypeLevelNameMap[] = +static const XMLTokenEnum aLevelNameTOCMap[] = + { XML_TOKEN_INVALID, XML_1, XML_2, XML_3, XML_4, XML_5, XML_6, XML_7, + XML_8, XML_9, XML_10, XML_TOKEN_INVALID }; +static const XMLTokenEnum aLevelNameTableMap[] = + { XML_TOKEN_INVALID, XML__EMPTY, XML_TOKEN_INVALID }; +static const XMLTokenEnum aLevelNameAlphaMap[] = + { XML_TOKEN_INVALID, XML_SEPARATOR, XML_1, XML_2, XML_3, XML_TOKEN_INVALID }; +static const XMLTokenEnum aLevelNameBibliographyMap[] = + { XML_TOKEN_INVALID, XML_ARTICLE, XML_BOOK, XML_BOOKLET, XML_CONFERENCE, + XML_CUSTOM1, XML_CUSTOM2, XML_CUSTOM3, XML_CUSTOM4, + XML_CUSTOM5, XML_EMAIL, XML_INBOOK, XML_INCOLLECTION, + XML_INPROCEEDINGS, XML_JOURNAL, + XML_MANUAL, XML_MASTERSTHESIS, XML_MISC, XML_PHDTHESIS, + XML_PROCEEDINGS, XML_TECHREPORT, XML_UNPUBLISHED, XML_WWW, + XML_TOKEN_INVALID }; + +static const XMLTokenEnum* aTypeLevelNameMap[] = { aLevelNameTOCMap, // TOC aLevelNameTableMap, // table index @@ -1029,26 +1028,26 @@ static const sal_Char** aTypeLevelStylePropNameMap[] = aLevelStylePropNameBibliographyMap // bibliography }; -static const sal_Char* aTypeLevelAttrMap[] = +static const XMLTokenEnum aTypeLevelAttrMap[] = { - sXML_outline_level, // TOC - NULL, // table index - NULL, // illustration index - NULL, // object index - sXML_outline_level, // user index - sXML_outline_level, // alphabetical index - sXML_bibliography_type // bibliography + XML_OUTLINE_LEVEL, // TOC + XML_TOKEN_INVALID, // table index + XML_TOKEN_INVALID, // illustration index + XML_TOKEN_INVALID, // object index + XML_OUTLINE_LEVEL, // user index + XML_OUTLINE_LEVEL, // alphabetical index + XML_BIBLIOGRAPHY_TYPE // bibliography }; -static const sal_Char* aTypeElementNameMap[] = +static const XMLTokenEnum aTypeElementNameMap[] = { - sXML_table_of_content_entry_template, // TOC - sXML_table_index_entry_template, // table index - sXML_illustration_index_entry_template, // illustration index - sXML_object_index_entry_template, // object index - sXML_user_index_entry_template, // user index - sXML_alphabetical_index_entry_template, // alphabetical index - sXML_bibliography_entry_template // bibliography + XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE, // TOC + XML_TABLE_INDEX_ENTRY_TEMPLATE, // table index + XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE, // illustration index + XML_OBJECT_INDEX_ENTRY_TEMPLATE, // object index + XML_USER_INDEX_ENTRY_TEMPLATE, // user index + XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE, // alphabetical index + XML_BIBLIOGRAPHY_ENTRY_TEMPLATE // bibliography }; @@ -1058,44 +1057,44 @@ sal_Bool XMLSectionExport::ExportIndexTemplate( const Reference<XPropertySet> & rPropertySet, Sequence<Sequence<PropertyValue> > & rValues) { - DBG_ASSERT(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); - DBG_ASSERT(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); - DBG_ASSERT(nOutlineLevel >= 0, "illegal outline level"); + OSL_ENSURE(eType >= TEXT_SECTION_TYPE_TOC, "illegal index type"); + OSL_ENSURE(eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY, "illegal index type"); + OSL_ENSURE(nOutlineLevel >= 0, "illegal outline level"); if ( (eType >= TEXT_SECTION_TYPE_TOC) && (eType <= TEXT_SECTION_TYPE_BIBLIOGRAPHY) && (nOutlineLevel >= 0) ) { // get level name and level attribute name from aLevelNameMap; - const sal_Char* pLevelAttrName = - aTypeLevelAttrMap[eType-TEXT_SECTION_TYPE_TOC]; - const sal_Char* pLevelName = - aTypeLevelNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]; + const XMLTokenEnum eLevelAttrName( + aTypeLevelAttrMap[eType-TEXT_SECTION_TYPE_TOC]); + const XMLTokenEnum eLevelName( + aTypeLevelNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]); // #92124#: some old documents may be broken, then they have // too many template levels; we need to recognize this and // export only as many as is legal for the respective index // type. To do this, we simply return an error flag, which // will then abort further template level exports. - DBG_ASSERT(NULL != pLevelName, "can't find level name"); - if ( NULL == pLevelName ) + OSL_ENSURE(XML_TOKEN_INVALID != eLevelName, "can't find level name"); + if ( XML_TOKEN_INVALID == eLevelName ) { // output level not found? Then end of templates! #91214# return sal_False; } // output level name - if ((NULL != pLevelName) && (NULL != pLevelAttrName)) + if ((XML_TOKEN_INVALID != eLevelName) && (XML_TOKEN_INVALID != eLevelAttrName)) { - GetExport().AddAttributeASCII(XML_NAMESPACE_TEXT, - pLevelAttrName, - pLevelName); + GetExport().AddAttribute(XML_NAMESPACE_TEXT, + GetXMLToken(eLevelAttrName), + GetXMLToken(eLevelName)); } // paragraph level style name - const sal_Char* pPropName = - aTypeLevelStylePropNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]; - DBG_ASSERT(NULL != pPropName, "can't find property name"); + const sal_Char* pPropName( + aTypeLevelStylePropNameMap[eType-TEXT_SECTION_TYPE_TOC][nOutlineLevel]); + OSL_ENSURE(NULL != pPropName, "can't find property name"); if (NULL != pPropName) { Any aAny = rPropertySet->getPropertyValue( @@ -1108,11 +1107,11 @@ sal_Bool XMLSectionExport::ExportIndexTemplate( } // template element - const sal_Char* pElementName = - aTypeElementNameMap[eType - TEXT_SECTION_TYPE_TOC]; + const XMLTokenEnum eElementName( + aTypeElementNameMap[eType - TEXT_SECTION_TYPE_TOC]); SvXMLElementExport aLevelTemplate(GetExport(), XML_NAMESPACE_TEXT, - pElementName, + GetXMLToken(eElementName), sal_True, sal_True); // export sequence @@ -1353,39 +1352,46 @@ void XMLSectionExport::ExportIndexTemplateElement( } // convert type to token (and check validity) ... - sal_Char* pElement = NULL; + XMLTokenEnum eElement(XML_TOKEN_INVALID); switch(nTokenType) { case TOK_TTYPE_ENTRY_TEXT: - pElement = sXML_index_entry_text; + eElement = XML_INDEX_ENTRY_TEXT; break; case TOK_TTYPE_TAB_STOP: // test validity - pElement = ( bRightAligned || bTabPositionOK || bFillCharOK ) - ? sXML_index_entry_tab_stop : NULL; + if ( bRightAligned || bTabPositionOK || bFillCharOK ) + { + eElement = XML_INDEX_ENTRY_TAB_STOP; + } break; case TOK_TTYPE_TEXT: // test validity - pElement = bTextOK ? sXML_index_entry_span : NULL; + if (bTextOK) + { + eElement = XML_INDEX_ENTRY_SPAN; + } break; case TOK_TTYPE_PAGE_NUMBER: - pElement = sXML_index_entry_page_number; + eElement = XML_INDEX_ENTRY_PAGE_NUMBER; break; case TOK_TTYPE_CHAPTER_INFO: // keyword index - pElement = sXML_index_entry_chapter; + eElement = XML_INDEX_ENTRY_CHAPTER; break; case TOK_TTYPE_ENTRY_NUMBER: // table of content - pElement = sXML_index_entry_chapter; + eElement = XML_INDEX_ENTRY_CHAPTER; break; case TOK_TTYPE_HYPERLINK_START: - pElement = sXML_index_entry_link_start; + eElement = XML_INDEX_ENTRY_LINK_START; break; case TOK_TTYPE_HYPERLINK_END: - pElement = sXML_index_entry_link_end; + eElement = XML_INDEX_ENTRY_LINK_END; break; case TOK_TTYPE_BIBLIOGRAPHY: - pElement = bBibliographyDataOK - ? sXML_index_entry_bibliography : NULL; + if (bBibliographyDataOK) + { + eElement = XML_INDEX_ENTRY_BIBLIOGRAPHY; + } break; default: ; // unknown/unimplemented template @@ -1404,7 +1410,7 @@ void XMLSectionExport::ExportIndexTemplateElement( //it's not permitted in other indexes if (eType != TEXT_SECTION_TYPE_ALPHABETICAL) { - pElement = NULL; //not permitted, null the element + eElement = XML_TOKEN_INVALID; //not permitted, invalidate the element } else //maps format for 1.1 & 1.0 { @@ -1447,7 +1453,7 @@ void XMLSectionExport::ExportIndexTemplateElement( //<--- // ... and write Element - if (pElement != NULL) + if (eElement != XML_TOKEN_INVALID) { // character style (for most templates) if (bCharStyleOK) @@ -1510,7 +1516,7 @@ void XMLSectionExport::ExportIndexTemplateElement( // bibliography data if (TOK_TTYPE_BIBLIOGRAPHY == nTokenType) { - DBG_ASSERT(bBibliographyDataOK, "need bibl data"); + OSL_ENSURE(bBibliographyDataOK, "need bibl data"); OUStringBuffer sBuf; if (SvXMLUnitConverter::convertEnum( sBuf, nBibliographyData, aBibliographyDataFieldMap ) ) @@ -1524,7 +1530,7 @@ void XMLSectionExport::ExportIndexTemplateElement( // chapter info if (TOK_TTYPE_CHAPTER_INFO == nTokenType) { - DBG_ASSERT(bChapterFormatOK, "need chapter info"); + OSL_ENSURE(bChapterFormatOK, "need chapter info"); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_DISPLAY, XMLTextFieldExport::MapChapterDisplayFormat(nChapterFormat)); @@ -1550,7 +1556,9 @@ void XMLSectionExport::ExportIndexTemplateElement( //<--- // export template SvXMLElementExport aTemplateElement(GetExport(), XML_NAMESPACE_TEXT, - pElement, sal_True, sal_False); + GetXMLToken(eElement), + sal_True, sal_False) + ; // entry text or span element: write text if (TOK_TTYPE_TEXT == nTokenType) @@ -1614,7 +1622,7 @@ void XMLSectionExport::ExportBoolean( sal_Bool bDefault, sal_Bool bInvert) { - DBG_ASSERT(eAttributeName != XML_TOKEN_INVALID, "Need attribute name"); + OSL_ENSURE(eAttributeName != XML_TOKEN_INVALID, "Need attribute name"); Any aAny = rPropSet->getPropertyValue(sPropertyName); sal_Bool bTmp = *(sal_Bool*)aAny.getValue(); @@ -1656,7 +1664,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport) Reference<XPropertySet> xPropSet; aAny >>= xPropSet; - DBG_ASSERT( xPropSet.is(), "field master must have XPropSet" ); + OSL_ENSURE( xPropSet.is(), "field master must have XPropSet" ); const OUString sBracketBefore( RTL_CONSTASCII_USTRINGPARAM("BracketBefore")); @@ -1843,7 +1851,7 @@ sal_Bool XMLSectionExport::IsInSection( { // default: like default argument sal_Bool bRet = bDefault; - DBG_ASSERT(rEnclosingSection.is(), "enclosing section expected"); + OSL_ENSURE(rEnclosingSection.is(), "enclosing section expected"); Reference<XPropertySet> xPropSet(rContent, UNO_QUERY); if (xPropSet.is()) diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index f31ce783565f..4b9b94b1ced7 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -161,9 +161,6 @@ void XMLSectionImportContext::StartElement( // save PropertySet (for CreateChildContext) xSectionPropertySet = xPropSet; - // xml:id for RDF metadata - GetImport().SetXmlId(xIfc, sXmlId); - // name Reference<XNamed> xNamed(xPropSet, UNO_QUERY); xNamed->setName(sName); @@ -253,6 +250,9 @@ void XMLSectionImportContext::StartElement( // finally, check for redlines that should start at // the section start node rHelper->RedlineAdjustStartNodeCursor(sal_True); // start ??? + + // xml:id for RDF metadata + GetImport().SetXmlId(xIfc, sXmlId); } } } diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index c15bb1a64055..accaa49d5ea4 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -43,7 +43,6 @@ #include <xmloff/xmlimp.hxx> #include <xmloff/xmltoken.hxx> #include "xmlnmspe.hxx" -#include "xmlkywd.hxx" #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> #include "XMLAnchorTypePropHdl.hxx" @@ -1032,10 +1031,11 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( { OUString sValue( rValue ); sValue.trim(); - const sal_Int32 nRotateLen = sizeof(sXML_rotate)-1; + const OUString aRotate(GetXMLToken(XML_ROTATE)); + const sal_Int32 nRotateLen(aRotate.getLength()); sal_Int32 nLen = sValue.getLength(); if( nLen >= nRotateLen+3 && - 0 == sValue.compareToAscii( sXML_rotate, nRotateLen ) && + 0 == sValue.compareTo( aRotate, nRotateLen ) && '(' == sValue[nRotateLen] && ')' == sValue[nLen-1] ) { @@ -1241,6 +1241,14 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, const OUString& rTargetFrameName, sal_Bool bMap ) { + static ::rtl::OUString s_HyperLinkURL( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL")); + static ::rtl::OUString s_HyperLinkName( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkName")); + static ::rtl::OUString s_HyperLinkTarget( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkTarget")); + static ::rtl::OUString s_ServerMap( + RTL_CONSTASCII_USTRINGPARAM("ServerMap")); if( !xPropSet.is() ) return; @@ -1248,29 +1256,29 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, Reference < XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); if( !xPropSetInfo.is() || - !xPropSetInfo->hasPropertyByName( xTxtImp->sHyperLinkURL ) ) + !xPropSetInfo->hasPropertyByName(s_HyperLinkURL)) return; Any aAny; aAny <<= rHRef; - xPropSet->setPropertyValue( xTxtImp->sHyperLinkURL, aAny ); + xPropSet->setPropertyValue( s_HyperLinkURL, aAny ); - if( xPropSetInfo->hasPropertyByName( xTxtImp->sHyperLinkName ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkName)) { aAny <<= rName; - xPropSet->setPropertyValue( xTxtImp->sHyperLinkName, aAny ); + xPropSet->setPropertyValue(s_HyperLinkName, aAny); } - if( xPropSetInfo->hasPropertyByName( xTxtImp->sHyperLinkTarget ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget)) { aAny <<= rTargetFrameName; - xPropSet->setPropertyValue( xTxtImp->sHyperLinkTarget, aAny ); + xPropSet->setPropertyValue( s_HyperLinkTarget, aAny ); } - if( xPropSetInfo->hasPropertyByName( xTxtImp->sServerMap ) ) + if (xPropSetInfo->hasPropertyByName(s_ServerMap)) { aAny.setValue( &bMap, ::getBooleanCppuType() ); - xPropSet->setPropertyValue( xTxtImp->sServerMap, aAny ); + xPropSet->setPropertyValue(s_ServerMap, aAny); } } diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index fdf1da1c9aff..fd2cb58b257f 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -79,6 +79,8 @@ XMLTextListBlockContext::XMLTextListBlockContext( , msContinueListId() // <-- { + static ::rtl::OUString s_PropNameDefaultListId( + RTL_CONSTASCII_USTRINGPARAM("DefaultListId")); { // get the parent list block context (if any); this is a bit ugly... XMLTextListBlockContext * pLB(0); @@ -180,10 +182,12 @@ XMLTextListBlockContext::XMLTextListBlockContext( { uno::Reference< beans::XPropertySetInfo > xNumRulePropSetInfo( xNumRuleProps->getPropertySetInfo()); - if ( xNumRulePropSetInfo.is() && - xNumRulePropSetInfo->hasPropertyByName( mrTxtImport.sPropNameDefaultListId) ) + if (xNumRulePropSetInfo.is() && + xNumRulePropSetInfo->hasPropertyByName( + s_PropNameDefaultListId)) { - xNumRuleProps->getPropertyValue( mrTxtImport.sPropNameDefaultListId ) >>= sListStyleDefaultListId; + xNumRuleProps->getPropertyValue(s_PropNameDefaultListId) + >>= sListStyleDefaultListId; DBG_ASSERT( sListStyleDefaultListId.getLength() != 0, "no default list id found at numbering rules instance. Serious defect -> please inform OD." ); } diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index 2f26f15c7c5c..b9a6dc1915e5 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -69,6 +69,8 @@ XMLTextListItemContext::XMLTextListItemContext( mxNumRulesOverride() // <-- { + static ::rtl::OUString s_NumberingRules( + RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for( sal_Int16 i=0; i < nAttrCount; i++ ) { @@ -105,7 +107,7 @@ XMLTextListItemContext::XMLTextListItemContext( aAny >>= xStyle; uno::Reference< beans::XPropertySet > xPropSet( xStyle, UNO_QUERY ); - aAny = xPropSet->getPropertyValue( rTxtImp.sNumberingRules ); + aAny = xPropSet->getPropertyValue(s_NumberingRules); aAny >>= mxNumRulesOverride; } else diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 91fe01dfcc3a..af51f5f56d98 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -49,10 +49,13 @@ #include <com/sun/star/text/XFormField.hpp> +#include "RDFaImportHelper.hxx" + using ::rtl::OUString; using ::rtl::OUStringBuffer; +using namespace ::com::sun::star; using namespace ::com::sun::star::text; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -113,7 +116,6 @@ XMLTextMarkImportContext::XMLTextMarkImportContext( const OUString& rLocalName ) : SvXMLImportContext(rImport, nPrefix, rLocalName) , m_rHelper(rHlp) - , m_bHaveAbout(false) { } @@ -190,13 +192,13 @@ void XMLTextMarkImportContext::EndElement() { SvXMLImportContext::EndElement(); - const OUString sAPI_reference_mark( + static const OUString sAPI_reference_mark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ReferenceMark")); - const OUString sAPI_bookmark( + static const OUString sAPI_bookmark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark")); - const OUString sAPI_fieldmark( + static const OUString sAPI_fieldmark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Fieldmark")); - const OUString sAPI_formfieldmark( + static const OUString sAPI_formfieldmark( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.FormFieldmark")); if (m_sBookmarkName.getLength() > 0) @@ -228,13 +230,6 @@ void XMLTextMarkImportContext::EndElement() m_sBookmarkName, m_rHelper.GetCursorAsRange()->getStart(), m_sXmlId) ); - if (m_bHaveAbout) - { - const Reference<com::sun::star::rdf::XMetadatable> - xMeta( xContent, UNO_QUERY); - GetImport().AddRDFa(xMeta, - m_sAbout, m_sProperty, m_sContent, m_sDatatype); - } if ((lcl_MarkType)nTmp==TypeFieldmark) { if (xContent.is() && bImportAsField) { // setup fieldmark... @@ -252,9 +247,22 @@ void XMLTextMarkImportContext::EndElement() case TypeFieldmarkStart: case TypeBookmarkStart: // save XTextRange for later construction of bookmark - m_rHelper.InsertBookmarkStartRange( - m_sBookmarkName, m_rHelper.GetCursorAsRange()->getStart(), - m_sXmlId); + { + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > + pRDFaAttributes; + if (m_bHaveAbout && (TypeBookmarkStart + == static_cast<lcl_MarkType>(nTmp))) + { + pRDFaAttributes = + GetImport().GetRDFaImportHelper().ParseRDFa( + m_sAbout, m_sProperty, + m_sContent, m_sDatatype); + } + m_rHelper.InsertBookmarkStartRange( + m_sBookmarkName, + m_rHelper.GetCursorAsRange()->getStart(), + m_sXmlId, pRDFaAttributes); + } break; case TypeFieldmarkEnd: @@ -262,8 +270,11 @@ void XMLTextMarkImportContext::EndElement() { // get old range, and construct Reference<XTextRange> xStartRange; - if (m_rHelper.FindAndRemoveBookmarkStartRange(m_sBookmarkName, - xStartRange, m_sXmlId)) + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > + pRDFaAttributes; + if (m_rHelper.FindAndRemoveBookmarkStartRange( + m_sBookmarkName, xStartRange, + m_sXmlId, pRDFaAttributes)) { Reference<XTextRange> xEndRange( m_rHelper.GetCursorAsRange()->getStart()); @@ -295,12 +306,12 @@ void XMLTextMarkImportContext::EndElement() m_sBookmarkName, xInsertionRange, m_sXmlId) ); - if (m_bHaveAbout) + if (pRDFaAttributes) { - const Reference<com::sun::star::rdf::XMetadatable> - xMeta( xContent, UNO_QUERY); - GetImport().AddRDFa(xMeta, - m_sAbout, m_sProperty, m_sContent, m_sDatatype); + const Reference<rdf::XMetadatable> + xMeta(xContent, UNO_QUERY); + GetImport().GetRDFaImportHelper().AddRDFa( + xMeta, pRDFaAttributes); } if ((lcl_MarkType)nTmp==TypeFieldmarkEnd) { diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 335276a6865d..579ad91ddfe9 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -212,87 +212,6 @@ const sal_Char sAPI_TextRange[] = "TextRange"; const sal_Char sAPI_true[] = "TRUE"; -static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = -{ - { XML_NAMESPACE_TEXT, XML_FIXED, XML_TOK_TEXTFIELD_FIXED }, - { XML_NAMESPACE_TEXT, XML_DESCRIPTION, XML_TOK_TEXTFIELD_DESCRIPTION }, - { XML_NAMESPACE_TEXT, XML_HELP, XML_TOK_TEXTFIELD_HELP }, - { XML_NAMESPACE_TEXT, XML_HINT, XML_TOK_TEXTFIELD_HINT }, - { XML_NAMESPACE_TEXT, XML_PLACEHOLDER_TYPE, - XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE }, - { XML_NAMESPACE_TEXT, XML_NAME, XML_TOK_TEXTFIELD_NAME }, - { XML_NAMESPACE_TEXT, XML_FORMULA, XML_TOK_TEXTFIELD_FORMULA }, - { XML_NAMESPACE_STYLE, XML_NUM_FORMAT, XML_TOK_TEXTFIELD_NUM_FORMAT }, - { XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC, - XML_TOK_TEXTFIELD_NUM_LETTER_SYNC }, - { XML_NAMESPACE_TEXT, XML_DISPLAY_FORMULA, - XML_TOK_TEXTFIELD_DISPLAY_FORMULA }, - { XML_NAMESPACE_TEXT, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, // #i32362#: src680m48++ saves text:value-type - { XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, - { XML_NAMESPACE_TEXT, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, - { XML_NAMESPACE_OFFICE, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, - { XML_NAMESPACE_TEXT, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, - { XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, - { XML_NAMESPACE_TEXT, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, - { XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, - { XML_NAMESPACE_TEXT, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, - { XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, - { XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_TOK_TEXTFIELD_BOOL_VALUE}, - { XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_TOK_TEXTFIELD_CURRENCY}, - { XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, - XML_TOK_TEXTFIELD_DATA_STYLE_NAME }, - { XML_NAMESPACE_TEXT, XML_DISPLAY_OUTLINE_LEVEL, - XML_TOK_TEXTFIELD_NUMBERING_LEVEL }, - { XML_NAMESPACE_TEXT, XML_SEPARATION_CHARACTER, - XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR }, - { XML_NAMESPACE_TEXT, XML_DISPLAY, XML_TOK_TEXTFIELD_DISPLAY }, - { XML_NAMESPACE_TEXT, XML_TIME_ADJUST, XML_TOK_TEXTFIELD_TIME_ADJUST }, - { XML_NAMESPACE_TEXT, XML_DATE_ADJUST, XML_TOK_TEXTFIELD_DATE_ADJUST }, - { XML_NAMESPACE_TEXT, XML_PAGE_ADJUST, XML_TOK_TEXTFIELD_PAGE_ADJUST }, - { XML_NAMESPACE_TEXT, XML_SELECT_PAGE, XML_TOK_TEXTFIELD_SELECT_PAGE }, - { XML_NAMESPACE_TEXT, XML_DATABASE_NAME, XML_TOK_TEXTFIELD_DATABASE_NAME}, - { XML_NAMESPACE_TEXT, XML_TABLE_NAME, XML_TOK_TEXTFIELD_TABLE_NAME }, - { XML_NAMESPACE_TEXT, XML_COLUMN_NAME, XML_TOK_TEXTFIELD_COLUMN_NAME }, - { XML_NAMESPACE_TEXT, XML_ROW_NUMBER, XML_TOK_TEXTFIELD_ROW_NUMBER }, - { XML_NAMESPACE_TEXT, XML_CONDITION, XML_TOK_TEXTFIELD_CONDITION }, - { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_TRUE, - XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE }, - { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_FALSE, - XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE }, - { XML_NAMESPACE_TEXT, XML_EDITING_CYCLES, XML_TOK_TEXTFIELD_REVISION }, - { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, XML_TOK_TEXTFIELD_OUTLINE_LEVEL}, - { XML_NAMESPACE_TEXT, XML_ACTIVE, XML_TOK_TEXTFIELD_ACTIVE }, - { XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_TOK_TEXTFIELD_NOTE_CLASS }, - { XML_NAMESPACE_TEXT, XML_REFERENCE_FORMAT, - XML_TOK_TEXTFIELD_REFERENCE_FORMAT }, - { XML_NAMESPACE_TEXT, XML_REF_NAME, XML_TOK_TEXTFIELD_REF_NAME }, - { XML_NAMESPACE_TEXT, XML_CONNECTION_NAME, - XML_TOK_TEXTFIELD_CONNECTION_NAME }, - { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_TEXTFIELD_HREF }, - { XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, - XML_TOK_TEXTFIELD_TARGET_FRAME }, - { XML_NAMESPACE_TEXT, XML_ANNOTATION, XML_TOK_TEXTFIELD_ANNOTATION }, - { XML_NAMESPACE_SCRIPT, XML_LANGUAGE, XML_TOK_TEXTFIELD_LANGUAGE }, - { XML_NAMESPACE_TEXT, XML_KIND, XML_TOK_TEXTFIELD_MEASURE_KIND }, - { XML_NAMESPACE_TEXT, XML_IS_HIDDEN, XML_TOK_TEXTFIELD_IS_HIDDEN }, - { XML_NAMESPACE_TEXT, XML_CURRENT_VALUE, - XML_TOK_TEXTFIELD_CURRENT_VALUE }, - { XML_NAMESPACE_TEXT, XML_TABLE_TYPE, XML_TOK_TEXTFIELD_TABLE_TYPE }, - - XML_TOKEN_MAP_END -}; - -const SvXMLTokenMap& XMLTextImportHelper::GetTextFieldAttrTokenMap() -{ - if ( !pTextFieldAttrTokenMap.get() ) { - pTextFieldAttrTokenMap.reset( - new SvXMLTokenMap(aTextFieldAttrTokenMap) ); - } - - return *pTextFieldAttrTokenMap; - -} - TYPEINIT1( XMLTextFieldImportContext, SvXMLImportContext); XMLTextFieldImportContext::XMLTextFieldImportContext( diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index cd09ba7f646f..bc01112d9b03 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -27,6 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + +#include <vector> + +#include <boost/scoped_array.hpp> +#include <boost/tuple/tuple.hpp> + #include <tools/solar.h> #include <tools/debug.hxx> #ifndef _SVSTDARR_STRINGSDTOR_DECL @@ -45,6 +51,7 @@ #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/XTextFrame.hpp> +#include <com/sun/star/text/XFormField.hpp> #include <com/sun/star/drawing/XShapes.hpp> #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -56,6 +63,8 @@ #include <xmloff/families.hxx> #include <xmloff/xmlnumfi.hxx> #include <xmloff/xmlnumi.hxx> +#include <xmloff/xmlictxt.hxx> +#include <xmloff/xmlimppr.hxx> #include "txtparai.hxx" #include <xmloff/txtimp.hxx> @@ -97,6 +106,7 @@ using ::rtl::OUStringBuffer; using ::com::sun::star::ucb::XAnyCompare; using namespace ::std; +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::text; @@ -333,11 +343,11 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPAttrTokenMap[] = { XML_NAMESPACE_XHTML, XML_PROPERTY, XML_TOK_TEXT_P_PROPERTY }, { XML_NAMESPACE_XHTML, XML_CONTENT, XML_TOK_TEXT_P_CONTENT }, { XML_NAMESPACE_XHTML, XML_DATATYPE, XML_TOK_TEXT_P_DATATYPE }, + { XML_NAMESPACE_TEXT, XML_ID, XML_TOK_TEXT_P_TEXTID }, { XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_TEXT_P_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_COND_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,XML_TOK_TEXT_P_LEVEL }, - { XML_NAMESPACE_TEXT, XML_ID, XML_TOK_TEXT_P_ID }, { XML_NAMESPACE_TEXT, XML_IS_LIST_HEADER,XML_TOK_TEXT_P_IS_LIST_HEADER }, { XML_NAMESPACE_TEXT, XML_RESTART_NUMBERING,XML_TOK_TEXT_P_RESTART_NUMBERING }, { XML_NAMESPACE_TEXT, XML_START_VALUE,XML_TOK_TEXT_P_START_VALUE }, @@ -444,9 +454,436 @@ static __FAR_DATA SvXMLTokenMapEntry aTextMasterPageElemTokenMap[] = XML_TOKEN_MAP_END }; +static __FAR_DATA SvXMLTokenMapEntry aTextFieldAttrTokenMap[] = +{ + { XML_NAMESPACE_TEXT, XML_FIXED, XML_TOK_TEXTFIELD_FIXED }, + { XML_NAMESPACE_TEXT, XML_DESCRIPTION, XML_TOK_TEXTFIELD_DESCRIPTION }, + { XML_NAMESPACE_TEXT, XML_HELP, XML_TOK_TEXTFIELD_HELP }, + { XML_NAMESPACE_TEXT, XML_HINT, XML_TOK_TEXTFIELD_HINT }, + { XML_NAMESPACE_TEXT, XML_PLACEHOLDER_TYPE, + XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE }, + { XML_NAMESPACE_TEXT, XML_NAME, XML_TOK_TEXTFIELD_NAME }, + { XML_NAMESPACE_TEXT, XML_FORMULA, XML_TOK_TEXTFIELD_FORMULA }, + { XML_NAMESPACE_STYLE, XML_NUM_FORMAT, XML_TOK_TEXTFIELD_NUM_FORMAT }, + { XML_NAMESPACE_STYLE, XML_NUM_LETTER_SYNC, + XML_TOK_TEXTFIELD_NUM_LETTER_SYNC }, + { XML_NAMESPACE_TEXT, XML_DISPLAY_FORMULA, + XML_TOK_TEXTFIELD_DISPLAY_FORMULA }, + { XML_NAMESPACE_TEXT, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, // #i32362#: src680m48++ saves text:value-type + { XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_TOK_TEXTFIELD_VALUE_TYPE }, + { XML_NAMESPACE_TEXT, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, + { XML_NAMESPACE_OFFICE, XML_VALUE, XML_TOK_TEXTFIELD_VALUE }, + { XML_NAMESPACE_TEXT, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, + { XML_NAMESPACE_OFFICE, XML_STRING_VALUE, XML_TOK_TEXTFIELD_STRING_VALUE }, + { XML_NAMESPACE_TEXT, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, + { XML_NAMESPACE_OFFICE, XML_DATE_VALUE, XML_TOK_TEXTFIELD_DATE_VALUE }, + { XML_NAMESPACE_TEXT, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, + { XML_NAMESPACE_OFFICE, XML_TIME_VALUE, XML_TOK_TEXTFIELD_TIME_VALUE }, + { XML_NAMESPACE_OFFICE, XML_BOOLEAN_VALUE, XML_TOK_TEXTFIELD_BOOL_VALUE}, + { XML_NAMESPACE_OFFICE, XML_CURRENCY, XML_TOK_TEXTFIELD_CURRENCY}, + { XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, + XML_TOK_TEXTFIELD_DATA_STYLE_NAME }, + { XML_NAMESPACE_TEXT, XML_DISPLAY_OUTLINE_LEVEL, + XML_TOK_TEXTFIELD_NUMBERING_LEVEL }, + { XML_NAMESPACE_TEXT, XML_SEPARATION_CHARACTER, + XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR }, + { XML_NAMESPACE_TEXT, XML_DISPLAY, XML_TOK_TEXTFIELD_DISPLAY }, + { XML_NAMESPACE_TEXT, XML_TIME_ADJUST, XML_TOK_TEXTFIELD_TIME_ADJUST }, + { XML_NAMESPACE_TEXT, XML_DATE_ADJUST, XML_TOK_TEXTFIELD_DATE_ADJUST }, + { XML_NAMESPACE_TEXT, XML_PAGE_ADJUST, XML_TOK_TEXTFIELD_PAGE_ADJUST }, + { XML_NAMESPACE_TEXT, XML_SELECT_PAGE, XML_TOK_TEXTFIELD_SELECT_PAGE }, + { XML_NAMESPACE_TEXT, XML_DATABASE_NAME, XML_TOK_TEXTFIELD_DATABASE_NAME}, + { XML_NAMESPACE_TEXT, XML_TABLE_NAME, XML_TOK_TEXTFIELD_TABLE_NAME }, + { XML_NAMESPACE_TEXT, XML_COLUMN_NAME, XML_TOK_TEXTFIELD_COLUMN_NAME }, + { XML_NAMESPACE_TEXT, XML_ROW_NUMBER, XML_TOK_TEXTFIELD_ROW_NUMBER }, + { XML_NAMESPACE_TEXT, XML_CONDITION, XML_TOK_TEXTFIELD_CONDITION }, + { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_TRUE, + XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE }, + { XML_NAMESPACE_TEXT, XML_STRING_VALUE_IF_FALSE, + XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE }, + { XML_NAMESPACE_TEXT, XML_EDITING_CYCLES, XML_TOK_TEXTFIELD_REVISION }, + { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL, XML_TOK_TEXTFIELD_OUTLINE_LEVEL}, + { XML_NAMESPACE_TEXT, XML_ACTIVE, XML_TOK_TEXTFIELD_ACTIVE }, + { XML_NAMESPACE_TEXT, XML_NOTE_CLASS, XML_TOK_TEXTFIELD_NOTE_CLASS }, + { XML_NAMESPACE_TEXT, XML_REFERENCE_FORMAT, + XML_TOK_TEXTFIELD_REFERENCE_FORMAT }, + { XML_NAMESPACE_TEXT, XML_REF_NAME, XML_TOK_TEXTFIELD_REF_NAME }, + { XML_NAMESPACE_TEXT, XML_CONNECTION_NAME, + XML_TOK_TEXTFIELD_CONNECTION_NAME }, + { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_TEXTFIELD_HREF }, + { XML_NAMESPACE_OFFICE, XML_TARGET_FRAME_NAME, + XML_TOK_TEXTFIELD_TARGET_FRAME }, + { XML_NAMESPACE_TEXT, XML_ANNOTATION, XML_TOK_TEXTFIELD_ANNOTATION }, + { XML_NAMESPACE_SCRIPT, XML_LANGUAGE, XML_TOK_TEXTFIELD_LANGUAGE }, + { XML_NAMESPACE_TEXT, XML_KIND, XML_TOK_TEXTFIELD_MEASURE_KIND }, + { XML_NAMESPACE_TEXT, XML_IS_HIDDEN, XML_TOK_TEXTFIELD_IS_HIDDEN }, + { XML_NAMESPACE_TEXT, XML_CURRENT_VALUE, + XML_TOK_TEXTFIELD_CURRENT_VALUE }, + { XML_NAMESPACE_TEXT, XML_TABLE_TYPE, XML_TOK_TEXTFIELD_TABLE_TYPE }, + + XML_TOKEN_MAP_END +}; + + // maximum allowed length of combined characters field #define MAX_COMBINED_CHARACTERS 6 +struct SAL_DLLPRIVATE XMLTextImportHelper::Impl + : private ::boost::noncopyable +{ + ::std::auto_ptr<SvXMLTokenMap> m_pTextElemTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextPElemTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextPAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextFieldAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextNumberedParagraphAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextListBlockAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextListBlockElemTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextFrameAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextContourAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextHyperlinkAttrTokenMap; + ::std::auto_ptr<SvXMLTokenMap> m_pTextMasterPageElemTokenMap; + ::std::auto_ptr<SvStringsDtor> m_pPrevFrmNames; + ::std::auto_ptr<SvStringsDtor> m_pNextFrmNames; + + // --> OD 2008-04-25 #refactorlists# + ::std::auto_ptr<XMLTextListsHelper> m_pTextListsHelper; + // <-- + + SvXMLImportContextRef m_xAutoStyles; + SvXMLImportContextRef m_xFontDecls; + + XMLSectionList_Impl m_SectionList; + + UniReference< SvXMLImportPropertyMapper > m_xParaImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xTextImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xFrameImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xSectionImpPrMap; + UniReference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; + + ::std::auto_ptr<SvI18NMap> m_pRenameMap; + // --> OD 2006-10-12 #i69629# - change and extend data structure: + // - data structure contains candidates of paragraph styles, which + // will be assigned to the outline style + // - data structure contains more than one candidate for each list level + // of the outline style + ::boost::scoped_array< ::std::vector< ::rtl::OUString > > + m_pOutlineStylesCandidates; + // <-- + + // start range, xml:id, RDFa stuff + typedef ::boost::tuple< + uno::Reference<text::XTextRange>, ::rtl::OUString, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > > + BookmarkMapEntry_t; + /// start ranges for open bookmarks + ::std::map< ::rtl::OUString, BookmarkMapEntry_t, + ::comphelper::UStringLess> m_BookmarkStartRanges; + + typedef ::std::vector< ::rtl::OUString > BookmarkVector_t; + BookmarkVector_t m_BookmarkVector; + + /// name of the last 'open' redline that started between paragraphs + ::rtl::OUString m_sOpenRedlineIdentifier; + + uno::Reference<text::XText> m_xText; + uno::Reference<text::XTextCursor> m_xCursor; + uno::Reference<text::XTextRange> m_xCursorAsRange; + uno::Reference<container::XNameContainer> m_xParaStyles; + uno::Reference<container::XNameContainer> m_xTextStyles; + uno::Reference<container::XNameContainer> m_xNumStyles; + uno::Reference<container::XNameContainer> m_xFrameStyles; + uno::Reference<container::XNameContainer> m_xPageStyles; + uno::Reference<container::XIndexReplace> m_xChapterNumbering; + uno::Reference<container::XNameAccess> m_xTextFrames; + uno::Reference<container::XNameAccess> m_xGraphics; + uno::Reference<container::XNameAccess> m_xObjects; + uno::Reference<lang::XMultiServiceFactory> m_xServiceFactory; + + SvXMLImport & m_rSvXMLImport; + + bool m_bInsertMode : 1; + bool m_bStylesOnlyMode : 1; + bool m_bBlockMode : 1; + bool m_bProgress : 1; + bool m_bOrganizerMode : 1; + bool m_bBodyContentStarted : 1; + + // #107848# + // One more flag to remember if we are inside a deleted redline section + bool m_bInsideDeleteContext : 1; + + typedef ::std::pair< ::rtl::OUString, ::rtl::OUString> field_name_type_t; + typedef ::std::pair< ::rtl::OUString, ::rtl::OUString > field_param_t; + typedef ::std::vector< field_param_t > field_params_t; + typedef ::std::pair< field_name_type_t, field_params_t > field_stack_item_t; + typedef ::std::stack< field_stack_item_t > field_stack_t; + + field_stack_t m_FieldStack; + + ::rtl::OUString m_sCellParaStyleDefault; + + Impl( uno::Reference<frame::XModel> const& rModel, + SvXMLImport & rImport, + bool const bInsertMode, bool const bStylesOnlyMode, + bool const bProgress, bool const bBlockMode, + bool const bOrganizerMode) + : m_pTextElemTokenMap( 0 ) + , m_pTextPElemTokenMap( 0 ) + , m_pTextPAttrTokenMap( 0 ) + , m_pTextFieldAttrTokenMap( 0 ) + , m_pTextNumberedParagraphAttrTokenMap( 0 ) + , m_pTextListBlockAttrTokenMap( 0 ) + , m_pTextListBlockElemTokenMap( 0 ) + , m_pTextFrameAttrTokenMap( 0 ) + , m_pTextContourAttrTokenMap( 0 ) + , m_pTextHyperlinkAttrTokenMap( 0 ) + , m_pTextMasterPageElemTokenMap( 0 ) + , m_pPrevFrmNames( 0 ) + , m_pNextFrmNames( 0 ) + // --> OD 2008-04-25 #refactorlists# + , m_pTextListsHelper( new XMLTextListsHelper() ) + // <-- + , m_pRenameMap( 0 ) + // --> OD 2006-10-12 #i69629# + , m_pOutlineStylesCandidates( 0 ) + // <-- + , m_xServiceFactory( rModel, UNO_QUERY ) + , m_rSvXMLImport( rImport ) + , m_bInsertMode( bInsertMode ) + , m_bStylesOnlyMode( bStylesOnlyMode ) + , m_bBlockMode( bBlockMode ) + , m_bProgress( bProgress ) + , m_bOrganizerMode( bOrganizerMode ) + , m_bBodyContentStarted( true ) + // #107848# Initialize inside_deleted_section flag correctly + , m_bInsideDeleteContext( false ) + { + } + + void InitOutlineStylesCandidates() + { + if (!m_pOutlineStylesCandidates) + { + size_t const size(m_xChapterNumbering->getCount()); + m_pOutlineStylesCandidates.reset( + new ::std::vector< ::rtl::OUString >[size] ); + } + } + +}; + + +uno::Reference< text::XText > & XMLTextImportHelper::GetText() +{ + return m_pImpl->m_xText; +} + +uno::Reference< text::XTextCursor > & XMLTextImportHelper::GetCursor() +{ + return m_pImpl->m_xCursor; +} + +uno::Reference< text::XTextRange > & XMLTextImportHelper::GetCursorAsRange() +{ + return m_pImpl->m_xCursorAsRange; +} + +bool XMLTextImportHelper::IsInsertMode() const +{ + return m_pImpl->m_bInsertMode; +} + +bool XMLTextImportHelper::IsStylesOnlyMode() const +{ + return m_pImpl->m_bStylesOnlyMode; +} + +bool XMLTextImportHelper::IsBlockMode() const +{ + return m_pImpl->m_bBlockMode; +} + +bool XMLTextImportHelper::IsOrganizerMode() const +{ + return m_pImpl->m_bOrganizerMode; +} + +bool XMLTextImportHelper::IsProgress() const +{ + return m_pImpl->m_bProgress; +} + +XMLSectionList_Impl & XMLTextImportHelper::GetSectionList() +{ + return m_pImpl->m_SectionList; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetParaStyles() const +{ + return m_pImpl->m_xParaStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetTextStyles() const +{ + return m_pImpl->m_xTextStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetNumberingStyles() const +{ + return m_pImpl->m_xNumStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetFrameStyles() const +{ + return m_pImpl->m_xFrameStyles; +} + +uno::Reference<container::XNameContainer> const& +XMLTextImportHelper::GetPageStyles() const +{ + return m_pImpl->m_xPageStyles; +} + +uno::Reference<container::XIndexReplace> const& +XMLTextImportHelper::GetChapterNumbering() const +{ + return m_pImpl->m_xChapterNumbering; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetParaImportPropertySetMapper() const +{ + return m_pImpl->m_xParaImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetTextImportPropertySetMapper() const +{ + return m_pImpl->m_xTextImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetFrameImportPropertySetMapper() const +{ + return m_pImpl->m_xFrameImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetSectionImportPropertySetMapper() const +{ + return m_pImpl->m_xSectionImpPrMap; +} + +UniReference< SvXMLImportPropertyMapper > const& +XMLTextImportHelper::GetRubyImportPropertySetMapper() const +{ + return m_pImpl->m_xRubyImpPrMap; +} + +void XMLTextImportHelper::SetInsideDeleteContext(bool const bNew) +{ + m_pImpl->m_bInsideDeleteContext = bNew; +} + +bool XMLTextImportHelper::IsInsideDeleteContext() const +{ + return m_pImpl->m_bInsideDeleteContext; +} + +SvXMLImport & XMLTextImportHelper::GetXMLImport() +{ + return m_pImpl->m_rSvXMLImport; +} + +XMLTextListsHelper & XMLTextImportHelper::GetTextListHelper() +{ + return *m_pImpl->m_pTextListsHelper; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextElemTokenMap() +{ + if (!m_pImpl->m_pTextElemTokenMap.get()) + { + m_pImpl->m_pTextElemTokenMap.reset( + new SvXMLTokenMap( aTextElemTokenMap )); + } + return *m_pImpl->m_pTextElemTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextPElemTokenMap() +{ + if (!m_pImpl->m_pTextPElemTokenMap.get()) + { + m_pImpl->m_pTextPElemTokenMap.reset( + new SvXMLTokenMap( aTextPElemTokenMap )); + } + return *m_pImpl->m_pTextPElemTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextPAttrTokenMap() +{ + if (!m_pImpl->m_pTextPAttrTokenMap.get()) + { + m_pImpl->m_pTextPAttrTokenMap.reset( + new SvXMLTokenMap( aTextPAttrTokenMap )); + } + return *m_pImpl->m_pTextPAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextFrameAttrTokenMap() +{ + if (!m_pImpl->m_pTextFrameAttrTokenMap.get()) + { + m_pImpl->m_pTextFrameAttrTokenMap.reset( + new SvXMLTokenMap( aTextFrameAttrTokenMap )); + } + return *m_pImpl->m_pTextFrameAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextContourAttrTokenMap() +{ + if (!m_pImpl->m_pTextContourAttrTokenMap.get()) + { + m_pImpl->m_pTextContourAttrTokenMap.reset( + new SvXMLTokenMap( aTextContourAttrTokenMap )); + } + return *m_pImpl->m_pTextContourAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextHyperlinkAttrTokenMap() +{ + if (!m_pImpl->m_pTextHyperlinkAttrTokenMap.get()) + { + m_pImpl->m_pTextHyperlinkAttrTokenMap.reset( + new SvXMLTokenMap( aTextHyperlinkAttrTokenMap )); + } + return *m_pImpl->m_pTextHyperlinkAttrTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextMasterPageElemTokenMap() +{ + if (!m_pImpl->m_pTextMasterPageElemTokenMap.get()) + { + m_pImpl->m_pTextMasterPageElemTokenMap.reset( + new SvXMLTokenMap( aTextMasterPageElemTokenMap )); + } + return *m_pImpl->m_pTextMasterPageElemTokenMap; +} + +const SvXMLTokenMap& XMLTextImportHelper::GetTextFieldAttrTokenMap() +{ + if (!m_pImpl->m_pTextFieldAttrTokenMap.get()) + { + m_pImpl->m_pTextFieldAttrTokenMap.reset( + new SvXMLTokenMap( aTextFieldAttrTokenMap )); + } + return *m_pImpl->m_pTextFieldAttrTokenMap; +} + namespace { @@ -513,111 +950,48 @@ namespace } XMLTextImportHelper::XMLTextImportHelper( - const Reference < XModel >& rModel, + uno::Reference<frame::XModel> const& rModel, SvXMLImport& rImport, - sal_Bool bInsertM, sal_Bool bStylesOnlyM, - sal_Bool bPrg, - sal_Bool bBlockM, - sal_Bool bOrganizerM ) -: pTextElemTokenMap( 0 ) -, pTextPElemTokenMap( 0 ) -, pTextPAttrTokenMap( 0 ) -, pTextFieldAttrTokenMap( 0 ) -, pTextNumberedParagraphAttrTokenMap( 0 ) -, pTextListBlockAttrTokenMap( 0 ) -, pTextListBlockElemTokenMap( 0 ) -, pTextFrameAttrTokenMap( 0 ) -, pTextContourAttrTokenMap( 0 ) -, pTextHyperlinkAttrTokenMap( 0 ) -, pTextMasterPageElemTokenMap( 0 ) -, pPrevFrmNames( 0 ) -, pNextFrmNames( 0 ) - -// --> OD 2008-04-25 #refactorlists# -, mpTextListsHelper( new XMLTextListsHelper() ) -// <-- - -, pRenameMap( 0 ) -// --> OD 2006-10-12 #i69629# -, mpOutlineStylesCandidates( 0 ) -// <-- - -, pFootnoteBackpatcher( NULL ) -, pSequenceIdBackpatcher( NULL ) -, pSequenceNameBackpatcher( NULL ) - -, xServiceFactory( rModel, UNO_QUERY ) - -, rSvXMLImport( rImport ) - -, bInsertMode( bInsertM ) -, bStylesOnlyMode( bStylesOnlyM ) -, bBlockMode( bBlockM ) -, bProgress( bPrg ) -, bOrganizerMode( bOrganizerM ) -, bBodyContentStarted( sal_True ) - - // #107848# - // Initialize inside_deleted_section flag correctly -, bInsideDeleteContext( sal_False ) - -, sParaStyleName(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")) -, sCharStyleName(RTL_CONSTASCII_USTRINGPARAM("CharStyleName")) -, sHeadingStyleName(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")) -, sNumberingLevel(RTL_CONSTASCII_USTRINGPARAM("NumberingLevel")) -, sNumberingStartValue(RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue")) -, sNumberingRules(RTL_CONSTASCII_USTRINGPARAM("NumberingRules")) -, sParaIsNumberingRestart(RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart")) -, sNumberingIsNumber(RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber")) -, sCurrentPresentation(RTL_CONSTASCII_USTRINGPARAM("CurrentPresentation")) -, sSequenceNumber(RTL_CONSTASCII_USTRINGPARAM("SequenceNumber")) -, sSourceName(RTL_CONSTASCII_USTRINGPARAM("SourceName")) -, sChainNextName(RTL_CONSTASCII_USTRINGPARAM("ChainNextName")) -, sChainPrevName(RTL_CONSTASCII_USTRINGPARAM("ChainPrevName")) -, sHyperLinkURL(RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL")) -, sHyperLinkName(RTL_CONSTASCII_USTRINGPARAM("HyperLinkName")) -, sHyperLinkTarget(RTL_CONSTASCII_USTRINGPARAM("HyperLinkTarget")) -, sUnvisitedCharStyleName(RTL_CONSTASCII_USTRINGPARAM("UnvisitedCharStyleName")) -, sVisitedCharStyleName(RTL_CONSTASCII_USTRINGPARAM("VisitedCharStyleName")) -, sTextFrame(RTL_CONSTASCII_USTRINGPARAM("TextFrame")) -, sPageDescName(RTL_CONSTASCII_USTRINGPARAM("PageDescName")) -, sServerMap(RTL_CONSTASCII_USTRINGPARAM("ServerMap")) -, sHyperLinkEvents(RTL_CONSTASCII_USTRINGPARAM("HyperLinkEvents")) -, sContent(RTL_CONSTASCII_USTRINGPARAM("Content")) -, sServiceCombinedCharacters(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.CombinedCharacters")) -, sNumberingStyleName(RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")) -// --> OD 2008-04-23 #refactorlists# -, sPropNameDefaultListId(RTL_CONSTASCII_USTRINGPARAM("DefaultListId")) -, sPropNameListId(RTL_CONSTASCII_USTRINGPARAM("ListId")) -, sOutlineLevel( RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")) //#outline level,add by zhaojianwei -// <-- + bool const bInsertMode, bool const bStylesOnlyMode, + bool const bProgress, bool const bBlockMode, + bool const bOrganizerMode) + : m_pImpl( new Impl(rModel, rImport, bInsertMode, bStylesOnlyMode, + bProgress, bBlockMode, bOrganizerMode) ) + , m_pBackpatcherImpl( MakeBackpatcherImpl() ) { + static ::rtl::OUString s_PropNameDefaultListId( + RTL_CONSTASCII_USTRINGPARAM("DefaultListId")); + Reference< XChapterNumberingSupplier > xCNSupplier( rModel, UNO_QUERY ); if( xCNSupplier.is() ) { - xChapterNumbering = xCNSupplier->getChapterNumberingRules(); + m_pImpl->m_xChapterNumbering = xCNSupplier->getChapterNumberingRules(); // --> OD 2008-05-15 #refactorlists# - if ( xChapterNumbering.is() ) + if (m_pImpl->m_xChapterNumbering.is()) { - Reference< XPropertySet > xNumRuleProps( xChapterNumbering, UNO_QUERY ); + Reference< XPropertySet > const xNumRuleProps( + m_pImpl->m_xChapterNumbering, UNO_QUERY); if ( xNumRuleProps.is() ) { Reference< XPropertySetInfo > xNumRulePropSetInfo( xNumRuleProps->getPropertySetInfo()); - if ( xNumRulePropSetInfo.is() && - xNumRulePropSetInfo->hasPropertyByName( sPropNameDefaultListId) ) + if (xNumRulePropSetInfo.is() && + xNumRulePropSetInfo->hasPropertyByName( + s_PropNameDefaultListId)) { ::rtl::OUString sListId; - xNumRuleProps->getPropertyValue( sPropNameDefaultListId ) >>= sListId; + xNumRuleProps->getPropertyValue(s_PropNameDefaultListId) + >>= sListId; DBG_ASSERT( sListId.getLength() != 0, "no default list id found at chapter numbering rules instance. Serious defect -> please inform OD." ); if ( sListId.getLength() ) { - Reference< XNamed > xChapterNumNamed( xChapterNumbering, UNO_QUERY ); + Reference< XNamed > const xChapterNumNamed( + m_pImpl->m_xChapterNumbering, UNO_QUERY); if ( xChapterNumNamed.is() ) { - mpTextListsHelper->KeepListAsProcessed( + m_pImpl->m_pTextListsHelper->KeepListAsProcessed( sListId, xChapterNumNamed->getName(), ::rtl::OUString() ); @@ -639,72 +1013,81 @@ XMLTextImportHelper::XMLTextImportHelper( const OUString aParaStyles(RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles")); if( xFamilies->hasByName( aParaStyles ) ) { - xParaStyles.set(xFamilies->getByName( aParaStyles ), UNO_QUERY); + m_pImpl->m_xParaStyles.set(xFamilies->getByName(aParaStyles), + UNO_QUERY); } const OUString aCharStyles(RTL_CONSTASCII_USTRINGPARAM("CharacterStyles")); if( xFamilies->hasByName( aCharStyles ) ) { - xTextStyles.set(xFamilies->getByName( aCharStyles ), UNO_QUERY); + m_pImpl->m_xTextStyles.set(xFamilies->getByName(aCharStyles), + UNO_QUERY); } const OUString aNumStyles(RTL_CONSTASCII_USTRINGPARAM("NumberingStyles")); if( xFamilies->hasByName( aNumStyles ) ) { - xNumStyles.set(xFamilies->getByName( aNumStyles ), UNO_QUERY); + m_pImpl->m_xNumStyles.set(xFamilies->getByName(aNumStyles), + UNO_QUERY); } const OUString aFrameStyles(RTL_CONSTASCII_USTRINGPARAM("FrameStyles")); if( xFamilies->hasByName( aFrameStyles ) ) { - xFrameStyles.set(xFamilies->getByName( aFrameStyles ), UNO_QUERY); + m_pImpl->m_xFrameStyles.set(xFamilies->getByName(aFrameStyles), + UNO_QUERY); } const OUString aPageStyles(RTL_CONSTASCII_USTRINGPARAM("PageStyles")); if( xFamilies->hasByName( aPageStyles ) ) { - xPageStyles.set(xFamilies->getByName( aPageStyles ), UNO_QUERY); + m_pImpl->m_xPageStyles.set(xFamilies->getByName(aPageStyles), + UNO_QUERY); } } Reference < XTextFramesSupplier > xTFS( rModel, UNO_QUERY ); if( xTFS.is() ) - xTextFrames.set(xTFS->getTextFrames()); + { + m_pImpl->m_xTextFrames.set(xTFS->getTextFrames()); + } Reference < XTextGraphicObjectsSupplier > xTGOS( rModel, UNO_QUERY ); if( xTGOS.is() ) - xGraphics.set(xTGOS->getGraphicObjects()); + { + m_pImpl->m_xGraphics.set(xTGOS->getGraphicObjects()); + } Reference < XTextEmbeddedObjectsSupplier > xTEOS( rModel, UNO_QUERY ); if( xTEOS.is() ) - xObjects.set(xTEOS->getEmbeddedObjects()); + { + m_pImpl->m_xObjects.set(xTEOS->getEmbeddedObjects()); + } XMLPropertySetMapper *pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ); - xParaImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xParaImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT ); - xTextImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xTextImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME ); - xFrameImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xFrameImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION ); - xSectionImpPrMap = new XMLTextImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xSectionImpPrMap = + new XMLTextImportPropertyMapper( pPropMapper, rImport ); pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY ); - xRubyImpPrMap = new SvXMLImportPropertyMapper( pPropMapper, rImport ); + m_pImpl->m_xRubyImpPrMap = + new SvXMLImportPropertyMapper( pPropMapper, rImport ); } XMLTextImportHelper::~XMLTextImportHelper() { - // --> OD 2006-10-12 #i69629# - delete [] mpOutlineStylesCandidates; - // <-- - - aBookmarkVector.clear(); - - _FinitBackpatcher(); } SvXMLImportPropertyMapper *XMLTextImportHelper::CreateShapeExtPropMapper(SvXMLImport& rImport) @@ -771,75 +1154,46 @@ SvXMLImportPropertyMapper* void XMLTextImportHelper::SetCursor( const Reference < XTextCursor > & rCursor ) { - xCursor.set(rCursor); - xText.set(rCursor->getText()); - xCursorAsRange.set( rCursor, UNO_QUERY ); + m_pImpl->m_xCursor.set(rCursor); + m_pImpl->m_xText.set(rCursor->getText()); + m_pImpl->m_xCursorAsRange.set( rCursor, UNO_QUERY ); } void XMLTextImportHelper::ResetCursor() { - xCursor.set(0); - xText.set(0); - xCursorAsRange.set(0); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextElemTokenMap() -{ - return new SvXMLTokenMap( aTextElemTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextPElemTokenMap() -{ - return new SvXMLTokenMap( aTextPElemTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextPAttrTokenMap() -{ - return new SvXMLTokenMap( aTextPAttrTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextFrameAttrTokenMap() -{ - return new SvXMLTokenMap( aTextFrameAttrTokenMap ); -} - -SvXMLTokenMap *XMLTextImportHelper::_GetTextContourAttrTokenMap() -{ - return new SvXMLTokenMap( aTextContourAttrTokenMap ); -} - - -SvXMLTokenMap *XMLTextImportHelper::_GetTextHyperlinkAttrTokenMap() -{ - return new SvXMLTokenMap( aTextHyperlinkAttrTokenMap ); + m_pImpl->m_xCursor.set(0); + m_pImpl->m_xText.set(0); + m_pImpl->m_xCursorAsRange.set(0); } -SvXMLTokenMap *XMLTextImportHelper::_GetTextMasterPageElemTokenMap() -{ - return new SvXMLTokenMap( aTextMasterPageElemTokenMap ); -} sal_Bool XMLTextImportHelper::HasFrameByName( const OUString& rName ) const { - return ( xTextFrames.is() && xTextFrames->hasByName( rName ) ) || - ( xGraphics.is() && xGraphics->hasByName( rName ) ) || - ( xObjects.is() && xObjects->hasByName( rName ) ); + return (m_pImpl->m_xTextFrames.is() && + m_pImpl->m_xTextFrames->hasByName(rName)) + || (m_pImpl->m_xGraphics.is() && + m_pImpl->m_xGraphics->hasByName(rName)) + || (m_pImpl->m_xObjects.is() && + m_pImpl->m_xObjects->hasByName(rName)); } void XMLTextImportHelper::InsertString( const OUString& rChars ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) - xText->insertString( xCursorAsRange, rChars, sal_False ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) + { + m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + rChars, sal_False); + } } void XMLTextImportHelper::InsertString( const OUString& rChars, sal_Bool& rIgnoreLeadingSpace ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) { sal_Int32 nLen = rChars.getLength(); OUStringBuffer sChars( nLen ); @@ -863,35 +1217,43 @@ void XMLTextImportHelper::InsertString( const OUString& rChars, break; } } - xText->insertString( xCursorAsRange, sChars.makeStringAndClear(), - sal_False ); + m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + sChars.makeStringAndClear(), sal_False); } } + void XMLTextImportHelper::InsertControlCharacter( sal_Int16 nControl ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) - xText->insertControlCharacter( xCursorAsRange, nControl, sal_False ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) + { + m_pImpl->m_xText->insertControlCharacter( + m_pImpl->m_xCursorAsRange, nControl, sal_False); + } } void XMLTextImportHelper::InsertTextContent( Reference < XTextContent > & xContent ) { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); - if( xText.is() ) - xText->insertTextContent( xCursorAsRange, xContent, sal_False ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); + if (m_pImpl->m_xText.is()) + { + m_pImpl->m_xText->insertTextContent( + m_pImpl->m_xCursorAsRange, xContent, sal_False); + } } void XMLTextImportHelper::DeleteParagraph() { - DBG_ASSERT( xText.is(), "no text" ); - DBG_ASSERT( xCursor.is(), "no cursor" ); - DBG_ASSERT( xCursorAsRange.is(), "no range" ); + DBG_ASSERT(m_pImpl->m_xText.is(), "no text"); + DBG_ASSERT(m_pImpl->m_xCursor.is(), "no cursor"); + DBG_ASSERT(m_pImpl->m_xCursorAsRange.is(), "no range"); sal_Bool bDelete = sal_True; - Reference < XEnumerationAccess > xEnumAccess( xCursor, UNO_QUERY ); + Reference < XEnumerationAccess > const xEnumAccess( + m_pImpl->m_xCursor, UNO_QUERY); if( xEnumAccess.is() ) { Reference < XEnumeration > xEnum(xEnumAccess->createEnumeration()); @@ -909,10 +1271,11 @@ void XMLTextImportHelper::DeleteParagraph() } if( bDelete ) { - if( xCursor->goLeft( 1, sal_True ) ) + if (m_pImpl->m_xCursor->goLeft( 1, sal_True )) { OUString sEmpty; - xText->insertString( xCursorAsRange, sEmpty, sal_True ); + m_pImpl->m_xText->insertString(m_pImpl->m_xCursorAsRange, + sEmpty, sal_True); } } } @@ -935,9 +1298,10 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, XMLTextStyleContext *pStyle = 0; sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; - if( rStyleName.getLength() && xAutoStyles.Is() ) + if (rStyleName.getLength() && m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( nFamily, rStyleName, sal_True ); pStyle = PTR_CAST( XMLTextStyleContext,pTempStyle); @@ -949,7 +1313,8 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, if( nCount ) { UniReference < SvXMLImportPropertyMapper > xImpPrMap = - ((SvXMLStylesContext *)&xAutoStyles)->GetImportPropertyMapper(nFamily); + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles) + ->GetImportPropertyMapper(nFamily); if( xImpPrMap.is() ) { UniReference<XMLPropertySetMapper> rPropMapper = @@ -1135,13 +1500,41 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( sal_Bool bSetListAttrs ) // <-- { + static ::rtl::OUString s_ParaStyleName( + RTL_CONSTASCII_USTRINGPARAM("ParaStyleName")); + static ::rtl::OUString s_CharStyleName( + RTL_CONSTASCII_USTRINGPARAM("CharStyleName")); + static ::rtl::OUString s_NumberingRules( + RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); + static ::rtl::OUString s_NumberingIsNumber( + RTL_CONSTASCII_USTRINGPARAM("NumberingIsNumber")); + static ::rtl::OUString s_NumberingLevel( + RTL_CONSTASCII_USTRINGPARAM("NumberingLevel")); + static ::rtl::OUString s_ParaIsNumberingRestart( + RTL_CONSTASCII_USTRINGPARAM("ParaIsNumberingRestart")); + static ::rtl::OUString s_NumberingStartValue( + RTL_CONSTASCII_USTRINGPARAM("NumberingStartValue")); + static ::rtl::OUString s_PropNameListId( + RTL_CONSTASCII_USTRINGPARAM("ListId")); + static ::rtl::OUString s_PageDescName( + RTL_CONSTASCII_USTRINGPARAM("PageDescName")); + static ::rtl::OUString s_ServiceCombinedCharacters( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.text.TextField.CombinedCharacters")); + static ::rtl::OUString s_Content(RTL_CONSTASCII_USTRINGPARAM("Content")); + static ::rtl::OUString s_OutlineLevel( + RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")); + static ::rtl::OUString s_NumberingStyleName( + RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")); + const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH : XML_STYLE_FAMILY_TEXT_TEXT; XMLTextStyleContext *pStyle = 0; OUString sStyleName( rStyleName ); - if( sStyleName.getLength() && xAutoStyles.Is() ) + if (sStyleName.getLength() && m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( nFamily, sStyleName, sal_True ); pStyle = PTR_CAST( XMLTextStyleContext,pTempStyle); } @@ -1156,9 +1549,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if( sStyleName.getLength() ) { sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName ); - const String& rPropName = bPara ? sParaStyleName : sCharStyleName; - const Reference < XNameContainer > & rStyles = bPara ? xParaStyles - : xTextStyles; + const String& rPropName = (bPara) ? s_ParaStyleName : s_CharStyleName; + const Reference < XNameContainer > & rStyles = (bPara) + ? m_pImpl->m_xParaStyles + : m_pImpl->m_xTextStyles; if( rStyles.is() && xPropSetInfo->hasPropertyByName( rPropName ) && rStyles->hasByName( sStyleName ) ) @@ -1174,11 +1568,13 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // is not inside a list and if it by default applies the outline style. bool bApplyOutlineLevelAsListLevel( false ); // --> OD 2007-08-17 #i80724# - if ( bSetListAttrs && bPara && xPropSetInfo->hasPropertyByName( sNumberingRules ) ) + if (bSetListAttrs && bPara + && xPropSetInfo->hasPropertyByName( s_NumberingRules)) // <-- { // Set numbering rules - Reference < XIndexReplace > xNumRules(xPropSet->getPropertyValue( sNumberingRules ), UNO_QUERY); + Reference< XIndexReplace > const xNumRules( + xPropSet->getPropertyValue(s_NumberingRules), UNO_QUERY); XMLTextListBlockContext * pListBlock(0); XMLTextListItemContext * pListItem(0); @@ -1214,7 +1610,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // --> OD 2008-08-15 #i92811# - sListId = mpTextListsHelper->GetListIdForListBlock( *pListBlock ); + sListId = m_pImpl->m_pTextListsHelper->GetListIdForListBlock( + *pListBlock); // <-- } else if (pNumberedParagraph) @@ -1268,7 +1665,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // gracefully. try { - xPropSet->setPropertyValue( sNumberingRules, makeAny(xNewNumRules) ); + xPropSet->setPropertyValue( + s_NumberingRules, makeAny(xNewNumRules) ); } catch( Exception e ) { @@ -1279,37 +1677,37 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } if (!bNumberingIsNumber && - xPropSetInfo->hasPropertyByName( sNumberingIsNumber ) ) + xPropSetInfo->hasPropertyByName(s_NumberingIsNumber)) { - xPropSet->setPropertyValue( sNumberingIsNumber, Any(sal_False) ); + xPropSet->setPropertyValue(s_NumberingIsNumber, Any(sal_False)); } - xPropSet->setPropertyValue( sNumberingLevel, Any(nLevel) ); + xPropSet->setPropertyValue( s_NumberingLevel, Any(nLevel) ); if( pListBlock && pListBlock->IsRestartNumbering() ) { // TODO: property missing - if( xPropSetInfo->hasPropertyByName( sParaIsNumberingRestart ) ) + if (xPropSetInfo->hasPropertyByName(s_ParaIsNumberingRestart)) { sal_Bool bTmp = sal_True; - xPropSet->setPropertyValue(sParaIsNumberingRestart, + xPropSet->setPropertyValue(s_ParaIsNumberingRestart, makeAny(bTmp) ); } pListBlock->ResetRestartNumbering(); } if ( 0 <= nStartValue && - xPropSetInfo->hasPropertyByName( sNumberingStartValue ) ) + xPropSetInfo->hasPropertyByName(s_NumberingStartValue)) { - xPropSet->setPropertyValue(sNumberingStartValue, + xPropSet->setPropertyValue(s_NumberingStartValue, makeAny(nStartValue)); } // --> OD 2008-04-23 #refactorlists# - if ( xPropSetInfo->hasPropertyByName( sPropNameListId ) ) + if (xPropSetInfo->hasPropertyByName(s_PropNameListId)) { if (sListId.getLength()) { - xPropSet->setPropertyValue( sPropNameListId, + xPropSet->setPropertyValue(s_PropNameListId, makeAny(sListId) ); } } @@ -1338,10 +1736,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( ( bBuildIdFound && nUPD == 680 ) || !pStyle || !pStyle->IsListStyleSet() ) { - if ( xChapterNumbering.is() ) + if (m_pImpl->m_xChapterNumbering.is()) { Reference< XNamed > xNumNamed( xNumRules, UNO_QUERY ); - Reference< XNamed > xChapterNumNamed( xChapterNumbering, UNO_QUERY ); + Reference< XNamed > const xChapterNumNamed ( + m_pImpl->m_xChapterNumbering, UNO_QUERY); if ( xNumNamed.is() && xChapterNumNamed.is() && xNumNamed->getName() == xChapterNumNamed->getName() ) { @@ -1355,7 +1754,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // <-- if ( bRemove ) { - xPropSet->setPropertyValue( sNumberingRules, Any() ); + xPropSet->setPropertyValue( s_NumberingRules, Any() ); } } // <-- @@ -1367,27 +1766,28 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { pStyle->FillPropertySet( xPropSet ); if( bPara && pStyle->HasMasterPageName() && - xPropSetInfo->hasPropertyByName( sPageDescName ) ) + xPropSetInfo->hasPropertyByName(s_PageDescName)) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, pStyle->GetMasterPageName()) ); if( !sDisplayName.getLength() || - (xPageStyles.is() && - xPageStyles->hasByName( sDisplayName )) ) + (m_pImpl->m_xPageStyles.is() && + m_pImpl->m_xPageStyles->hasByName( sDisplayName))) { - xPropSet->setPropertyValue( sPageDescName, makeAny(sDisplayName) ); + xPropSet->setPropertyValue(s_PageDescName, + makeAny(sDisplayName)); } } if( bPara && pStyle->GetDropCapStyleName().getLength() && - xTextStyles.is() ) + m_pImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, pStyle->GetDropCapStyleName()) ); - if( xTextStyles->hasByName( sDisplayName ) && + if (m_pImpl->m_xTextStyles->hasByName(sDisplayName) && xPropSetInfo->hasPropertyByName( sDisplayName ) ) { xPropSet->setPropertyValue( pStyle->sDropCapCharStyleName, makeAny(sDisplayName) ); @@ -1398,9 +1798,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if (!bPara && pStyle->HasCombinedCharactersLetter()) { // insert combined characters text field - if( xServiceFactory.is() ) + if (m_pImpl->m_xServiceFactory.is()) { - Reference<XPropertySet> xTmp( xServiceFactory->createInstance(sServiceCombinedCharacters), UNO_QUERY ); + uno::Reference<beans::XPropertySet> const xTmp( + m_pImpl->m_xServiceFactory->createInstance( + s_ServiceCombinedCharacters), UNO_QUERY); if( xTmp.is() ) { // fix cursor if larger than possible for @@ -1413,15 +1815,16 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( } // set field value (the combined character string) - xTmp->setPropertyValue(sContent, makeAny(rCursor->getString())); + xTmp->setPropertyValue(s_Content, + makeAny(rCursor->getString())); // insert the field over it's original text Reference<XTextRange> xRange(rCursor, UNO_QUERY); Reference<XTextContent> xTextContent(xTmp, UNO_QUERY); - if (xText.is() && xRange.is()) + if (m_pImpl->m_xText.is() && xRange.is()) { - xText->insertTextContent( xRange, xTextContent, - sal_True ); + m_pImpl->m_xText->insertTextContent( + xRange, xTextContent, sal_True); } } } @@ -1444,10 +1847,12 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( { // --> OD 2009-08-18 #i103817# sal_Int16 nCurrentOutlineLevelInheritedFromParagraphStyle = 0; - const bool bHasOutlineLevelProp( xPropSetInfo->hasPropertyByName( sOutlineLevel ) ); + const bool bHasOutlineLevelProp( + xPropSetInfo->hasPropertyByName(s_OutlineLevel)); if ( bHasOutlineLevelProp ) { - xPropSet->getPropertyValue( sOutlineLevel ) >>= nCurrentOutlineLevelInheritedFromParagraphStyle; + xPropSet->getPropertyValue(s_OutlineLevel) + >>= nCurrentOutlineLevelInheritedFromParagraphStyle; } // <-- //if ( bPara && nOutlineLevel != -1 ) //#outline level,removed by zhaojianwei @@ -1460,7 +1865,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // attribute outline level, the paragraph attribute value is left unset if ( nCurrentOutlineLevelInheritedFromParagraphStyle != nOutlineLevel ) { - xPropSet->setPropertyValue( sOutlineLevel, + xPropSet->setPropertyValue( s_OutlineLevel, makeAny( static_cast<sal_Int16>(nOutlineLevel) ) ); } }//<-end,zhaojianwei @@ -1469,11 +1874,11 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( bApplyOutlineLevelAsListLevel ) { sal_Int16 nNumLevel = -1; - xPropSet->getPropertyValue( sNumberingLevel ) >>= nNumLevel; + xPropSet->getPropertyValue( s_NumberingLevel ) >>= nNumLevel; if ( nNumLevel == -1 || nNumLevel != (nOutlineLevel - 1) ) { - xPropSet->setPropertyValue( sNumberingLevel, + xPropSet->setPropertyValue( s_NumberingLevel, makeAny( static_cast<sal_Int8>(nOutlineLevel - 1) ) ); } } @@ -1486,7 +1891,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // a candidate for an assignment to the list level of the outline // style, if it has no direct list style property and (if exists) the // automatic paragraph style has also no direct list style set. - if( xParaStyles->hasByName( sStyleName ) ) + if (m_pImpl->m_xParaStyles->hasByName(sStyleName)) { bool bOutlineStyleCandidate( false ); @@ -1538,19 +1943,19 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( // Assure that heading applies the outline style if ( ( !pStyle || !pStyle->IsListStyleSet() ) && !bOutlineStyleCandidate && - xChapterNumbering.is() ) + m_pImpl->m_xChapterNumbering.is()) { OUString sEmptyStr; if ( !lcl_HasListStyle( sStyleName, - xParaStyles, GetXMLImport(), - sNumberingStyleName, + m_pImpl->m_xParaStyles, GetXMLImport(), + s_NumberingStyleName, sEmptyStr ) ) { // heading not in a list --> apply outline style - xPropSet->setPropertyValue( sNumberingRules, - makeAny(xChapterNumbering) ); - xPropSet->setPropertyValue( sNumberingLevel, - makeAny( static_cast<sal_Int8>(nOutlineLevel - 1) ) ); + xPropSet->setPropertyValue( s_NumberingRules, + makeAny(m_pImpl->m_xChapterNumbering) ); + xPropSet->setPropertyValue( s_NumberingLevel, + makeAny(static_cast<sal_Int8>(nOutlineLevel - 1))); } } // <-- @@ -1564,7 +1969,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( if ( nCurrentOutlineLevelInheritedFromParagraphStyle != 0 ) { sal_Int16 nZero = 0; - xPropSet->setPropertyValue( sOutlineLevel, makeAny( static_cast<sal_Int16>(nZero) ) ); + xPropSet->setPropertyValue(s_OutlineLevel, + makeAny( static_cast<sal_Int16>(nZero) )); } }//<-end,zhaojianwei } @@ -1576,38 +1982,39 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, sal_Int8 nOutlineLevel ) { + static ::rtl::OUString s_HeadingStyleName( + RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); + // style name empty? if( rStyleName.getLength() == 0 ) { // Empty? Then we need o do stuff. Let's do error checking first. - if( xChapterNumbering.is() && + if (m_pImpl->m_xChapterNumbering.is() && ( nOutlineLevel > 0 ) && - ( nOutlineLevel <= xChapterNumbering->getCount() ) ) + (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount())) { nOutlineLevel--; // for the remainder, the level's are 0-based // empty style name: look-up previously used name // if we don't have a previously used name, we'll use the default - if ( mpOutlineStylesCandidates == NULL ) - { - mpOutlineStylesCandidates = new ::std::vector<OUString>[xChapterNumbering->getCount()]; - } - - if ( mpOutlineStylesCandidates[nOutlineLevel].empty() ) + m_pImpl->InitOutlineStylesCandidates(); + if (m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].empty()) { // no other name used previously? Then use default // iterate over property value sequence to find the style name Sequence<PropertyValue> aProperties; - xChapterNumbering->getByIndex( nOutlineLevel ) >>= aProperties; + m_pImpl->m_xChapterNumbering->getByIndex( nOutlineLevel ) + >>= aProperties; for( sal_Int32 i = 0; i < aProperties.getLength(); i++ ) { - if( aProperties[i].Name == sHeadingStyleName ) + if (aProperties[i].Name == s_HeadingStyleName) { rtl::OUString aOutlineStyle; aProperties[i].Value >>= aOutlineStyle; - mpOutlineStylesCandidates[nOutlineLevel].push_back( aOutlineStyle ); + m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel] + .push_back( aOutlineStyle ); break; // early out, if we found it!. } } @@ -1616,7 +2023,8 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, // finally, we'll use the previously used style name for this // format (or the default we've just put into that style) // --> OD 2006-11-06 #i71249# - take last added one - rStyleName = mpOutlineStylesCandidates[nOutlineLevel].back(); + rStyleName = + m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel].back(); // <-- } // else: nothing we can do, so we'll leave it empty @@ -1627,23 +2035,27 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName, void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel, const OUString& rStyleName ) { - if ( rStyleName.getLength() && - xChapterNumbering.is() && - nOutlineLevel > 0 && nOutlineLevel <= xChapterNumbering->getCount() ) + if (rStyleName.getLength() + && m_pImpl->m_xChapterNumbering.is() + && (nOutlineLevel > 0) + && (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount())) { - if( !mpOutlineStylesCandidates ) - { - mpOutlineStylesCandidates = new ::std::vector<OUString>[xChapterNumbering->getCount()]; - } - mpOutlineStylesCandidates[nOutlineLevel-1].push_back( rStyleName ); + m_pImpl->InitOutlineStylesCandidates(); + m_pImpl->m_pOutlineStylesCandidates[nOutlineLevel-1].push_back( + rStyleName); } } void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) { - if ( ( mpOutlineStylesCandidates != NULL || bSetEmptyLevels ) && - xChapterNumbering.is() && - !IsInsertMode() ) + static ::rtl::OUString s_NumberingStyleName( + RTL_CONSTASCII_USTRINGPARAM("NumberingStyleName")); + static ::rtl::OUString s_HeadingStyleName( + RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); + + if ((m_pImpl->m_pOutlineStylesCandidates != NULL || bSetEmptyLevels) && + m_pImpl->m_xChapterNumbering.is() && + !IsInsertMode()) { bool bChooseLastOne( false ); { @@ -1666,12 +2078,13 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) OUString sOutlineStyleName; { - Reference<XPropertySet> xChapterNumRule( xChapterNumbering, UNO_QUERY ); + Reference<XPropertySet> xChapterNumRule( + m_pImpl->m_xChapterNumbering, UNO_QUERY); const OUString sName(RTL_CONSTASCII_USTRINGPARAM("Name")); xChapterNumRule->getPropertyValue(sName) >>= sOutlineStyleName; } - const sal_Int32 nCount = xChapterNumbering->getCount(); + const sal_Int32 nCount = m_pImpl->m_xChapterNumbering->getCount(); // --> OD 2009-11-13 #i106218# // First collect all paragraph styles choosen for assignment to each // list level of the outline style, then perform the intrinsic assignment. @@ -1683,28 +2096,33 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) for( sal_Int32 i=0; i < nCount; ++i ) { if ( bSetEmptyLevels || - ( mpOutlineStylesCandidates && - !mpOutlineStylesCandidates[i].empty() ) ) + (m_pImpl->m_pOutlineStylesCandidates && + !m_pImpl->m_pOutlineStylesCandidates[i].empty())) { // determine, which candidate is one to be assigned to the list // level of the outline style - if ( mpOutlineStylesCandidates && - !mpOutlineStylesCandidates[i].empty() ) + if (m_pImpl->m_pOutlineStylesCandidates && + !m_pImpl->m_pOutlineStylesCandidates[i].empty()) { if ( bChooseLastOne ) { - sChosenStyles[i] = mpOutlineStylesCandidates[i].back(); + sChosenStyles[i] = + m_pImpl->m_pOutlineStylesCandidates[i].back(); } else { - for ( sal_uInt32 j = 0; j < mpOutlineStylesCandidates[i].size(); ++j ) + for (sal_uInt32 j = 0; + j < m_pImpl->m_pOutlineStylesCandidates[i].size(); + ++j) { - if ( !lcl_HasListStyle( mpOutlineStylesCandidates[i][j], - xParaStyles, GetXMLImport(), - sNumberingStyleName, - sOutlineStyleName ) ) + if (!lcl_HasListStyle( + m_pImpl->m_pOutlineStylesCandidates[i][j], + m_pImpl->m_xParaStyles, GetXMLImport(), + s_NumberingStyleName, + sOutlineStyleName)) { - sChosenStyles[i] = mpOutlineStylesCandidates[i][j]; + sChosenStyles[i] = + m_pImpl->m_pOutlineStylesCandidates[i][j]; break; } } @@ -1715,7 +2133,7 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) // --> OD 2009-11-13 #i106218# Sequence < PropertyValue > aProps( 1 ); PropertyValue *pProps = aProps.getArray(); - pProps->Name = sHeadingStyleName; + pProps->Name = s_HeadingStyleName; for ( sal_Int32 i = 0; i < nCount; ++i ) { // --> OD 2009-12-11 #i107610# @@ -1724,7 +2142,8 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels ) // <-- { pProps->Value <<= sChosenStyles[i]; - xChapterNumbering->replaceByIndex( i, makeAny( aProps ) ); + m_pImpl->m_xChapterNumbering->replaceByIndex(i, + makeAny( aProps )); } } // <-- @@ -1741,62 +2160,79 @@ void XMLTextImportHelper::SetHyperlink( const OUString& rVisitedStyleName, XMLEventsImportContext* pEvents) { + static ::rtl::OUString s_HyperLinkURL( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkURL")); + static ::rtl::OUString s_HyperLinkName( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkName")); + static ::rtl::OUString s_HyperLinkTarget( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkTarget")); + static ::rtl::OUString s_UnvisitedCharStyleName( + RTL_CONSTASCII_USTRINGPARAM("UnvisitedCharStyleName")); + static ::rtl::OUString s_VisitedCharStyleName( + RTL_CONSTASCII_USTRINGPARAM("VisitedCharStyleName")); + static ::rtl::OUString s_HyperLinkEvents( + RTL_CONSTASCII_USTRINGPARAM("HyperLinkEvents")); + Reference < XPropertySet > xPropSet( rCursor, UNO_QUERY ); Reference < XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo()); - if( !xPropSetInfo.is() || !xPropSetInfo->hasPropertyByName(sHyperLinkURL) ) + if (!xPropSetInfo.is() || !xPropSetInfo->hasPropertyByName(s_HyperLinkURL)) return; - xPropSet->setPropertyValue( sHyperLinkURL, makeAny(rHRef) ); + xPropSet->setPropertyValue(s_HyperLinkURL, makeAny(rHRef)); - if( xPropSetInfo->hasPropertyByName( sHyperLinkName ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkName)) { - xPropSet->setPropertyValue( sHyperLinkName, makeAny(rName) ); + xPropSet->setPropertyValue(s_HyperLinkName, makeAny(rName)); } - if( xPropSetInfo->hasPropertyByName( sHyperLinkTarget ) ) + if (xPropSetInfo->hasPropertyByName(s_HyperLinkTarget)) { - xPropSet->setPropertyValue( sHyperLinkTarget, makeAny(rTargetFrameName) ); + xPropSet->setPropertyValue(s_HyperLinkTarget, + makeAny(rTargetFrameName)); } if ( (pEvents != NULL) && - xPropSetInfo->hasPropertyByName( sHyperLinkEvents )) + xPropSetInfo->hasPropertyByName(s_HyperLinkEvents)) { // The API treats events at hyperlinks differently from most // other properties: You have to set a name replace with the // events in it. The easiest way to to this is to 1) get // events, 2) set new ones, and 3) then put events back. - Reference<XNameReplace> xReplace(xPropSet->getPropertyValue( sHyperLinkEvents ), UNO_QUERY); + uno::Reference<XNameReplace> const xReplace( + xPropSet->getPropertyValue(s_HyperLinkEvents), UNO_QUERY); if (xReplace.is()) { // set events pEvents->SetEvents(xReplace); // put events - xPropSet->setPropertyValue( sHyperLinkEvents, makeAny(xReplace) ); + xPropSet->setPropertyValue(s_HyperLinkEvents, makeAny(xReplace)); } } - if( xTextStyles.is() ) + if (m_pImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rStyleName ) ); if( sDisplayName.getLength() && - xPropSetInfo->hasPropertyByName( sUnvisitedCharStyleName ) && - xTextStyles->hasByName( sDisplayName ) ) + xPropSetInfo->hasPropertyByName(s_UnvisitedCharStyleName) && + m_pImpl->m_xTextStyles->hasByName(sDisplayName)) { - xPropSet->setPropertyValue( sUnvisitedCharStyleName, makeAny(sDisplayName) ); + xPropSet->setPropertyValue(s_UnvisitedCharStyleName, + makeAny(sDisplayName)); } sDisplayName = rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rVisitedStyleName ); if( sDisplayName.getLength() && - xPropSetInfo->hasPropertyByName( sVisitedCharStyleName ) && - xTextStyles->hasByName( sDisplayName ) ) + xPropSetInfo->hasPropertyByName(s_VisitedCharStyleName) && + m_pImpl->m_xTextStyles->hasByName(sDisplayName)) { - xPropSet->setPropertyValue( sVisitedCharStyleName, makeAny(sDisplayName) ); + xPropSet->setPropertyValue(s_VisitedCharStyleName, + makeAny(sDisplayName)); } } } @@ -1822,9 +2258,10 @@ void XMLTextImportHelper::SetRuby( // the ruby style (ruby-adjust) XMLPropStyleContext *pStyle = 0; - if( rStyleName.getLength() && xAutoStyles.Is() ) + if (rStyleName.getLength() && m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY, rStyleName, sal_True ); pStyle = PTR_CAST(XMLPropStyleContext,pTempStyle); @@ -1834,14 +2271,14 @@ void XMLTextImportHelper::SetRuby( } // the ruby text character style - if( xTextStyles.is() ) + if (m_pImpl->m_xTextStyles.is()) { OUString sDisplayName( rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_TEXT, rTextStyleName ) ); if( (sDisplayName.getLength() > 0) && // xPropSetInfo->hasPropertyByName( sRubyCharStyleName ) && - xTextStyles->hasByName( sDisplayName ) ) + m_pImpl->m_xTextStyles->hasByName( sDisplayName )) { xPropSet->setPropertyValue(sRubyCharStyleName, makeAny(sDisplayName)); } @@ -1851,21 +2288,21 @@ void XMLTextImportHelper::SetRuby( void XMLTextImportHelper::SetAutoStyles( SvXMLStylesContext *pStyles ) { - xAutoStyles = pStyles; + m_pImpl->m_xAutoStyles = pStyles; } void XMLTextImportHelper::SetFontDecls( XMLFontStylesContext *pFontDecls ) { - xFontDecls = pFontDecls; - ((XMLTextImportPropertyMapper *)xParaImpPrMap.get()) + m_pImpl->m_xFontDecls = pFontDecls; + ((XMLTextImportPropertyMapper *)m_pImpl->m_xParaImpPrMap.get()) ->SetFontDecls( pFontDecls ); - ((XMLTextImportPropertyMapper *)xTextImpPrMap.get()) + ((XMLTextImportPropertyMapper *)m_pImpl->m_xTextImpPrMap.get()) ->SetFontDecls( pFontDecls ); } const XMLFontStylesContext *XMLTextImportHelper::GetFontDecls() const { - return (XMLFontStylesContext *)&xFontDecls; + return (XMLFontStylesContext *)&m_pImpl->m_xFontDecls; } sal_Bool XMLTextImportHelper::HasDrawNameAttribute( @@ -1910,7 +2347,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( pContext = new XMLParaContext( rImport, nPrefix, rLocalName, xAttrList, bHeading ); - if( bProgress && XML_TEXT_TYPE_SHAPE != eType ) + if (m_pImpl->m_bProgress && XML_TEXT_TYPE_SHAPE != eType) { rImport.GetProgressBarHelper()->Increment(); } @@ -1935,7 +2372,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( xAttrList ); break; case XML_TOK_TEXT_SEQUENCE_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -1945,7 +2382,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_VARFIELD_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -1955,7 +2392,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_USERFIELD_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted)|| + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted)|| XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLVariableDeclsImportContext( @@ -1965,7 +2402,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_DDE_DECLS: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_HEADER_FOOTER == eType ) { pContext = new XMLDdeFieldDeclsImportContext( @@ -1975,7 +2412,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_TEXT_FRAME_PAGE: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) { @@ -1990,7 +2427,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; case XML_TOK_DRAW_A_PAGE: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType) { @@ -2080,7 +2517,7 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( break; default: - if( (XML_TEXT_TYPE_BODY == eType && bBodyContentStarted) || + if ((XML_TEXT_TYPE_BODY == eType && m_pImpl->m_bBodyContentStarted) || XML_TEXT_TYPE_TEXTBOX == eType || XML_TEXT_TYPE_CHANGED_REGION == eType ) { @@ -2103,7 +2540,9 @@ SvXMLImportContext *XMLTextImportHelper::CreateTextChildContext( } if( XML_TEXT_TYPE_BODY == eType && bContent ) - bBodyContentStarted = sal_False; + { + m_pImpl->m_bBodyContentStarted = sal_False; + } return pContext; } @@ -2120,7 +2559,8 @@ SvXMLImportContext *XMLTextImportHelper::CreateTableChildContext( sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, sal_Bool* pIsSystemLanguage ) { - const SvXMLStyleContext* pStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE, sStyleName, sal_True ); @@ -2153,9 +2593,10 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName, const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUString& rName ) const { const SvxXMLListStyleContext *pStyle = 0; - if( xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName, sal_True ); pStyle = PTR_CAST( SvxXMLListStyleContext ,pTempStyle); @@ -2167,9 +2608,10 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rName ) const { XMLPropStyleContext *pStyle = 0; - if( xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName, sal_True ); pStyle = PTR_CAST( XMLPropStyleContext ,pTempStyle); @@ -2182,9 +2624,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle( const OUString& rName ) const { XMLPropStyleContext* pStyle = NULL; - if (xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_TEXT_SECTION, rName, sal_True ); @@ -2198,9 +2641,10 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster( const OUString& rName ) const { XMLPropStyleContext* pStyle = NULL; - if (xAutoStyles.Is() ) + if (m_pImpl->m_xAutoStyles.Is()) { - const SvXMLStyleContext* pTempStyle = ((SvXMLStylesContext *)&xAutoStyles)-> + const SvXMLStyleContext* pTempStyle = + ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)-> FindStyleChildContext( XML_STYLE_FAMILY_PAGE_MASTER, rName, sal_True ); @@ -2224,63 +2668,75 @@ void XMLTextImportHelper::PopListContext() const SvXMLTokenMap& XMLTextImportHelper::GetTextNumberedParagraphAttrTokenMap() { - if( !pTextNumberedParagraphAttrTokenMap.get() ) - pTextNumberedParagraphAttrTokenMap.reset( + if (!m_pImpl->m_pTextNumberedParagraphAttrTokenMap.get()) + { + m_pImpl->m_pTextNumberedParagraphAttrTokenMap.reset( new SvXMLTokenMap( aTextNumberedParagraphAttrTokenMap ) ); - - return *pTextNumberedParagraphAttrTokenMap; + } + return *m_pImpl->m_pTextNumberedParagraphAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockAttrTokenMap() { - if( !pTextListBlockAttrTokenMap.get() ) - pTextListBlockAttrTokenMap.reset( + if (!m_pImpl->m_pTextListBlockAttrTokenMap.get()) + { + m_pImpl->m_pTextListBlockAttrTokenMap.reset( new SvXMLTokenMap( aTextListBlockAttrTokenMap ) ); - - return *pTextListBlockAttrTokenMap; + } + return *m_pImpl->m_pTextListBlockAttrTokenMap; } const SvXMLTokenMap& XMLTextImportHelper::GetTextListBlockElemTokenMap() { - if( !pTextListBlockElemTokenMap.get() ) - pTextListBlockElemTokenMap.reset( + if (!m_pImpl->m_pTextListBlockElemTokenMap.get()) + { + m_pImpl->m_pTextListBlockElemTokenMap.reset( new SvXMLTokenMap( aTextListBlockElemTokenMap ) ); - - return *pTextListBlockElemTokenMap; + } + return *m_pImpl->m_pTextListBlockElemTokenMap; } SvI18NMap& XMLTextImportHelper::GetRenameMap() { - if( !pRenameMap.get() ) - pRenameMap.reset( new SvI18NMap() ); - return *pRenameMap; + if (!m_pImpl->m_pRenameMap.get()) + { + m_pImpl->m_pRenameMap.reset( new SvI18NMap() ); + } + return *m_pImpl->m_pRenameMap; } void XMLTextImportHelper::InsertBookmarkStartRange( const OUString sName, const Reference<XTextRange> & rRange, - const OUString& i_rXmlId) + OUString const& i_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & i_rpRDFaAttributes) { - aBookmarkStartRanges[sName] = std::make_pair(rRange, i_rXmlId); - aBookmarkVector.push_back(sName); + m_pImpl->m_BookmarkStartRanges[sName] = + ::boost::make_tuple(rRange, i_rXmlId, i_rpRDFaAttributes); + m_pImpl->m_BookmarkVector.push_back(sName); } sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( const OUString sName, Reference<XTextRange> & o_rRange, - OUString& o_rXmlId) + OUString & o_rXmlId, + ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > & o_rpRDFaAttributes) { - if (aBookmarkStartRanges.count(sName)) + if (m_pImpl->m_BookmarkStartRanges.count(sName)) { - o_rRange.set(aBookmarkStartRanges[sName].first); - o_rXmlId = aBookmarkStartRanges[sName].second; - aBookmarkStartRanges.erase(sName); - BookmarkVector_t::iterator it=aBookmarkVector.begin(); - while(it!=aBookmarkVector.end() && it->compareTo(sName)!=0) { + Impl::BookmarkMapEntry_t & rEntry = + (*m_pImpl->m_BookmarkStartRanges.find(sName)).second; + o_rRange.set(rEntry.get<0>()); + o_rXmlId = rEntry.get<1>(); + o_rpRDFaAttributes = rEntry.get<2>(); + m_pImpl->m_BookmarkStartRanges.erase(sName); + Impl::BookmarkVector_t::iterator it(m_pImpl->m_BookmarkVector.begin()); + while (it != m_pImpl->m_BookmarkVector.end() && it->compareTo(sName)!=0) + { it++; } - if (it!=aBookmarkVector.end()) { - aBookmarkVector.erase(it); + if (it!=m_pImpl->m_BookmarkVector.end()) { + m_pImpl->m_BookmarkVector.erase(it); } return sal_True; } @@ -2292,62 +2748,68 @@ sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange( ::rtl::OUString XMLTextImportHelper::FindActiveBookmarkName() { - if ( !aBookmarkVector.empty() ) { - return aBookmarkVector.back(); + if (!m_pImpl->m_BookmarkVector.empty()) { + return m_pImpl->m_BookmarkVector.back(); } else return ::rtl::OUString(); // return the empty string on error... } ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > XMLTextImportHelper::GetRangeFor(::rtl::OUString &sName) { - return aBookmarkStartRanges[sName].first; + return m_pImpl->m_BookmarkStartRanges[sName].get<0>(); } void XMLTextImportHelper::pushFieldCtx( ::rtl::OUString name, ::rtl::OUString type ) { - aFieldStack.push(field_stack_item_t(field_name_type_t(name, type), field_params_t())); + m_pImpl->m_FieldStack.push(Impl::field_stack_item_t( + Impl::field_name_type_t(name, type), Impl::field_params_t())); } void XMLTextImportHelper::popFieldCtx() { - aFieldStack.pop(); + m_pImpl->m_FieldStack.pop(); } void XMLTextImportHelper::addFieldParam( ::rtl::OUString name, ::rtl::OUString value ) { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty()) { - field_stack_item_t &aFieldStackItem=aFieldStack.top(); - aFieldStackItem.second.push_back(field_param_t( name, value )); + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty()) { + Impl::field_stack_item_t & FieldStackItem(m_pImpl->m_FieldStack.top()); + FieldStackItem.second.push_back(Impl::field_param_t( name, value )); } } ::rtl::OUString XMLTextImportHelper::getCurrentFieldName() { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty()) { - return aFieldStack.top().first.first; + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty()) { + return m_pImpl->m_FieldStack.top().first.first; } else return ::rtl::OUString(); } ::rtl::OUString XMLTextImportHelper::getCurrentFieldType() { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty()) { - return aFieldStack.top().first.second; + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty()) { + return m_pImpl->m_FieldStack.top().first.second; } else return ::rtl::OUString(); } bool XMLTextImportHelper::hasCurrentFieldCtx() { - return !aFieldStack.empty(); + return !m_pImpl->m_FieldStack.empty(); } void XMLTextImportHelper::setCurrentFieldParamsTo(::com::sun::star::uno::Reference< ::com::sun::star::text::XFormField> &xFormField) { - DBG_ASSERT(!aFieldStack.empty(), "stack is empty: not good! Do a pushFieldCtx before..."); - if (!aFieldStack.empty() && xFormField.is()) + DBG_ASSERT(!m_pImpl->m_FieldStack.empty(), + "stack is empty: not good! Do a pushFieldCtx before..."); + if (!m_pImpl->m_FieldStack.empty() && xFormField.is()) { - FieldParamImporter(&aFieldStack.top().second, xFormField->getParameters()).Import(); + FieldParamImporter(&m_pImpl->m_FieldStack.top().second, + xFormField->getParameters()).Import(); } } @@ -2357,6 +2819,11 @@ void XMLTextImportHelper::ConnectFrameChains( const OUString& rNextFrmName, const Reference < XPropertySet >& rFrmPropSet ) { + static ::rtl::OUString s_ChainNextName( + RTL_CONSTASCII_USTRINGPARAM("ChainNextName")); + static ::rtl::OUString s_ChainPrevName( + RTL_CONSTASCII_USTRINGPARAM("ChainPrevName")); + if( !rFrmName.getLength() ) return; @@ -2364,39 +2831,42 @@ void XMLTextImportHelper::ConnectFrameChains( { OUString sNextFrmName(GetRenameMap().Get( XML_TEXT_RENAME_TYPE_FRAME, rNextFrmName )); - if( xTextFrames.is() && xTextFrames->hasByName( sNextFrmName ) ) + if (m_pImpl->m_xTextFrames.is() + && m_pImpl->m_xTextFrames->hasByName(sNextFrmName)) { - rFrmPropSet->setPropertyValue( sChainNextName, makeAny(sNextFrmName) ); + rFrmPropSet->setPropertyValue(s_ChainNextName, + makeAny(sNextFrmName)); } else { - if( !pPrevFrmNames.get() ) + if (!m_pImpl->m_pPrevFrmNames.get()) { - pPrevFrmNames.reset( new SvStringsDtor ); - pNextFrmNames.reset( new SvStringsDtor ); + m_pImpl->m_pPrevFrmNames.reset( new SvStringsDtor ); + m_pImpl->m_pNextFrmNames.reset( new SvStringsDtor ); } - pPrevFrmNames->Insert( new String( rFrmName ), - pPrevFrmNames->Count() ); - pNextFrmNames->Insert( new String( sNextFrmName ), - pNextFrmNames->Count() ); + m_pImpl->m_pPrevFrmNames->Insert( new String( rFrmName ), + m_pImpl->m_pPrevFrmNames->Count() ); + m_pImpl->m_pNextFrmNames->Insert( new String( sNextFrmName ), + m_pImpl->m_pNextFrmNames->Count() ); } } - if( pPrevFrmNames.get() && pPrevFrmNames->Count() ) + if (m_pImpl->m_pPrevFrmNames.get() && m_pImpl->m_pPrevFrmNames->Count()) { - sal_uInt16 nCount = pPrevFrmNames->Count(); + sal_uInt16 nCount = m_pImpl->m_pPrevFrmNames->Count(); for( sal_uInt16 i=0; i<nCount; i++ ) { - String *pNext = (*pNextFrmNames)[i]; + String *pNext = (*m_pImpl->m_pNextFrmNames)[i]; if( OUString(*pNext) == rFrmName ) { // The previuous frame must exist, because it existing than // inserting the entry - String *pPrev = (*pPrevFrmNames)[i]; + String *pPrev = (*m_pImpl->m_pPrevFrmNames)[i]; - rFrmPropSet->setPropertyValue( sChainPrevName, makeAny(OUString( *pPrev )) ); + rFrmPropSet->setPropertyValue(s_ChainPrevName, + makeAny(OUString( *pPrev ))); - pPrevFrmNames->Remove( i, 1 ); - pNextFrmNames->Remove( i, 1 ); + m_pImpl->m_pPrevFrmNames->Remove( i, 1 ); + m_pImpl->m_pNextFrmNames->Remove( i, 1 ); delete pPrev; delete pNext; @@ -2409,6 +2879,9 @@ void XMLTextImportHelper::ConnectFrameChains( sal_Bool XMLTextImportHelper::IsInFrame() const { + static ::rtl::OUString s_TextFrame( + RTL_CONSTASCII_USTRINGPARAM("TextFrame")); + sal_Bool bIsInFrame = sal_False; // are we currently in a text frame? yes, if the cursor has a @@ -2416,9 +2889,10 @@ sal_Bool XMLTextImportHelper::IsInFrame() const Reference<XPropertySet> xPropSet(((XMLTextImportHelper *)this)->GetCursor(), UNO_QUERY); if (xPropSet.is()) { - if (xPropSet->getPropertySetInfo()->hasPropertyByName(sTextFrame)) + if (xPropSet->getPropertySetInfo()->hasPropertyByName(s_TextFrame)) { - Reference<XTextFrame> xFrame(xPropSet->getPropertyValue(sTextFrame), UNO_QUERY); + uno::Reference<XTextFrame> const xFrame( + xPropSet->getPropertyValue(s_TextFrame), UNO_QUERY); if (xFrame.is()) { @@ -2541,12 +3015,12 @@ void XMLTextImportHelper::SetChangesProtectionKey(const Sequence<sal_Int8> &) OUString XMLTextImportHelper::GetOpenRedlineId() { - return sOpenRedlineIdentifier; + return m_pImpl->m_sOpenRedlineIdentifier; } void XMLTextImportHelper::SetOpenRedlineId( ::rtl::OUString& rId) { - sOpenRedlineIdentifier = rId; + m_pImpl->m_sOpenRedlineIdentifier = rId; } void XMLTextImportHelper::ResetOpenRedlineId() @@ -2555,3 +3029,14 @@ void XMLTextImportHelper::ResetOpenRedlineId() SetOpenRedlineId(sEmpty); } +void +XMLTextImportHelper::SetCellParaStyleDefault(::rtl::OUString const& rNewValue) +{ + m_pImpl->m_sCellParaStyleDefault = rNewValue; +} + +::rtl::OUString const& XMLTextImportHelper::GetCellParaStyleDefault() +{ + return m_pImpl->m_sCellParaStyleDefault; +} + diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index 24c09bde6e7f..ab90e2ae4000 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -453,6 +453,8 @@ XMLTextListsHelper::MakeNumRule( sal_Bool* o_pRestartNumbering, sal_Bool* io_pSetDefaults) { + static ::rtl::OUString s_NumberingRules( + RTL_CONSTASCII_USTRINGPARAM("NumberingRules")); uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule); if ( i_StyleName.getLength() && i_StyleName != i_ParentStyleName ) @@ -479,8 +481,7 @@ XMLTextListsHelper::MakeNumRule( uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::UNO_QUERY ); - any = xPropSet->getPropertyValue( - i_rImport.GetTextImport()->sNumberingRules ); + any = xPropSet->getPropertyValue(s_NumberingRules); any >>= xNumRules; } else diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index f1cf89cb0640..140656fd4298 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -90,7 +90,6 @@ #include <com/sun/star/text/XEndnotesSupplier.hpp> #include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/util/DateTime.hpp> -#include "xmlkywd.hxx" #include "xmlnmspe.hxx" #include <xmloff/xmlaustp.hxx> #include <xmloff/families.hxx> @@ -1999,7 +1998,18 @@ void XMLTextParagraphExport::exportParagraph( { const OUString& rIdentifier = GetExport().getInterfaceToIdentifierMapper().getIdentifier( xRef ); if( rIdentifier.getLength() ) - GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ID, rIdentifier ); + { + // FIXME: this is just temporary until EditEngine + // paragraphs implement XMetadatable. + // then that must be used and not the mapper, because + // when both can be used we get two xml:id! + uno::Reference<rdf::XMetadatable> const xMeta(xRef, + uno::UNO_QUERY); + OSL_ENSURE(!xMeta.is(), "paragraph that implements " + "XMetadatable used in interfaceToIdentifierMapper?"); + GetExport().AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + rIdentifier); + } } OUString sAutoStyle( sStyle ); diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index d1d7273ddd46..566c94ed166a 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -1917,6 +1917,7 @@ XMLParaContext::XMLParaContext( const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextPAttrTokenMap(); + bool bHaveXmlId( false ); OUString aCondStyleName, sClassNames; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1933,6 +1934,7 @@ XMLParaContext::XMLParaContext( { case XML_TOK_TEXT_P_XMLID: m_sXmlId = rValue; + bHaveXmlId = true; break; case XML_TOK_TEXT_P_ABOUT: m_sAbout = rValue; @@ -1947,6 +1949,9 @@ XMLParaContext::XMLParaContext( case XML_TOK_TEXT_P_DATATYPE: m_sDatatype = rValue; break; + case XML_TOK_TEXT_P_TEXTID: + if (!bHaveXmlId) { m_sXmlId = rValue; } + break; case XML_TOK_TEXT_P_STYLE_NAME: sStyleName = rValue; break; @@ -1979,9 +1984,6 @@ XMLParaContext::XMLParaContext( } } break; - case XML_TOK_TEXT_P_ID: - sId = rValue; - break; case XML_TOK_TEXT_P_RESTART_NUMBERING: { sal_Bool bBool; @@ -2020,14 +2022,17 @@ XMLParaContext::~XMLParaContext() // if we have an id set for this paragraph, get a cursor for this // paragraph and register it with the given identifier - if( sId.getLength() ) + // FIXME: this is just temporary, and should be removed when + // EditEngine paragraphs implement XMetadatable! + if (m_sXmlId.getLength()) { Reference < XTextCursor > xIdCursor( xTxtImport->GetText()->createTextCursorByRange( xStart ) ); if( xIdCursor.is() ) { xIdCursor->gotoRange( xEnd, sal_True ); Reference< XInterface > xRef( xIdCursor, UNO_QUERY ); - GetImport().getInterfaceToIdentifierMapper().registerReference( sId, xRef ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + m_sXmlId, xRef); } } @@ -2067,7 +2072,7 @@ XMLParaContext::~XMLParaContext() } } - OUString sCellParaStyleName = xTxtImport->sCellParaStyleDefault; + OUString const sCellParaStyleName(xTxtImport->GetCellParaStyleDefault()); if( sCellParaStyleName.getLength() > 0 ) { // --> OD 2007-08-16 #i80724# diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx index 9c911a5b639c..ecd593ca3d4f 100644 --- a/xmloff/source/text/txtparai.hxx +++ b/xmloff/source/text/txtparai.hxx @@ -46,7 +46,6 @@ class XMLParaContext : public SvXMLImportContext ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextRange > xStart; // xub_StrLen nStart; ::rtl::OUString sStyleName; - ::rtl::OUString sId; ::rtl::OUString m_sXmlId; ::rtl::OUString m_sAbout; ::rtl::OUString m_sProperty; diff --git a/xmloff/util/makefile.mk b/xmloff/util/makefile.mk index a7060d79504c..b8745b6b8fff 100644 --- a/xmloff/util/makefile.mk +++ b/xmloff/util/makefile.mk @@ -53,17 +53,8 @@ LIB1FILES= \ # --- Shared-Library ----------------------------------------------- -.IF "$(GUI)"!="UNX" -LIB4TARGET= $(LB)$/ixo.lib -LIB4FILES= $(LB)$/_ixo.lib -.IF "$(GUI)"!="OS2" -LIB4OBJFILES=\ - $(OBJ)$/xmlkywd.obj -.ENDIF -.ENDIF - SHL1TARGET= xo$(DLLPOSTFIX) -SHL1IMPLIB= _ixo +SHL1IMPLIB= i$(TARGET) SHL1USE_EXPORTS=name SHL1STDLIBS= \ @@ -86,21 +77,6 @@ SHL1STDLIBS+=-licg617mxp SHL1DEF= $(MISC)$/$(SHL1TARGET).def SHL1LIBS= $(LIB1TARGET) - -SHL5STDLIBS= \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(SALHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) - -.IF "$(GUI)"=="UNX" || "$(COM)"=="GCC" - SHL5STDLIBS += -lxo$(DLLPOSTFIX) -.ELSE - SHL5STDLIBS += ixo.lib -.ENDIF - # --- Def-File --------------------------------------------------------- DEF1NAME =$(SHL1TARGET) |