summaryrefslogtreecommitdiff
path: root/xmloff/inc
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/inc')
-rw-r--r--xmloff/inc/AttributeContainerHandler.hxx50
-rw-r--r--xmloff/inc/DashStyle.hxx76
-rw-r--r--xmloff/inc/DomBuilderContext.hxx112
-rw-r--r--xmloff/inc/DomExport.hxx46
-rw-r--r--xmloff/inc/EnhancedCustomShapeToken.hxx169
-rw-r--r--xmloff/inc/GradientStyle.hxx77
-rw-r--r--xmloff/inc/HatchStyle.hxx74
-rw-r--r--xmloff/inc/ImageStyle.hxx63
-rw-r--r--xmloff/inc/MarkerStyle.hxx76
-rw-r--r--xmloff/inc/MetaExportComponent.hxx85
-rw-r--r--xmloff/inc/MetaImportComponent.hxx85
-rw-r--r--xmloff/inc/MultiPropertySetHelper.hxx207
-rw-r--r--xmloff/inc/PageMasterImportContext.hxx70
-rw-r--r--xmloff/inc/PropertySetMerger.hxx41
-rw-r--r--xmloff/inc/RDFaExportHelper.hxx80
-rw-r--r--xmloff/inc/RDFaImportHelper.hxx106
-rw-r--r--xmloff/inc/SchXMLExport.hxx93
-rw-r--r--xmloff/inc/SchXMLImport.hxx223
-rw-r--r--xmloff/inc/StyleMap.hxx97
-rw-r--r--xmloff/inc/TransGradientStyle.hxx73
-rw-r--r--xmloff/inc/VisAreaContext.hxx72
-rw-r--r--xmloff/inc/VisAreaExport.hxx57
-rw-r--r--xmloff/inc/XMLBackgroundImageContext.hxx85
-rw-r--r--xmloff/inc/XMLBackgroundImageExport.hxx65
-rw-r--r--xmloff/inc/XMLBase64Export.hxx63
-rw-r--r--xmloff/inc/XMLBasicExportFilter.hxx75
-rw-r--r--xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx65
-rw-r--r--xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx68
-rw-r--r--xmloff/inc/XMLChartPropertySetMapper.hxx130
-rw-r--r--xmloff/inc/XMLChartStyleContext.hxx70
-rw-r--r--xmloff/inc/XMLClipPropertyHandler.hxx51
-rw-r--r--xmloff/inc/XMLElementPropertyContext.hxx70
-rw-r--r--xmloff/inc/XMLEmbeddedObjectExportFilter.hxx95
-rw-r--r--xmloff/inc/XMLEmbeddedObjectImportContext.hxx81
-rw-r--r--xmloff/inc/XMLEventImportHelper.hxx109
-rw-r--r--xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx65
-rw-r--r--xmloff/inc/XMLFilterServiceNames.h49
-rw-r--r--xmloff/inc/XMLFootnoteConfigurationImportContext.hxx124
-rw-r--r--xmloff/inc/XMLImageMapContext.hxx79
-rw-r--r--xmloff/inc/XMLImageMapExport.hxx122
-rw-r--r--xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx110
-rw-r--r--xmloff/inc/XMLIsPercentagePropertyHandler.hxx55
-rw-r--r--xmloff/inc/XMLLineNumberingImportContext.hxx129
-rw-r--r--xmloff/inc/XMLNumberStylesImport.hxx81
-rw-r--r--xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx57
-rw-r--r--xmloff/inc/XMLRectangleMembersHandler.hxx67
-rw-r--r--xmloff/inc/XMLReplacementImageContext.hxx74
-rw-r--r--xmloff/inc/XMLScriptContextFactory.hxx70
-rw-r--r--xmloff/inc/XMLScriptExportHandler.hxx62
-rw-r--r--xmloff/inc/XMLShapePropertySetContext.hxx65
-rw-r--r--xmloff/inc/XMLStarBasicContextFactory.hxx71
-rw-r--r--xmloff/inc/XMLStarBasicExportHandler.hxx66
-rw-r--r--xmloff/inc/XMLStringBufferImportContext.hxx72
-rw-r--r--xmloff/inc/XMLTextColumnsContext.hxx82
-rw-r--r--xmloff/inc/XMLTextColumnsExport.hxx61
-rw-r--r--xmloff/inc/XMLTextColumnsPropertyHandler.hxx59
-rw-r--r--xmloff/inc/XMLTextHeaderFooterContext.hxx78
-rw-r--r--xmloff/inc/XMLTextListAutoStylePool.hxx87
-rw-r--r--xmloff/inc/anim.hxx106
-rw-r--r--xmloff/inc/animationexport.hxx58
-rw-r--r--xmloff/inc/animationimport.hxx74
-rw-r--r--xmloff/inc/animations.hxx69
-rw-r--r--xmloff/inc/animimp.hxx59
-rw-r--r--xmloff/inc/functional.hxx30
-rw-r--r--xmloff/inc/i18nmap.hxx71
-rw-r--r--xmloff/inc/makefile.mk48
-rw-r--r--xmloff/inc/numehelp.hxx131
-rw-r--r--xmloff/inc/pch/precompiled_xmloff.cxx31
-rw-r--r--xmloff/inc/pch/precompiled_xmloff.hxx483
-rw-r--r--xmloff/inc/txtflde.hxx549
-rw-r--r--xmloff/inc/txtfldi.hxx1596
-rw-r--r--xmloff/inc/txtimppr.hxx84
-rw-r--r--xmloff/inc/txtlists.hxx197
-rw-r--r--xmloff/inc/txtvfldi.hxx621
-rw-r--r--xmloff/inc/unoatrcn.hxx89
-rw-r--r--xmloff/inc/unointerfacetouniqueidentifiermapper.hxx55
-rw-r--r--xmloff/inc/xexptran.hxx204
-rw-r--r--xmloff/inc/xformsexport.hxx63
-rw-r--r--xmloff/inc/xformsimport.hxx93
-rw-r--r--xmloff/inc/xmlcnitm.hxx92
-rw-r--r--xmloff/inc/xmlehelp.hxx53
-rw-r--r--xmloff/inc/xmlerror.hxx169
-rw-r--r--xmloff/inc/xmlnmspe.hxx114
-rw-r--r--xmloff/inc/xmloff/DocumentSettingsContext.hxx66
-rw-r--r--xmloff/inc/xmloff/EnumPropertyHdl.hxx55
-rw-r--r--xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx65
-rw-r--r--xmloff/inc/xmloff/PageMasterStyleMap.hxx158
-rw-r--r--xmloff/inc/xmloff/ProgressBarHelper.hxx80
-rw-r--r--xmloff/inc/xmloff/PropertySetInfoHash.hxx68
-rw-r--r--xmloff/inc/xmloff/PropertySetInfoKey.hxx70
-rw-r--r--xmloff/inc/xmloff/SchXMLExportHelper.hxx76
-rw-r--r--xmloff/inc/xmloff/SchXMLImportHelper.hxx172
-rw-r--r--xmloff/inc/xmloff/SettingsExportHelper.hxx113
-rw-r--r--xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx82
-rw-r--r--xmloff/inc/xmloff/WordWrapPropertyHdl.hxx56
-rw-r--r--xmloff/inc/xmloff/XMLBase64ImportContext.hxx66
-rw-r--r--xmloff/inc/xmloff/XMLCharContext.hxx74
-rw-r--r--xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx72
-rw-r--r--xmloff/inc/xmloff/XMLEventExport.hxx142
-rw-r--r--xmloff/inc/xmloff/XMLEventsImportContext.hxx141
-rw-r--r--xmloff/inc/xmloff/XMLFontAutoStylePool.hxx78
-rw-r--r--xmloff/inc/xmloff/XMLFontStylesContext.hxx100
-rw-r--r--xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx65
-rw-r--r--xmloff/inc/xmloff/XMLPageExport.hxx116
-rw-r--r--xmloff/inc/xmloff/XMLSettingsExportContext.hxx69
-rw-r--r--xmloff/inc/xmloff/XMLShapeStyleContext.hxx79
-rw-r--r--xmloff/inc/xmloff/XMLStringVector.hxx41
-rw-r--r--xmloff/inc/xmloff/XMLTextMasterPageContext.hxx93
-rw-r--r--xmloff/inc/xmloff/XMLTextMasterPageExport.hxx73
-rw-r--r--xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx64
-rw-r--r--xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx75
-rw-r--r--xmloff/inc/xmloff/XMLTextTableContext.hxx62
-rw-r--r--xmloff/inc/xmloff/animexp.hxx54
-rw-r--r--xmloff/inc/xmloff/attrlist.hxx96
-rw-r--r--xmloff/inc/xmloff/contextid.hxx57
-rw-r--r--xmloff/inc/xmloff/controlpropertyhdl.hxx145
-rw-r--r--xmloff/inc/xmloff/dllapi.h43
-rw-r--r--xmloff/inc/xmloff/families.hxx119
-rw-r--r--xmloff/inc/xmloff/formlayerexport.hxx214
-rw-r--r--xmloff/inc/xmloff/formlayerimport.hxx173
-rw-r--r--xmloff/inc/xmloff/formsimp.hxx51
-rw-r--r--xmloff/inc/xmloff/maptype.hxx77
-rw-r--r--xmloff/inc/xmloff/nmspmap.hxx188
-rw-r--r--xmloff/inc/xmloff/odffields.hxx64
-rw-r--r--xmloff/inc/xmloff/prhdlfac.hxx114
-rw-r--r--xmloff/inc/xmloff/prstylei.hxx110
-rw-r--r--xmloff/inc/xmloff/shapeexport.hxx340
-rw-r--r--xmloff/inc/xmloff/shapeimport.hxx442
-rw-r--r--xmloff/inc/xmloff/styleexp.hxx142
-rw-r--r--xmloff/inc/xmloff/table/XMLTableExport.hxx115
-rw-r--r--xmloff/inc/xmloff/table/XMLTableImport.hxx81
-rw-r--r--xmloff/inc/xmloff/txtimp.hxx761
-rw-r--r--xmloff/inc/xmloff/txtparae.hxx748
-rw-r--r--xmloff/inc/xmloff/txtprmap.hxx205
-rw-r--r--xmloff/inc/xmloff/txtstyle.hxx63
-rw-r--r--xmloff/inc/xmloff/txtstyli.hxx123
-rw-r--r--xmloff/inc/xmloff/uniref.hxx232
-rw-r--r--xmloff/inc/xmloff/xmlaustp.hxx140
-rw-r--r--xmloff/inc/xmloff/xmlcnimp.hxx131
-rw-r--r--xmloff/inc/xmloff/xmlement.hxx60
-rw-r--r--xmloff/inc/xmloff/xmlevent.hxx155
-rw-r--r--xmloff/inc/xmloff/xmlexp.hxx731
-rw-r--r--xmloff/inc/xmloff/xmlexppr.hxx207
-rw-r--r--xmloff/inc/xmloff/xmlictxt.hxx110
-rw-r--r--xmloff/inc/xmloff/xmlimp.hxx539
-rw-r--r--xmloff/inc/xmloff/xmlimppr.hxx212
-rw-r--r--xmloff/inc/xmloff/xmlmetae.hxx129
-rw-r--r--xmloff/inc/xmloff/xmlmetai.hxx86
-rw-r--r--xmloff/inc/xmloff/xmlnume.hxx118
-rw-r--r--xmloff/inc/xmloff/xmlnumfe.hxx142
-rw-r--r--xmloff/inc/xmloff/xmlnumfi.hxx235
-rw-r--r--xmloff/inc/xmloff/xmlnumi.hxx113
-rw-r--r--xmloff/inc/xmloff/xmlprcon.hxx80
-rw-r--r--xmloff/inc/xmloff/xmlprhdl.hxx67
-rw-r--r--xmloff/inc/xmloff/xmlprmap.hxx192
-rw-r--r--xmloff/inc/xmloff/xmlscripti.hxx63
-rw-r--r--xmloff/inc/xmloff/xmlstyle.hxx271
-rw-r--r--xmloff/inc/xmloff/xmltkmap.hxx69
-rw-r--r--xmloff/inc/xmloff/xmltoken.hxx3159
-rw-r--r--xmloff/inc/xmloff/xmltypes.hxx289
-rw-r--r--xmloff/inc/xmloff/xmluconv.hxx448
-rw-r--r--xmloff/inc/xmlreg.hxx45
-rw-r--r--xmloff/inc/xmltabe.hxx62
-rw-r--r--xmloff/inc/xmltabi.hxx67
-rw-r--r--xmloff/inc/xmlversion.hxx158
165 files changed, 25289 insertions, 0 deletions
diff --git a/xmloff/inc/AttributeContainerHandler.hxx b/xmloff/inc/AttributeContainerHandler.hxx
new file mode 100644
index 000000000000..be052573e886
--- /dev/null
+++ b/xmloff/inc/AttributeContainerHandler.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ATTRIBUTECONTAINERHANDLER_HXX
+#define _XMLOFF_ATTRIBUTECONTAINERHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLAttributeContainerHandler : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLAttributeContainerHandler();
+
+ virtual bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_ATTRIBUTECONTAINERHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/DashStyle.hxx b/xmloff/inc/DashStyle.hxx
new file mode 100644
index 000000000000..7f6e553a98ba
--- /dev/null
+++ b/xmloff/inc/DashStyle.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_DASHSTYLE_HXX
+#define _XMLOFF_DASHSTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+
+class SvXMLImport;
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class A> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace uno { class Any; }
+} } }
+namespace rtl { class OUString; }
+
+
+class XMLOFF_DLLPUBLIC XMLDashStyleImport
+{
+ SvXMLImport& rImport;
+
+public:
+ XMLDashStyleImport( SvXMLImport& rImport );
+ ~XMLDashStyleImport();
+
+ sal_Bool importXML(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue,
+ ::rtl::OUString& rStrName );
+};
+
+
+class XMLOFF_DLLPUBLIC XMLDashStyleExport
+{
+ SvXMLExport& rExport;
+
+public:
+ XMLDashStyleExport( SvXMLExport& rExport );
+ ~XMLDashStyleExport();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName,
+ const ::com::sun::star::uno::Any& rValue );
+};
+
+#endif // _XMLOFF_DASHSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx
new file mode 100644
index 000000000000..159c7f58c3d6
--- /dev/null
+++ b/xmloff/inc/DomBuilderContext.hxx
@@ -0,0 +1,112 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_DOMBUILDERCONTEXT_HXX
+#define _XMLOFF_DOMBUILDERCONTEXT_HXX
+
+
+//
+// include for parent class and members
+//
+
+#include <xmloff/xmlictxt.hxx>
+
+
+//
+// forward declarations
+//
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace dom {
+ class XNode;
+ class XDocument;
+ } }
+ namespace xml { namespace sax {
+ class XAttributeList;
+ } }
+} } }
+namespace rtl {
+ class OUString;
+}
+class SvXMLImport;
+class SvXMLImportContext;
+
+/**
+ * DomBuilderContext creates a DOM tree suitable for in-memory processing of
+ * XML data from a sequence of SAX events */
+class DomBuilderContext : public SvXMLImportContext
+{
+ com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> mxNode;
+
+public:
+
+ /** default constructor: create new DOM tree */
+ DomBuilderContext( SvXMLImport& rImport,
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName );
+
+ /** constructor: create DOM subtree under the given node */
+ DomBuilderContext( SvXMLImport& rImport,
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>& );
+
+ virtual ~DomBuilderContext();
+
+
+ //
+ // access to the DOM tree
+ //
+
+ /** access the DOM tree */
+ com::sun::star::uno::Reference<com::sun::star::xml::dom::XDocument> getTree();
+
+ /** access this context's DOM sub-tree */
+ com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode> getNode();
+
+
+ //
+ // implement SvXMLImportContext methods:
+ //
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void StartElement(
+ const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList );
+
+ virtual void EndElement();
+
+ virtual void Characters( const ::rtl::OUString& rChars );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/DomExport.hxx b/xmloff/inc/DomExport.hxx
new file mode 100644
index 000000000000..4eb463ab54b9
--- /dev/null
+++ b/xmloff/inc/DomExport.hxx
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_DOMEXPORT_HXX
+#define _XMLOFF_DOMEXPORT_HXX
+
+// the Solaris compiler apparently needs the following include:
+#include <com/sun/star/uno/Reference.hxx>
+
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<typename T> class Reference; }
+ namespace xml { namespace dom { class XDocument; } }
+ namespace xml { namespace dom { class XNode; } }
+} } }
+
+void exportDom( SvXMLExport&, const com::sun::star::uno::Reference<com::sun::star::xml::dom::XDocument>& );
+void exportDom( SvXMLExport&, const com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>& );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/EnhancedCustomShapeToken.hxx b/xmloff/inc/EnhancedCustomShapeToken.hxx
new file mode 100644
index 000000000000..df3ebbceb887
--- /dev/null
+++ b/xmloff/inc/EnhancedCustomShapeToken.hxx
@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _ENHANCED_CUSTOMSHAPE_TOKEN_HXX
+#define _ENHANCED_CUSTOMSHAPE_TOKEN_HXX
+
+#include <rtl/ustring.hxx>
+
+namespace xmloff { namespace EnhancedCustomShapeToken {
+
+ enum EnhancedCustomShapeTokenEnum
+ {
+ EAS_type,
+ EAS_name,
+ EAS_mirror_horizontal,
+ EAS_mirror_vertical,
+ EAS_viewBox,
+ EAS_text_rotate_angle,
+ EAS_extrusion_allowed,
+ EAS_text_path_allowed,
+ EAS_concentric_gradient_fill_allowed,
+ EAS_extrusion,
+ EAS_extrusion_brightness,
+ EAS_extrusion_depth,
+ EAS_extrusion_diffusion,
+ EAS_extrusion_number_of_line_segments,
+ EAS_extrusion_light_face,
+ EAS_extrusion_first_light_harsh,
+ EAS_extrusion_second_light_harsh,
+ EAS_extrusion_first_light_level,
+ EAS_extrusion_second_light_level,
+ EAS_extrusion_first_light_direction,
+ EAS_extrusion_second_light_direction,
+ EAS_extrusion_metal,
+ EAS_shade_mode,
+ EAS_extrusion_rotation_angle,
+ EAS_extrusion_rotation_center,
+ EAS_extrusion_shininess,
+ EAS_extrusion_skew,
+ EAS_extrusion_specularity,
+ EAS_projection,
+ EAS_extrusion_viewpoint,
+ EAS_extrusion_origin,
+ EAS_extrusion_color,
+ EAS_enhanced_path,
+ EAS_path_stretchpoint_x,
+ EAS_path_stretchpoint_y,
+ EAS_text_areas,
+ EAS_glue_points,
+ EAS_glue_point_type,
+ EAS_glue_point_leaving_directions,
+ EAS_text_path,
+ EAS_text_path_mode,
+ EAS_text_path_scale,
+ EAS_text_path_same_letter_heights,
+ EAS_modifiers,
+ EAS_equation,
+ EAS_formula,
+ EAS_handle,
+ EAS_handle_mirror_horizontal,
+ EAS_handle_mirror_vertical,
+ EAS_handle_switched,
+ EAS_handle_position,
+ EAS_handle_range_x_minimum,
+ EAS_handle_range_x_maximum,
+ EAS_handle_range_y_minimum,
+ EAS_handle_range_y_maximum,
+ EAS_handle_polar,
+ EAS_handle_radius_range_minimum,
+ EAS_handle_radius_range_maximum,
+
+ EAS_CustomShapeEngine,
+ EAS_CustomShapeData,
+ EAS_Type,
+ EAS_MirroredX,
+ EAS_MirroredY,
+ EAS_ViewBox,
+ EAS_TextRotateAngle,
+ EAS_ExtrusionAllowed,
+ EAS_ConcentricGradientFillAllowed,
+ EAS_TextPathAllowed,
+ EAS_Extrusion,
+ EAS_Equations,
+ EAS_Equation,
+ EAS_Path,
+ EAS_TextPath,
+ EAS_Handles,
+ EAS_Handle,
+ EAS_Brightness,
+ EAS_Depth,
+ EAS_Diffusion,
+ EAS_NumberOfLineSegments,
+ EAS_LightFace,
+ EAS_FirstLightHarsh,
+ EAS_SecondLightHarsh,
+ EAS_FirstLightLevel,
+ EAS_SecondLightLevel,
+ EAS_FirstLightDirection,
+ EAS_SecondLightDirection,
+ EAS_Metal,
+ EAS_ShadeMode,
+ EAS_RotateAngle,
+ EAS_RotationCenter,
+ EAS_Shininess,
+ EAS_Skew,
+ EAS_Specularity,
+ EAS_ProjectionMode,
+ EAS_ViewPoint,
+ EAS_Origin,
+ EAS_Color,
+ EAS_Switched,
+ EAS_Polar,
+ EAS_RangeXMinimum,
+ EAS_RangeXMaximum,
+ EAS_RangeYMinimum,
+ EAS_RangeYMaximum,
+ EAS_RadiusRangeMinimum,
+ EAS_RadiusRangeMaximum,
+ EAS_Coordinates,
+ EAS_Segments,
+ EAS_StretchX,
+ EAS_StretchY,
+ EAS_TextFrames,
+ EAS_GluePoints,
+ EAS_GluePointLeavingDirections,
+ EAS_GluePointType,
+ EAS_TextPathMode,
+ EAS_ScaleX,
+ EAS_SameLetterHeights,
+ EAS_Position,
+ EAS_AdjustmentValues,
+
+ EAS_Last,
+ EAS_NotFound
+ };
+
+ EnhancedCustomShapeTokenEnum EASGet( const rtl::OUString& );
+ rtl::OUString EASGet( const EnhancedCustomShapeTokenEnum );
+}
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/GradientStyle.hxx b/xmloff/inc/GradientStyle.hxx
new file mode 100644
index 000000000000..6ccd3c942dcd
--- /dev/null
+++ b/xmloff/inc/GradientStyle.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_GRADIENTSTYLE_HXX
+#define _XMLOFF_GRADIENTSTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+
+class SvXMLImport;
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class A> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace uno { class Any; }
+} } }
+namespace rtl { class OUString; }
+
+
+class XMLOFF_DLLPUBLIC XMLGradientStyleImport
+{
+ SvXMLImport& rImport;
+
+public:
+ XMLGradientStyleImport( SvXMLImport& rImport );
+ ~XMLGradientStyleImport();
+
+ sal_Bool importXML(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue,
+ ::rtl::OUString& rStrName );
+};
+
+
+class XMLOFF_DLLPUBLIC XMLGradientStyleExport
+{
+ SvXMLExport& rExport;
+
+public:
+ XMLGradientStyleExport( SvXMLExport& rExport );
+ ~XMLGradientStyleExport();
+
+ sal_Bool exportXML(
+ const ::rtl::OUString& rStrName,
+ const ::com::sun::star::uno::Any& rValue );
+};
+
+#endif // _XMLOFF_GRADIENTSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/HatchStyle.hxx b/xmloff/inc/HatchStyle.hxx
new file mode 100644
index 000000000000..a9a178f6cf92
--- /dev/null
+++ b/xmloff/inc/HatchStyle.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_HATCHSTYLE_HXX
+#define _XMLOFF_HATCHSTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+
+class SvXMLImport;
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class A> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace uno { class Any; }
+} } }
+namespace rtl { class OUString; }
+
+
+class XMLOFF_DLLPUBLIC XMLHatchStyleImport
+{
+ SvXMLImport& rImport;
+
+public:
+ XMLHatchStyleImport( SvXMLImport& rImport );
+ ~XMLHatchStyleImport();
+
+ sal_Bool importXML(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ ::com::sun::star::uno::Any& rValue,
+ ::rtl::OUString& rStrName );
+};
+
+class XMLOFF_DLLPUBLIC XMLHatchStyleExport
+{
+ SvXMLExport& rExport;
+
+public:
+ XMLHatchStyleExport( SvXMLExport& rExport );
+ ~XMLHatchStyleExport();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+};
+
+#endif // _XMLOFF_HATCHELEMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/ImageStyle.hxx b/xmloff/inc/ImageStyle.hxx
new file mode 100644
index 000000000000..aadc84a9c972
--- /dev/null
+++ b/xmloff/inc/ImageStyle.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_IMAGESTYLE_HXX
+#define _XMLOFF_IMAGESTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLUnitConverter;
+class SvXMLExport;
+class SvXMLImport;
+
+class XMLOFF_DLLPUBLIC XMLImageStyle
+{
+public:
+ XMLImageStyle();
+ ~XMLImageStyle();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue, SvXMLExport& rExport );
+ sal_Bool importXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName, SvXMLImport& rImport );
+
+private:
+
+ SAL_DLLPRIVATE sal_Bool ImpExportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue,
+ SvXMLExport& rExport );
+ SAL_DLLPRIVATE sal_Bool ImpImportXML( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue, ::rtl::OUString& rStrName,
+ SvXMLImport& rImport );
+};
+
+#endif // _XMLOFF_IMAGESTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/MarkerStyle.hxx b/xmloff/inc/MarkerStyle.hxx
new file mode 100644
index 000000000000..d8768302110d
--- /dev/null
+++ b/xmloff/inc/MarkerStyle.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_MARKERSTYLE_HXX
+#define _XMLOFF_MARKERSTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+
+class SvXMLImport;
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class A> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace uno { class Any; }
+} } }
+namespace rtl { class OUString; }
+
+
+class XMLOFF_DLLPUBLIC XMLMarkerStyleImport
+{
+ SvXMLImport& rImport;
+
+public:
+ XMLMarkerStyleImport( SvXMLImport& rImport );
+ ~XMLMarkerStyleImport();
+
+ sal_Bool importXML(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue,
+ ::rtl::OUString& rStrName );
+};
+
+class XMLOFF_DLLPUBLIC XMLMarkerStyleExport
+{
+ SvXMLExport& rExport;
+
+public:
+ XMLMarkerStyleExport( SvXMLExport& rExport );
+ ~XMLMarkerStyleExport();
+
+ sal_Bool exportXML(
+ const ::rtl::OUString& rStrName,
+ const ::com::sun::star::uno::Any& rValue );
+};
+
+#endif // _XMLOFF_MARKERSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/MetaExportComponent.hxx b/xmloff/inc/MetaExportComponent.hxx
new file mode 100644
index 000000000000..de9d6c25512f
--- /dev/null
+++ b/xmloff/inc/MetaExportComponent.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_METAEXPORTCOMPONENT_HXX
+#define _XMLOFF_METAEXPORTCOMPONENT_HXX
+
+#include <com/sun/star/document/XDocumentProperties.hpp>
+
+#include <xmloff/xmlexp.hxx>
+
+class XMLMetaExportComponent : public SvXMLExport
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties > mxDocProps;
+
+public:
+ // #110680#
+ // XMLMetaExportComponent();
+ XMLMetaExportComponent(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ sal_uInt16 nFlags
+ );
+
+ virtual ~XMLMetaExportComponent();
+
+protected:
+ // export the events off all autotexts
+ virtual sal_uInt32 exportDoc(
+ enum ::xmloff::token::XMLTokenEnum eClass = xmloff::token::XML_TOKEN_INVALID );
+
+ // accept XDocumentProperties in addition to XModel
+ virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // override
+ virtual void _ExportMeta();
+
+ // methods without content:
+ virtual void _ExportAutoStyles();
+ virtual void _ExportMasterStyles();
+ virtual void _ExportContent();
+};
+
+// global functions to support the component
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ XMLMetaExportComponent_getSupportedServiceNames()
+ throw();
+
+::rtl::OUString SAL_CALL XMLMetaExportComponent_getImplementationName()
+ throw();
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ XMLMetaExportComponent_createInstance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & )
+ throw( ::com::sun::star::uno::Exception );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/MetaImportComponent.hxx b/xmloff/inc/MetaImportComponent.hxx
new file mode 100644
index 000000000000..17e7b1f4a715
--- /dev/null
+++ b/xmloff/inc/MetaImportComponent.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_METAIMPORTCOMPONENT_HXX
+#define _XMLOFF_METAIMPORTCOMPONENT_HXX
+
+#include <xmloff/xmlimp.hxx>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+
+
+class XMLMetaImportComponent : public SvXMLImport
+{
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> mxDocProps;
+
+public:
+ // #110680#
+ // XMLMetaImportComponent() throw();
+ XMLMetaImportComponent(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory
+ ) throw();
+
+ virtual ~XMLMetaImportComponent() throw();
+
+
+protected:
+
+ virtual SvXMLImportContext* CreateContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ // XImporter
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc )
+ throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+};
+
+
+// global functions to support the component
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ XMLMetaImportComponent_getSupportedServiceNames()
+ throw();
+
+::rtl::OUString SAL_CALL XMLMetaImportComponent_getImplementationName()
+ throw();
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ XMLMetaImportComponent_createInstance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & )
+ throw( ::com::sun::star::uno::Exception );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/MultiPropertySetHelper.hxx b/xmloff/inc/MultiPropertySetHelper.hxx
new file mode 100644
index 000000000000..c399b87df201
--- /dev/null
+++ b/xmloff/inc/MultiPropertySetHelper.hxx
@@ -0,0 +1,207 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONDITIONALMULTIPROPERTYSETHELPER_HXX
+#define _XMLOFF_CONDITIONALMULTIPROPERTYSETHELPER_HXX
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <tools/debug.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace beans { class XMultiPropertySet; }
+ namespace beans { class XPropertySet; }
+ namespace beans { class XPropertySetInfo; }
+} } }
+
+
+/**
+ * The MultiPropertySetHelper performs the follwing functions:
+ *
+ * Given a list of property names (as sal_Char** or OUString*), it can
+ * query an XMultiPropertySet (or XPropertySet) which of these properties
+ * it supports (method hasProperties(...)). The properties *MUST* be
+ * sorted alphabetically.
+ *
+ * Then, the X(Multi)PropertySet can be queried for values, and only
+ * the supported properties are queried. (method getValues(...)) The
+ * values are stored in the helper itself.
+ *
+ * Finally, each property can be queried for existence
+ * (method hasProperty(...)) or its value (method (getValue(...))).
+ *
+ * After some initial preparation (hasProperties, getValues) the
+ * MultiPropertySetHelper can be used similarly to an
+ * XPropertySet in that you can query the values in the places where you
+ * need them. However, if an XMultiPropertySet is supplied, the queries
+ * are more efficient, often significantly so.
+ */
+class MultiPropertySetHelper
+{
+ /// names of all properties
+ ::rtl::OUString* pPropertyNames;
+
+ /// length of pPropertyNames array
+ sal_Int16 nLength;
+
+ /// the sequence of property names that the current (multi)
+ /// property set implementation supports
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > aPropertySequence;
+
+ /// an array of indices that maps from pPropertyNames indices to
+ /// aPropertySequence indices
+ sal_Int16* pSequenceIndex;
+
+ /// the last set of values retrieved by getValues
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aValues;
+
+ /// result of aValues.getConstArray()
+ const ::com::sun::star::uno::Any* pValues;
+
+ /// an empty Any
+ ::com::sun::star::uno::Any aEmptyAny;
+
+public:
+
+ MultiPropertySetHelper( const sal_Char** pNames );
+
+ MultiPropertySetHelper( const ::rtl::OUString* pNames );
+
+ ~MultiPropertySetHelper();
+
+
+ /**
+ * Call hasPropertiesByName for the provided XPropertySetInfo and build
+ * list of allowed properties.
+ */
+ void hasProperties( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo> & );
+
+
+ /**
+ * Return whether hasProperties was called
+ * (i.e. if we are ready to call getValues)
+ */
+ sal_Bool checkedProperties();
+
+ /**
+ * Get values from the XMultiPropertySet.
+ *
+ * May only be called after hasProperties() was called for the
+ * appropriate XPropertySetInfo.
+ */
+ void getValues( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XMultiPropertySet> & );
+
+ /**
+ * Get values from the XPropertySet. This can be much slower than
+ * getValues( const Reference<XMultiPropertySet& ) and hence
+ * should be avoided.
+ *
+ * May only be called after hasProperties() was called for the
+ * appropriate XPropertySetInfo.
+ */
+ void getValues( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & );
+
+
+
+ /**
+ * Get a value from the values array.
+ *
+ * May only be called after getValues() was called.
+ */
+ inline const ::com::sun::star::uno::Any& getValue( sal_Int16 nIndex );
+
+ /**
+ * Find out if this property is supported.
+ *
+ * May only be called after hasProperties() was called.
+ */
+ inline sal_Bool hasProperty( sal_Int16 nIndex );
+
+ /**
+ * Get a value from the XPropertySet on demand.
+ *
+ * If neither getValues nor getValueOnDemand has been called already
+ * after the last call to resetValues, the values are retrieved
+ * using getValues. Otherwise the value already retrieved is returned.
+ * In case XMultiPropertySet is supported by the XPropertySet and
+ * bTryMult is set, the XMultiPropertySet is used to get the values.
+ *
+ */
+ const ::com::sun::star::uno::Any& getValue( sal_Int16 nIndex,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> &,
+ sal_Bool bTryMulti = sal_False );
+
+ /**
+ * Get a value from the XMultiPropertySet on demand.
+ *
+ * If neither getValues nor getValueOnDemand has been called already
+ * after the last call to resetValues, the values are retrieved
+ * using getValues. Otherwise the value already retrieved is returned.
+ * In case XMultiPropertySet is supported by the XPropertySet,
+ * XMultiPropertySet is used to get the values.
+ *
+ */
+ const ::com::sun::star::uno::Any& getValue( sal_Int16 nIndex,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XMultiPropertySet> & );
+
+ inline void resetValues() { pValues = 0; }
+};
+
+
+// inline implementations of the often-called methods getValue and hasProperty:
+
+const ::com::sun::star::uno::Any& MultiPropertySetHelper::getValue(
+ sal_Int16 nValueNo )
+{
+ DBG_ASSERT( pValues != NULL,
+ "called getValue() without calling getValues() before");
+ DBG_ASSERT( pSequenceIndex != NULL,
+ "called getValue() without calling hasProperties() before" );
+ DBG_ASSERT( nValueNo < nLength, "index out of range" );
+
+ sal_Int16 nIndex = pSequenceIndex[ nValueNo ];
+ return ( nIndex != -1 ) ? pValues[ nIndex ] : aEmptyAny;
+}
+
+sal_Bool MultiPropertySetHelper::hasProperty( sal_Int16 nValueNo )
+{
+ DBG_ASSERT( pSequenceIndex != NULL,
+ "called getValue() without calling hasProperties() before" );
+ DBG_ASSERT( nValueNo < nLength, "index out of range" );
+
+ return pSequenceIndex[ nValueNo ] != -1;
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/PageMasterImportContext.hxx b/xmloff/inc/PageMasterImportContext.hxx
new file mode 100644
index 000000000000..0ec6c8ce0e6a
--- /dev/null
+++ b/xmloff/inc/PageMasterImportContext.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PAGEMASTERIMPORTCONTEXT_HXX
+#define _XMLOFF_PAGEMASTERIMPORTCONTEXT_HXX
+
+#include <xmloff/prstylei.hxx>
+#include <xmloff/xmlimp.hxx>
+
+class PageStyleContext : public XMLPropStyleContext
+{
+ ::rtl::OUString sPageUsage;
+protected:
+
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+
+public:
+
+ TYPEINFO();
+
+ PageStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles,
+ sal_Bool bDefaultStyle=sal_False);
+ virtual ~PageStyleContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void FillPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropSet );
+
+ //text grid enhancement
+ virtual void SetDefaults();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/PropertySetMerger.hxx b/xmloff/inc/PropertySetMerger.hxx
new file mode 100644
index 000000000000..5ba830c269e1
--- /dev/null
+++ b/xmloff/inc/PropertySetMerger.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPERTYSETMERGER_HXX_
+#define _XMLOFF_PROPERTYSETMERGER_HXX_
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+extern ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ PropertySetMerger_CreateInstance(
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rPropSet1,
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rPropSet2 ) throw();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/RDFaExportHelper.hxx b/xmloff/inc/RDFaExportHelper.hxx
new file mode 100644
index 000000000000..9228e6fd72f6
--- /dev/null
+++ b/xmloff/inc/RDFaExportHelper.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 RDFAEXPORTHELPER_HXX
+#define RDFAEXPORTHELPER_HXX
+
+#include <com/sun/star/uno/Reference.h>
+
+#include <rtl/ustring.hxx>
+
+#include <map>
+
+
+namespace com { namespace sun { namespace star {
+ namespace rdf { class XBlankNode; }
+ namespace rdf { class XMetadatable; }
+ namespace rdf { class XDocumentRepository; }
+} } }
+
+class SvXMLExport;
+
+namespace xmloff {
+
+class SAL_DLLPRIVATE RDFaExportHelper
+{
+private:
+ SvXMLExport & m_rExport;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XDocumentRepository> m_xRepository;
+
+ typedef ::std::map< ::rtl::OUString, ::rtl::OUString >
+ BlankNodeMap_t;
+
+ BlankNodeMap_t m_BlankNodeMap;
+
+ long m_Counter;
+
+ ::rtl::OUString
+ LookupBlankNode( ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XBlankNode> const & i_xBlankNode);
+
+public:
+ RDFaExportHelper(SvXMLExport & i_rExport);
+
+ void
+ AddRDFa(::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable> const & i_xMetadatable);
+};
+
+} // namespace xmloff
+
+#endif // RDFAEXPORTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/RDFaImportHelper.hxx b/xmloff/inc/RDFaImportHelper.hxx
new file mode 100644
index 000000000000..5e854b95355f
--- /dev/null
+++ b/xmloff/inc/RDFaImportHelper.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 RDFAIMPORTHELPER_HXX
+#define RDFAIMPORTHELPER_HXX
+
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
+
+#include <com/sun/star/uno/Reference.h>
+
+
+namespace rtl { class OUString; }
+
+namespace com { namespace sun { namespace star {
+ namespace uno { class XComponentContext; }
+ namespace rdf { class XMetadatable; }
+ namespace rdf { class XRepositorySupplier; }
+} } }
+
+class SvXMLImport;
+
+namespace xmloff {
+
+struct RDFaEntry;
+struct ParsedRDFaAttributes;
+
+class SAL_DLLPRIVATE RDFaImportHelper
+{
+
+private:
+ const SvXMLImport & m_rImport;
+
+ typedef ::std::vector< RDFaEntry > RDFaEntries_t;
+
+ RDFaEntries_t m_RDFaEntries;
+
+ const SvXMLImport & GetImport() const { return m_rImport; }
+
+
+public:
+ RDFaImportHelper(const SvXMLImport & i_rImport);
+
+ ~RDFaImportHelper();
+
+ /** 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>
+ 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,
+ ::rtl::OUString const & i_rDatatype);
+
+ /** Insert all added statements into the RDF repository.
+ <p> This is done <em>after</em> the input file has been read,
+ to prevent collision between generated ids and ids in the file.</p>
+ */
+ void InsertRDFa( ::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XRepositorySupplier > const & i_xModel);
+};
+
+} // namespace xmloff
+
+#endif // RDFAIMPORTHELPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx
new file mode 100644
index 000000000000..f27fc49803f0
--- /dev/null
+++ b/xmloff/inc/SchXMLExport.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 SCH_XMLEXPORT_HXX_
+#define SCH_XMLEXPORT_HXX_
+
+#include <xmloff/SchXMLExportHelper.hxx>
+#include "SchXMLAutoStylePoolP.hxx"
+#include <xmloff/xmlexp.hxx>
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/prhdlfac.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace chart {
+ class XDiagram;
+ class XChartDocument;
+ struct ChartSeriesAddress;
+ }
+ namespace drawing {
+ class XShape;
+ }
+ namespace task {
+ class XStatusIndicator;
+ }
+}}}
+
+class SvXMLAutoStylePoolP;
+class SvXMLUnitConverter;
+class XMLChartExportPropertyMapper;
+
+// ------------------------------------------
+// export class for a complete chart document
+// ------------------------------------------
+
+class SchXMLExport : public SvXMLExport
+{
+private:
+ com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
+ SchXMLAutoStylePoolP maAutoStylePool;
+
+ SchXMLExportHelper maExportHelper;
+
+protected:
+ virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID );
+
+ virtual void _ExportStyles( sal_Bool bUsed );
+ virtual void _ExportAutoStyles();
+ virtual void _ExportMasterStyles();
+ virtual void _ExportContent();
+
+public:
+ // #110680#
+ SchXMLExport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ sal_uInt16 nExportFlags = EXPORT_ALL );
+ virtual ~SchXMLExport();
+
+ void SetProgress( sal_Int32 nPercentage );
+
+ UniReference< XMLPropertySetMapper > GetPropertySetMapper() const;
+
+ // XServiceInfo ( : SvXMLExport )
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+};
+
+#endif // SCH_XMLEXPORT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx
new file mode 100644
index 000000000000..ce878a138a86
--- /dev/null
+++ b/xmloff/inc/SchXMLImport.hxx
@@ -0,0 +1,223 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 SCH_XMLIMPORT_HXX_
+#define SCH_XMLIMPORT_HXX_
+
+#include <xmloff/SchXMLImportHelper.hxx>
+#include <xmloff/xmlimp.hxx>
+#include <xmloff/xmltkmap.hxx>
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/prhdlfac.hxx>
+#include <xmloff/families.hxx>
+
+/* ----------------------------------------
+ these enums are used for the
+ SvXMLTokenMapEntries to distinguish
+ the tokens in switch-directives
+ ----------------------------------------*/
+
+enum SchXMLDocElemTokenMap
+{
+ XML_TOK_DOC_AUTOSTYLES,
+ XML_TOK_DOC_STYLES,
+ XML_TOK_DOC_META,
+ XML_TOK_DOC_BODY
+};
+
+enum SchXMLTableElemTokenMap
+{
+ XML_TOK_TABLE_HEADER_COLS,
+ XML_TOK_TABLE_COLUMNS,
+ XML_TOK_TABLE_COLUMN,
+ XML_TOK_TABLE_HEADER_ROWS,
+ XML_TOK_TABLE_ROWS,
+ XML_TOK_TABLE_ROW
+};
+
+enum SchXMLChartElemTokenMap
+{
+ XML_TOK_CHART_PLOT_AREA,
+ XML_TOK_CHART_TITLE,
+ XML_TOK_CHART_SUBTITLE,
+ XML_TOK_CHART_LEGEND,
+ XML_TOK_CHART_TABLE
+};
+
+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,
+ XML_TOK_PA_FLOOR,
+ XML_TOK_PA_LIGHT_SOURCE,
+ XML_TOK_PA_STOCK_GAIN,
+ XML_TOK_PA_STOCK_LOSS,
+ XML_TOK_PA_STOCK_RANGE
+};
+
+enum SchXMLSeriesElemTokenMap
+{
+ XML_TOK_SERIES_DATA_POINT,
+ XML_TOK_SERIES_DOMAIN,
+ XML_TOK_SERIES_MEAN_VALUE_LINE,
+ XML_TOK_SERIES_REGRESSION_CURVE,
+ XML_TOK_SERIES_ERROR_INDICATOR
+};
+
+enum SchXMLAxisElemTokenMap
+{
+ XML_TOK_AXIS_TITLE,
+ XML_TOK_AXIS_CATEGORIES,
+ XML_TOK_AXIS_GRID
+};
+
+// ----------------------------------------
+
+enum SchXMLChartAttrMap
+{
+ XML_TOK_CHART_HREF,
+ XML_TOK_CHART_CLASS,
+ XML_TOK_CHART_WIDTH,
+ XML_TOK_CHART_HEIGHT,
+ XML_TOK_CHART_STYLE_NAME,
+ XML_TOK_CHART_ADDIN_NAME,
+ XML_TOK_CHART_COL_MAPPING,
+ XML_TOK_CHART_ROW_MAPPING
+};
+
+enum SchXMLPlotAreaAttrTokenMap
+{
+ XML_TOK_PA_X,
+ XML_TOK_PA_Y,
+ XML_TOK_PA_WIDTH,
+ XML_TOK_PA_HEIGHT,
+ XML_TOK_PA_STYLE_NAME,
+ XML_TOK_PA_TRANSFORM,
+ XML_TOK_PA_CHART_ADDRESS,
+ XML_TOK_PA_TABLE_NUMBER_LIST,
+ XML_TOK_PA_DS_HAS_LABELS,
+ XML_TOK_PA_VRP,
+ XML_TOK_PA_VPN,
+ XML_TOK_PA_VUP,
+ XML_TOK_PA_PROJECTION,
+ XML_TOK_PA_DISTANCE,
+ XML_TOK_PA_FOCAL_LENGTH,
+ XML_TOK_PA_SHADOW_SLANT,
+ XML_TOK_PA_SHADE_MODE,
+ XML_TOK_PA_AMBIENT_COLOR,
+ XML_TOK_PA_LIGHTING_MODE
+};
+
+enum SchXMLAxisAttrTokenMap
+{
+ XML_TOK_AXIS_DIMENSION,
+ XML_TOK_AXIS_NAME,
+ XML_TOK_AXIS_STYLE_NAME
+};
+
+enum SchXMLLegendAttrMap
+{
+ XML_TOK_LEGEND_POSITION,
+ XML_TOK_LEGEND_X,
+ XML_TOK_LEGEND_Y,
+ XML_TOK_LEGEND_STYLE_NAME
+};
+
+enum SchXMLAutoStyleAttrMap
+{
+ XML_TOK_AS_FAMILY,
+ XML_TOK_AS_NAME
+};
+
+enum SchXMLCellAttrMap
+{
+ XML_TOK_CELL_VAL_TYPE,
+ XML_TOK_CELL_VALUE
+};
+
+enum SchXMLSeriesAttrMap
+{
+ XML_TOK_SERIES_CELL_RANGE,
+ XML_TOK_SERIES_LABEL_ADDRESS,
+ XML_TOK_SERIES_ATTACHED_AXIS,
+ XML_TOK_SERIES_STYLE_NAME,
+ XML_TOK_SERIES_CHART_CLASS
+};
+
+enum SchXMLRegEquationAttrMap
+{
+ XML_TOK_REGEQ_STYLE_NAME,
+ XML_TOK_REGEQ_DISPLAY_EQUATION,
+ XML_TOK_REGEQ_DISPLAY_R_SQUARE,
+ XML_TOK_REGEQ_POS_X,
+ XML_TOK_REGEQ_POS_Y
+};
+
+class SchXMLImport : public SvXMLImport
+{
+private:
+ com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
+
+ SchXMLImportHelper maImportHelper;
+
+protected:
+ virtual SvXMLImportContext *CreateContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+public:
+ // #110680#
+ SchXMLImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ sal_uInt16 nImportFlags = IMPORT_ALL );
+
+ // #110680#
+ SchXMLImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ com::sun::star::uno::Reference< com::sun::star::frame::XModel > xModel,
+ com::sun::star::uno::Reference< com::sun::star::document::XGraphicObjectResolver > &,
+ sal_Bool bLoadDoc, sal_Bool bShowProgress );
+
+ virtual ~SchXMLImport() throw ();
+
+ // XServiceInfo ( : SvXMLExport )
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
+
+ SvXMLImportContext* CreateStylesContext( const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ // XImporter
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+};
+
+#endif // SCH_XMLIMPORT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/StyleMap.hxx b/xmloff/inc/StyleMap.hxx
new file mode 100644
index 000000000000..02de1e994e31
--- /dev/null
+++ b/xmloff/inc/StyleMap.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_STYLEMAP_HXX
+#define _XMLOFF_STYLEMAP_HXX
+
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <cppuhelper/implbase1.hxx>
+#include <hash_map>
+
+struct StyleNameKey_Impl
+{
+ sal_uInt16 m_nFamily;
+ ::rtl::OUString m_aName;
+
+ inline StyleNameKey_Impl( sal_uInt16 nFamily,
+ const ::rtl::OUString& rName ) :
+ m_nFamily( nFamily ),
+ m_aName( rName )
+ {
+ }
+
+ inline StyleNameKey_Impl() :
+ m_nFamily( 0 )
+ {
+ }
+};
+
+struct StyleNameHash_Impl
+{
+ inline size_t operator()( const StyleNameKey_Impl& r ) const;
+ inline bool operator()( const StyleNameKey_Impl& r1,
+ const StyleNameKey_Impl& r2 ) const;
+};
+
+inline size_t StyleNameHash_Impl::operator()( const StyleNameKey_Impl& r ) const
+{
+ return static_cast< size_t >( r.m_nFamily ) +
+ static_cast< size_t >( r.m_aName.hashCode() );
+}
+
+inline bool StyleNameHash_Impl::operator()(
+ const StyleNameKey_Impl& r1,
+ const StyleNameKey_Impl& r2 ) const
+{
+ return r1.m_nFamily == r2.m_nFamily && r1.m_aName == r2.m_aName;
+}
+
+class StyleMap :
+ public ::cppu::WeakImplHelper1< ::com::sun::star::lang::XUnoTunnel>,
+ public ::std::hash_map< StyleNameKey_Impl, ::rtl::OUString,
+ StyleNameHash_Impl, StyleNameHash_Impl >
+{
+
+public:
+
+ StyleMap();
+ virtual ~StyleMap();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ static StyleMap* getImplementation(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > ) throw();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething(
+ const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _XMLOFF_STYLEMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/TransGradientStyle.hxx b/xmloff/inc/TransGradientStyle.hxx
new file mode 100644
index 000000000000..15f875c3f2da
--- /dev/null
+++ b/xmloff/inc/TransGradientStyle.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TRANSGRADIENTSTYLE_HXX
+#define _XMLOFF_TRANSGRADIENTSTYLE_HXX
+
+
+#include <sal/types.h>
+
+class SvXMLImport;
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class A> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace uno { class Any; }
+} } }
+namespace rtl { class OUString; }
+
+
+class XMLTransGradientStyleImport
+{
+ SvXMLImport& rImport;
+
+public:
+ XMLTransGradientStyleImport( SvXMLImport& rImport );
+ ~XMLTransGradientStyleImport();
+
+ sal_Bool importXML(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::com::sun::star::uno::Any& rValue,
+ ::rtl::OUString& rStrName );
+};
+
+class XMLTransGradientStyleExport
+{
+ SvXMLExport& rExport;
+
+public:
+ XMLTransGradientStyleExport( SvXMLExport& rExport );
+ ~XMLTransGradientStyleExport();
+
+ sal_Bool exportXML( const ::rtl::OUString& rStrName, const ::com::sun::star::uno::Any& rValue );
+};
+
+#endif // _XMLOFF_TRANSGRADIENTSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/VisAreaContext.hxx b/xmloff/inc/VisAreaContext.hxx
new file mode 100644
index 000000000000..bf5768cffc4c
--- /dev/null
+++ b/xmloff/inc/VisAreaContext.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_VISAREACONTEXT_HXX
+#define _XMLOFF_VISAREACONTEXT_HXX
+
+#include <xmloff/xmlictxt.hxx>
+#include <tools/mapunit.hxx>
+
+class Rectangle;
+
+namespace com { namespace sun { namespace star { namespace awt {
+ struct Rectangle;
+} } } }
+
+class XMLVisAreaContext : public SvXMLImportContext
+{
+public:
+ // read all attributes and set the values in rRect
+ XMLVisAreaContext( SvXMLImport& rImport, USHORT nPrfx, const rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ Rectangle& rRect, const MapUnit aMapUnit);
+
+ XMLVisAreaContext( SvXMLImport& rImport, USHORT nPrfx, const rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ ::com::sun::star::awt::Rectangle& rRect, const sal_Int16 nMeasureUnit);
+
+ virtual ~XMLVisAreaContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void EndElement();
+
+private:
+ void process( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ ::com::sun::star::awt::Rectangle& rRect,
+ const sal_Int16 nMeasureUnit );
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/VisAreaExport.hxx b/xmloff/inc/VisAreaExport.hxx
new file mode 100644
index 000000000000..46643659a393
--- /dev/null
+++ b/xmloff/inc/VisAreaExport.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_VISAREAEXPORT_HXX
+#define _XMLOFF_VISAREAEXPORT_HXX
+
+#include <tools/mapunit.hxx>
+#include <sal/types.h>
+
+class SvXMLExport;
+class Rectangle;
+
+namespace com { namespace sun { namespace star { namespace awt {
+ struct Rectangle;
+} } } }
+
+class XMLVisAreaExport
+{
+public:
+ // the complete export is done in the constructor
+ XMLVisAreaExport(SvXMLExport& rExport, const sal_Char *pName,
+ const Rectangle& aRect, const MapUnit aMapUnit);
+
+ XMLVisAreaExport(SvXMLExport& rExport, const sal_Char *pName,
+ const com::sun::star::awt::Rectangle& aRect, const sal_Int16 nMeasureUnit );
+
+ ~XMLVisAreaExport();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLBackgroundImageContext.hxx b/xmloff/inc/XMLBackgroundImageContext.hxx
new file mode 100644
index 000000000000..9db309d3675e
--- /dev/null
+++ b/xmloff/inc/XMLBackgroundImageContext.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _XMLBACKGROUNDIMAGECONTEXT_HXX
+#define _XMLBACKGROUNDIMAGECONTEXT_HXX
+
+#include <com/sun/star/style/GraphicLocation.hpp>
+#include "XMLElementPropertyContext.hxx"
+
+namespace com { namespace sun { namespace star {
+ namespace io { class XOutputStream; }
+} } }
+
+class XMLBackgroundImageContext : public XMLElementPropertyContext
+{
+ XMLPropertyState aPosProp;
+ XMLPropertyState aFilterProp;
+ XMLPropertyState aTransparencyProp;
+
+ ::com::sun::star::style::GraphicLocation ePos;
+ ::rtl::OUString sURL;
+ ::rtl::OUString sFilter;
+ sal_Int8 nTransparency;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > xBase64Stream;
+
+private:
+ void ProcessAttrs(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+public:
+ TYPEINFO();
+
+ XMLBackgroundImageContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ const XMLPropertyState& rProp,
+ sal_Int32 nPosIdx,
+ sal_Int32 nFilterIdx,
+ sal_Int32 nTransparencyIdx,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~XMLBackgroundImageContext();
+
+ SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void EndElement();
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLBackgroundImageExport.hxx b/xmloff/inc/XMLBackgroundImageExport.hxx
new file mode 100644
index 000000000000..16190b8f0e4f
--- /dev/null
+++ b/xmloff/inc/XMLBackgroundImageExport.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _XMLBACKGROUNDIMAGEEXPORT_HXX
+#define _XMLBACKGROUNDIMAGEEXPORT_HXX
+
+#include <sal/types.h>
+
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star { namespace uno {
+ class Any;
+} } } }
+
+class SvXMLExport;
+
+class XMLBackgroundImageExport
+{
+ SvXMLExport& rExport;
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+public:
+
+ XMLBackgroundImageExport( SvXMLExport& rExport );
+
+ ~XMLBackgroundImageExport();
+
+ void exportXML( const ::com::sun::star::uno::Any& rURL,
+ const ::com::sun::star::uno::Any *pPos,
+ const ::com::sun::star::uno::Any *pFilter,
+ const ::com::sun::star::uno::Any *pTransparency,
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLBase64Export.hxx b/xmloff/inc/XMLBase64Export.hxx
new file mode 100644
index 000000000000..15b7be83b855
--- /dev/null
+++ b/xmloff/inc/XMLBase64Export.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLBASE64EXPORT_HXX
+#define _XMLOFF_XMLBASE64EXPORT_HXX
+
+#include <com/sun/star/uno/Reference.h>
+
+namespace com { namespace sun { namespace star { namespace io {
+ class XInputStream; } } } }
+class SvXMLExport;
+
+class XMLBase64Export
+{
+ SvXMLExport& rExport;
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+
+public:
+
+ XMLBase64Export( SvXMLExport& rExport );
+
+ sal_Bool exportXML( const ::com::sun::star::uno::Reference <
+ ::com::sun::star::io::XInputStream > & rIn );
+ sal_Bool exportElement( const ::com::sun::star::uno::Reference <
+ ::com::sun::star::io::XInputStream > & rIn,
+ sal_uInt16 nNamespace,
+ enum ::xmloff::token::XMLTokenEnum eName );
+ sal_Bool exportOfficeBinaryDataElement(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::io::XInputStream > & rIn );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLBasicExportFilter.hxx b/xmloff/inc/XMLBasicExportFilter.hxx
new file mode 100644
index 000000000000..b3fc4611f3c4
--- /dev/null
+++ b/xmloff/inc/XMLBasicExportFilter.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLBASICEXPORTFILTER_HXX
+#define _XMLOFF_XMLBASICEXPORTFILTER_HXX
+
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+
+// =============================================================================
+// class XMLBasicExportFilter
+// =============================================================================
+
+typedef ::cppu::WeakImplHelper1<
+ ::com::sun::star::xml::sax::XDocumentHandler > XMLBasicExportFilter_BASE;
+
+class XMLBasicExportFilter : public XMLBasicExportFilter_BASE
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > m_xHandler;
+
+public:
+ XMLBasicExportFilter(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler >& rxHandler );
+ virtual ~XMLBasicExportFilter();
+
+ // XDocumentHandler
+ virtual void SAL_CALL startDocument()
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endDocument()
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL startElement( const ::rtl::OUString& aName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttribs )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL endElement( const ::rtl::OUString& aName )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL characters( const ::rtl::OUString& aChars )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL processingInstruction( const ::rtl::OUString& aTarget, const ::rtl::OUString& aData )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDocumentLocator( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator >& xLocator )
+ throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+};
+
+#endif // _XMLOFF_XMLBASICEXPORTFILTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx b/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx
new file mode 100644
index 000000000000..57e22d7152de
--- /dev/null
+++ b/xmloff/inc/XMLBitmapLogicalSizePropertyHandler.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLBITMAPLOGICALSIZEPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLBITMAPLOGICALSIZEPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+struct SvXMLEnumMapEntry;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Abstract base-class for different XML-types. Derivations of this class
+ knows how to compare, im/export a special XML-type
+*/
+class XMLBitmapLogicalSizePropertyHandler: public XMLPropertyHandler
+{
+public:
+
+ XMLBitmapLogicalSizePropertyHandler();
+
+ // Just needed for virtual destruction
+ virtual ~XMLBitmapLogicalSizePropertyHandler();
+
+ /// Imports the given value in cas of the given XML-data-type
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+
+ /// Exports the given value in cas of the given XML-data-type
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_XMLBITMAPLOGICALSIZEPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx b/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx
new file mode 100644
index 000000000000..90597b5bb919
--- /dev/null
+++ b/xmloff/inc/XMLBitmapRepeatOffsetPropertyHandler.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLBITMAPREPEATOFFSETPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLBITMAPREPEATOFFSETPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+struct SvXMLEnumMapEntry;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Abstract base-class for different XML-types. Derivations of this class
+ knows how to compare, im/export a special XML-type
+*/
+class XMLBitmapRepeatOffsetPropertyHandler: public XMLPropertyHandler
+{
+ sal_Bool mbX;
+ ::rtl::OUString msVertical;
+ ::rtl::OUString msHorizontal;
+public:
+
+ XMLBitmapRepeatOffsetPropertyHandler( sal_Bool bX );
+
+ // Just needed for virtual destruction
+ virtual ~XMLBitmapRepeatOffsetPropertyHandler();
+
+ /// Imports the given value in cas of the given XML-data-type
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+
+ /// Exports the given value in cas of the given XML-data-type
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_XMLBITMAPREPEATOFFSETPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
new file mode 100644
index 000000000000..dee76236154b
--- /dev/null
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CHARTPROPERTYSETMAPPER_HXX_
+#define _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
+
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/xmlexppr.hxx>
+#include <xmloff/xmlimppr.hxx>
+#include <xmloff/xmlimp.hxx>
+
+namespace rtl { class OUString; }
+
+extern const XMLPropertyMapEntry aXMLChartPropMap[];
+
+class SvXMLExport;
+
+// ----------------------------------------
+
+class XMLChartPropHdlFactory : public XMLPropertyHandlerFactory
+{
+private:
+ const XMLPropertyHandler* GetShapePropertyHandler( sal_Int32 nType ) const;
+
+public:
+ virtual ~XMLChartPropHdlFactory();
+ virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
+};
+
+// ----------------------------------------
+
+class XMLChartPropertySetMapper : public XMLPropertySetMapper
+{
+public:
+ XMLChartPropertySetMapper();
+ ~XMLChartPropertySetMapper();
+};
+
+// ----------------------------------------
+
+class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
+{
+private:
+ const rtl::OUString msTrue;
+ const rtl::OUString msFalse;
+ bool mbAdaptPercentage;
+
+ SvXMLExport& mrExport;
+
+protected:
+ virtual void ContextFilter(
+ ::std::vector< XMLPropertyState >& rProperties,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet ) const;
+
+private:
+ /// this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
+ virtual void handleElementItem(
+ SvXMLExport& rExport,
+ const XMLPropertyState& rProperty, sal_uInt16 nFlags,
+ const ::std::vector< XMLPropertyState > *pProperties = 0,
+ sal_uInt32 nIdx = 0 ) const;
+
+ /// this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
+ virtual void handleSpecialItem(
+ SvXMLAttributeList& rAttrList, const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap,
+ const ::std::vector< XMLPropertyState > *pProperties = 0,
+ sal_uInt32 nIdx = 0 ) const;
+
+public:
+ XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
+ SvXMLExport& rExport );
+ virtual ~XMLChartExportPropertyMapper();
+
+ void setAdaptPercentage( bool bNewValue );
+};
+
+// ----------------------------------------
+
+class XMLChartImportPropertyMapper : public SvXMLImportPropertyMapper
+{
+private:
+ SvXMLImport& mrImport;
+
+public:
+ XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper,
+ const SvXMLImport& rImport );
+ virtual ~XMLChartImportPropertyMapper();
+
+ virtual bool handleSpecialItem(
+ XMLPropertyState& rProperty,
+ ::std::vector< XMLPropertyState >& rProperties,
+ const ::rtl::OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const;
+
+ virtual void finished(
+ ::std::vector< XMLPropertyState >& rProperties,
+ sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const;
+};
+
+#endif // _XMLOFF_CHARTPROPERTYSETMAPPER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLChartStyleContext.hxx b/xmloff/inc/XMLChartStyleContext.hxx
new file mode 100644
index 000000000000..f7d4c4d88214
--- /dev/null
+++ b/xmloff/inc/XMLChartStyleContext.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLCHARTSTYLECONTEXT_HXX_
+#define _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
+
+#include <xmloff/XMLShapeStyleContext.hxx>
+
+class XMLChartStyleContext : public XMLShapeStyleContext
+{
+private:
+ ::rtl::OUString msDataStyleName;
+ ::rtl::OUString msPercentageDataStyleName;
+ SvXMLStylesContext& mrStyles;
+
+protected:
+ /// is called when an attribute at the (auto)style element is found
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+
+public:
+ TYPEINFO();
+
+ XMLChartStyleContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily );
+ virtual ~XMLChartStyleContext();
+
+ /// is called after all styles have been read to apply styles
+ void FillPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropSet );
+
+ /// necessary for property context (element-property symbol-image)
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+};
+
+#endif // _XMLOFF_XMLCHARTSTYLECONTEXT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLClipPropertyHandler.hxx b/xmloff/inc/XMLClipPropertyHandler.hxx
new file mode 100644
index 000000000000..e67f4dd86a71
--- /dev/null
+++ b/xmloff/inc/XMLClipPropertyHandler.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLCLIPPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLCLIPPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLClipPropertyHandler : public XMLPropertyHandler
+{
+ sal_Bool m_bODF11;
+public:
+ XMLClipPropertyHandler( sal_Bool bODF11 );
+ virtual ~XMLClipPropertyHandler();
+
+ virtual bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLER_BASICTYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLElementPropertyContext.hxx b/xmloff/inc/XMLElementPropertyContext.hxx
new file mode 100644
index 000000000000..6d9355eda996
--- /dev/null
+++ b/xmloff/inc/XMLElementPropertyContext.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLELEMENTPROPERTYCONTEXT_HXX
+#define _XMLOFF_XMLELEMENTPROPERTYCONTEXT_HXX
+
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/xmlictxt.hxx>
+
+class SvXMLImport;
+
+namespace rtl
+{
+ class OUString;
+}
+
+class XMLElementPropertyContext : public SvXMLImportContext
+{
+ sal_Bool bInsert;
+
+protected:
+
+ ::std::vector< XMLPropertyState > &rProperties;
+ XMLPropertyState aProp;
+
+ sal_Bool IsInsert() const { return bInsert; }
+ void SetInsert( sal_Bool bIns ) { bInsert = bIns; }
+
+public:
+ TYPEINFO();
+
+ XMLElementPropertyContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~XMLElementPropertyContext();
+
+ virtual void EndElement();
+};
+
+
+#endif // _XMLOFF_ELEMENTPROPERTYCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx b/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx
new file mode 100644
index 000000000000..3d98a51189db
--- /dev/null
+++ b/xmloff/inc/XMLEmbeddedObjectExportFilter.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
+#define _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
+
+#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <cppuhelper/implbase3.hxx>
+
+class XMLEmbeddedObjectExportFilter : public ::cppu::WeakImplHelper3<
+ ::com::sun::star::xml::sax::XExtendedDocumentHandler,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XInitialization>
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler > xHandler;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XExtendedDocumentHandler > xExtHandler;
+
+public:
+ XMLEmbeddedObjectExportFilter() throw();
+ XMLEmbeddedObjectExportFilter( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler > & rHandler ) throw();
+ virtual ~XMLEmbeddedObjectExportFilter () throw();
+
+ // ::com::sun::star::xml::sax::XDocumentHandler
+ virtual void SAL_CALL startDocument(void)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL endDocument(void)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL startElement(const ::rtl::OUString& aName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttribs)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL endElement(const ::rtl::OUString& aName)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL characters(const ::rtl::OUString& aChars)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL ignorableWhitespace(const ::rtl::OUString& aWhitespaces)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL processingInstruction(const ::rtl::OUString& aTarget,
+ const ::rtl::OUString& aData)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setDocumentLocator(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > & xLocator)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::xml::sax::XExtendedDocumentHandler
+ virtual void SAL_CALL startCDATA(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL endCDATA(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL comment(const ::rtl::OUString& sComment)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL allowLineBreak(void)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unknown(const ::rtl::OUString& sString)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+};
+
+#endif // _XMLOFF_XMLEMBEDDEDOBJECTEXPORTFILTER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
new file mode 100644
index 000000000000..329a1e5451f2
--- /dev/null
+++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEMBEDDEDOBJECTIMPORTCONTEXT_HXX
+#define _XMLOFF_XMLEMBEDDEDOBJECTIMPORTCONTEXT_HXX
+
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <xmloff/xmlictxt.hxx>
+
+namespace com { namespace sun { namespace star { namespace lang {
+ class XComponent; } } } }
+
+class XMLEmbeddedObjectImportContext : public SvXMLImportContext
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler > xHandler;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XComponent > xComp;
+
+ ::rtl::OUString sFilterService;
+ // #100592#
+ ::rtl::OUString sCLSID;
+
+public:
+ TYPEINFO();
+
+ const ::rtl::OUString& GetFilterServiceName() const { return sFilterService; }
+ // #100592#
+ const ::rtl::OUString& GetFilterCLSID() const { return sCLSID; }
+
+ XMLEmbeddedObjectImportContext( SvXMLImport& rImport, USHORT nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual ~XMLEmbeddedObjectImportContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void EndElement();
+
+ virtual void Characters( const ::rtl::OUString& rChars );
+
+ sal_Bool SetComponent(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XComponent >& rComp );
+
+};
+
+#endif // _XMLOFF_XMLEMBEDDEDOBJECTIMPORTCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLEventImportHelper.hxx b/xmloff/inc/XMLEventImportHelper.hxx
new file mode 100644
index 000000000000..df376472c17a
--- /dev/null
+++ b/xmloff/inc/XMLEventImportHelper.hxx
@@ -0,0 +1,109 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_EVENTIMPORTHELPER_HXX
+#define _XMLOFF_EVENTIMPORTHELPER_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <xmloff/xmlevent.hxx>
+
+#include <map>
+#include <list>
+
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+} } }
+namespace rtl { class OUString; }
+class XMLEventContextFactory;
+class XMLEventsImportContext;
+struct XMLEventNameTranslation;
+
+typedef ::std::map< ::rtl::OUString, XMLEventContextFactory* > FactoryMap;
+typedef ::std::map< XMLEventName, ::rtl::OUString > NameMap;
+typedef ::std::list< NameMap* > NameMapList;
+
+
+/**
+ * Helps the XMLEventsImportContext.
+ *
+ * This class stores
+ * a) the translation from XML event names to API event names, and
+ * b) a mapping from script language names to XMLEventContextFactory objects
+ * (that handle particular languages).
+ *
+ * Event name translation tables may be added, i.e. they will be joined
+ * together. If different translations are needed (i.e., if the same XML name
+ * needs to be translated to different API names in different contexts), then
+ * translation tables may be saved on a translation table stack.
+ */
+class XMLEventImportHelper
+{
+ /// map of XMLEventContextFactory objects
+ FactoryMap aFactoryMap;
+
+ /// map from XML to API names
+ NameMap* pEventNameMap;
+
+ /// stack of previous aEventNameMap
+ NameMapList aEventNameMapList;
+
+public:
+ XMLEventImportHelper();
+
+ ~XMLEventImportHelper();
+
+ /// register a handler for a particular language type
+ void RegisterFactory( const ::rtl::OUString& rLanguage,
+ XMLEventContextFactory* aFactory );
+
+ /// add event name translation to the internal table
+ void AddTranslationTable( const XMLEventNameTranslation* pTransTable );
+
+ /// save the old translation table on a stack and install an empty table
+ void PushTranslationTable();
+
+ /// recover the top-most previously saved translation table
+ void PopTranslationTable();
+
+ /// create an appropriate import context for a particular event
+ SvXMLImportContext* CreateContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ XMLEventsImportContext* rEvents,
+ const ::rtl::OUString& rXmlEventName,
+ const ::rtl::OUString& rLanguage);
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx b/xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx
new file mode 100644
index 000000000000..e52035dab685
--- /dev/null
+++ b/xmloff/inc/XMLFillBitmapSizePropertyHandler.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLFILLBITMAPSIZEPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLFILLBITMAPSIZEPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+struct SvXMLEnumMapEntry;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Abstract base-class for different XML-types. Derivations of this class
+ knows how to compare, im/export a special XML-type
+*/
+class XMLFillBitmapSizePropertyHandler: public XMLPropertyHandler
+{
+public:
+
+ XMLFillBitmapSizePropertyHandler();
+
+ // Just needed for virtual destruction
+ virtual ~XMLFillBitmapSizePropertyHandler();
+
+ /// Imports the given value in cas of the given XML-data-type
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+
+ /// Exports the given value in cas of the given XML-data-type
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_XMLFILLBITMAPSIZEPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLFilterServiceNames.h b/xmloff/inc/XMLFilterServiceNames.h
new file mode 100644
index 000000000000..31be57ee6a2c
--- /dev/null
+++ b/xmloff/inc/XMLFilterServiceNames.h
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLFILTERSERVICENAMES_H
+#define _XMLOFF_XMLFILTERSERVICENAMES_H
+
+
+#define XML_IMPORT_FILTER_WRITER "com.sun.star.comp.Writer.XMLOasisImporter"
+#define XML_IMPORT_FILTER_CALC "com.sun.star.comp.Calc.XMLOasisImporter"
+#define XML_IMPORT_FILTER_DRAW "com.sun.star.comp.Draw.XMLOasisImporter"
+#define XML_IMPORT_FILTER_IMPRESS "com.sun.star.comp.Impress.XMLOasisImporter"
+#define XML_IMPORT_FILTER_MATH "com.sun.star.comp.Math.XMLImporter"
+#define XML_IMPORT_FILTER_CHART "com.sun.star.comp.Chart.XMLOasisImporter"
+
+#define XML_EXPORT_FILTER_WRITER "com.sun.star.comp.Writer.XMLOasisExporter"
+#define XML_EXPORT_FILTER_CALC "com.sun.star.comp.Calc.XMLOasisExporter"
+#define XML_EXPORT_FILTER_DRAW "com.sun.star.comp.Draw.XMLOasisExporter"
+#define XML_EXPORT_FILTER_IMPRESS "com.sun.star.comp.Impress.XMLOasisExporter"
+#define XML_EXPORT_FILTER_MATH "com.sun.star.comp.Math.XMLExporter"
+#define XML_EXPORT_FILTER_CHART "com.sun.star.comp.Chart.XMLOasisExporter"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
new file mode 100644
index 000000000000..a2c5ae7e0b06
--- /dev/null
+++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx
@@ -0,0 +1,124 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
+#define _XMLOFF_XMLFOOTNOTECONFIGURATIONIMPORTCONTEXT_HXX
+
+#include <xmloff/xmlstyle.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class X> class Reference; }
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace beans { class XPropertySet; }
+} } }
+namespace rtl { class OUString; }
+class SvXMLImport;
+
+/// import footnote and endnote configuration elements
+class XMLFootnoteConfigurationImportContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString sPropertyAnchorCharStyleName;
+ const ::rtl::OUString sPropertyCharStyleName;
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertyPageStyleName;
+ const ::rtl::OUString sPropertyParagraphStyleName;
+ const ::rtl::OUString sPropertyPrefix;
+ const ::rtl::OUString sPropertyStartAt;
+ const ::rtl::OUString sPropertySuffix;
+ const ::rtl::OUString sPropertyPositionEndOfDoc;
+ const ::rtl::OUString sPropertyFootnoteCounting;
+ const ::rtl::OUString sPropertyEndNotice;
+ const ::rtl::OUString sPropertyBeginNotice;
+
+ ::rtl::OUString sCitationStyle;
+ ::rtl::OUString sAnchorStyle;
+ ::rtl::OUString sDefaultStyle;
+ ::rtl::OUString sPageStyle;
+ ::rtl::OUString sPrefix;
+ ::rtl::OUString sSuffix;
+ ::rtl::OUString sNumFormat;
+ ::rtl::OUString sNumSync;
+ ::rtl::OUString sBeginNotice;
+ ::rtl::OUString sEndNotice;
+
+ SvXMLTokenMap* pAttrTokenMap;
+
+ sal_Int16 nOffset;
+ sal_Int16 nNumbering;
+ sal_Bool bPosition;
+ sal_Bool bIsEndnote;
+
+public:
+
+ TYPEINFO();
+
+ XMLFootnoteConfigurationImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ virtual ~XMLFootnoteConfigurationImportContext();
+
+ /// parse attributes
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ /// for footnotes, also parse begin and end notices
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ /// get token map for attributes
+ const SvXMLTokenMap& GetFtnConfigAttrTokenMap();
+
+ /// set configuration at document; calls ProcessSettings
+ // --> OD 2005-01-31 #i40579# - move code from <CreateAndInsertLate(..)>
+ // to <Finish(..)>, because at this time all styles it references have been set.
+ virtual void Finish( sal_Bool bOverwrite);
+ // <--
+
+ /// set configuration at document
+ void ProcessSettings(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rConfig);
+
+ /// for helper class: set begin notice
+ void SetBeginNotice( ::rtl::OUString sText);
+
+ /// for helper class: set end notice
+ void SetEndNotice( ::rtl::OUString sText);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLImageMapContext.hxx b/xmloff/inc/XMLImageMapContext.hxx
new file mode 100644
index 000000000000..280333370648
--- /dev/null
+++ b/xmloff/inc/XMLImageMapContext.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLIMAGEMAPCONTEXT_HXX_
+#define _XMLOFF_XMLIMAGEMAPCONTEXT_HXX_
+
+#include <xmloff/xmlictxt.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com { namespace sun { namespace star {
+ namespace container { class XIndexContainer; }
+ namespace beans { class XPropertySet; }
+ namespace xml { namespace sax { class XAttributeList; } }
+} } }
+
+
+class XMLImageMapContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sImageMap;
+
+ /// the image map to be imported
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexContainer> xImageMap;
+
+ /// the property set from which to get and where eventually to set the
+ /// image map
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> xPropertySet;
+
+public:
+ TYPEINFO();
+
+ XMLImageMapContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+
+ virtual ~XMLImageMapContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void EndElement();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLImageMapExport.hxx b/xmloff/inc/XMLImageMapExport.hxx
new file mode 100644
index 000000000000..8d298eb77dbe
--- /dev/null
+++ b/xmloff/inc/XMLImageMapExport.hxx
@@ -0,0 +1,122 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLIMAGEMAPEXPORT_HXX_
+#define _XMLOFF_XMLIMAGEMAPEXPORT_HXX_
+
+#include <rtl/ustring.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class X> class Reference; }
+ namespace beans { class XPropertySet; }
+ namespace container { class XIndexContainer; }
+} } }
+class SvXMLExport;
+
+
+/**
+ * Export an ImageMap as defined by service com.sun.star.image.ImageMap to XML.
+ */
+class XMLImageMapExport
+{
+ const ::rtl::OUString msBoundary;
+ const ::rtl::OUString msCenter;
+ const ::rtl::OUString msDescription;
+ const ::rtl::OUString msImageMap;
+ const ::rtl::OUString msIsActive;
+ const ::rtl::OUString msName;
+ const ::rtl::OUString msPolygon;
+ const ::rtl::OUString msRadius;
+ const ::rtl::OUString msTarget;
+ const ::rtl::OUString msURL;
+ const ::rtl::OUString msTitle;
+
+ SvXMLExport& mrExport;
+
+ sal_Bool mbWhiteSpace; /// use whitespace between image map elements?
+
+public:
+ XMLImageMapExport(SvXMLExport& rExport);
+
+ ~XMLImageMapExport();
+
+ /**
+ * Get the ImageMap object from the "ImageMap" property and subsequently
+ * export the map (if present).
+ */
+ void Export(
+ /// the property set containing the ImageMap property
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+ /**
+ * Export an ImageMap (XIndexContainer).
+ */
+ void Export(
+ /// the container containing the image map elements
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexContainer> & rContainer);
+
+protected:
+
+ /**
+ * Export a single, named map entry.
+ * (as given by com.sun.star.image.ImageMapObject)
+ * Calls methods for specific image map entries.
+ */
+ void ExportMapEntry(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+
+ /**
+ * Export the specifics of a rectangular image map entry.
+ * To be called by ExportMapEntry.
+ */
+ void ExportRectangle(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+
+ /**
+ * Export the specifics of a circular image map entry.
+ * To be called by ExportMapEntry.
+ */
+ void ExportCircle(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+
+ /**
+ * Export the specifics of a polygonal image map entry;
+ * To be called by ExportMapEntry.
+ */
+ void ExportPolygon(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
new file mode 100644
index 000000000000..5ed828d1359a
--- /dev/null
+++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLINDEXBIBLIOGRAPHYCONFIGURATIONCONTEXT_HXX_
+#define _XMLOFF_XMLINDEXBIBLIOGRAPHYCONFIGURATIONCONTEXT_HXX_
+
+#include <xmloff/xmlstyle.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/lang/Locale.hpp>
+#include <rtl/ustring.hxx>
+
+
+#include <vector>
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+} } }
+
+
+/**
+ * Import bibliography configuration.
+ *
+ * Little cheat: Cover all child elements in CreateChildContext.
+ */
+class XMLIndexBibliographyConfigurationContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString sFieldMaster_Bibliography;
+ const ::rtl::OUString sBracketBefore;
+ const ::rtl::OUString sBracketAfter;
+ const ::rtl::OUString sIsNumberEntries;
+ const ::rtl::OUString sIsSortByPosition;
+ const ::rtl::OUString sSortKeys;
+ const ::rtl::OUString sSortKey;
+ const ::rtl::OUString sIsSortAscending;
+ const ::rtl::OUString sSortAlgorithm;
+ const ::rtl::OUString sLocale;
+
+ ::rtl::OUString sSuffix;
+ ::rtl::OUString sPrefix;
+ ::rtl::OUString sAlgorithm;
+ ::com::sun::star::lang::Locale aLocale;
+ sal_Bool bNumberedEntries;
+ sal_Bool bSortByPosition;
+
+ ::std::vector< ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> > aSortKeys;
+
+public:
+
+ TYPEINFO();
+
+ XMLIndexBibliographyConfigurationContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ ~XMLIndexBibliographyConfigurationContext();
+
+protected:
+
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ virtual void CreateAndInsert( sal_Bool bOverwrite );
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ void ProcessAttribute(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString sLocalName,
+ const ::rtl::OUString sValue);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLIsPercentagePropertyHandler.hxx b/xmloff/inc/XMLIsPercentagePropertyHandler.hxx
new file mode 100644
index 000000000000..275dc30cddc6
--- /dev/null
+++ b/xmloff/inc/XMLIsPercentagePropertyHandler.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLISPERCENTAGEPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLISPERCENTAGEPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+/**
+ This is a handler that returns true for import if the attribute string
+ contains a '%' value. For export this is only usable for filtering.
+*/
+class XMLIsPercentagePropertyHandler : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLIsPercentagePropertyHandler ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx b/xmloff/inc/XMLLineNumberingImportContext.hxx
new file mode 100644
index 000000000000..d7e589817c36
--- /dev/null
+++ b/xmloff/inc/XMLLineNumberingImportContext.hxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLLINENUMBERINGIMPORTCONTEXT_HXX_
+#define _XMLOFF_XMLLINENUMBERINGIMPORTCONTEXT_HXX_
+
+#include <xmloff/xmlstyle.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+} } }
+
+
+enum LineNumberingToken
+{
+ XML_TOK_LINENUMBERING_STYLE_NAME,
+ XML_TOK_LINENUMBERING_NUMBER_LINES,
+ XML_TOK_LINENUMBERING_COUNT_EMPTY_LINES,
+ XML_TOK_LINENUMBERING_COUNT_IN_TEXT_BOXES,
+ XML_TOK_LINENUMBERING_RESTART_NUMBERING,
+ XML_TOK_LINENUMBERING_OFFSET,
+ XML_TOK_LINENUMBERING_NUM_FORMAT,
+ XML_TOK_LINENUMBERING_NUM_LETTER_SYNC,
+ XML_TOK_LINENUMBERING_NUMBER_POSITION,
+ XML_TOK_LINENUMBERING_INCREMENT
+// XML_TOK_LINENUMBERING_LINENUMBERING_CONFIGURATION,
+// XML_TOK_LINENUMBERING_INCREMENT,
+// XML_TOK_LINENUMBERING_LINENUMBERING_SEPARATOR,
+};
+
+
+/** import <text:linenumbering-configuration> elements */
+class XMLLineNumberingImportContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString sCharStyleName;
+ const ::rtl::OUString sCountEmptyLines;
+ const ::rtl::OUString sCountLinesInFrames;
+ const ::rtl::OUString sDistance;
+ const ::rtl::OUString sInterval;
+ const ::rtl::OUString sSeparatorText;
+ const ::rtl::OUString sNumberPosition;
+ const ::rtl::OUString sNumberingType;
+ const ::rtl::OUString sIsOn;
+ const ::rtl::OUString sRestartAtEachPage;
+ const ::rtl::OUString sSeparatorInterval;
+
+ ::rtl::OUString sStyleName;
+ ::rtl::OUString sNumFormat;
+ ::rtl::OUString sNumLetterSync;
+ ::rtl::OUString sSeparator;
+ sal_Int32 nOffset;
+ sal_Int16 nNumberPosition;
+ sal_Int16 nIncrement;
+ sal_Int16 nSeparatorIncrement;
+ sal_Bool bNumberLines;
+ sal_Bool bCountEmptyLines;
+ sal_Bool bCountInFloatingFrames;
+ sal_Bool bRestartNumbering;
+
+public:
+
+ TYPEINFO();
+
+ XMLLineNumberingImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ ~XMLLineNumberingImportContext();
+
+ // to be used by child context: set separator info
+ void SetSeparatorText(const ::rtl::OUString& sText);
+ void SetSeparatorIncrement(sal_Int16 nIncr);
+
+protected:
+
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ void ProcessAttribute(
+ enum LineNumberingToken eToken,
+ ::rtl::OUString sValue);
+
+ virtual void CreateAndInsert(sal_Bool bOverwrite);
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ void ProcessAttribute(
+ const ::rtl::OUString sLocalName,
+ const ::rtl::OUString sValue);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx
new file mode 100644
index 000000000000..84260eca28b9
--- /dev/null
+++ b/xmloff/inc/XMLNumberStylesImport.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_NUMBERSTYLESIMPORT_HXX
+#define _XMLOFF_NUMBERSTYLESIMPORT_HXX
+
+#include <xmloff/xmlnumfi.hxx>
+#include <com/sun/star/container/XNameAccess.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// presentations:animations
+
+struct SdXMLFixedDataStyle;
+class SdXMLImport;
+
+class SdXMLNumberFormatImportContext : public SvXMLNumFormatContext
+{
+private:
+ friend class SdXMLNumberFormatMemberImportContext;
+
+ SdXMLImport& mrImport;
+
+ sal_Bool mbTimeStyle;
+ sal_Bool mbAutomatic;
+ sal_uInt8 mnElements[16];
+ sal_Int16 mnIndex;
+
+ sal_Int32 mnKey;
+
+ bool compareStyle( const SdXMLFixedDataStyle* pStyle, sal_Int16& nIndex ) const;
+
+protected:
+ void add( rtl::OUString& rNumberStyle, sal_Bool bLong, sal_Bool bTextual, sal_Bool bDecimal02, rtl::OUString& rText );
+
+public:
+ TYPEINFO();
+
+ SdXMLNumberFormatImportContext( SdXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ SvXMLNumImpData* pNewData, sal_uInt16 nNewType,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ SvXMLStylesContext& rStyles);
+ virtual ~SdXMLNumberFormatImportContext();
+
+ virtual void EndElement();
+
+ virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+
+ sal_Int32 GetDrawKey() const { return mnKey; }
+};
+
+#endif // _XMLOFF_NUMBERSTYLESIMPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx b/xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx
new file mode 100644
index 000000000000..a3195d0cbadd
--- /dev/null
+++ b/xmloff/inc/XMLPercentOrMeasurePropertyHandler.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLPERCENTORMEASUREPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLPERCENTORMEASUREPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+/**
+ This is a handler either only import/exports percent or measure.
+*/
+class XMLPercentOrMeasurePropertyHandler : public XMLPropertyHandler
+{
+private:
+ sal_Bool mbPercent;
+public:
+ XMLPercentOrMeasurePropertyHandler( sal_Bool bPercent );
+ virtual ~XMLPercentOrMeasurePropertyHandler ();
+
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLRectangleMembersHandler.hxx b/xmloff/inc/XMLRectangleMembersHandler.hxx
new file mode 100644
index 000000000000..0bc73833fba0
--- /dev/null
+++ b/xmloff/inc/XMLRectangleMembersHandler.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLRECTANGLEMEMBERSHANDLER_HXX
+#define _XMLOFF_XMLRECTANGLEMEMBERSHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+struct SvXMLEnumMapEntry;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Abstract base-class for different XML-types. Derivations of this class
+ knows how to compare, im/export a special XML-type
+*/
+class XMLRectangleMembersHdl: public XMLPropertyHandler
+{
+private:
+ sal_Int32 mnType;
+public:
+
+ XMLRectangleMembersHdl( sal_Int32 nType );
+
+ // Just needed for virtual destruction
+ virtual ~XMLRectangleMembersHdl();
+
+ /// Imports the given value in cas of the given XML-data-type
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+
+ /// Exports the given value in cas of the given XML-data-type
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_XMLRECTANGLEMEMBERSHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLReplacementImageContext.hxx b/xmloff/inc/XMLReplacementImageContext.hxx
new file mode 100644
index 000000000000..a0769d936cc1
--- /dev/null
+++ b/xmloff/inc/XMLReplacementImageContext.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLREPLACEMENTIMAGECONTEXT_HXX
+#define _XMLOFF_XMLREPLACEMENTIMAGECONTEXT_HXX
+
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <xmloff/xmlictxt.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace beans { class XPropertySet; }
+ namespace io { class XOutputStream; } } } }
+
+class XMLReplacementImageContext : public SvXMLImportContext
+{
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::io::XOutputStream > m_xBase64Stream;
+::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > m_xPropSet;
+
+ ::rtl::OUString m_sHRef;
+ const ::rtl::OUString m_sGraphicURL;
+
+public:
+
+ TYPEINFO();
+
+ XMLReplacementImageContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & rAttrList,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet >& rPropSet );
+ virtual ~XMLReplacementImageContext();
+
+ virtual void EndElement();
+
+ SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+};
+
+#endif // _XMLOFF_XMLREPLACEMENTIMAGECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLScriptContextFactory.hxx b/xmloff/inc/XMLScriptContextFactory.hxx
new file mode 100644
index 000000000000..9d9872aae9d0
--- /dev/null
+++ b/xmloff/inc/XMLScriptContextFactory.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSCRIPTCONTEXTFACTORY_HXX
+#define _XMLOFF_XMLSCRIPTCONTEXTFACTORY_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <xmloff/xmlevent.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+} } }
+namespace rtl { class OUString; }
+class SvXMLImport;
+class XMLEventsImportContext;
+
+class XMLScriptContextFactory : public XMLEventContextFactory
+{
+ const ::rtl::OUString sEventType;
+ const ::rtl::OUString sScript;
+ const ::rtl::OUString sURL;
+
+public:
+ XMLScriptContextFactory();
+ virtual ~XMLScriptContextFactory();
+
+ virtual SvXMLImportContext *
+ CreateContext(SvXMLImport & rImport, /// import context
+ sal_uInt16 nPrefix, /// element: namespace prefix
+ const ::rtl::OUString & rLocalName, /// element: local name
+ /// attribute list
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ /// the context for the enclosing <script:events> element
+ XMLEventsImportContext * rEvents,
+ /// the event name (as understood by the API)
+ const ::rtl::OUString & rApiEventName,
+ /// the event type name (as registered)
+ const ::rtl::OUString & rLanguage);
+};
+
+#endif // _XMLOFF_XMLSCRIPTCONTEXTFACTORY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLScriptExportHandler.hxx b/xmloff/inc/XMLScriptExportHandler.hxx
new file mode 100644
index 000000000000..2223f3fb158d
--- /dev/null
+++ b/xmloff/inc/XMLScriptExportHandler.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSCRIPTEXPORTHANDLER_HXX
+#define _XMLOFF_XMLSCRIPTEXPORTHANDLER_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+#include <xmloff/xmlevent.hxx>
+
+#include <map>
+
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace beans { struct PropertyValue; }
+} } }
+
+class XMLScriptExportHandler : public XMLEventExportHandler
+{
+ const ::rtl::OUString sURL;
+
+public:
+ XMLScriptExportHandler();
+ virtual ~XMLScriptExportHandler();
+
+ virtual void Export(
+ SvXMLExport& rExport,
+ const ::rtl::OUString& rEventName,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> & rValues,
+ sal_Bool bUseWhitespace);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLShapePropertySetContext.hxx b/xmloff/inc/XMLShapePropertySetContext.hxx
new file mode 100644
index 000000000000..6b1f52671495
--- /dev/null
+++ b/xmloff/inc/XMLShapePropertySetContext.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSHAPEPROPERTYSETCONTEXT_HXX
+#define _XMLOFF_XMLSHAPEPROPERTYSETCONTEXT_HXX
+
+
+#include <xmloff/xmlprcon.hxx>
+
+class XMLShapePropertySetContext : public SvXMLPropertySetContext
+{
+ SvXMLImportContextRef mxBulletStyle;
+ sal_Int32 mnBulletIndex;
+
+public:
+
+ TYPEINFO();
+
+ XMLShapePropertySetContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ sal_uInt32 nFam,
+ ::std::vector< XMLPropertyState > &rProps,
+ const UniReference < SvXMLImportPropertyMapper > &rMap );
+
+ virtual ~XMLShapePropertySetContext();
+
+ virtual void EndElement();
+
+ using SvXMLPropertySetContext::CreateChildContext;
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::std::vector< XMLPropertyState > &rProperties,
+ const XMLPropertyState& rProp);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLStarBasicContextFactory.hxx b/xmloff/inc/XMLStarBasicContextFactory.hxx
new file mode 100644
index 000000000000..c317c1539eac
--- /dev/null
+++ b/xmloff/inc/XMLStarBasicContextFactory.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSTARBASICCONTEXTFACTORY_HXX
+#define _XMLOFF_XMLSTARBASICCONTEXTFACTORY_HXX
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <xmloff/xmlevent.hxx>
+
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+} } }
+namespace rtl { class OUString; }
+class SvXMLImport;
+class XMLEventsImportContext;
+
+
+class XMLStarBasicContextFactory : public XMLEventContextFactory
+{
+ const ::rtl::OUString sEventType;
+ const ::rtl::OUString sLibrary;
+ const ::rtl::OUString sMacroName;
+ const ::rtl::OUString sStarBasic;
+
+public:
+ XMLStarBasicContextFactory();
+ virtual ~XMLStarBasicContextFactory();
+
+ virtual SvXMLImportContext* CreateContext(
+ SvXMLImport& rImport, /// import context
+ sal_uInt16 nPrefix, /// element: namespace prefix
+ const ::rtl::OUString& rLocalName, /// element: local name
+ const ::com::sun::star::uno::Reference< /// attribute list
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ /// the context for the enclosing <script:events> element
+ XMLEventsImportContext* rEvents,
+ /// the event name (as understood by the API)
+ const ::rtl::OUString& rApiEventName,
+ /// the event type name (as registered)
+ const ::rtl::OUString& rLanguage);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLStarBasicExportHandler.hxx b/xmloff/inc/XMLStarBasicExportHandler.hxx
new file mode 100644
index 000000000000..4a1060eef0fa
--- /dev/null
+++ b/xmloff/inc/XMLStarBasicExportHandler.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSTARBASICEXPORTHANDLER_HXX
+#define _XMLOFF_XMLSTARBASICEXPORTHANDLER_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+#include <xmloff/xmlevent.hxx>
+
+#include <map>
+
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace beans { struct PropertyValue; }
+} } }
+
+class XMLStarBasicExportHandler : public XMLEventExportHandler
+{
+ const ::rtl::OUString sStarBasic;
+ const ::rtl::OUString sLibrary;
+ const ::rtl::OUString sMacroName;
+ const ::rtl::OUString sStarOffice;
+ const ::rtl::OUString sApplication;
+
+public:
+ XMLStarBasicExportHandler();
+ virtual ~XMLStarBasicExportHandler();
+
+ virtual void Export(
+ SvXMLExport& rExport,
+ const ::rtl::OUString& rEventName,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> & rValues,
+ sal_Bool bUseWhitespace);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLStringBufferImportContext.hxx b/xmloff/inc/XMLStringBufferImportContext.hxx
new file mode 100644
index 000000000000..ce095a0716e4
--- /dev/null
+++ b/xmloff/inc/XMLStringBufferImportContext.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSTRINGBUFFERIMPORTCONTEXT_HXX
+#define _XMLOFF_XMLSTRINGBUFFERIMPORTCONTEXT_HXX
+
+
+#include <xmloff/xmlictxt.hxx>
+
+#include <xmloff/xmlimp.hxx>
+#include <rtl/ustrbuf.hxx>
+
+
+/**
+ * Import all text into a string buffer. Paragraph elements (<text:p>)
+ * are recognized and cause a return character (0x0a) to be added.
+ */
+class XMLStringBufferImportContext : public SvXMLImportContext
+{
+ ::rtl::OUStringBuffer& rTextBuffer;
+
+public:
+
+ TYPEINFO();
+
+ XMLStringBufferImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& sLocalName,
+ ::rtl::OUStringBuffer& rBuffer);
+
+ virtual ~XMLStringBufferImportContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void Characters(
+ const ::rtl::OUString& rChars );
+
+ virtual void EndElement();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx
new file mode 100644
index 000000000000..779f2e78aa1e
--- /dev/null
+++ b/xmloff/inc/XMLTextColumnsContext.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _XMLTEXTCOLUMNSCONTEXT_HXX
+#define _XMLTEXTCOLUMNSCONTEXT_HXX
+
+#include "XMLElementPropertyContext.hxx"
+
+
+namespace rtl { class OUString; }
+class XMLTextColumnsArray_Impl;
+class XMLTextColumnSepContext_Impl;
+class SvXMLTokenMap;
+
+class XMLTextColumnsContext :public XMLElementPropertyContext
+{
+ const ::rtl::OUString sSeparatorLineIsOn;
+ const ::rtl::OUString sSeparatorLineWidth;
+ const ::rtl::OUString sSeparatorLineColor;
+ const ::rtl::OUString sSeparatorLineRelativeHeight;
+ const ::rtl::OUString sSeparatorLineVerticalAlignment;
+ const ::rtl::OUString sIsAutomatic;
+ const ::rtl::OUString sAutomaticDistance;
+
+
+ XMLTextColumnsArray_Impl *pColumns;
+ XMLTextColumnSepContext_Impl *pColumnSep;
+ SvXMLTokenMap *pColumnAttrTokenMap;
+ SvXMLTokenMap *pColumnSepAttrTokenMap;
+ sal_Int16 nCount;
+ sal_Bool bAutomatic;
+ sal_Int32 nAutomaticDistance;
+
+public:
+ TYPEINFO();
+
+ XMLTextColumnsContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~XMLTextColumnsContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void EndElement();
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLTextColumnsExport.hxx b/xmloff/inc/XMLTextColumnsExport.hxx
new file mode 100644
index 000000000000..abbaeeee5879
--- /dev/null
+++ b/xmloff/inc/XMLTextColumnsExport.hxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTEXTCOLUMNSEXPORT_HXX
+#define _XMLOFF_XMLTEXTCOLUMNSEXPORT_HXX
+
+namespace com { namespace sun { namespace star { namespace uno {
+ class Any; } } } }
+class SvXMLExport;
+
+class XMLTextColumnsExport
+{
+ SvXMLExport& rExport;
+
+ const ::rtl::OUString sSeparatorLineIsOn;
+ const ::rtl::OUString sSeparatorLineWidth;
+ const ::rtl::OUString sSeparatorLineColor;
+ const ::rtl::OUString sSeparatorLineRelativeHeight;
+ const ::rtl::OUString sSeparatorLineVerticalAlignment;
+ const ::rtl::OUString sIsAutomatic;
+ const ::rtl::OUString sAutomaticDistance;
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+
+public:
+
+ XMLTextColumnsExport( SvXMLExport& rExport );
+
+ void exportXML( const ::com::sun::star::uno::Any& rAny );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLTextColumnsPropertyHandler.hxx b/xmloff/inc/XMLTextColumnsPropertyHandler.hxx
new file mode 100644
index 000000000000..a8ae44638eb4
--- /dev/null
+++ b/xmloff/inc/XMLTextColumnsPropertyHandler.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTEXTCOLUMNSPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLTEXTCOLUMNSPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+
+/**
+ PropertyHandler for the XML-data-type:
+*/
+class XMLTextColumnsPropertyHandler : public XMLPropertyHandler
+{
+public:
+ virtual ~XMLTextColumnsPropertyHandler ();
+
+ virtual bool equals(
+ const ::com::sun::star::uno::Any& r1,
+ const ::com::sun::star::uno::Any& r2 ) const;
+
+ /// TabStops will be imported/exported as XML-Elements. So the Import/Export-work must be done at another place.
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx b/xmloff/inc/XMLTextHeaderFooterContext.hxx
new file mode 100644
index 000000000000..62462b3f57fa
--- /dev/null
+++ b/xmloff/inc/XMLTextHeaderFooterContext.hxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TEXTHEADERFOOTERCONTEXT_HXX_
+#define _XMLOFF_TEXTHEADERFOOTERCONTEXT_HXX_
+
+
+#include <xmloff/xmlictxt.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XTextCursor; }
+ namespace beans { class XPropertySet; }
+} } }
+
+class XMLTextHeaderFooterContext: public SvXMLImportContext
+{
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextCursor > xOldTextCursor;
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > xPropSet;
+
+ const ::rtl::OUString sOn;
+ const ::rtl::OUString sShareContent;
+ const ::rtl::OUString sText;
+ const ::rtl::OUString sTextLeft;
+
+ sal_Bool bInsertContent : 1;
+ sal_Bool bLeft : 1;
+
+public:
+ TYPEINFO();
+
+ XMLTextHeaderFooterContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPageStylePropSet,
+ sal_Bool bFooter, sal_Bool bLft );
+
+ virtual ~XMLTextHeaderFooterContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void EndElement();
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/XMLTextListAutoStylePool.hxx b/xmloff/inc/XMLTextListAutoStylePool.hxx
new file mode 100644
index 000000000000..05df26c09b94
--- /dev/null
+++ b/xmloff/inc/XMLTextListAutoStylePool.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+#define _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <rtl/ustring.hxx>
+#include <com/sun/star/ucb/XAnyCompare.hpp>
+
+namespace com { namespace sun { namespace star { namespace container {
+ class XIndexReplace; } } } }
+namespace rtl { class OUString; }
+
+
+class XMLTextListAutoStylePool_Impl;
+class XMLTextListAutoStylePoolNames_Impl;
+class XMLTextListAutoStylePoolEntry_Impl;
+class SvXMLExport;
+
+class XMLOFF_DLLPUBLIC XMLTextListAutoStylePool
+{
+ SvXMLExport& rExport;
+
+ ::rtl::OUString sPrefix;
+
+ XMLTextListAutoStylePool_Impl *pPool;
+ XMLTextListAutoStylePoolNames_Impl *pNames;
+ sal_uInt32 nName;
+
+ /** this is an optional NumRule compare component for applications where
+ the NumRules don't have names */
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XAnyCompare > mxNumRuleCompare;
+
+ SAL_DLLPRIVATE sal_uInt32 Find( XMLTextListAutoStylePoolEntry_Impl* pEntry )
+ const;
+public:
+
+ XMLTextListAutoStylePool( SvXMLExport& rExport );
+ ~XMLTextListAutoStylePool();
+
+ void RegisterName( const ::rtl::OUString& rName );
+ sal_Bool HasName( const ::rtl::OUString& rName ) const;
+
+ ::rtl::OUString Add(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace > & rNumRules );
+
+ ::rtl::OUString Find(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace > & rNumRules ) const;
+ ::rtl::OUString Find( const ::rtl::OUString& rInternalName ) const;
+
+ void exportXML() const;
+};
+
+
+#endif // _XMLOFF_XMLTEXTLISTAUTOSTYLEPOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/anim.hxx b/xmloff/inc/anim.hxx
new file mode 100644
index 000000000000..37a388725fbc
--- /dev/null
+++ b/xmloff/inc/anim.hxx
@@ -0,0 +1,106 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ANIM_HXX
+#define _XMLOFF_ANIM_HXX
+
+#include <com/sun/star/presentation/AnimationEffect.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmlement.hxx>
+
+enum XMLEffect
+{
+ EK_none,
+ EK_fade,
+ EK_move,
+ EK_stripes,
+ EK_open,
+ EK_close,
+ EK_dissolve,
+ EK_wavyline,
+ EK_random,
+ EK_lines,
+ EK_laser,
+ EK_appear,
+ EK_hide,
+ EK_move_short,
+ EK_checkerboard,
+ EK_rotate,
+ EK_stretch
+};
+
+extern SvXMLEnumMapEntry aXML_AnimationEffect_EnumMap[];
+
+enum XMLEffectDirection
+{
+ ED_none,
+ ED_from_left,
+ ED_from_top,
+ ED_from_right,
+ ED_from_bottom,
+ ED_from_center,
+ ED_from_upperleft,
+ ED_from_upperright,
+ ED_from_lowerleft,
+ ED_from_lowerright,
+
+ ED_to_left,
+ ED_to_top,
+ ED_to_right,
+ ED_to_bottom,
+ ED_to_upperleft,
+ ED_to_upperright,
+ ED_to_lowerright,
+ ED_to_lowerleft,
+
+ ED_path,
+ ED_spiral_inward_left,
+ ED_spiral_inward_right,
+ ED_spiral_outward_left,
+ ED_spiral_outward_right,
+
+ ED_vertical,
+ ED_horizontal,
+
+ ED_to_center,
+
+ ED_clockwise,
+ ED_cclockwise
+};
+
+extern SvXMLEnumMapEntry aXML_AnimationDirection_EnumMap[];
+
+extern SvXMLEnumMapEntry aXML_AnimationSpeed_EnumMap[];
+
+void SdXMLImplSetEffect( ::com::sun::star::presentation::AnimationEffect eEffect, XMLEffect& eKind, XMLEffectDirection& eDirection, sal_Int16& nStartScale, sal_Bool& bIn );
+::com::sun::star::presentation::AnimationEffect ImplSdXMLgetEffect( XMLEffect eKind, XMLEffectDirection eDirection, sal_Int16 nStartScale, sal_Bool bIn );
+
+#endif // _XMLOFF_ANIM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/animationexport.hxx b/xmloff/inc/animationexport.hxx
new file mode 100644
index 000000000000..aab13d859347
--- /dev/null
+++ b/xmloff/inc/animationexport.hxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ANIMATIONEXPORT_HXX
+#define _XMLOFF_ANIMATIONEXPORT_HXX
+
+#include <com/sun/star/animations/XAnimationNode.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <xmloff/uniref.hxx>
+
+class SvXMLExport;
+
+namespace xmloff
+{
+class AnimationsExporterImpl;
+
+class AnimationsExporter : public UniRefBase
+{
+ AnimationsExporterImpl* mpImpl;
+
+public:
+ AnimationsExporter( SvXMLExport& rExport, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xPageProps );
+ virtual ~AnimationsExporter();
+
+ void prepare( ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > xRootNode );
+ void exportAnimations( ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > xRootNode );
+};
+
+}
+
+#endif // _XMLOFF_ANIMATIONEXPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx
new file mode 100644
index 000000000000..3b4d3b32031f
--- /dev/null
+++ b/xmloff/inc/animationimport.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ANIMATIONIMPORT_HXX
+#define _XMLOFF_ANIMATIONIMPORT_HXX
+
+#include <xmloff/xmlictxt.hxx>
+#include <com/sun/star/animations/XAnimationNode.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// presentations:animations
+
+namespace xmloff
+{
+class AnimationsImportHelperImpl;
+
+class AnimationNodeContext : public SvXMLImportContext
+{
+ AnimationsImportHelperImpl* mpHelper;
+ bool mbRootContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode > mxNode;
+
+ void init_node( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+public:
+ TYPEINFO();
+
+ AnimationNodeContext(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xParentNode,
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ AnimationsImportHelperImpl* mpImpl = NULL );
+ virtual ~AnimationNodeContext();
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+
+ static void postProcessRootNode( SvXMLImport& rImport, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xPageProps );
+};
+
+}
+
+#endif // _XMLOFF_ANIMATIONIMPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/animations.hxx b/xmloff/inc/animations.hxx
new file mode 100644
index 000000000000..c0f879b1890b
--- /dev/null
+++ b/xmloff/inc/animations.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ANIMATIONS_HXX
+#define _XMLOFF_ANIMATIONS_HXX
+
+#include <xmloff/xmltoken.hxx>
+
+struct SvXMLEnumMapEntry;
+
+namespace xmloff
+{
+const sal_uInt16 Animations_EnumMap_Fill = 0;
+const sal_uInt16 Animations_EnumMap_FillDefault = 1;
+const sal_uInt16 Animations_EnumMap_Restart = 2;
+const sal_uInt16 Animations_EnumMap_RestartDefault = 3;
+const sal_uInt16 Animations_EnumMap_Endsync = 4;
+const sal_uInt16 Animations_EnumMap_CalcMode = 5;
+const sal_uInt16 Animations_EnumMap_AdditiveMode = 6;
+const sal_uInt16 Animations_EnumMap_TransformType = 7;
+const sal_uInt16 Animations_EnumMap_TransitionType = 8;
+const sal_uInt16 Animations_EnumMap_TransitionSubType = 9;
+const sal_uInt16 Animations_EnumMap_EventTrigger = 10;
+const sal_uInt16 Animations_EnumMap_EffectPresetClass = 11;
+const sal_uInt16 Animations_EnumMap_EffectNodeType = 12;
+const sal_uInt16 Animations_EnumMap_SubItem = 13;
+const sal_uInt16 Animations_EnumMap_IterateType = 14;
+const sal_uInt16 Animations_EnumMap_Command = 15;
+
+extern SvXMLEnumMapEntry* getAnimationsEnumMap( sal_uInt16 nMap );
+
+struct ImplAttributeNameConversion
+{
+ token::XMLTokenEnum meXMLToken;
+ const sal_Char* mpAPIName;
+};
+
+extern struct ImplAttributeNameConversion* getAnimationAttributeNamesConversionList();
+
+}
+
+#endif // _XMLOFF_ANIMATIONS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx
new file mode 100644
index 000000000000..e23128f713f3
--- /dev/null
+++ b/xmloff/inc/animimp.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ANIMIMP_HXX
+#define _XMLOFF_ANIMIMP_HXX
+
+#include <xmloff/xmlictxt.hxx>
+#include <com/sun/star/drawing/XShapes.hpp>
+
+class AnimImpImpl;
+
+//////////////////////////////////////////////////////////////////////////////
+// presentations:animations
+
+class XMLAnimationsContext : public SvXMLImportContext
+{
+ AnimImpImpl* mpImpl;
+
+public:
+ TYPEINFO();
+
+ XMLAnimationsContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual ~XMLAnimationsContext();
+
+ virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+};
+
+#endif // _XMLOFF_ANIMIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/functional.hxx b/xmloff/inc/functional.hxx
new file mode 100644
index 000000000000..e3ebb6d004d5
--- /dev/null
+++ b/xmloff/inc/functional.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#ifndef _XMLOFF_FUNCTIONAL_HXX
+#define _XMLOFF_FUNCTIONAL_HXX
+
+#include <rtl/ustring.hxx>
+
+/* THIS HEADER IS DEPRECATED. USE comphelper/stl_types.hxx INSTEAD!!! */
+
+/** @#file
+ *
+ * re-implement STL functors as needed
+ *
+ * The standard comparison operators from the STL cause warnings with
+ * several compilers about our sal_Bool (=unsigned char) being
+ * converted to bool (C++ bool). We wish to avoid that.
+ */
+
+struct less_functor
+{
+ bool operator()(const ::rtl::OUString& x,
+ const ::rtl::OUString& y) const
+ {
+ return 0 != (x<y);
+ }
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/i18nmap.hxx b/xmloff/inc/i18nmap.hxx
new file mode 100644
index 000000000000..94e09752000c
--- /dev/null
+++ b/xmloff/inc/i18nmap.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_I18NMAP_HXX
+#define _XMLOFF_I18NMAP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <tools/solar.h>
+
+
+namespace rtl
+{
+ class OUString;
+}
+
+class SvI18NMap_Impl;
+class SvI18NMapEntry_Impl;
+
+class XMLOFF_DLLPUBLIC SvI18NMap
+{
+ SvI18NMap_Impl *pImpl;
+
+ SAL_DLLPRIVATE SvI18NMapEntry_Impl *_Find( USHORT nKind,
+ const ::rtl::OUString& rName ) const;
+
+public:
+
+ SvI18NMap();
+ ~SvI18NMap();
+
+ // Add a name mapping
+ void Add( USHORT nKind, const ::rtl::OUString& rName,
+ const ::rtl::OUString& rNewName );
+
+ // Return a mapped name. If the name could not be found, return the
+ // original name.
+ const ::rtl::OUString& Get( USHORT nKind,
+ const ::rtl::OUString& rName ) const;
+};
+
+
+#endif // _XMLOFF_I18NMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/makefile.mk b/xmloff/inc/makefile.mk
new file mode 100644
index 000000000000..db706e293088
--- /dev/null
+++ b/xmloff/inc/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+PRJ=..
+
+PRJNAME=xmloff
+TARGET=inc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+.INCLUDE : $(PRJ)$/util$/makefile.pmk
+
+# --- Files --------------------------------------------------------
+# --- Targets -------------------------------------------------------
+
+.INCLUDE : target.mk
+
+.IF "$(ENABLE_PCH)"!=""
+ALLTAR : \
+ $(SLO)$/precompiled.pch \
+ $(SLO)$/precompiled_ex.pch
+
+.ENDIF # "$(ENABLE_PCH)"!=""
+
diff --git a/xmloff/inc/numehelp.hxx b/xmloff/inc/numehelp.hxx
new file mode 100644
index 000000000000..131b10f1d0de
--- /dev/null
+++ b/xmloff/inc/numehelp.hxx
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_NUMEHELP_HXX
+#define XMLOFF_NUMEHELP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+
+#ifndef __SGI_STL_SET
+#include <set>
+#endif
+
+class SvXMLExport;
+namespace rtl
+{
+ class OUString;
+}
+
+struct XMLNumberFormat
+{
+ rtl::OUString sCurrency;
+ sal_Int32 nNumberFormat;
+ sal_Int16 nType;
+ sal_Bool bIsStandard : 1;
+ XMLNumberFormat() : nNumberFormat(0), nType(0) {}
+ XMLNumberFormat(const rtl::OUString& sTempCurrency, sal_Int32 nTempFormat,
+ sal_Int16 nTempType) : sCurrency(sTempCurrency), nNumberFormat(nTempFormat),
+ nType(nTempType) {}
+};
+
+struct LessNumberFormat
+{
+ sal_Bool operator() (const XMLNumberFormat& rValue1, const XMLNumberFormat& rValue2) const
+ {
+ return rValue1.nNumberFormat < rValue2.nNumberFormat;
+ }
+};
+
+typedef std::set<XMLNumberFormat, LessNumberFormat> XMLNumberFormatSet;
+
+class XMLOFF_DLLPUBLIC XMLNumberFormatAttributesExportHelper
+{
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > xNumberFormats;
+ SvXMLExport* pExport;
+ const rtl::OUString sEmpty;
+ const rtl::OUString sStandardFormat;
+ const rtl::OUString sType;
+ const rtl::OUString sAttrValueType;
+ const rtl::OUString sAttrValue;
+ const rtl::OUString sAttrDateValue;
+ const rtl::OUString sAttrTimeValue;
+ const rtl::OUString sAttrBooleanValue;
+ const rtl::OUString sAttrStringValue;
+ const rtl::OUString sAttrCurrency;
+ const rtl::OUString msCurrencySymbol;
+ const rtl::OUString msCurrencyAbbreviation;
+ XMLNumberFormatSet aNumberFormats;
+public :
+ XMLNumberFormatAttributesExportHelper(::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier);
+ XMLNumberFormatAttributesExportHelper(::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier,
+ SvXMLExport& rExport );
+ ~XMLNumberFormatAttributesExportHelper();
+ void SetExport(SvXMLExport* pExp) { this->pExport = pExp; }
+
+ sal_Int16 GetCellType(const sal_Int32 nNumberFormat, rtl::OUString& sCurrency, sal_Bool& bIsStandard);
+ static void WriteAttributes(SvXMLExport& rXMLExport,
+ const sal_Int16 nTypeKey,
+ const double& rValue,
+ const rtl::OUString& rCurrencySymbol,
+ sal_Bool bExportValue = sal_True);
+ static sal_Bool GetCurrencySymbol(const sal_Int32 nNumberFormat, rtl::OUString& rCurrencySymbol,
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xNumberFormatsSupplier);
+ static sal_Int16 GetCellType(const sal_Int32 nNumberFormat, sal_Bool& bIsStandard,
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & xNumberFormatsSupplier);
+ static void SetNumberFormatAttributes(SvXMLExport& rXMLExport,
+ const sal_Int32 nNumberFormat,
+ const double& rValue,
+ sal_Bool bExportValue = sal_True);
+ static void SetNumberFormatAttributes(SvXMLExport& rXMLExport,
+ const rtl::OUString& rValue,
+ const rtl::OUString& rCharacters,
+ sal_Bool bExportValue = sal_True,
+ sal_Bool bExportTypeAttribute = sal_True);
+
+ sal_Bool GetCurrencySymbol(const sal_Int32 nNumberFormat, rtl::OUString& rCurrencySymbol);
+ sal_Int16 GetCellType(const sal_Int32 nNumberFormat, sal_Bool& bIsStandard);
+ void WriteAttributes(const sal_Int16 nTypeKey,
+ const double& rValue,
+ const rtl::OUString& rCurrencySymbol,
+ sal_Bool bExportValue = sal_True);
+ void SetNumberFormatAttributes(const sal_Int32 nNumberFormat,
+ const double& rValue,
+ sal_Bool bExportValue = sal_True);
+ void SetNumberFormatAttributes(const rtl::OUString& rValue,
+ const rtl::OUString& rCharacters,
+ sal_Bool bExportValue = sal_True,
+ sal_Bool bExportTypeAttribute = sal_True);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/pch/precompiled_xmloff.cxx b/xmloff/inc/pch/precompiled_xmloff.cxx
new file mode 100644
index 000000000000..17974bf080f4
--- /dev/null
+++ b/xmloff/inc/pch/precompiled_xmloff.cxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "precompiled_xmloff.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/pch/precompiled_xmloff.hxx b/xmloff/inc/pch/precompiled_xmloff.hxx
new file mode 100644
index 000000000000..70bc8a77a3c7
--- /dev/null
+++ b/xmloff/inc/pch/precompiled_xmloff.hxx
@@ -0,0 +1,483 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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): Generated on 2006-09-01 17:50:21.060744
+
+#ifdef PRECOMPILED_HEADERS
+
+//---MARKER---
+#include "sal/config.h"
+#include "sal/types.h"
+
+#include "com/sun/star/animations/AnimationAdditiveMode.hpp"
+#include "com/sun/star/animations/AnimationCalcMode.hpp"
+#include "com/sun/star/animations/AnimationColorSpace.hpp"
+#include "com/sun/star/animations/AnimationEndSync.hpp"
+#include "com/sun/star/animations/AnimationFill.hpp"
+#include "com/sun/star/animations/AnimationNodeType.hpp"
+#include "com/sun/star/animations/AnimationRestart.hpp"
+#include "com/sun/star/animations/AnimationTransformType.hpp"
+#include "com/sun/star/animations/Event.hpp"
+#include "com/sun/star/animations/EventTrigger.hpp"
+#include "com/sun/star/animations/Timing.hpp"
+#include "com/sun/star/animations/TransitionSubType.hpp"
+#include "com/sun/star/animations/TransitionType.hpp"
+#include "com/sun/star/animations/ValuePair.hpp"
+#include "com/sun/star/animations/XAnimateColor.hpp"
+#include "com/sun/star/animations/XAnimateMotion.hpp"
+#include "com/sun/star/animations/XAnimateSet.hpp"
+#include "com/sun/star/animations/XAnimateTransform.hpp"
+#include "com/sun/star/animations/XAnimationNode.hpp"
+#include "com/sun/star/animations/XAnimationNodeSupplier.hpp"
+#include "com/sun/star/animations/XAudio.hpp"
+#include "com/sun/star/animations/XCommand.hpp"
+#include "com/sun/star/animations/XIterateContainer.hpp"
+#include "com/sun/star/animations/XTransitionFilter.hpp"
+#include "com/sun/star/awt/FontDescriptor.hpp"
+#include "com/sun/star/awt/FontEmphasisMark.hpp"
+#include "com/sun/star/awt/FontFamily.hpp"
+#include "com/sun/star/awt/FontPitch.hpp"
+#include "com/sun/star/awt/FontRelief.hpp"
+#include "com/sun/star/awt/FontSlant.hpp"
+#include "com/sun/star/awt/FontStrikeout.hpp"
+#include "com/sun/star/awt/FontUnderline.hpp"
+#include "com/sun/star/awt/FontWidth.hpp"
+#include "com/sun/star/awt/Gradient.hpp"
+#include "com/sun/star/awt/ImagePosition.hpp"
+#include "com/sun/star/awt/Point.hpp"
+#include "com/sun/star/awt/Rectangle.hdl"
+#include "com/sun/star/awt/Rectangle.hpp"
+#include "com/sun/star/awt/ScrollBarOrientation.hpp"
+#include "com/sun/star/awt/Size.hpp"
+#include "com/sun/star/awt/TextAlign.hpp"
+#include "com/sun/star/awt/VisualEffect.hpp"
+#include "com/sun/star/awt/XBitmap.hpp"
+#include "com/sun/star/awt/XControlModel.hpp"
+#include "com/sun/star/beans/NamedValue.hpp"
+#include "com/sun/star/beans/PropertyAttribute.hpp"
+#include "com/sun/star/beans/PropertyState.hpp"
+#include "com/sun/star/beans/PropertyValue.hpp"
+#include "com/sun/star/beans/PropertyValues.hpp"
+#include "com/sun/star/beans/PropertyVetoException.hpp"
+#include "com/sun/star/beans/TolerantPropertySetResultType.hpp"
+#include "com/sun/star/beans/UnknownPropertyException.hpp"
+#include "com/sun/star/beans/XMultiPropertySet.hpp"
+#include "com/sun/star/beans/XMultiPropertyStates.hpp"
+#include "com/sun/star/beans/XPropertyContainer.hpp"
+#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/beans/XPropertySetInfo.hpp"
+#include "com/sun/star/beans/XPropertyState.hpp"
+#include "com/sun/star/beans/XTolerantMultiPropertySet.hpp"
+#include "com/sun/star/chart/ChartAxisArrangeOrderType.hpp"
+#include "com/sun/star/chart/ChartAxisAssign.hpp"
+#include "com/sun/star/chart/ChartAxisMarks.hpp"
+#include "com/sun/star/chart/ChartDataCaption.hpp"
+#include "com/sun/star/chart/ChartDataRowSource.hpp"
+#include "com/sun/star/chart/ChartErrorCategory.hpp"
+#include "com/sun/star/chart/ChartErrorIndicatorType.hpp"
+#include "com/sun/star/chart/ChartLegendPosition.hpp"
+#include "com/sun/star/chart/ChartRegressionCurveType.hpp"
+#include "com/sun/star/chart/ChartSeriesAddress.hpp"
+#include "com/sun/star/chart/ChartSolidType.hpp"
+#include "com/sun/star/chart/ChartSymbolType.hpp"
+#include "com/sun/star/chart/X3DDisplay.hpp"
+#include "com/sun/star/chart/XAxisZSupplier.hpp"
+#include "com/sun/star/chart/XChartDataArray.hpp"
+#include "com/sun/star/chart/XChartDocument.hpp"
+#include "com/sun/star/chart/XDiagram.hpp"
+#include "com/sun/star/chart/XSecondAxisTitleSupplier.hpp"
+#include "com/sun/star/chart/XStatisticDisplay.hpp"
+#include "com/sun/star/chart/XTwoAxisXSupplier.hpp"
+#include "com/sun/star/chart/XTwoAxisYSupplier.hpp"
+#include "com/sun/star/container/XChild.hpp"
+#include "com/sun/star/container/XContentEnumerationAccess.hpp"
+#include "com/sun/star/container/XEnumeration.hpp"
+#include "com/sun/star/container/XEnumerationAccess.hpp"
+#include "com/sun/star/container/XIdentifierAccess.hpp"
+#include "com/sun/star/container/XIdentifierContainer.hpp"
+#include "com/sun/star/container/XIndexAccess.hpp"
+#include "com/sun/star/container/XIndexContainer.hpp"
+#include "com/sun/star/container/XIndexReplace.hpp"
+#include "com/sun/star/container/XNameAccess.hpp"
+#include "com/sun/star/container/XNameContainer.hpp"
+#include "com/sun/star/container/XNameReplace.hpp"
+#include "com/sun/star/container/XNamed.hpp"
+#include "com/sun/star/container/XSet.hpp"
+#include "com/sun/star/document/PrinterIndependentLayout.hpp"
+#include "com/sun/star/document/XActionLockable.hpp"
+#include "com/sun/star/document/XBinaryStreamResolver.hpp"
+#include "com/sun/star/document/XDocumentInfo.hpp"
+#include "com/sun/star/document/XDocumentInfoSupplier.hpp"
+#include "com/sun/star/document/XDocumentRevisionListPersistence.hpp"
+#include "com/sun/star/document/XEmbeddedObjectResolver.hpp"
+#include "com/sun/star/document/XEmbeddedObjectSupplier.hpp"
+#include "com/sun/star/document/XEventsSupplier.hpp"
+#include "com/sun/star/document/XExporter.hpp"
+#include "com/sun/star/document/XFilter.hpp"
+#include "com/sun/star/document/XGraphicObjectResolver.hpp"
+#include "com/sun/star/document/XImporter.hpp"
+#include "com/sun/star/document/XRedlinesSupplier.hpp"
+#include "com/sun/star/document/XViewDataSupplier.hpp"
+#include "com/sun/star/drawing/Alignment.hpp"
+#include "com/sun/star/drawing/BitmapMode.hpp"
+#include "com/sun/star/drawing/CameraGeometry.hpp"
+#include "com/sun/star/drawing/CircleKind.hpp"
+#include "com/sun/star/drawing/ColorMode.hpp"
+#include "com/sun/star/drawing/ConnectorType.hpp"
+#include "com/sun/star/drawing/DashStyle.hpp"
+#include "com/sun/star/drawing/Direction3D.hpp"
+#include "com/sun/star/drawing/DoubleSequence.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeAdjustmentValue.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeGluePointType.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeParameter.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeParameterType.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeSegment.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeSegmentCommand.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp"
+#include "com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp"
+#include "com/sun/star/drawing/EscapeDirection.hpp"
+#include "com/sun/star/drawing/FillStyle.hpp"
+#include "com/sun/star/drawing/FlagSequence.hpp"
+#include "com/sun/star/drawing/FlagSequenceSequence.hpp"
+#include "com/sun/star/drawing/GluePoint2.hpp"
+#include "com/sun/star/drawing/Hatch.hpp"
+#include "com/sun/star/drawing/HomogenMatrix.hpp"
+#include "com/sun/star/drawing/HomogenMatrix3.hpp"
+#include "com/sun/star/drawing/LineDash.hpp"
+#include "com/sun/star/drawing/LineJoint.hpp"
+#include "com/sun/star/drawing/LineStyle.hpp"
+#include "com/sun/star/drawing/MeasureTextHorzPos.hpp"
+#include "com/sun/star/drawing/MeasureTextVertPos.hpp"
+#include "com/sun/star/drawing/NormalsKind.hpp"
+#include "com/sun/star/drawing/PointSequence.hpp"
+#include "com/sun/star/drawing/PointSequenceSequence.hpp"
+#include "com/sun/star/drawing/PolyPolygonBezierCoords.hpp"
+#include "com/sun/star/drawing/PolyPolygonShape3D.hpp"
+#include "com/sun/star/drawing/Position3D.hpp"
+#include "com/sun/star/drawing/ProjectionMode.hpp"
+#include "com/sun/star/drawing/RectanglePoint.hpp"
+#include "com/sun/star/drawing/ShadeMode.hpp"
+#include "com/sun/star/drawing/TextAnimationDirection.hpp"
+#include "com/sun/star/drawing/TextAnimationKind.hpp"
+#include "com/sun/star/drawing/TextFitToSizeType.hpp"
+#include "com/sun/star/drawing/TextHorizontalAdjust.hpp"
+#include "com/sun/star/drawing/TextVerticalAdjust.hpp"
+#include "com/sun/star/drawing/TextureKind.hpp"
+#include "com/sun/star/drawing/TextureMode.hpp"
+#include "com/sun/star/drawing/TextureProjectionMode.hpp"
+#include "com/sun/star/drawing/XControlShape.hpp"
+#include "com/sun/star/drawing/XCustomShapeEngine.hpp"
+#include "com/sun/star/drawing/XDrawPage.hpp"
+#include "com/sun/star/drawing/XDrawPageSupplier.hpp"
+#include "com/sun/star/drawing/XDrawPages.hpp"
+#include "com/sun/star/drawing/XDrawPagesSupplier.hpp"
+#include "com/sun/star/drawing/XGluePointsSupplier.hpp"
+#include "com/sun/star/drawing/XLayerManager.hpp"
+#include "com/sun/star/drawing/XLayerSupplier.hpp"
+#include "com/sun/star/drawing/XMasterPageTarget.hpp"
+#include "com/sun/star/drawing/XMasterPagesSupplier.hpp"
+#include "com/sun/star/drawing/XShape.hpp"
+#include "com/sun/star/drawing/XShapes.hpp"
+#include "com/sun/star/embed/ElementModes.hpp"
+#include "com/sun/star/embed/XStorage.hpp"
+#include "com/sun/star/form/FormButtonType.hpp"
+#include "com/sun/star/form/FormComponentType.hpp"
+#include "com/sun/star/form/FormSubmitEncoding.hpp"
+#include "com/sun/star/form/FormSubmitMethod.hpp"
+#include "com/sun/star/form/ListSourceType.hpp"
+#include "com/sun/star/form/NavigationBarMode.hpp"
+#include "com/sun/star/form/TabulatorCycle.hpp"
+#include "com/sun/star/form/XForm.hpp"
+#include "com/sun/star/form/XFormsSupplier.hpp"
+#include "com/sun/star/form/XFormsSupplier2.hpp"
+#include "com/sun/star/form/XGridColumnFactory.hpp"
+#include "com/sun/star/form/binding/XBindableValue.hpp"
+#include "com/sun/star/form/binding/XListEntrySink.hpp"
+#include "com/sun/star/form/binding/XListEntrySource.hpp"
+#include "com/sun/star/form/binding/XValueBinding.hpp"
+#include "com/sun/star/form/submission/XSubmission.hpp"
+#include "com/sun/star/form/submission/XSubmissionSupplier.hpp"
+#include "com/sun/star/formula/SymbolDescriptor.hpp"
+#include "com/sun/star/frame/XModel.hpp"
+#include "com/sun/star/frame/XStorable.hpp"
+#include "com/sun/star/i18n/NativeNumberXmlAttributes.hpp"
+#include "com/sun/star/i18n/UnicodeType.hpp"
+#include "com/sun/star/i18n/XCharacterClassification.hpp"
+#include "com/sun/star/i18n/XForbiddenCharacters.hpp"
+#include "com/sun/star/io/XActiveDataSource.hpp"
+#include "com/sun/star/io/XInputStream.hpp"
+#include "com/sun/star/io/XOutputStream.hpp"
+#include "com/sun/star/io/XPersistObject.hpp"
+#include "com/sun/star/lang/IllegalArgumentException.hpp"
+#include "com/sun/star/lang/Locale.hpp"
+#include "com/sun/star/lang/ServiceNotRegisteredException.hpp"
+#include "com/sun/star/lang/WrappedTargetException.hpp"
+#include "com/sun/star/lang/XEventListener.hpp"
+#include "com/sun/star/lang/XInitialization.hpp"
+#include "com/sun/star/lang/XMultiServiceFactory.hpp"
+#include "com/sun/star/lang/XServiceInfo.hpp"
+#include "com/sun/star/lang/XSingleServiceFactory.hpp"
+#include "com/sun/star/lang/XTypeProvider.hpp"
+#include "com/sun/star/lang/XUnoTunnel.hpp"
+#include "com/sun/star/linguistic2/XSupportedLocales.hpp"
+#include "com/sun/star/media/ZoomLevel.hpp"
+#include "com/sun/star/presentation/AnimationEffect.hpp"
+#include "com/sun/star/presentation/AnimationSpeed.hpp"
+#include "com/sun/star/presentation/ClickAction.hpp"
+#include "com/sun/star/presentation/EffectCommands.hpp"
+#include "com/sun/star/presentation/EffectNodeType.hpp"
+#include "com/sun/star/presentation/EffectPresetClass.hpp"
+#include "com/sun/star/presentation/FadeEffect.hpp"
+#include "com/sun/star/presentation/ParagraphTarget.hpp"
+#include "com/sun/star/presentation/ShapeAnimationSubType.hpp"
+#include "com/sun/star/presentation/TextAnimationType.hpp"
+#include "com/sun/star/presentation/XCustomPresentationSupplier.hpp"
+#include "com/sun/star/presentation/XHandoutMasterSupplier.hpp"
+#include "com/sun/star/presentation/XPresentationPage.hpp"
+#include "com/sun/star/presentation/XPresentationSupplier.hpp"
+#include "com/sun/star/registry/XRegistryKey.hpp"
+#include "com/sun/star/script/ScriptEventDescriptor.hpp"
+#include "com/sun/star/script/XEventAttacherManager.hpp"
+#include "com/sun/star/sdb/CommandType.hpp"
+#include "com/sun/star/sheet/XSpreadsheetDocument.hpp"
+#include "com/sun/star/style/BreakType.hpp"
+#include "com/sun/star/style/CaseMap.hpp"
+#include "com/sun/star/style/DropCapFormat.hpp"
+#include "com/sun/star/style/GraphicLocation.hpp"
+#include "com/sun/star/style/LineNumberPosition.hpp"
+#include "com/sun/star/style/LineSpacing.hpp"
+#include "com/sun/star/style/LineSpacingMode.hpp"
+#include "com/sun/star/style/NumberingType.hpp"
+#include "com/sun/star/style/PageStyleLayout.hpp"
+#include "com/sun/star/style/ParagraphAdjust.hpp"
+#include "com/sun/star/style/ParagraphStyleCategory.hpp"
+#include "com/sun/star/style/TabAlign.hpp"
+#include "com/sun/star/style/TabStop.hpp"
+#include "com/sun/star/style/VerticalAlignment.hpp"
+#include "com/sun/star/style/XStyle.hpp"
+#include "com/sun/star/style/XStyleFamiliesSupplier.hpp"
+#include "com/sun/star/table/BorderLine.hpp"
+#include "com/sun/star/table/CellAddress.hpp"
+#include "com/sun/star/table/CellRangeAddress.hpp"
+#include "com/sun/star/table/ShadowFormat.hpp"
+#include "com/sun/star/table/XCellRange.hpp"
+#include "com/sun/star/task/XStatusIndicator.hpp"
+#include "com/sun/star/task/XStatusIndicatorSupplier.hpp"
+#include "com/sun/star/text/BibliographyDataField.hpp"
+#include "com/sun/star/text/BibliographyDataType.hpp"
+#include "com/sun/star/text/ChapterFormat.hpp"
+#include "com/sun/star/text/ControlCharacter.hpp"
+#include "com/sun/star/text/FilenameDisplayFormat.hpp"
+#include "com/sun/star/text/FontEmphasis.hpp"
+#include "com/sun/star/text/FontRelief.hpp"
+#include "com/sun/star/text/FootnoteNumbering.hpp"
+#include "com/sun/star/text/GraphicCrop.hpp"
+#include "com/sun/star/text/HoriOrientation.hpp"
+#include "com/sun/star/text/HorizontalAdjust.hpp"
+#include "com/sun/star/text/PageNumberType.hpp"
+#include "com/sun/star/text/ParagraphVertAlign.hpp"
+#include "com/sun/star/text/PlaceholderType.hpp"
+#include "com/sun/star/text/PositionLayoutDir.hpp"
+#include "com/sun/star/text/ReferenceFieldPart.hpp"
+#include "com/sun/star/text/ReferenceFieldSource.hpp"
+#include "com/sun/star/text/RelOrientation.hpp"
+#include "com/sun/star/text/RubyAdjust.hpp"
+#include "com/sun/star/text/SectionFileLink.hpp"
+#include "com/sun/star/text/SetVariableType.hpp"
+#include "com/sun/star/text/SizeType.hpp"
+#include "com/sun/star/text/TemplateDisplayFormat.hpp"
+#include "com/sun/star/text/TextColumn.hpp"
+#include "com/sun/star/text/TextContentAnchorType.hpp"
+#include "com/sun/star/text/TextGridMode.hpp"
+#include "com/sun/star/text/UserDataPart.hpp"
+#include "com/sun/star/text/VertOrientation.hpp"
+#include "com/sun/star/text/WrapInfluenceOnPosition.hpp"
+#include "com/sun/star/text/WrapTextMode.hpp"
+#include "com/sun/star/text/WritingMode.hpp"
+#include "com/sun/star/text/WritingMode2.hpp"
+#include "com/sun/star/text/XChapterNumberingSupplier.hpp"
+#include "com/sun/star/text/XDependentTextField.hpp"
+#include "com/sun/star/text/XDocumentIndex.hpp"
+#include "com/sun/star/text/XEndnotesSupplier.hpp"
+#include "com/sun/star/text/XFootnote.hpp"
+#include "com/sun/star/text/XFootnotesSupplier.hpp"
+#include "com/sun/star/text/XLineNumberingProperties.hpp"
+#include "com/sun/star/text/XNumberingTypeInfo.hpp"
+#include "com/sun/star/text/XRelativeTextContentInsert.hpp"
+#include "com/sun/star/text/XRelativeTextContentRemove.hpp"
+#include "com/sun/star/text/XText.hpp"
+#include "com/sun/star/text/XTextColumns.hpp"
+#include "com/sun/star/text/XTextContent.hpp"
+#include "com/sun/star/text/XTextCursor.hpp"
+#include "com/sun/star/text/XTextDocument.hpp"
+#include "com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp"
+#include "com/sun/star/text/XTextField.hpp"
+#include "com/sun/star/text/XTextFieldsSupplier.hpp"
+#include "com/sun/star/text/XTextFrame.hpp"
+#include "com/sun/star/text/XTextFramesSupplier.hpp"
+#include "com/sun/star/text/XTextGraphicObjectsSupplier.hpp"
+#include "com/sun/star/text/XTextRange.hpp"
+#include "com/sun/star/text/XTextRangeCompare.hpp"
+#include "com/sun/star/text/XTextSection.hpp"
+#include "com/sun/star/text/XTextShapesSupplier.hpp"
+#include "com/sun/star/ucb/XAnyCompare.hpp"
+#include "com/sun/star/ucb/XAnyCompareFactory.hpp"
+#include "com/sun/star/uno/Any.hxx"
+#include "com/sun/star/uno/Exception.hpp"
+#include "com/sun/star/uno/Reference.h"
+#include "com/sun/star/uno/Reference.hxx"
+#include "com/sun/star/uno/Sequence.h"
+#include "com/sun/star/uno/Sequence.hxx"
+#include "com/sun/star/uno/Type.h"
+#include "com/sun/star/uno/Type.hxx"
+#include "com/sun/star/uno/XInterface.hpp"
+#include "com/sun/star/uri/XUriReferenceFactory.hpp"
+#include "com/sun/star/uri/XVndSunStarScriptUrl.hpp"
+#include "com/sun/star/util/Date.hpp"
+#include "com/sun/star/util/DateTime.hpp"
+#include "com/sun/star/util/NumberFormat.hpp"
+#include "com/sun/star/util/RevisionTag.hpp"
+#include "com/sun/star/util/Time.hpp"
+#include "com/sun/star/util/XCloneable.hpp"
+#include "com/sun/star/util/XModifiable.hpp"
+#include "com/sun/star/util/XNumberFormats.hpp"
+#include "com/sun/star/util/XNumberFormatsSupplier.hpp"
+#include "com/sun/star/util/XStringMapping.hpp"
+#include "com/sun/star/util/XStringSubstitution.hpp"
+#include "com/sun/star/util/XUpdatable.hpp"
+#include "com/sun/star/view/PaperOrientation.hpp"
+#include "com/sun/star/xforms/XDataTypeRepository.hpp"
+#include "com/sun/star/xforms/XFormsSupplier.hpp"
+#include "com/sun/star/xforms/XModel.hpp"
+#include "com/sun/star/xml/AttributeData.hpp"
+#include "com/sun/star/xml/dom/NodeType.hpp"
+#include "com/sun/star/xml/dom/XAttr.hpp"
+#include "com/sun/star/xml/dom/XDocument.hpp"
+#include "com/sun/star/xml/dom/XDocumentBuilder.hpp"
+#include "com/sun/star/xml/dom/XElement.hpp"
+#include "com/sun/star/xml/dom/XEntity.hpp"
+#include "com/sun/star/xml/dom/XNamedNodeMap.hpp"
+#include "com/sun/star/xml/dom/XNode.hpp"
+#include "com/sun/star/xml/dom/XNotation.hpp"
+#include "com/sun/star/xml/sax/InputSource.hpp"
+#include "com/sun/star/xml/sax/SAXException.hpp"
+#include "com/sun/star/xml/sax/SAXInvalidCharacterException.hpp"
+#include "com/sun/star/xml/sax/SAXParseException.hpp"
+#include "com/sun/star/xml/sax/XAttributeList.hpp"
+#include "com/sun/star/xml/sax/XDocumentHandler.hpp"
+#include "com/sun/star/xml/sax/XExtendedDocumentHandler.hpp"
+#include "com/sun/star/xml/sax/XLocator.hpp"
+#include "com/sun/star/xml/sax/XParser.hpp"
+#include "com/sun/star/xsd/DataTypeClass.hpp"
+#include "com/sun/star/xsd/WhiteSpaceTreatment.hpp"
+#include "com/sun/star/xsd/XDataType.hpp"
+
+#include "comphelper/genericpropertyset.hxx"
+#include "comphelper/namecontainer.hxx"
+#include "comphelper/processfactory.hxx"
+#include "comphelper/sequence.hxx"
+#include "comphelper/stl_types.hxx"
+#include "comphelper/types.hxx"
+
+#include "cppuhelper/factory.hxx"
+#include "cppuhelper/implbase1.hxx"
+#include "cppuhelper/implbase2.hxx"
+#include "cppuhelper/implbase3.hxx"
+#include "cppuhelper/implbase4.hxx"
+#include "cppuhelper/implbase6.hxx"
+#include "cppuhelper/weak.hxx"
+#include "cppuhelper/weakref.hxx"
+
+#include "i18npool/lang.h"
+#include "i18npool/mslangid.hxx"
+
+#include "osl/diagnose.h"
+#include "osl/interlck.h"
+#include "osl/mutex.hxx"
+
+#include "rsc/rscsfx.hxx"
+
+#include "rtl/logfile.hxx"
+#include "rtl/math.hxx"
+#include "rtl/memory.h"
+#include "rtl/ustrbuf.hxx"
+#include "rtl/ustring.hxx"
+#include "rtl/uuid.h"
+
+#include "salhelper/simplereferenceobject.hxx"
+
+#include "sot/clsids.hxx"
+
+#include "svl/cntnrsrt.hxx"
+#include "svl/itemset.hxx"
+#include "unotools/moduleoptions.hxx"
+#include "svl/nfsymbol.hxx"
+#include "svl/numuno.hxx"
+#include "svl/poolitem.hxx"
+#include "svl/svarray.hxx"
+#include "svl/svstdarr.hxx"
+#include "svl/urihelper.hxx"
+
+
+#include "tools/bigint.hxx"
+#include "tools/color.hxx"
+#include "tools/debug.hxx"
+#include "tools/gen.hxx"
+#include "tools/globname.hxx"
+#include "tools/inetdef.hxx"
+#include "tools/list.hxx"
+#include "tools/ref.hxx"
+#include "tools/rtti.hxx"
+#include "tools/solar.h"
+#include "tools/string.hxx"
+#include "tools/time.hxx"
+#include "tools/urlobj.hxx"
+
+#include "uno/lbnames.h"
+
+#include "unotools/bootstrap.hxx"
+#include "unotools/charclass.hxx"
+#include "unotools/configmgr.hxx"
+#include "unotools/processfactory.hxx"
+#include "unotools/streamwrap.hxx"
+
+#include "tools/fldunit.hxx"
+#include "unotools/fontcvt.hxx"
+#include "tools/mapunit.hxx"
+
+#include "osl/mutex.hxx"
+#include "rtl/ref.hxx"
+#include "salhelper/simplereferenceobject.hxx"
+
+#include "xmloff/dllapi.h"
+//---MARKER---
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/txtflde.hxx b/xmloff/inc/txtflde.hxx
new file mode 100644
index 000000000000..97b6113b588e
--- /dev/null
+++ b/xmloff/inc/txtflde.hxx
@@ -0,0 +1,549 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/** @#file
+ * XML export of all text fields
+ */
+
+#ifndef _XMLOFF_TXTFLDE_HXX
+#define _XMLOFF_TXTFLDE_HXX
+
+#include <com/sun/star/uno/Reference.h>
+#include "xmlnmspe.hxx"
+
+#include <rtl/ustring.hxx>
+#include <xmloff/xmltoken.hxx>
+
+#include <map>
+#include <set>
+
+
+class SvXMLExport;
+class SvXMLNumFmtExport;
+struct XMLPropertyState;
+
+namespace com { namespace sun { namespace star {
+ namespace util { struct DateTime; }
+ namespace util { struct Date; }
+ namespace text { class XTextField; }
+ namespace text { class XText; }
+ namespace beans { class XPropertySet; }
+ namespace beans { class XPropertySetInfo; }
+ namespace frame { class XModel; }
+ namespace uno { template<typename A> class Sequence; }
+} } }
+namespace rtl { class OUString; }
+
+
+/// field IDs,
+// including translation between UNO speak and XML speak if appropriate
+
+enum FieldIdEnum {
+ FIELD_ID_SENDER, // sender == extended user
+ FIELD_ID_AUTHOR,
+ FIELD_ID_DATE, // current date
+ FIELD_ID_TIME, // current time (+date)
+ FIELD_ID_PAGENUMBER, // page number
+ FIELD_ID_PAGESTRING, // page contination string (page number string)
+ FIELD_ID_REFPAGE_SET, // set reference page
+ FIELD_ID_REFPAGE_GET, // get reference page number
+
+ FIELD_ID_PLACEHOLDER, // placeholder field == jump edit field
+
+ FIELD_ID_VARIABLE_DECL, // field type for set variable
+ FIELD_ID_VARIABLE_GET, // get variable == get expression
+ FIELD_ID_VARIABLE_SET, // set variable == set expression
+ FIELD_ID_VARIABLE_INPUT, // input field (variable)
+ FIELD_ID_USER_DECL, // field type for user field
+ FIELD_ID_USER_GET, // user field
+ FIELD_ID_USER_INPUT, // input field (user field)
+ FIELD_ID_TEXT_INPUT, // input field (text)
+ FIELD_ID_EXPRESSION, // expression field = formula field
+ FIELD_ID_SEQUENCE_DECL, // field type for sequence
+ FIELD_ID_SEQUENCE, // sequence field
+
+ FIELD_ID_DATABASE_NEXT, // select next row
+ FIELD_ID_DATABASE_SELECT, // select row # (NumSet)
+ FIELD_ID_DATABASE_DISPLAY, // display data (form letter field)
+ FIELD_ID_DATABASE_NAME, // display current db name (database name)
+ FIELD_ID_DATABASE_NUMBER, // display row # (SetNumber)
+
+ FIELD_ID_DOCINFO_CREATION_AUTHOR, // docinfo fields
+ FIELD_ID_DOCINFO_CREATION_TIME,
+ FIELD_ID_DOCINFO_CREATION_DATE,
+ FIELD_ID_DOCINFO_DESCRIPTION,
+ FIELD_ID_DOCINFO_CUSTOM,
+ FIELD_ID_DOCINFO_PRINT_TIME,
+ FIELD_ID_DOCINFO_PRINT_DATE,
+ FIELD_ID_DOCINFO_PRINT_AUTHOR,
+ FIELD_ID_DOCINFO_TITLE,
+ FIELD_ID_DOCINFO_SUBJECT,
+ FIELD_ID_DOCINFO_KEYWORDS,
+ FIELD_ID_DOCINFO_REVISION,
+ FIELD_ID_DOCINFO_EDIT_DURATION,
+ FIELD_ID_DOCINFO_SAVE_TIME,
+ FIELD_ID_DOCINFO_SAVE_DATE,
+ FIELD_ID_DOCINFO_SAVE_AUTHOR,
+
+ FIELD_ID_CONDITIONAL_TEXT, // conditionally choose between 2 texts
+ FIELD_ID_HIDDEN_TEXT, // conditionally hide a text
+ FIELD_ID_HIDDEN_PARAGRAPH, // conditionally hide a paragraph
+
+ FIELD_ID_TEMPLATE_NAME, // display name of template
+ FIELD_ID_CHAPTER, // display name/number of current chapter
+ FIELD_ID_FILE_NAME, // display name of current file
+
+ FIELD_ID_COUNT_PARAGRAPHS, // statistics fields: - paragraphs
+ FIELD_ID_COUNT_WORDS, // - words
+ FIELD_ID_COUNT_CHARACTERS, // - chars
+ FIELD_ID_COUNT_PAGES, // - pages
+ FIELD_ID_COUNT_TABLES, // - tables
+ FIELD_ID_COUNT_GRAPHICS, // - graphics
+ FIELD_ID_COUNT_OBJECTS, // - objects
+
+ FIELD_ID_MACRO, // macro fields
+ FIELD_ID_REF_REFERENCE, // get reference field (reference)
+ FIELD_ID_REF_SEQUENCE, // get reference field (sequence)
+ FIELD_ID_REF_BOOKMARK, // get reference field (bookmark)
+ FIELD_ID_REF_FOOTNOTE, // get reference field (footnote)
+ FIELD_ID_REF_ENDNOTE, // get reference field (endnote)
+ FIELD_ID_DDE, // DDE field
+
+ FIELD_ID_BIBLIOGRAPHY, // bibliography index entry
+
+ FIELD_ID_SHEET_NAME, // name of current (spread-)sheet
+ FIELD_ID_URL, // URL field (only Calc, Draw, Impress)
+
+ FIELD_ID_SCRIPT, // script fields (for HTML pages, mostly)
+ FIELD_ID_ANNOTATION, // annotation (notice) field
+
+ FIELD_ID_COMBINED_CHARACTERS, // combined characters (asian typography)
+
+ FIELD_ID_META, // text:meta-field (RDF metadata)
+
+ FIELD_ID_MEASURE, // for measure shapes
+
+ FIELD_ID_TABLE_FORMULA, // DEPRECATED: table formulas (Writer 2.0)
+ FIELD_ID_DROP_DOWN, // DEPRECATED: dropdown fields (WW8)
+
+ FIELD_ID_DRAW_HEADER,
+ FIELD_ID_DRAW_FOOTER,
+ FIELD_ID_DRAW_DATE_TIME,
+
+ FIELD_ID_UNKNOWN // invalid or unknown field type!
+};
+
+
+
+class XMLTextFieldExport
+{
+ SvXMLExport& rExport;
+
+ /// store used text field master names (NULL means: don't collect)
+ ::std::map<
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XText >,
+ ::std::set< ::rtl::OUString > > *
+ pUsedMasters;
+
+public:
+
+ XMLTextFieldExport( SvXMLExport& rExp,
+ /// XMLPropertyState for the combined characters field
+ XMLPropertyState* pCombinedCharState = NULL );
+ virtual ~XMLTextFieldExport();
+
+ /// Export this field and the surrounding span element with the formatting.
+ /// To be called for every field in the document body.
+ void ExportField(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField,
+ sal_Bool bProgress );
+
+ /// collect styles (character styles, data styles, ...) for this field
+ /// (if appropriate).
+ /// Also collect used field masters (if pUsedMasters is set)
+ /// to be called for every field during style export.
+ void ExportFieldAutoStyle(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField,
+ const sal_Bool bProgress, const sal_Bool bRecursive );
+
+ /// export field declarations.
+ /// to be called once at beginning of document body.
+ void ExportFieldDeclarations();
+
+ /// export field declarations for fields used in the the particular XText.
+ /// (Requires that a list of used field declarations has previously been
+ /// built-up in ExportFieldAutoStyle() )
+ void ExportFieldDeclarations(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText);
+
+ /// export all field declarations, or only those that have been used?
+ /// Calling this method will reset the list of used field declataions.
+ void SetExportOnlyUsedFieldDeclarations(
+ sal_Bool bExportOnlyUsed = sal_True);
+
+ // determine element or attribute names
+ // (public, because they may be useful in related XML export classes)
+ static enum ::xmloff::token::XMLTokenEnum MapPlaceholderType(sal_uInt16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapTemplateDisplayFormat(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapChapterDisplayFormat(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapFilenameDisplayFormat(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapDocInfoFieldName(enum FieldIdEnum nToken);
+ static enum ::xmloff::token::XMLTokenEnum MapReferenceSource(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapReferenceType(sal_Int16 nType);
+ static enum ::xmloff::token::XMLTokenEnum MapCountFieldName(FieldIdEnum nToken);
+ static enum ::xmloff::token::XMLTokenEnum MapBibliographyFieldName(::rtl::OUString sName);
+ static enum ::xmloff::token::XMLTokenEnum MapMeasureKind(sal_Int16 nKind);
+ enum ::xmloff::token::XMLTokenEnum MapPageNumberName(const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropSet,
+ sal_Int32& nOffset); /// also adjust page offset
+ enum ::xmloff::token::XMLTokenEnum MapAuthorFieldName(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+ enum ::xmloff::token::XMLTokenEnum MapSenderFieldName(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+
+ /// export a field after <text:span> is already written
+ void ExportFieldHelper(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextField> & rTextField,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropSet,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rRangePropSet,
+ enum FieldIdEnum nToken,
+ sal_Bool bProgress );
+
+ /// export an empty element
+ void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
+ sal_Bool bAddSpace = sal_False); /// add blanks around
+ /// element?
+
+ /// export an element with string content
+ void ExportElement(enum ::xmloff::token::XMLTokenEnum eElement, /// element token
+ const ::rtl::OUString& sContent, /// element content
+ sal_Bool bAddSpace = sal_False); /// add blanks around
+ /// element?
+
+ /// export a macro (as used in the macro field)
+ void ExportMacro( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropSet,
+ const ::rtl::OUString& rContent);
+
+ /// export text:meta-field (RDF metadata)
+ void ExportMetaField( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & i_xMeta,
+ bool i_bAutoStyles, sal_Bool i_bProgress );
+
+ /// export a boolean attribute
+ void ProcessBoolean(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ sal_Bool bBool, /// attribute value
+ sal_Bool bDefault); /// attribute default; omit, if attribute differs
+
+ /// export an integer attribute
+ void ProcessInteger(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ sal_Int32 nNum); /// attribute value
+
+ /// export an integer attribute, omit if default
+ void ProcessIntegerDef(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ sal_Int32 nNum, /// attribute value
+ sal_Int32 nDefault); /// default value
+
+ /// export a string attribute
+ void ProcessString(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ const ::rtl::OUString& sValue, /// attribute value
+ sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export a string attribute taht gets a QName value
+ void ProcessString(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ sal_uInt16 nValuePrefix,
+ const ::rtl::OUString& sValue, /// attribute value
+ sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+
+ /// export a string attribute, omit if default
+ void ProcessString(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ const ::rtl::OUString& sValue, /// attribute value
+ const ::rtl::OUString& sDefault, /// default value; omit if equal
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export a string attribute, omit if default
+ void ProcessString(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ sal_uInt16 nValuePrefix,
+ const ::rtl::OUString& sValue, /// attribute value
+ const ::rtl::OUString& sDefault, /// default value; omit if equal
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export a string attribute
+ void ProcessString(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eValue, /// attribute token
+ sal_Bool bOmitEmpty = sal_False, /// omit attribute, if value is empty
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export a string attribute, omit if default
+ void ProcessString(
+ enum ::xmloff::token::XMLTokenEnum eXmlName, /// attribute token (namespace text)
+ enum ::xmloff::token::XMLTokenEnum eValue, /// attribute value token
+ enum ::xmloff::token::XMLTokenEnum eDefault, /// default value token
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export a string as a sequence of paragraphs
+ void ProcessParagraphSequence(
+ /// string containing the paragraphs
+ const ::rtl::OUString& sParagraphSequence);
+
+ /// export a numbering format (numeric, roman, alphabetic, etc.)
+ void ProcessNumberingType(
+ sal_Int16 nNumberingType); /// numbering type key
+
+ /// export display attribute (value, formula, none)
+ void ProcessDisplay(sal_Bool bIsVisible, /// is visible?
+ sal_Bool bIsCommand, /// is show command/show name?
+ sal_Bool bDefault = sal_True); /// omit, if default
+
+ /// export all data-style related attributes
+ void ProcessValueAndType(
+ sal_Bool bIsString, /// do we process a string or a number?
+ sal_Int32 nFormatKey, /// format key for NumberFormatter; possibly -1
+ const ::rtl::OUString& sContent, /// string content; possibly invalid
+ const ::rtl::OUString& sDefault, /// default string
+ double fValue, /// float content; possibly invalid
+ sal_Bool bExportValue, /// export value attribute?
+ sal_Bool bExportValueType, /// export value-type attribute?
+ sal_Bool bExportStyle, /// export style-sttribute?
+ sal_Bool bForceSystemLanguage, /// no style language export
+ sal_Bool bTimeStyle = sal_False); /// exporting a time style?
+
+ /// export times, dates and durations according to ISO 8601
+ void ProcessDateTime(
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
+ double dValue, /// date/time value
+ sal_Bool bIsDate, /// export as date (rather than date/time)?
+ sal_Bool bIsDuration = sal_False, /// export as duration
+ sal_Bool bOmitDurationIfZero = sal_True, /// omit zero-length durat.
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export a date, time, or duration
+ void ProcessDateTime(
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
+ sal_Int32 nMinutes, /// date/time value in minutes
+ sal_Bool bIsDate, /// export as date?
+ sal_Bool bIsDuration, /// export as duration?
+ sal_Bool bOmitDurationIfZero, /// omit zero-length durations
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export times, dates and durations according to ISO 8601
+ void ProcessDateTime(
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
+ const ::com::sun::star::util::DateTime& rTime, /// date/time value
+ sal_Bool bIsDate, /// export as date (rather than date/time)?
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export date according to ISO 8601
+ void ProcessDate(
+ enum ::xmloff::token::XMLTokenEnum eXMLName, /// attribute token
+ const ::com::sun::star::util::Date& rTime, /// date value
+ sal_uInt16 nPrefix = XML_NAMESPACE_TEXT); /// attribute name prefix
+
+ /// export all attributes for bibliography data fields
+ void ProcessBibliographyData(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropertySet);
+
+ /// export CommandTypeAttribute
+ void ProcessCommandType(
+ sal_Int32 nCommandType); /// com::sun::star::sdb::CommandType
+
+ void ProcessStringSequence(
+ const ::com::sun::star::uno::Sequence<rtl::OUString>& rSequence,
+ const rtl::OUString sSelected );
+
+ void ProcessStringSequence(
+ const ::com::sun::star::uno::Sequence<rtl::OUString>& rSequence,
+ sal_Int32 nSelected );
+
+ /// export attributes that describe a data source
+ void ExportDataBaseElement(
+ enum ::xmloff::token::XMLTokenEnum eElement,
+ const ::rtl::OUString& sContent,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > & rPropertySetInfo );
+
+ /// for XDependentTextFields, get PropertySet of FieldMaster
+ ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >
+ GetMasterPropertySet(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField);
+
+ /// get PropertySet of (any) DependentTextField for this FieldMaster
+ sal_Bool GetDependentFieldPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xmaster,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xField);
+
+
+ /// get field ID from XTextField (and it's Property-Set)
+ enum FieldIdEnum GetFieldID(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField > & rTextField,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+
+ /// get field ID from XTextField service name (and it's PropertySet)
+ enum FieldIdEnum MapFieldName(const ::rtl::OUString& sFieldName,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet> & xPropSet);
+
+ /// determine, whether field has string or numeric content
+ sal_Bool IsStringField(FieldIdEnum nFieldType, /// field ID
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & xPropSet);
+
+
+ /// explode a field master name into field type and field name
+ sal_Bool ExplodeFieldMasterName(
+ const ::rtl::OUString& sMasterName, /// name as returned by SO API
+ ::rtl::OUString& sFieldType, /// out: field type
+ ::rtl::OUString& sVarName); /// out: variable name
+
+ /// make reference name for a foot- or endnote
+ static ::rtl::OUString MakeFootnoteRefName(sal_Int16 nSeqNo);
+
+ /// make reference name for a sequence field
+ static ::rtl::OUString MakeSequenceRefName(sal_Int16 nSeqNo,
+ const ::rtl::OUString& rSeqName);
+
+private:
+ // constants
+
+ // service names
+ const ::rtl::OUString sServicePrefix;
+ const ::rtl::OUString sFieldMasterPrefix;
+ const ::rtl::OUString sPresentationServicePrefix;
+
+ // property names
+ const ::rtl::OUString sPropertyAdjust;
+ const ::rtl::OUString sPropertyAuthor;
+ const ::rtl::OUString sPropertyChapterFormat;
+ const ::rtl::OUString sPropertyChapterNumberingLevel;
+ const ::rtl::OUString sPropertyCharStyleNames;
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyDataBaseName;
+ const ::rtl::OUString sPropertyDataBaseURL;
+ const ::rtl::OUString sPropertyDataColumnName;
+ const ::rtl::OUString sPropertyDataCommandType;
+ const ::rtl::OUString sPropertyDataTableName;
+ const ::rtl::OUString sPropertyDate;
+ const ::rtl::OUString sPropertyDateTime;
+ const ::rtl::OUString sPropertyDateTimeValue;
+ const ::rtl::OUString sPropertyDDECommandElement;
+ const ::rtl::OUString sPropertyDDECommandFile;
+ const ::rtl::OUString sPropertyDDECommandType;
+ const ::rtl::OUString sPropertyDependentTextFields;
+ const ::rtl::OUString sPropertyFalseContent;
+ const ::rtl::OUString sPropertyFields;
+ const ::rtl::OUString sPropertyFieldSubType;
+ const ::rtl::OUString sPropertyFileFormat;
+ const ::rtl::OUString sPropertyFullName;
+ const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyInstanceName;
+ const ::rtl::OUString sPropertyIsAutomaticUpdate;
+ const ::rtl::OUString sPropertyIsConditionTrue;
+ const ::rtl::OUString sPropertyIsDataBaseFormat;
+ const ::rtl::OUString sPropertyIsDate;
+ const ::rtl::OUString sPropertyIsExpression;
+ const ::rtl::OUString sPropertyIsFixed;
+ const ::rtl::OUString sPropertyIsFixedLanguage;
+ const ::rtl::OUString sPropertyIsHidden;
+ const ::rtl::OUString sPropertyIsInput;
+ const ::rtl::OUString sPropertyIsShowFormula;
+ const ::rtl::OUString sPropertyIsVisible;
+ const ::rtl::OUString sPropertyItems;
+ const ::rtl::OUString sPropertyLevel;
+ const ::rtl::OUString sPropertyMacro;
+ const ::rtl::OUString sPropertyMeasureKind;
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyNumberingSeparator;
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertyOffset;
+ const ::rtl::OUString sPropertyOn;
+ const ::rtl::OUString sPropertyPlaceholder;
+ const ::rtl::OUString sPropertyPlaceholderType;
+ const ::rtl::OUString sPropertyReferenceFieldPart;
+ const ::rtl::OUString sPropertyReferenceFieldSource;
+ const ::rtl::OUString sPropertyReferenceFieldType;
+ const ::rtl::OUString sPropertyRevision;
+ const ::rtl::OUString sPropertyScriptType;
+ const ::rtl::OUString sPropertySelectedItem;
+ const ::rtl::OUString sPropertySequenceNumber;
+ const ::rtl::OUString sPropertySequenceValue;
+ const ::rtl::OUString sPropertySetNumber;
+ const ::rtl::OUString sPropertySourceName;
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyTargetFrame;
+ const ::rtl::OUString sPropertyTrueContent;
+ const ::rtl::OUString sPropertyURL;
+ const ::rtl::OUString sPropertyURLContent;
+ const ::rtl::OUString sPropertyUserText;
+ const ::rtl::OUString sPropertyValue;
+ const ::rtl::OUString sPropertyVariableName;
+ const ::rtl::OUString sPropertyVariableSubType;
+ const ::rtl::OUString sPropertyHelp;
+ const ::rtl::OUString sPropertyTooltip;
+ const ::rtl::OUString sPropertyTextRange;
+
+ const ::rtl::OUString sEmpty;
+
+ XMLPropertyState* pCombinedCharactersPropertyState;
+
+};
+
+
+
+
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx
new file mode 100644
index 000000000000..6e17b123e230
--- /dev/null
+++ b/xmloff/inc/txtfldi.hxx
@@ -0,0 +1,1596 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * import of all text fields
+ * (except variable related + database display field: see txtvfldi.hxx)
+ */
+
+#ifndef _XMLOFF_TXTFLDI_HXX
+#define _XMLOFF_TXTFLDI_HXX
+
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/text/PageNumberType.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/util/Date.hpp>
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/txtimp.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <tools/debug.hxx>
+
+
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace text { class XTextField; }
+ namespace beans { class XPropertySet; struct PropertyValue; }
+} } }
+
+namespace rtl
+{
+ class OUString;
+}
+
+
+class SvXMLImport;
+class XMLTextImportHelper;
+class SvXMLTokenMap;
+
+
+
+
+enum XMLTextFieldAttrTokens
+{
+ XML_TOK_TEXTFIELD_FIXED = 0,
+ XML_TOK_TEXTFIELD_DESCRIPTION,
+ XML_TOK_TEXTFIELD_HELP,
+ XML_TOK_TEXTFIELD_HINT,
+ XML_TOK_TEXTFIELD_PLACEHOLDER_TYPE,
+ XML_TOK_TEXTFIELD_TIME_ADJUST,
+ XML_TOK_TEXTFIELD_DATE_ADJUST,
+ XML_TOK_TEXTFIELD_PAGE_ADJUST,
+ XML_TOK_TEXTFIELD_SELECT_PAGE,
+ XML_TOK_TEXTFIELD_ACTIVE,
+
+ XML_TOK_TEXTFIELD_NAME,
+ XML_TOK_TEXTFIELD_FORMULA,
+ XML_TOK_TEXTFIELD_NUM_FORMAT,
+ XML_TOK_TEXTFIELD_NUM_LETTER_SYNC,
+ XML_TOK_TEXTFIELD_DISPLAY_FORMULA,
+ XML_TOK_TEXTFIELD_NUMBERING_LEVEL,
+ XML_TOK_TEXTFIELD_NUMBERING_SEPARATOR,
+ XML_TOK_TEXTFIELD_DISPLAY,
+ XML_TOK_TEXTFIELD_OUTLINE_LEVEL,
+
+ XML_TOK_TEXTFIELD_VALUE_TYPE,
+ XML_TOK_TEXTFIELD_VALUE,
+ XML_TOK_TEXTFIELD_STRING_VALUE,
+ XML_TOK_TEXTFIELD_DATE_VALUE,
+ XML_TOK_TEXTFIELD_TIME_VALUE,
+ XML_TOK_TEXTFIELD_BOOL_VALUE,
+ XML_TOK_TEXTFIELD_CURRENCY,
+ XML_TOK_TEXTFIELD_DATA_STYLE_NAME,
+
+ XML_TOK_TEXTFIELD_DATABASE_NAME,
+ XML_TOK_TEXTFIELD_TABLE_NAME,
+ XML_TOK_TEXTFIELD_COLUMN_NAME,
+ XML_TOK_TEXTFIELD_ROW_NUMBER,
+ XML_TOK_TEXTFIELD_CONDITION,
+ XML_TOK_TEXTFIELD_STRING_VALUE_IF_TRUE,
+ XML_TOK_TEXTFIELD_STRING_VALUE_IF_FALSE,
+ XML_TOK_TEXTFIELD_REVISION,
+ XML_TOK_TEXTFIELD_IS_HIDDEN,
+ XML_TOK_TEXTFIELD_CURRENT_VALUE,
+
+ XML_TOK_TEXTFIELD_REFERENCE_FORMAT,
+ XML_TOK_TEXTFIELD_REF_NAME,
+ XML_TOK_TEXTFIELD_CONNECTION_NAME,
+
+ XML_TOK_TEXTFIELD_HREF,
+ XML_TOK_TEXTFIELD_TARGET_FRAME,
+
+ XML_TOK_TEXTFIELD_OFFICE_CREATE_DATE,
+ XML_TOK_TEXTFIELD_OFFICE_AUTHOR,
+ XML_TOK_TEXTFIELD_ANNOTATION,
+ XML_TOK_TEXTFIELD_LANGUAGE,
+
+ XML_TOK_TEXTFIELD_MEASURE_KIND,
+ XML_TOK_TEXTFIELD_TABLE_TYPE,
+
+ XML_TOK_TEXTFIELD_NOTE_CLASS,
+
+ XML_TOK_TEXTFIELD_UNKNOWN
+};
+
+
+
+
+
+/// abstract class for text field import
+class XMLTextFieldImportContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sIsFixed;
+
+ // data members
+ ::rtl::OUStringBuffer sContentBuffer; /// collect character data
+ ::rtl::OUString sContent; /// character data after collection
+ ::rtl::OUString sServiceName; /// service name for text field
+ XMLTextImportHelper& rTextImportHelper; /// the import helper
+
+protected:
+ ::rtl::OUString sServicePrefix;
+
+ // data members for use in subclasses
+ sal_Bool bValid; /// ist dieses Feld gültig?
+
+public:
+
+ TYPEINFO();
+
+ XMLTextFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ const sal_Char* pService, /// name of SO API service
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+ virtual ~XMLTextFieldImportContext();
+
+ /// process character data: will be collected in member sContentBuffer
+ virtual void Characters( const ::rtl::OUString& sContent );
+
+ /// parses attributes and calls ProcessAttribute
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// create XTextField and insert into document; calls PrepareTextField
+ virtual void EndElement();
+
+ /// create the appropriate field context from
+ /// (for use in paragraph import)
+ static XMLTextFieldImportContext* CreateTextFieldImportContext(
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rName,
+ sal_uInt16 nToken);
+
+
+protected:
+
+ /// get helper
+ inline XMLTextImportHelper& GetImportHelper() { return rTextImportHelper; }
+
+ inline ::rtl::OUString GetServiceName() { return sServiceName; }
+ inline void SetServiceName(::rtl::OUString sStr) { sServiceName = sStr; }
+
+ ::rtl::OUString GetContent();
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue ) = 0;
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet) = 0;
+
+ /// create field from ServiceName
+ sal_Bool CreateField(::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xField,
+ const ::rtl::OUString& sServiceName);
+
+ /// force an update of the field's value
+ /// call update on optional XUptadeable interface; (disable Fixed property)
+ void ForceUpdate(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropertySet);
+};
+
+
+
+class XMLSenderFieldImportContext : public XMLTextFieldImportContext
+{
+
+ sal_Int16 nSubType; /// API subtype for ExtUser field
+
+ const ::rtl::OUString sEmpty; /// empty string
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyFieldSubType;
+ const ::rtl::OUString sPropertyContent;
+
+protected:
+
+ // variables for access in subclass
+ sal_Bool bFixed;
+ sal_uInt16 nElementToken; /// token for this elment field
+
+public:
+
+ TYPEINFO();
+
+ XMLSenderFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName, /// element name w/o prefix
+ sal_uInt16 nToken); /// element token
+
+protected:
+
+ /// start element
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** inherit sender field because of fixed attribute in ProcessAttributes */
+class XMLAuthorFieldImportContext : public XMLSenderFieldImportContext
+{
+
+ sal_Bool bAuthorFullName;
+ const ::rtl::OUString sServiceAuthor;
+ const ::rtl::OUString sPropertyAuthorFullName;
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyContent;
+
+public:
+
+ TYPEINFO();
+
+ XMLAuthorFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName, /// element name w/o prefix
+ sal_uInt16 nToken); /// element token
+
+protected:
+
+ /// start element
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+class XMLPlaceholderFieldImportContext : public XMLTextFieldImportContext
+{
+
+ const ::rtl::OUString sEmpty; /// empty string
+ const ::rtl::OUString sServiceJumpEdit;
+ const ::rtl::OUString sPropertyPlaceholderType;
+ const ::rtl::OUString sPropertyPlaceholder;
+ const ::rtl::OUString sPropertyHint;
+
+ ::rtl::OUString sDescription;
+
+ sal_Int16 nPlaceholderType;
+
+public:
+
+ TYPEINFO();
+
+ XMLPlaceholderFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+class XMLTimeFieldImportContext : public XMLTextFieldImportContext
+{
+
+protected:
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyDateTimeValue;
+ const ::rtl::OUString sPropertyDateTime;
+ const ::rtl::OUString sPropertyAdjust;
+ const ::rtl::OUString sPropertyIsDate;
+ const ::rtl::OUString sPropertyIsFixedLanguage;
+
+ double fTimeValue;
+ ::com::sun::star::util::DateTime aDateTimeValue;
+ sal_Int32 nAdjust;
+ sal_Int32 nFormatKey;
+ sal_Bool bTimeOK;
+ sal_Bool bFormatOK;
+ sal_Bool bFixed;
+ sal_Bool bIsDate; // is this a date?
+ // (for XMLDateFieldImportContext, really)
+ sal_Bool bIsDefaultLanguage;
+
+public:
+
+ TYPEINFO();
+
+ XMLTimeFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import date fields (<text:date>);
+ inherit from TimeField to reuse implementation */
+class XMLDateFieldImportContext : public XMLTimeFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLDateFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+};
+
+
+/** import page continuation fields (<text:page-continuation-string>) */
+class XMLPageContinuationImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyUserText;
+ const ::rtl::OUString sPropertyNumberingType;
+
+ ::rtl::OUString sString; /// continuation string
+ com::sun::star::text::PageNumberType eSelectPage; /// previous, current
+ /// or next page
+ sal_Bool sStringOK; /// continuation string encountered?
+
+public:
+
+ TYPEINFO();
+
+ XMLPageContinuationImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import page number fields (<text:page-number>) */
+class XMLPageNumberImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertyOffset;
+
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sNumberSync;
+ sal_Int16 nPageAdjust;
+ com::sun::star::text::PageNumberType eSelectPage; /// previous, current
+ /// or next page
+ sal_Bool sNumberFormatOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLPageNumberImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** superclass for database fields: handle database and table names */
+class XMLDatabaseFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyDataBaseName;
+ const ::rtl::OUString sPropertyDataBaseURL;
+ const ::rtl::OUString sPropertyTableName;
+ const ::rtl::OUString sPropertyDataCommandType;
+ const ::rtl::OUString sPropertyIsVisible;
+
+ ::rtl::OUString sDatabaseName;
+ ::rtl::OUString sDatabaseURL;
+ ::rtl::OUString sTableName;
+
+ sal_Int32 nCommandType;
+ sal_Bool bCommandTypeOK;
+
+ sal_Bool bDisplay;
+ bool bDisplayOK;
+ bool bUseDisplay;
+
+protected:
+ sal_Bool bDatabaseOK;
+ sal_Bool bDatabaseNameOK;
+ sal_Bool bDatabaseURLOK;
+ sal_Bool bTableOK;
+
+ /// protected constructor: only for subclasses
+ XMLDatabaseFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ bool bUseDisplay );
+
+public:
+
+TYPEINFO();
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ /// handle database-location children
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+};
+
+/** import database name fields (<text:database-name>) */
+class XMLDatabaseNameImportContext : public XMLDatabaseFieldImportContext
+{
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+};
+
+
+/** import database next fields (<text:database-next>) */
+class XMLDatabaseNextImportContext : public XMLDatabaseFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sTrue;
+ ::rtl::OUString sCondition;
+ sal_Bool bConditionOK;
+
+protected:
+
+ // for use in child classes
+ XMLDatabaseNextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ const sal_Char* pServiceName,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseNextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import database select fields (<text:database-select>) */
+class XMLDatabaseSelectImportContext : public XMLDatabaseNextImportContext
+{
+ const ::rtl::OUString sPropertySetNumber;
+ sal_Int32 nNumber;
+ sal_Bool bNumberOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseSelectImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import database display number fields (<text:database-row-number>) */
+class XMLDatabaseNumberImportContext : public XMLDatabaseFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberingType;
+ const ::rtl::OUString sPropertySetNumber;
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sNumberSync;
+ sal_Int32 nValue;
+ sal_Bool bValueOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseNumberImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import docinfo fields with only fixed atribute */
+class XMLSimpleDocInfoImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyAuthor;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+protected:
+ sal_Bool bFixed;
+ sal_Bool bHasAuthor;
+ sal_Bool bHasContent;
+
+public:
+
+ TYPEINFO();
+
+ XMLSimpleDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken,
+ sal_Bool bContent,
+ sal_Bool bAuthor);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ static const sal_Char* MapTokenToServiceName(sal_uInt16 nToken);
+};
+
+
+
+/** import docinfo fields with date or time attributes and numberformats */
+class XMLDateTimeDocInfoImportContext : public XMLSimpleDocInfoImportContext
+{
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyIsDate;
+ const ::rtl::OUString sPropertyIsFixedLanguage;
+
+ sal_Int32 nFormat;
+ sal_Bool bFormatOK;
+ sal_Bool bIsDate;
+ sal_Bool bHasDateTime;
+ sal_Bool bIsDefaultLanguage;
+
+public:
+
+ TYPEINFO();
+
+ XMLDateTimeDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import revision field (<text:editing-cycles>) */
+class XMLRevisionDocInfoImportContext : public XMLSimpleDocInfoImportContext
+{
+ const ::rtl::OUString sPropertyRevision;
+
+public:
+
+ TYPEINFO();
+
+ XMLRevisionDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import user docinfo field (<text:user-defined>) */
+class XMLUserDocInfoImportContext : public XMLSimpleDocInfoImportContext
+{
+ rtl::OUString aName;
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyIsFixedLanguage;
+ sal_Int32 nFormat;
+ sal_Bool bFormatOK;
+ sal_Bool bIsDefaultLanguage;
+
+public:
+
+ TYPEINFO();
+
+ XMLUserDocInfoImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import hidden paragraph fields (<text:hidden-paragraph>) */
+class XMLHiddenParagraphImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyIsHidden;
+
+ ::rtl::OUString sCondition;
+ sal_Bool bIsHidden;
+
+public:
+
+ TYPEINFO();
+
+ XMLHiddenParagraphImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import conditional text fields (<text:conditional-text>) */
+class XMLConditionalTextImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyTrueContent;
+ const ::rtl::OUString sPropertyFalseContent;
+ const ::rtl::OUString sPropertyIsConditionTrue;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ ::rtl::OUString sCondition;
+ ::rtl::OUString sTrueContent;
+ ::rtl::OUString sFalseContent;
+
+ sal_Bool bConditionOK;
+ sal_Bool bTrueOK;
+ sal_Bool bFalseOK;
+ sal_Bool bCurrentValue;
+
+public:
+
+ TYPEINFO();
+
+ XMLConditionalTextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import conditional text fields (<text:hidden-text>) */
+class XMLHiddenTextImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyCondition;
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyIsHidden;
+
+ ::rtl::OUString sCondition;
+ ::rtl::OUString sString;
+
+ sal_Bool bConditionOK;
+ sal_Bool bStringOK;
+ sal_Bool bIsHidden;
+
+public:
+
+ TYPEINFO();
+
+ XMLHiddenTextImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import file name fields (<text:file-name>) */
+class XMLFileNameImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyFixed;
+ const ::rtl::OUString sPropertyFileFormat;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ sal_Int16 nFormat;
+ sal_Bool bFixed;
+
+public:
+
+ TYPEINFO();
+
+ XMLFileNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import document template name fields (<text:template-name>) */
+class XMLTemplateNameImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyFileFormat;
+
+ sal_Int16 nFormat;
+
+public:
+
+ TYPEINFO();
+
+ XMLTemplateNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import chapter fields (<text:chapter>) */
+class XMLChapterImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyChapterFormat;
+ const ::rtl::OUString sPropertyLevel;
+
+ sal_Int16 nFormat;
+ sal_Int8 nLevel;
+
+public:
+
+ TYPEINFO();
+
+ XMLChapterImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import count fields (<text:[XXX]-count>) */
+class XMLCountFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberingType;
+
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sLetterSync;
+
+ sal_Bool bNumberFormatOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLCountFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ sal_uInt16 nToken);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ static const sal_Char* MapTokenToServiceName(sal_uInt16 nToken);
+};
+
+
+/** import page variable fields (<text:get-page-variable>) */
+class XMLPageVarGetFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberingType;
+
+ ::rtl::OUString sNumberFormat;
+ ::rtl::OUString sLetterSync;
+
+ sal_Bool bNumberFormatOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLPageVarGetFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import page variable fields (<text:get-page-variable>) */
+class XMLPageVarSetFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyOn;
+ const ::rtl::OUString sPropertyOffset;
+
+ sal_Int16 nAdjust;
+ sal_Bool bActive;
+
+public:
+
+ TYPEINFO();
+
+ XMLPageVarSetFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** import macro fields (<text:execute-macro>) */
+class XMLMacroFieldImportContext : public XMLTextFieldImportContext
+{
+
+ const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyMacroName;
+ const ::rtl::OUString sPropertyScriptURL;
+ const ::rtl::OUString sPropertyLibraryName;
+
+ ::rtl::OUString sDescription;
+ SvXMLImportContextRef xEventContext;
+
+ ::rtl::OUString sMacro; // macro for old documents (pre 638i)
+
+ sal_Bool bMacroOK;
+ sal_Bool bDescriptionOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLMacroFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// for <office:events> children
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import reference fields (<text:reference-get>) */
+class XMLReferenceFieldImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyReferenceFieldPart;
+ const ::rtl::OUString sPropertyReferenceFieldSource;
+ const ::rtl::OUString sPropertySourceName;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ ::rtl::OUString sName;
+ sal_uInt16 nElementToken;
+ sal_Int16 nSource;
+ sal_Int16 nType;
+ sal_Int16 nSequenceNumber;
+
+ sal_Bool bNameOK;
+ sal_Bool bTypeOK;
+ sal_Bool bSeqNumberOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLReferenceFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nToken,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// start element
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import dde field declaration container (<text:dde-connection-decls>) */
+class XMLDdeFieldDeclsImportContext : public SvXMLImportContext
+{
+
+ SvXMLTokenMap aTokenMap;
+
+public:
+
+ TYPEINFO();
+
+ XMLDdeFieldDeclsImportContext(SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+
+
+};
+
+
+
+/** import dde field declaration (<text:dde-connection-decl>) */
+class XMLDdeFieldDeclImportContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sPropertyIsAutomaticUpdate;
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertyDDECommandType;
+ const ::rtl::OUString sPropertyDDECommandFile;
+ const ::rtl::OUString sPropertyDDECommandElement;
+
+ const SvXMLTokenMap& rTokenMap;
+
+public:
+
+ TYPEINFO();
+
+ XMLDdeFieldDeclImportContext(SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName,
+ const SvXMLTokenMap& rMap);
+
+ // create fieldmaster
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+};
+
+
+
+/** import dde fields (<text:dde-connection>) */
+class XMLDdeFieldImportContext : public XMLTextFieldImportContext
+{
+ ::rtl::OUString sName;
+ ::rtl::OUString sPropertyContent;
+public:
+
+ TYPEINFO();
+
+ XMLDdeFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// create textfield, attach master, and insert into document
+ virtual void EndElement();
+
+ /// empty method
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+};
+
+
+/** import sheet name fields (Calc) dde fields (<text:sheet-name>) */
+class XMLSheetNameImportContext : public XMLTextFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLSheetNameImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// no attributes -> empty method
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// no atributes -> empty method
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import hyperlinks as URL fields (Calc, Impress, Draw) (<office:a>) */
+class XMLUrlFieldImportContext : public XMLTextFieldImportContext
+{
+
+ const ::rtl::OUString sPropertyURL;
+ const ::rtl::OUString sPropertyTargetFrame;
+ const ::rtl::OUString sPropertyRepresentation;
+
+ ::rtl::OUString sURL;
+ ::rtl::OUString sFrame;
+ sal_Bool bFrameOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLUrlFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// no attributes -> empty method
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// no atributes -> empty method
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import bibliography info fields (<text:bibliography-mark>) */
+class XMLBibliographyFieldImportContext : public XMLTextFieldImportContext
+{
+
+ const ::rtl::OUString sPropertyFields;
+
+ ::std::vector< ::com::sun::star::beans::PropertyValue> aValues;
+
+public:
+
+ TYPEINFO();
+
+ XMLBibliographyFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attributes (fill aValues)
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ /// empty method; all attributes are handled in StartElement
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// convert aValues into sequence and set property
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ static const sal_Char* MapBibliographyFieldName(::rtl::OUString sName);
+
+};
+
+
+/** Import an annotation field (<text:annotation>) */
+class XMLAnnotationImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyAuthor;
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyDate;
+ const ::rtl::OUString sPropertyTextRange;
+
+ ::rtl::OUStringBuffer aAuthorBuffer;
+ ::rtl::OUStringBuffer aTextBuffer;
+ ::rtl::OUStringBuffer aDateBuffer;
+
+ com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > mxField;
+ com::sun::star::uno::Reference < com::sun::star::text::XTextCursor > mxCursor;
+ com::sun::star::uno::Reference < com::sun::star::text::XTextCursor > mxOldCursor;
+
+public:
+
+ TYPEINFO();
+
+ XMLAnnotationImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attributes
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// set properties
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ virtual SvXMLImportContext *CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+ virtual void EndElement();
+};
+
+
+/** Import a script field (<text:script>) */
+class XMLScriptImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyScriptType;
+ const ::rtl::OUString sPropertyURLContent;
+ const ::rtl::OUString sPropertyContent;
+
+ ::rtl::OUString sContent;
+ ::rtl::OUString sScriptType;
+
+ sal_Bool bContentOK;
+ sal_Bool bScriptTypeOK;
+ sal_Bool bUrlContent;
+
+public:
+
+ TYPEINFO();
+
+ XMLScriptImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attributes
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// set properties
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import measure fields (<text:measure>) */
+class XMLMeasureFieldImportContext : public XMLTextFieldImportContext
+{
+ sal_Int16 mnKind;
+public:
+
+ TYPEINFO();
+
+ XMLMeasureFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+/** dropdown field (filter legacy) */
+class XMLDropDownFieldImportContext : public XMLTextFieldImportContext
+{
+ std::vector<rtl::OUString> aLabels;
+ rtl::OUString sName;
+ rtl::OUString sHelp;
+ rtl::OUString sHint;
+ sal_Int32 nSelected;
+ bool bNameOK;
+ bool bHelpOK;
+ bool bHintOK;
+
+ const rtl::OUString sPropertyItems;
+ const rtl::OUString sPropertySelectedItem;
+ const rtl::OUString sPropertyName;
+ const rtl::OUString sPropertyHelp;
+ const rtl::OUString sPropertyToolTip;
+
+public:
+ TYPEINFO();
+
+ XMLDropDownFieldImportContext(SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+ virtual SvXMLImportContext* CreateChildContext(
+ USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import header fields (<draw:header>) */
+class XMLHeaderFieldImportContext : public XMLTextFieldImportContext
+{
+public:
+ TYPEINFO();
+
+ XMLHeaderFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import footer fields (<draw:footer>) */
+class XMLFooterFieldImportContext : public XMLTextFieldImportContext
+{
+public:
+ TYPEINFO();
+
+ XMLFooterFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/** import footer fields (<draw:date-and-time>) */
+class XMLDateTimeFieldImportContext : public XMLTextFieldImportContext
+{
+public:
+ TYPEINFO();
+
+ XMLDateTimeFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+class XMLCustomPropertyFieldImportContext : public XMLTextFieldImportContext
+{
+ ::rtl::OUString sName;
+ ::com::sun::star::uno::Any aValue;
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertyValue;
+
+public:
+
+ TYPEINFO();
+
+ XMLCustomPropertyFieldImportContext (SvXMLImport& rImport,
+ XMLTextImportHelper& rHlp,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& sLocalName);
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/txtimppr.hxx b/xmloff/inc/txtimppr.hxx
new file mode 100644
index 000000000000..776d9d14bd39
--- /dev/null
+++ b/xmloff/inc/txtimppr.hxx
@@ -0,0 +1,84 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TXTIMPPR_HXX
+#define _XMLOFF_TXTIMPPR_HXX
+
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlimppr.hxx>
+
+class XMLFontStylesContext;
+
+class XMLOFF_DLLPUBLIC XMLTextImportPropertyMapper : public SvXMLImportPropertyMapper
+{
+ sal_Int32 nSizeTypeIndex;
+ sal_Int32 nWidthTypeIndex;
+ SvXMLImportContextRef xFontDecls;
+
+ void FontFinished(
+ XMLPropertyState *pFontFamilyNameState,
+ XMLPropertyState *pFontStyleNameState,
+ XMLPropertyState *pFontFamilyState,
+ XMLPropertyState *pFontPitchState,
+ XMLPropertyState *pFontCharsetState ) const;
+
+ void FontDefaultsCheck(
+ XMLPropertyState*pFontFamilyName,
+ XMLPropertyState* pFontStyleName,
+ XMLPropertyState* pFontFamily,
+ XMLPropertyState* pFontPitch,
+ XMLPropertyState* pFontCharSet,
+ XMLPropertyState** ppNewFontStyleName,
+ XMLPropertyState** ppNewFontFamily,
+ XMLPropertyState** ppNewFontPitch,
+ XMLPropertyState** ppNewFontCharSet ) const;
+
+protected:
+ virtual bool handleSpecialItem(
+ XMLPropertyState& rProperty,
+ ::std::vector< XMLPropertyState >& rProperties,
+ const ::rtl::OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const;
+public:
+ XMLTextImportPropertyMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper,
+ SvXMLImport& rImport,
+ XMLFontStylesContext *pFontDecls = 0 );
+ virtual ~XMLTextImportPropertyMapper();
+
+ void SetFontDecls( XMLFontStylesContext *pFontDecls );
+
+ /** This method is called when all attributes have benn processed. It may be used to remove items that are incomplete */
+ virtual void finished(
+ ::std::vector< XMLPropertyState >& rProperties,
+ sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const;
+};
+
+#endif // _XMLOFF_XMLIMPPR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/txtlists.hxx b/xmloff/inc/txtlists.hxx
new file mode 100644
index 000000000000..793a2e112bd2
--- /dev/null
+++ b/xmloff/inc/txtlists.hxx
@@ -0,0 +1,197 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TXTLISTS_HXX
+#define _XMLOFF_TXTLISTS_HXX
+
+#include <rtl/ustring.hxx>
+#include <comphelper/stl_types.hxx>
+#include <map>
+#include <vector>
+#include <stack>
+#include <boost/utility.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <com/sun/star/container/XIndexReplace.hpp>
+#include <xmloff/xmlictxt.hxx>
+
+class SvXMLImport;
+class XMLTextListBlockContext;
+class XMLTextListItemContext;
+class XMLNumberedParaContext;
+
+class XMLTextListsHelper : private boost::noncopyable
+{
+ public:
+ XMLTextListsHelper();
+ ~XMLTextListsHelper();
+
+ /// list stack for importing:
+
+ /// push a list context on the list context stack
+ void PushListContext(XMLTextListBlockContext *i_pListBlock = 0);
+ void PushListContext(XMLNumberedParaContext *i_pNumberedParagraph);
+ /// pop the list context stack
+ void PopListContext();
+ /// peek at the top of the list context stack
+ void ListContextTop(XMLTextListBlockContext*& o_pListBlockContext,
+ XMLTextListItemContext*& o_pListItemContext,
+ XMLNumberedParaContext*& o_pNumberedParagraphContext );
+ /// set list item on top of the list context stack
+ void SetListItem( XMLTextListItemContext *pListItem );
+
+
+ // keeping track of processed lists for import and export
+ // --> OD 2008-08-15 #i92811#
+ // - add optional parameter <sListStyleDefaultListId>
+ void KeepListAsProcessed( ::rtl::OUString sListId,
+ ::rtl::OUString sListStyleName,
+ ::rtl::OUString sContinueListId,
+ ::rtl::OUString sListStyleDefaultListId = ::rtl::OUString() );
+ // <--
+
+ sal_Bool IsListProcessed( const ::rtl::OUString sListId ) const;
+ ::rtl::OUString GetListStyleOfProcessedList(
+ const ::rtl::OUString sListId ) const;
+ ::rtl::OUString GetContinueListIdOfProcessedList(
+ const ::rtl::OUString sListId ) const;
+ const ::rtl::OUString& GetLastProcessedListId() const;
+ const ::rtl::OUString& GetListStyleOfLastProcessedList() const;
+
+ ::rtl::OUString GenerateNewListId() const;
+
+ // --> OD 2008-08-15 #i92811#
+ // provide list id for a certain list block for import
+ ::rtl::OUString GetListIdForListBlock( XMLTextListBlockContext& rListBlock );
+ // <--
+
+
+ // keep track of continue list chain for export
+ void StoreLastContinuingList( ::rtl::OUString sListId,
+ ::rtl::OUString sContinuingListId );
+
+ ::rtl::OUString GetLastContinuingListId( ::rtl::OUString sListId ) const;
+
+ // keep track of opened list elements of a certain list for export
+ void PushListOnStack( ::rtl::OUString sListId,
+ ::rtl::OUString sListStyleName );
+ void PopListFromStack();
+ sal_Bool EqualsToTopListStyleOnStack( const ::rtl::OUString sListId ) const;
+
+ /** for importing numbered-paragraph
+ note that the ID namespace for numbered-paragraph and regular list
+ is distinct; we never combine a list and a n-p
+ */
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace>
+ EnsureNumberedParagraph(
+ SvXMLImport & i_rImport,
+ const ::rtl::OUString i_ListId,
+ sal_Int16 & io_rLevel, const ::rtl::OUString i_StyleName);
+
+ /// get ID of the last numbered-paragraph iff it has given style-name
+ ::rtl::OUString GetNumberedParagraphListId(
+ const sal_uInt16 i_Level,
+ const ::rtl::OUString i_StyleName);
+
+ /** Creates a NumRule from given style-name.
+ @param i_rImport the SvXMLImport
+ @param i_xNumRule parent num rule
+ @param i_ParentStyleName parent list style name
+ @param i_StyleName the list style name
+ @param io_rLevel the list level (may be reset if too large)
+ @param o_rRestartNumbering set to true if no style (defaulting)
+ @param io_rSetDefaults set to true if no style (defaulting)
+ */
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace> MakeNumRule(
+ SvXMLImport & i_rImport,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace>& i_xNumRule,
+ const ::rtl::OUString i_ParentStyleName,
+ const ::rtl::OUString i_StyleName,
+ sal_Int16 & io_rLevel,
+ sal_Bool* o_pRestartNumbering = 0,
+ sal_Bool* io_pSetDefaults = 0);
+
+ private:
+
+ /** list context: list, list-item, numbered-paragraph
+ XMLTextListBlockContext, XMLTextListItemContext,
+ XMLNumberedParaContext
+ */
+ typedef ::boost::tuple<SvXMLImportContextRef,
+ SvXMLImportContextRef, SvXMLImportContextRef> ListStackFrame_t;
+ ::std::stack< ListStackFrame_t > mListStack;
+
+ // container type for processed lists:
+ // map with <ListId> as key and pair( <ListStyleName, ContinueListId> )
+ // as value
+ typedef ::std::map< ::rtl::OUString,
+ ::std::pair< ::rtl::OUString, ::rtl::OUString >,
+ ::comphelper::UStringLess > tMapForLists;
+ tMapForLists* mpProcessedLists;
+ ::rtl::OUString msLastProcessedListId;
+ ::rtl::OUString msListStyleOfLastProcessedList;
+
+ // --> OD 2008-08-15 #i92811#
+ // additional container for processed lists.
+ // map with <ListStyleName> as key and pair( <ListId, ListStyleDefaultListId> )
+ // as value.
+ tMapForLists* mpMapListIdToListStyleDefaultListId;
+ // <--
+
+ // container type to build up continue list chain:
+ // map with <ListId> of master list as key and <ListId> of last list
+ // continuing the master list as value
+ typedef ::std::map< ::rtl::OUString, ::rtl::OUString,
+ ::comphelper::UStringLess > tMapForContinuingLists;
+ tMapForContinuingLists* mpContinuingLists;
+
+ // stack type for opened list elements and its list style:
+ // vector with pair( <ListId>, <ListStyleName> ) as value
+ typedef ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString > >
+ tStackForLists;
+ tStackForLists* mpListStack;
+
+ /// to connect numbered-paragraphs that have no list-id attribute:
+ /// vector of pair of style-name and list-id (indexed by level)
+ typedef ::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString > >
+ LastNumberedParagraphs_t;
+
+ LastNumberedParagraphs_t mLastNumberedParagraphs;
+
+ /// numbered-paragraphs
+ typedef ::std::vector< ::std::pair< ::rtl::OUString,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace > > > NumParaList_t;
+ ::std::map< ::rtl::OUString, NumParaList_t > mNPLists;
+
+};
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx
new file mode 100644
index 000000000000..3899aba81d98
--- /dev/null
+++ b/xmloff/inc/txtvfldi.hxx
@@ -0,0 +1,621 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/** @#file
+ *
+ * XML import of all variable related text fields plus database display field
+ */
+
+#ifndef _XMLOFF_TXTVFLDI_HXX
+#define _XMLOFF_TXTVFLDI_HXX
+
+#include "txtvfldi.hxx"
+#include "txtfldi.hxx"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+
+
+
+/// variable type (for XMLSetVarFieldImportContext)
+enum VarType
+{
+ VarTypeSimple,
+ VarTypeUserField,
+ VarTypeSequence
+};
+
+
+
+/** helper class: parses value-type and associated value attributes */
+class XMLValueImportHelper
+{
+
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyValue;
+ const ::rtl::OUString sPropertyFormula;
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyIsFixedLanguage;
+
+ SvXMLImport& rImport;
+ XMLTextImportHelper& rHelper;
+
+ ::rtl::OUString sValue; /// string value (only valid if bStringValueOK)
+ double fValue; /// double value (only valid if bFloatValueOK)
+ sal_Int32 nFormatKey; /// format key (only valid of bFormatOK)
+ ::rtl::OUString sFormula; /// formula string
+ ::rtl::OUString sDefault; /// default (see bStringDefault/bFormulaDef.)
+ sal_Bool bIsDefaultLanguage;/// format (of nFormatKey) has system language?
+
+ sal_Bool bStringType; /// is this a string (or a float) type?
+ sal_Bool bFormatOK; /// have we read a style:data-style-name attr.?
+ sal_Bool bTypeOK; /// have we read a value-type attribute?
+ sal_Bool bStringValueOK; /// have we read a string-value attr.?
+ sal_Bool bFloatValueOK; /// have we read any of the float attr.s?
+ sal_Bool bFormulaOK; /// have we read the formula attribute?
+
+ const sal_Bool bSetType; /// should PrepareField set the SetExp subtype?
+ const sal_Bool bSetValue; /// should PrepareField set content/value?
+ const sal_Bool bSetStyle; /// should PrepareField set NumberFormat?
+ const sal_Bool bSetFormula; /// should PrepareField set Formula?
+
+ const sal_Bool bStringDefault; /// default: string-value = content
+ const sal_Bool bFormulaDefault; /// default: formula = content
+
+public:
+ XMLValueImportHelper(
+ SvXMLImport& rImprt, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_Bool bType, /// process type (PrepareField)
+ sal_Bool bStyle, /// process data style (P.F.)
+ sal_Bool bValue, /// process value (Prep.Field)
+ sal_Bool bFormula); /// process formula (Prep.F.)
+
+ virtual ~XMLValueImportHelper();
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ /// is value a string (rather than double)?
+ inline sal_Bool IsStringValue() { return bStringType; }
+
+ /// has format been read?
+ inline sal_Bool IsFormatOK() { return bFormatOK; }
+
+ inline void SetDefault(const ::rtl::OUString& sStr) { sDefault = sStr; }
+};
+
+
+
+/**
+ * abstract parent class for all variable related fields
+ * - variable-set/get/decl (not -decls),
+ * - user-field-get/decl (not -decls),
+ * - sequence/-decl (not -decls),
+ * - expression,
+ * - text-input
+ *
+ * Processes the following attributes:
+ * - name
+ * - formula
+ * - display
+ * - value, value-type, data-style-name (via XMLValueImportHelper)
+ * - description.
+ *
+ * Each attribute has a corresponding member, a bool variable to indicate
+ * whether it was set or not, and a bool variable whether it should be set
+ * using the standard property name.
+ *
+ * bValid is set true, when name is found!
+ * (Most variable related fields are valid, if a name is
+ * found. However, some are always valid. In this case, setting bValid
+ * does not matter.)
+ */
+class XMLVarFieldImportContext : public XMLTextFieldImportContext
+{
+protected:
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyHint;
+ const ::rtl::OUString sPropertyHelp;
+ const ::rtl::OUString sPropertyTooltip;
+ const ::rtl::OUString sPropertyIsVisible;
+ const ::rtl::OUString sPropertyIsDisplayFormula;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+private:
+ ::rtl::OUString sName; /// name attribute
+ ::rtl::OUString sFormula; /// formula attribute
+ ::rtl::OUString sDescription; /// description
+ ::rtl::OUString sHelp; /// help text
+ ::rtl::OUString sHint; /// hint
+ XMLValueImportHelper aValueHelper; /// value, value-type, and style
+ sal_Bool bDisplayFormula; /// display formula?(rather than value)
+ sal_Bool bDisplayNone; /// hide field?
+
+ sal_Bool bNameOK; /// sName was set
+ sal_Bool bFormulaOK; /// sFormula was set
+ sal_Bool bDescriptionOK; /// sDescription was set
+ sal_Bool bHelpOK; /// sHelp was set
+ sal_Bool bHintOK; /// sHint was set
+ sal_Bool bDisplayOK; /// sDisplayFormula/-None were set
+
+ sal_Bool bSetName; /// set sName with ???-property
+ sal_Bool bSetFormula; /// set Formula property
+ sal_Bool bSetFormulaDefault; /// use content as default for formula
+ sal_Bool bSetDescription; /// set sDescription with Hint-property
+ sal_Bool bSetHelp;
+ sal_Bool bSetHint;
+ sal_Bool bSetVisible; /// set IsVisible
+ sal_Bool bSetDisplayFormula; /// set DisplayFormula (sub type???)
+ sal_Bool bSetPresentation; /// set presentation frm elem. content?
+
+public:
+
+ TYPEINFO();
+
+ XMLVarFieldImportContext(
+ // for XMLTextFieldImportContext:
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ const sal_Char* pServiceName, /// name of SO API service
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName, /// element name w/o prefix
+ // config variables for PrepareField behavior:
+ sal_Bool bName, /// set sName with ???-property
+ sal_Bool bFormula, /// set Formula property
+ sal_Bool bFormulaDefault, /// use content as default for formula
+ sal_Bool bDescription, /// set sDescription with Hint-property
+ sal_Bool bHelp,
+ sal_Bool bHint,
+ sal_Bool bVisible, /// set IsVisible (display attr)
+ sal_Bool bDisplayFormula, /// set ??? (display attr.)
+ sal_Bool bType, /// set value type with ???-property
+ sal_Bool bStyle, /// set data style (NumberFormat-Prop.)
+ sal_Bool bValue, /// set value with Content/Value-Prop.
+ sal_Bool bPresentation); /// set presentation from elem. content
+
+protected:
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+
+ // various accessor methods:
+ inline ::rtl::OUString GetName() { return sName; }
+ inline sal_Bool IsStringValue() { return aValueHelper.IsStringValue();}
+ inline sal_Bool IsNameOK() { return bNameOK; }
+ inline sal_Bool IsFormulaOK() { return bFormulaOK; }
+ inline sal_Bool IsDescriptionOK() { return bDescriptionOK; }
+ inline sal_Bool IsDisplayOK() { return bDisplayOK; }
+};
+
+
+
+/** import variable get fields (<text:variable-get>) */
+class XMLVariableGetFieldImportContext : public XMLVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableGetFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+
+protected:
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import expression fields (<text:expression>) */
+class XMLExpressionFieldImportContext : public XMLVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+
+public:
+
+ TYPEINFO();
+
+ XMLExpressionFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+protected:
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+/*** import text input fields (<text:text-input>) */
+class XMLTextInputFieldImportContext : public XMLVarFieldImportContext
+{
+ const ::rtl::OUString sPropertyContent;
+
+public:
+
+ TYPEINFO();
+
+ XMLTextInputFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& sLocalName); /// element name w/o prefix
+
+protected:
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+
+
+
+/**
+ * uperclass for variable/user-set, var/user-input, and sequence fields
+ * inds field master of appropriate type and attaches field to it.
+ */
+class XMLSetVarFieldImportContext : public XMLVarFieldImportContext
+{
+ const VarType eFieldType;
+
+public:
+
+ TYPEINFO();
+
+ XMLSetVarFieldImportContext(
+ // for XMLTextFieldImportContext:
+ SvXMLImport& rImport, /// see XMLTextFieldImportContext
+ XMLTextImportHelper& rHlp, /// see XMLTextFieldImportContext
+ const sal_Char* pServiceName, /// see XMLTextFieldImportContext
+ sal_uInt16 nPrfx, /// see XMLTextFieldImportContext
+ const ::rtl::OUString& rLocalName, /// see XMLTextFieldImportContext
+ // for finding appropriate field master (see EndElement())
+ VarType eVarType, /// variable type
+ // config variables:
+ sal_Bool bName, /// see XMLTextFieldImportContext
+ sal_Bool bFormula, /// see XMLTextFieldImportContext
+ sal_Bool bFormulaDefault, /// see XMLTextFieldImportContext
+ sal_Bool bDescription, /// see XMLTextFieldImportContext
+ sal_Bool bHelp, /// see XMLTextFieldImportContext
+ sal_Bool bHint, /// see XMLTextFieldImportContext
+ sal_Bool bVisible, /// see XMLTextFieldImportContext
+ sal_Bool bDisplayFormula, /// see XMLTextFieldImportContext
+ sal_Bool bType, /// see XMLTextFieldImportContext
+ sal_Bool bStyle, /// see XMLTextFieldImportContext
+ sal_Bool bValue, /// see XMLTextFieldImportContext
+ sal_Bool bPresentation); /// see XMLTextFieldImportContext
+
+protected:
+
+ /// create XTextField, attach master and insert into document;
+ /// also calls PrepareTextField
+ virtual void EndElement();
+
+ /// find appropriate field master
+ sal_Bool FindFieldMaster(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xMaster);
+};
+
+
+
+/** import variable set fields (<text:variable-set>) */
+class XMLVariableSetFieldImportContext : public XMLSetVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableSetFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** variable input fields (<text:variable-input>) */
+class XMLVariableInputFieldImportContext : public XMLSetVarFieldImportContext
+{
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyIsInput;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableInputFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** user fields (<text:user-field-get>) */
+class XMLUserFieldImportContext : public XMLSetVarFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLUserFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+};
+
+/** user input fields (<text:user-field-input>) */
+class XMLUserFieldInputImportContext : public XMLVarFieldImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLUserFieldInputImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** sequence fields (<text:sequence>) */
+class XMLSequenceFieldImportContext : public XMLSetVarFieldImportContext
+{
+ const ::rtl::OUString sPropertyFormula;
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertySequenceValue;
+ ::rtl::OUString sFormula;
+ ::rtl::OUString sNumFormat;
+ ::rtl::OUString sNumFormatSync;
+ ::rtl::OUString sRefName;
+
+ sal_Bool bRefNameOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLSequenceFieldImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// Text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+
+
+
+/**
+ * variable declaration container for all variable fields
+ * (variable-decls, user-field-decls, sequence-decls)
+ */
+class XMLVariableDeclsImportContext : public SvXMLImportContext
+{
+ enum VarType eVarDeclsContextType;
+ XMLTextImportHelper& rImportHelper;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableDeclsImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName, /// element name w/o prefix
+ enum VarType eVarType); /// variable type
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+};
+
+/**
+ * variable field declarations
+ * (variable-decl, user-field-decl, sequence-decl)
+ */
+class XMLVariableDeclImportContext : public SvXMLImportContext
+{
+ const ::rtl::OUString sPropertyName;
+ const ::rtl::OUString sPropertySubType;
+ const ::rtl::OUString sPropertyNumberingLevel;
+ const ::rtl::OUString sPropertyNumberingSeparator;
+ const ::rtl::OUString sPropertyIsExpression;
+
+ ::rtl::OUString sName;
+ XMLValueImportHelper aValueHelper;
+ sal_Int8 nNumLevel;
+ sal_Unicode cSeparationChar;
+
+public:
+
+ TYPEINFO();
+
+ XMLVariableDeclImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName, /// element name w/o prefix
+ const ::com::sun::star::uno::Reference< /// list of element attributes
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ enum VarType eVarType); /// variable type
+
+ /// get field master for name and rename if appropriate
+ static sal_Bool FindFieldMaster(::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xMaster,
+ SvXMLImport& rImport,
+ XMLTextImportHelper& rHelper,
+ const ::rtl::OUString& sVarName,
+ enum VarType eVarType);
+};
+
+
+
+/** import table formula fields (deprecated; for Writer 2.0 compatibility) */
+class XMLTableFormulaImportContext : public XMLTextFieldImportContext
+{
+ const ::rtl::OUString sPropertyNumberFormat;
+ const ::rtl::OUString sPropertyContent;
+ const ::rtl::OUString sPropertyIsShowFormula;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+
+ XMLValueImportHelper aValueHelper;
+
+ ::rtl::OUString sFormula;
+ sal_Bool bFormulaOK;
+
+ sal_Bool bIsShowFormula;
+
+public:
+
+ TYPEINFO();
+
+ XMLTableFormulaImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+ virtual ~XMLTableFormulaImportContext();
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// prepare XTextField for insertion into document
+ virtual void PrepareField(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropertySet);
+};
+
+
+
+/** import database display fields (<text:database-display>) */
+class XMLDatabaseDisplayImportContext : public XMLDatabaseFieldImportContext
+{
+ const ::rtl::OUString sPropertyColumnName;
+ const ::rtl::OUString sPropertyDatabaseFormat;
+ const ::rtl::OUString sPropertyCurrentPresentation;
+ const ::rtl::OUString sPropertyIsVisible;
+
+ XMLValueImportHelper aValueHelper;
+
+ ::rtl::OUString sColumnName;
+ sal_Bool bColumnOK;
+
+ sal_Bool bDisplay;
+ sal_Bool bDisplayOK;
+
+public:
+
+ TYPEINFO();
+
+ XMLDatabaseDisplayImportContext(
+ SvXMLImport& rImport, /// XML Import
+ XMLTextImportHelper& rHlp, /// text import helper
+ sal_uInt16 nPrfx, /// namespace prefix
+ const ::rtl::OUString& rLocalName); /// element name w/o prefix
+
+protected:
+
+ /// process attribute values
+ virtual void ProcessAttribute( sal_uInt16 nAttrToken,
+ const ::rtl::OUString& sAttrValue );
+
+ /// create, prepare and insert database field master and database field
+ virtual void EndElement();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/unoatrcn.hxx b/xmloff/inc/unoatrcn.hxx
new file mode 100644
index 000000000000..2cd1b8197227
--- /dev/null
+++ b/xmloff/inc/unoatrcn.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+
+extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvUnoAttributeContainer_CreateInstance();
+
+class SvXMLAttrContainerData;
+
+class XMLOFF_DLLPUBLIC SvUnoAttributeContainer:
+ public ::cppu::WeakAggImplHelper3<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XUnoTunnel,
+ ::com::sun::star::container::XNameContainer >
+{
+private:
+ SvXMLAttrContainerData* mpContainer;
+
+ SAL_DLLPRIVATE sal_uInt16 getIndexByName(const ::rtl::OUString& aName )
+ const;
+
+public:
+ SvUnoAttributeContainer( SvXMLAttrContainerData* pContainer = NULL );
+ virtual ~SvUnoAttributeContainer();
+
+ SvXMLAttrContainerData* GetContainerImpl() const { return mpContainer; }
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ static SvUnoAttributeContainer* getImplementation( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInt ) throw();
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::container::XElementAccess
+ virtual ::com::sun::star::uno::Type SAL_CALL getElementType(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasElements(void) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XNameAccess
+ virtual ::com::sun::star::uno::Any SAL_CALL getByName(const ::rtl::OUString& aName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName(const ::rtl::OUString& aName) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XNameReplace
+ virtual void SAL_CALL replaceByName(const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::container::XNameContainer
+ virtual void SAL_CALL insertByName(const ::rtl::OUString& aName, const ::com::sun::star::uno::Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL removeByName(const ::rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::lang::XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
+
+ friend ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SvUnoAttributeContainer_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr ) throw( ::com::sun::star::uno::Exception );
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx b/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx
new file mode 100644
index 000000000000..bc8e3a7cf992
--- /dev/null
+++ b/xmloff/inc/unointerfacetouniqueidentifiermapper.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#ifndef __COMPHELPER_UNOINTERFACETOUNIQUEIDENTIFIERMAPPER__
+#define __COMPHELPER_UNOINTERFACETOUNIQUEIDENTIFIERMAPPER__
+
+#include <map>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/XInterface.hpp>
+
+namespace comphelper
+{
+
+typedef ::std::map< rtl::OUString, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > IdMap_t;
+
+class UnoInterfaceToUniqueIdentifierMapper
+{
+public:
+ UnoInterfaceToUniqueIdentifierMapper();
+
+ /** returns a unique identifier for the given uno object. IF a uno object is
+ registered more than once, the returned identifier is always the same.
+ */
+ const rtl::OUString& registerReference( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rInterface );
+
+ /** registers the given uno object with the given identifier.
+
+ @returns
+ false, if the given identifier already exists and is not associated with the given interface
+ */
+ bool registerReference( const rtl::OUString& rIdentifier, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rInterface );
+
+ /** @returns
+ the identifier for the given uno object. If this uno object is not already
+ registered, an empty string is returned
+ */
+ const rtl::OUString& getIdentifier( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rInterface ) const;
+
+ /** @returns
+ the uno object that is registered with the given identifier. If no uno object
+ is registered with the given identifier, an empty reference is returned.
+ */
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& getReference( const rtl::OUString& rIdentifier ) const;
+
+private:
+ bool findReference( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& rInterface, IdMap_t::const_iterator& rIter ) const;
+ bool findIdentifier( const rtl::OUString& rIdentifier, IdMap_t::const_iterator& rIter ) const;
+
+ IdMap_t maEntries;
+ sal_Int32 mnNextId;
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xexptran.hxx b/xmloff/inc/xexptran.hxx
new file mode 100644
index 000000000000..1036650bb2ca
--- /dev/null
+++ b/xmloff/inc/xexptran.hxx
@@ -0,0 +1,204 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _XEXPTRANSFORM_HXX
+#define _XEXPTRANSFORM_HXX
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/drawing/PointSequenceSequence.hpp>
+#include <com/sun/star/drawing/PointSequence.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/drawing/FlagSequenceSequence.hpp>
+#include <com/sun/star/drawing/FlagSequence.hpp>
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#include <tools/mapunit.hxx>
+
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+struct ImpSdXMLExpTransObj2DBase;
+struct ImpSdXMLExpTransObj3DBase;
+class SvXMLUnitConverter;
+
+namespace basegfx
+{
+ class B2DTuple;
+ class B2DHomMatrix;
+ class B3DTuple;
+ class B3DHomMatrix;
+} // end of namespace basegfx
+
+//////////////////////////////////////////////////////////////////////////////
+
+typedef ::std::vector< ImpSdXMLExpTransObj2DBase* > ImpSdXMLExpTransObj2DBaseList;
+typedef ::std::vector< ImpSdXMLExpTransObj3DBase* > ImpSdXMLExpTransObj3DBaseList;
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExTransform2D
+{
+ ImpSdXMLExpTransObj2DBaseList maList;
+ rtl::OUString msString;
+
+ void EmptyList();
+
+public:
+ SdXMLImExTransform2D() {}
+ SdXMLImExTransform2D(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+ ~SdXMLImExTransform2D() { EmptyList(); }
+
+ void AddRotate(double fNew);
+ void AddScale(const ::basegfx::B2DTuple& rNew);
+ void AddTranslate(const ::basegfx::B2DTuple& rNew);
+ void AddSkewX(double fNew);
+ void AddSkewY(double fNew);
+ void AddMatrix(const ::basegfx::B2DHomMatrix& rNew);
+
+ bool NeedsAction() const { return !maList.empty(); }
+ void GetFullTransform(::basegfx::B2DHomMatrix& rFullTrans);
+ const rtl::OUString& GetExportString(const SvXMLUnitConverter& rConv);
+ void SetString(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExTransform3D
+{
+ ImpSdXMLExpTransObj3DBaseList maList;
+ rtl::OUString msString;
+
+ void EmptyList();
+
+public:
+ SdXMLImExTransform3D() {}
+ SdXMLImExTransform3D(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+ ~SdXMLImExTransform3D() { EmptyList(); }
+
+ void AddRotateX(double fNew);
+ void AddRotateY(double fNew);
+ void AddRotateZ(double fNew);
+ void AddScale(const ::basegfx::B3DTuple& rNew);
+ void AddTranslate(const ::basegfx::B3DTuple& rNew);
+ void AddMatrix(const ::basegfx::B3DHomMatrix& rNew);
+
+ void AddHomogenMatrix(const com::sun::star::drawing::HomogenMatrix& xHomMat);
+ bool NeedsAction() const { return !maList.empty(); }
+ void GetFullTransform(::basegfx::B3DHomMatrix& rFullTrans);
+ bool GetFullHomogenTransform(com::sun::star::drawing::HomogenMatrix& xHomMat);
+ const rtl::OUString& GetExportString(const SvXMLUnitConverter& rConv);
+ void SetString(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExViewBox
+{
+ rtl::OUString msString;
+ sal_Int32 mnX;
+ sal_Int32 mnY;
+ sal_Int32 mnW;
+ sal_Int32 mnH;
+
+public:
+ SdXMLImExViewBox(sal_Int32 nX = 0L, sal_Int32 nY = 0L, sal_Int32 nW = 1000L, sal_Int32 nH = 1000L);
+ SdXMLImExViewBox(const rtl::OUString& rNew, const SvXMLUnitConverter& rConv);
+
+ sal_Int32 GetX() const { return mnX; }
+ sal_Int32 GetY() const { return mnY; }
+ sal_Int32 GetWidth() const { return mnW; }
+ sal_Int32 GetHeight() const { return mnH; }
+ const rtl::OUString& GetExportString();
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExPointsElement
+{
+ rtl::OUString msString;
+ com::sun::star::drawing::PointSequenceSequence maPoly;
+
+public:
+ SdXMLImExPointsElement(com::sun::star::drawing::PointSequence* pPoints,
+ const SdXMLImExViewBox& rViewBox,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ // #96328#
+ const bool bClosed = true);
+ SdXMLImExPointsElement(const rtl::OUString& rNew,
+ const SdXMLImExViewBox& rViewBox,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv);
+
+ const rtl::OUString& GetExportString() const { return msString; }
+ const com::sun::star::drawing::PointSequenceSequence& GetPointSequenceSequence() const { return maPoly; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SdXMLImExSvgDElement
+{
+ rtl::OUString msString;
+ const SdXMLImExViewBox& mrViewBox;
+ bool mbIsClosed;
+ bool mbIsCurve;
+
+ sal_Int32 mnLastX;
+ sal_Int32 mnLastY;
+
+ com::sun::star::drawing::PointSequenceSequence maPoly;
+ com::sun::star::drawing::FlagSequenceSequence maFlag;
+
+public:
+ SdXMLImExSvgDElement(const SdXMLImExViewBox& rViewBox);
+ SdXMLImExSvgDElement(const rtl::OUString& rNew,
+ const SdXMLImExViewBox& rViewBox,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ const SvXMLUnitConverter& rConv);
+
+ void AddPolygon(
+ com::sun::star::drawing::PointSequence* pPoints,
+ com::sun::star::drawing::FlagSequence* pFlags,
+ const com::sun::star::awt::Point& rObjectPos,
+ const com::sun::star::awt::Size& rObjectSize,
+ bool bClosed = false, bool bRelative = true);
+
+ const rtl::OUString& GetExportString() const { return msString; }
+ bool IsClosed() const { return mbIsClosed; }
+ bool IsCurve() const { return mbIsCurve; }
+ const com::sun::star::drawing::PointSequenceSequence& GetPointSequenceSequence() const { return maPoly; }
+ const com::sun::star::drawing::FlagSequenceSequence& GetFlagSequenceSequence() const { return maFlag; }
+};
+
+
+#endif // _XEXPTRANSFORM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xformsexport.hxx b/xmloff/inc/xformsexport.hxx
new file mode 100644
index 000000000000..e29ef4d5ece7
--- /dev/null
+++ b/xmloff/inc/xformsexport.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XFORMSEXPORT_HXX
+#define _XMLOFF_XFORMSEXPORT_HXX
+
+#include "xmloff/dllapi.h"
+
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace uno { template<typename T> class Reference; }
+ namespace uno { template<typename T> class Sequence; }
+ namespace frame { class XModel; }
+ namespace beans { class XPropertySet; struct PropertyValue; }
+ namespace container { class XNameAccess; }
+} } }
+namespace rtl { class OUString; }
+
+
+/** export an XForms model. */
+void SAL_DLLPRIVATE exportXForms( SvXMLExport& );
+
+rtl::OUString SAL_DLLPRIVATE getXFormsBindName( const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xBinding );
+
+rtl::OUString SAL_DLLPRIVATE getXFormsListBindName( const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xBinding );
+
+rtl::OUString SAL_DLLPRIVATE getXFormsSubmissionName( const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xBinding );
+
+
+/** returns the settings of the given XForms container, to be exported as document specific settings
+*/
+void XMLOFF_DLLPUBLIC getXFormsSettings(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rXForms,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _out_rSettings
+ );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xformsimport.hxx b/xmloff/inc/xformsimport.hxx
new file mode 100644
index 000000000000..f6f0e1a19428
--- /dev/null
+++ b/xmloff/inc/xformsimport.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XFORMSIMPORT_HXX
+#define _XMLOFF_XFORMSIMPORT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+
+#include <tools/solar.h> // for USHORT
+#include <com/sun/star/uno/Reference.hxx>
+
+class SvXMLImport;
+class SvXMLImportContext;
+namespace rtl { class OUString; }
+
+#if defined(WNT) && _MSC_VER < 1400
+namespace std { template<typename A, typename B> struct pair; }
+#endif
+
+namespace com { namespace sun { namespace star {
+ namespace uno { template<typename T> class Reference; }
+ namespace beans { class XPropertySet; struct PropertyValue; }
+ namespace frame { class XModel; }
+ namespace container { class XNameAccess; }
+} } }
+
+/** create import context for xforms:model element. */
+XMLOFF_DLLPUBLIC SvXMLImportContext* createXFormsModelContext(
+ SvXMLImport& rImport,
+ USHORT nPrefix,
+ const rtl::OUString& rLocalName );
+
+/** perform the actual binding of an XForms-binding with the suitable control
+ * @param document which contains the XForms-model(s)
+ * @param pair<XForms binding ID, reference to control>
+ */
+void bindXFormsValueBinding(
+ com::sun::star::uno::Reference<com::sun::star::frame::XModel>,
+ std::pair<com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>,rtl::OUString> );
+
+
+/** perform the actual binding of an XForms-binding as list source with a list control
+ * @param document which contains the XForms-model(s)
+ * @param pair<XForms binding ID, reference to control>
+ */
+void bindXFormsListBinding(
+ com::sun::star::uno::Reference<com::sun::star::frame::XModel>,
+ std::pair<com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>,rtl::OUString> );
+
+/** perform the actual binding of an XForms submission with the suitable control
+ * @param document which contains the XForms-model(s)
+ * @param pair<XForms submission ID, reference to control>
+ */
+void bindXFormsSubmission(
+ com::sun::star::uno::Reference<com::sun::star::frame::XModel>,
+ std::pair<com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>,rtl::OUString> );
+
+/** applies the given settings to the given XForms container
+*/
+void XMLOFF_DLLPUBLIC applyXFormsSettings(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rXForms,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rSettings
+ );
+
+#endif
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmlcnitm.hxx b/xmloff/inc/xmlcnitm.hxx
new file mode 100644
index 000000000000..1940505a31c8
--- /dev/null
+++ b/xmloff/inc/xmlcnitm.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLCNITM_HXX
+#define _XMLOFF_XMLCNITM_HXX
+
+#include <svl/poolitem.hxx>
+
+class SvXMLNamespaceMap;
+namespace rtl { class OUString; }
+
+//============================================================================
+
+class SvXMLAttrContainerItem_Impl;
+
+class SvXMLAttrContainerItem: public SfxPoolItem
+{
+ SvXMLAttrContainerItem_Impl *pImpl;
+
+public:
+ TYPEINFO();
+
+ SvXMLAttrContainerItem( sal_uInt16 nWhich = 0 );
+ SvXMLAttrContainerItem( const SvXMLAttrContainerItem& );
+ virtual ~SvXMLAttrContainerItem();
+
+ virtual int operator==( const SfxPoolItem& ) const;
+ using SfxPoolItem::Compare;
+ virtual int Compare( const SfxPoolItem &rWith ) const;
+
+ virtual SfxItemPresentation GetPresentation(
+ SfxItemPresentation ePresentation,
+ SfxMapUnit eCoreMetric,
+ SfxMapUnit ePresentationMetric,
+ XubString &rText,
+ const IntlWrapper *pIntlWrapper = 0 ) const;
+
+ virtual sal_uInt16 GetVersion( sal_uInt16 nFileFormatVersion ) const;
+
+ virtual bool QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+ virtual bool PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+
+ virtual SfxPoolItem *Clone( SfxItemPool * = 0) const
+ { return new SvXMLAttrContainerItem( *this ); }
+
+ sal_Bool AddAttr( const ::rtl::OUString& rLName,
+ const ::rtl::OUString& rValue );
+ sal_Bool AddAttr( const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rNamespace,
+ const ::rtl::OUString& rLName,
+ const ::rtl::OUString& rValue );
+
+ sal_uInt16 GetAttrCount() const;
+ ::rtl::OUString GetAttrNamespace( sal_uInt16 i ) const;
+ ::rtl::OUString GetAttrPrefix( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetAttrLName( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetAttrValue( sal_uInt16 i ) const;
+
+ sal_uInt16 GetFirstNamespaceIndex() const;
+ sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const;
+ const ::rtl::OUString& GetNamespace( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetPrefix( sal_uInt16 i ) const;
+};
+
+#endif // _XMLOFF_XMLCNITM_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmlehelp.hxx b/xmloff/inc/xmlehelp.hxx
new file mode 100644
index 000000000000..3b844b9189a7
--- /dev/null
+++ b/xmloff/inc/xmlehelp.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEHELP_HXX
+#define _XMLOFF_XMLEHELP_HXX
+
+#include <tools/mapunit.hxx>
+
+namespace rtl { class OUStringBuffer; }
+
+class SvXMLExportHelper
+{
+public:
+ static void AddLength( sal_Int32 nValue, MapUnit eValueUnit,
+ ::rtl::OUStringBuffer& rOut,
+ MapUnit eOutUnit );
+ static void AddPercentage( sal_Int32 nVal, ::rtl::OUStringBuffer& rOut );
+ static double GetConversionFactor(::rtl::OUStringBuffer& rUnit,
+ const MapUnit eCoreUnit, const MapUnit eDestUnit);
+ static MapUnit GetUnitFromString(const ::rtl::OUString& rString,
+ MapUnit eDefaultUnit);
+};
+
+
+
+#endif // _XMLOFF_XMLEHELP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmlerror.hxx b/xmloff/inc/xmlerror.hxx
new file mode 100644
index 000000000000..ef8e1140cb24
--- /dev/null
+++ b/xmloff/inc/xmlerror.hxx
@@ -0,0 +1,169 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLERROR_HXX
+#define _XMLOFF_XMLERROR_HXX
+
+#include <com/sun/star/xml/sax/SAXParseException.hpp>
+#include <sal/types.h>
+
+// STL includes
+#include <vector>
+
+
+
+// masks for the error ID fields
+#define XMLERROR_MASK_FLAG 0xF0000000
+#define XMLERROR_MASK_CLASS 0x00FF0000
+#define XMLERROR_MASK_NUMBER 0x0000FFFF
+
+// error flags:
+#define XMLERROR_FLAG_WARNING 0x10000000
+#define XMLERROR_FLAG_ERROR 0x20000000
+#define XMLERROR_FLAG_SEVERE 0x40000000
+
+// error classes: Error ID
+#define XMLERROR_CLASS_IO 0x00010000
+#define XMLERROR_CLASS_FORMAT 0x00020000
+#define XMLERROR_CLASS_API 0x00040000
+#define XMLERROR_CLASS_OTHER 0x00080000
+
+
+// error numbers, listed by error class
+// Within each class, errors should be numbered consecutively. Please
+// allways add to error code below the appropriate comment.
+
+// I/O errors:
+
+// format errors:
+#define XMLERROR_SAX ( XMLERROR_CLASS_FORMAT | 0x00000001 )
+#define XMLERROR_STYLE_ATTR_VALUE ( XMLERROR_CLASS_FORMAT | 0x00000002 )
+#define XMLERROR_NO_INDEX_ALLOWED_HERE ( XMLERROR_CLASS_FORMAT | 0x00000003 )
+#define XMLERROR_PARENT_STYLE_NOT_ALLOWED ( XMLERROR_CLASS_FORMAT | 0x00000004 )
+#define XMLERROR_ILLEGAL_EVENT (XMLERROR_CLASS_FORMAT | 0x00000005 )
+#define XMLERROR_NAMESPACE_TROUBLE (XMLERROR_CLASS_FORMAT | 0x00000006 )
+
+#define XMLERROR_XFORMS_NO_SCHEMA_SUPPORT ( XMLERROR_CLASS_FORMAT | XMLERROR_FLAG_WARNING | 0x00000007 )
+#define XMLERROR_XFORMS_UNKNOWN ( XMLERROR_CLASS_FORMAT | XMLERROR_FLAG_WARNING | 0x00000008 )
+#define XMLERROR_XFORMS_ONLY_ONE_INSTANCE_ELEMENT ( XMLERROR_CLASS_FORMAT | XMLERROR_FLAG_WARNING | 0x00000009 )
+#define XMLERROR_UNKNOWN_ATTRIBUTE ( XMLERROR_CLASS_FORMAT | XMLERROR_FLAG_WARNING | 0x0000000a )
+#define XMLERROR_UNKNOWN_ELEMENT ( XMLERROR_CLASS_FORMAT | XMLERROR_FLAG_WARNING | 0x0000000b )
+#define XMLERROR_UNKNOWN_CHARACTERS ( XMLERROR_CLASS_FORMAT | XMLERROR_FLAG_WARNING | 0x0000000c )
+#define XMLERROR_UNKNWON_ROOT (XMLERROR_CLASS_FORMAT | 0x0000000d )
+
+// API errors:
+#define XMLERROR_STYLE_PROP_VALUE ( XMLERROR_CLASS_API | 0x00000001 )
+#define XMLERROR_STYLE_PROP_UNKNOWN ( XMLERROR_CLASS_API | 0x00000002 )
+#define XMLERROR_STYLE_PROP_OTHER ( XMLERROR_CLASS_API | 0x00000003 )
+#define XMLERROR_API ( XMLERROR_CLASS_API | 0x00000004 )
+
+// other errors:
+#define XMLERROR_CANCEL ( XMLERROR_CLASS_OTHER | 0x00000001 )
+
+
+
+// 16bit error flag constants for use in the
+// SvXMLExport/SvXMLImport error flags
+#define ERROR_NO 0x0000
+#define ERROR_DO_NOTHING 0x0001
+#define ERROR_ERROR_OCCURED 0x0002
+#define ERROR_WARNING_OCCURED 0x0004
+
+
+
+
+// forward declarations
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star {
+ namespace uno { template<class X> class Sequence; }
+ namespace uno { template<class X> class Reference; }
+ namespace xml { namespace sax { class XLocator; } }
+} } }
+class ErrorRecord;
+
+
+
+/**
+ * The XMLErrors is used to collect all errors and warnings that occur
+ * for appropriate processing.
+ */
+class XMLErrors
+{
+ /// definition of type for error list
+ typedef ::std::vector<ErrorRecord> ErrorList;
+
+ ErrorList aErrors; /// list of error records
+
+public:
+
+ XMLErrors();
+ ~XMLErrors();
+
+ /// add a new entry to the list of error messages
+ void AddRecord(
+ sal_Int32 nId, /// error ID == error flags + error class + error number
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString> & rParams, /// parameters for error message
+ const ::rtl::OUString& rExceptionMessage, /// original exception string
+ sal_Int32 nRow, /// XLocator: file row number
+ sal_Int32 nColumn, /// XLocator: file column number
+ const ::rtl::OUString& rPublicId, /// XLocator: file public ID
+ const ::rtl::OUString& rSystemId ); /// XLocator: file system ID
+
+ void AddRecord(
+ sal_Int32 nId, /// error ID == error flags + error class + error number
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString> & rParams, /// parameters for error message
+ const ::rtl::OUString& rExceptionMessage, /// original exception string
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XLocator> & rLocator); /// location
+
+ void AddRecord(
+ sal_Int32 nId, /// error ID == error flags + error class + error number
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString> & rParams, /// parameters for error message
+ const ::rtl::OUString& rExceptionMessage); /// original exception string
+
+ void AddRecord(
+ sal_Int32 nId, /// error ID == error flags + error class + error number
+ const ::com::sun::star::uno::Sequence<
+ ::rtl::OUString> & rParams); /// parameters for error message
+
+
+ /**
+ * throw a SAXParseException that describes the first error that matches
+ * the given mask
+ */
+ void ThrowErrorAsSAXException( sal_Int32 nIdMask )
+ throw( ::com::sun::star::xml::sax::SAXParseException );
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
new file mode 100644
index 000000000000..c7d346638599
--- /dev/null
+++ b/xmloff/inc/xmlnmspe.hxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLNMSPE_HXX
+#define _XMLOFF_XMLNMSPE_HXX
+
+#include <sal/types.h>
+
+#define XML_NAMESPACE( prefix, key ) \
+const sal_uInt16 XML_NAMESPACE_##prefix = key; \
+const sal_uInt16 XML_NAMESPACE_##prefix##_IDX = key;
+
+#define XML_OLD_NAMESPACE( prefix, index ) \
+const sal_uInt16 XML_OLD_NAMESPACE_##prefix##_IDX = \
+ (_XML_OLD_NAMESPACE_BASE+index);
+
+// current namespaces
+// These namespaces have the same index in the namespace table as prefix used.
+// If a namespace is added, _XML_OLD_NAMESPACE_BASE has to be adjusted!
+XML_NAMESPACE( OFFICE, 0U )
+XML_NAMESPACE( STYLE, 1U )
+XML_NAMESPACE( TEXT , 2U )
+XML_NAMESPACE( TABLE, 3U )
+XML_NAMESPACE( DRAW , 4U )
+XML_NAMESPACE( FO , 5U )
+XML_NAMESPACE( XLINK, 6U )
+XML_NAMESPACE( DC , 7U )
+XML_NAMESPACE( META , 8U )
+XML_NAMESPACE( NUMBER, 9U )
+XML_NAMESPACE( PRESENTATION, 10U )
+XML_NAMESPACE( SVG, 11U )
+XML_NAMESPACE( CHART, 12U )
+XML_NAMESPACE( DR3D, 13U )
+XML_NAMESPACE( MATH, 14U )
+XML_NAMESPACE( FORM, 15U )
+XML_NAMESPACE( SCRIPT, 16U )
+XML_NAMESPACE( BLOCKLIST, 17U )
+XML_NAMESPACE( FRAMEWORK, 18U )
+XML_NAMESPACE( CONFIG, 19U )
+XML_NAMESPACE( OOO, 20U )
+XML_NAMESPACE( OOOW, 21U )
+XML_NAMESPACE( OOOC, 22U )
+XML_NAMESPACE( DOM, 23U )
+XML_NAMESPACE( TCD, 24U ) // text conversion dictionary
+XML_NAMESPACE( DB, 25U )
+XML_NAMESPACE( DLG, 26U )
+XML_NAMESPACE( XFORMS, 27U )
+XML_NAMESPACE( XSD, 28U )
+XML_NAMESPACE( XSI, 29U )
+XML_NAMESPACE( SMIL, 30U )
+XML_NAMESPACE( ANIMATION, 31U )
+XML_NAMESPACE( XML, 32U )
+XML_NAMESPACE( REPORT, 33U )
+XML_NAMESPACE( OF, 34U ) // OpenFormula aka ODFF
+XML_NAMESPACE( XHTML, 35U )
+XML_NAMESPACE( GRDDL, 36U )
+
+// namespaces for odf extended formats
+
+#define XML_NAMESPACE_EXT( prefix, key ) \
+const sal_uInt16 XML_NAMESPACE_##prefix##_EXT = key; \
+const sal_uInt16 XML_NAMESPACE_##prefix##_EXT_IDX = key;
+
+XML_NAMESPACE_EXT( OFFICE, 37U )
+XML_NAMESPACE_EXT( TABLE, 38U )
+XML_NAMESPACE_EXT( CHART, 39U )
+XML_NAMESPACE_EXT( DRAW, 40U )
+
+#define _XML_OLD_NAMESPACE_BASE 41U
+
+// namespaces used in the technical preview (SO 5.2)
+XML_OLD_NAMESPACE( FO, 0U )
+XML_OLD_NAMESPACE( XLINK, 1U )
+
+XML_OLD_NAMESPACE( OFFICE, 2U )
+XML_OLD_NAMESPACE( STYLE, 3U )
+XML_OLD_NAMESPACE( TEXT, 4U )
+XML_OLD_NAMESPACE( TABLE, 5U )
+XML_OLD_NAMESPACE( META, 6U )
+
+// experimental namespaces
+XML_NAMESPACE( FIELD, 100U )
+XML_NAMESPACE( CSS3TEXT, 103U ) // CSS Text Level 3
+XML_NAMESPACE( FORMX, 101U ) // form interop extensions
+
+
+#endif // _XMLOFF_XMLNMSPE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/DocumentSettingsContext.hxx b/xmloff/inc/xmloff/DocumentSettingsContext.hxx
new file mode 100644
index 000000000000..171bbd1c4061
--- /dev/null
+++ b/xmloff/inc/xmloff/DocumentSettingsContext.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_DOCUMENTSETTINGSCONTEXT_HXX
+#define _XMLOFF_DOCUMENTSETTINGSCONTEXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlictxt.hxx>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+#include <memory>
+
+struct XMLDocumentSettingsContext_Data;
+
+class XMLOFF_DLLPUBLIC XMLDocumentSettingsContext : public SvXMLImportContext
+{
+ ::std::auto_ptr< XMLDocumentSettingsContext_Data > m_pData;
+
+public:
+ XMLDocumentSettingsContext(SvXMLImport& rImport, USHORT nPrfx, const rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList);
+ virtual ~XMLDocumentSettingsContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void EndElement();
+
+private:
+ XMLDocumentSettingsContext(); // never implemented
+ XMLDocumentSettingsContext( const XMLDocumentSettingsContext& ); // never implemented
+ XMLDocumentSettingsContext& operator=( const XMLDocumentSettingsContext& ); // never implemented
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/EnumPropertyHdl.hxx b/xmloff/inc/xmloff/EnumPropertyHdl.hxx
new file mode 100644
index 000000000000..8d67995284fb
--- /dev/null
+++ b/xmloff/inc/xmloff/EnumPropertyHdl.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ENUMPROPERTYHANDLER_HXX
+#define _XMLOFF_ENUMPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <xmloff/xmlement.hxx>
+
+/**
+ PropertyHandler for a generic xml enumeration type:
+*/
+class XMLOFF_DLLPUBLIC XMLEnumPropertyHdl : public XMLPropertyHandler
+{
+private:
+ const SvXMLEnumMapEntry* mpEnumMap;
+ const ::com::sun::star::uno::Type & mrType;
+
+public:
+ XMLEnumPropertyHdl( const SvXMLEnumMapEntry* pEnumMap, const ::com::sun::star::uno::Type & rType ) : mpEnumMap( pEnumMap ), mrType( rType ) {}
+ virtual ~XMLEnumPropertyHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_ENUMPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx b/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx
new file mode 100644
index 000000000000..2cb3b50d77ad
--- /dev/null
+++ b/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_NAMEDBOOLPROPERTYHANDLER_HXX
+#define _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <xmloff/xmlement.hxx>
+
+/**
+ PropertyHandler for a named xml bool type:
+*/
+class XMLNamedBoolPropertyHdl : public XMLPropertyHandler
+{
+private:
+ const ::rtl::OUString maTrueStr;
+ const ::rtl::OUString maFalseStr;
+
+public:
+ XMLNamedBoolPropertyHdl( const ::rtl::OUString& rTrueStr, const ::rtl::OUString& rFalseStr ) : maTrueStr( rTrueStr ), maFalseStr( rFalseStr ) {}
+
+ XMLNamedBoolPropertyHdl(
+ ::xmloff::token::XMLTokenEnum eTrue,
+ ::xmloff::token::XMLTokenEnum eFalse
+ ) :
+ maTrueStr( ::xmloff::token::GetXMLToken( eTrue ) ),
+ maFalseStr( ::xmloff::token::GetXMLToken( eFalse ) )
+ {}
+
+ virtual ~XMLNamedBoolPropertyHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/PageMasterStyleMap.hxx b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
new file mode 100644
index 000000000000..741d933798ed
--- /dev/null
+++ b/xmloff/inc/xmloff/PageMasterStyleMap.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PAGEMASTERSTYLEMAP_HXX_
+#define _XMLOFF_PAGEMASTERSTYLEMAP_HXX_
+
+#include <xmloff/maptype.hxx>
+#include <xmloff/xmltypes.hxx>
+#include <xmloff/contextid.hxx>
+
+//______________________________________________________________________________
+
+#define XML_PM_TYPE_PAGESTYLELAYOUT (XML_PM_TYPES_START + 0)
+#define XML_PM_TYPE_NUMFORMAT (XML_PM_TYPES_START + 1)
+#define XML_PM_TYPE_NUMLETTERSYNC (XML_PM_TYPES_START + 2)
+#define XML_PM_TYPE_PAPERTRAYNUMBER (XML_PM_TYPES_START + 3)
+#define XML_PM_TYPE_PRINTORIENTATION (XML_PM_TYPES_START + 4)
+#define XML_PM_TYPE_PRINTANNOTATIONS (XML_PM_TYPES_START + 5)
+#define XML_PM_TYPE_PRINTCHARTS (XML_PM_TYPES_START + 6)
+#define XML_PM_TYPE_PRINTDRAWING (XML_PM_TYPES_START + 7)
+#define XML_PM_TYPE_PRINTFORMULAS (XML_PM_TYPES_START + 8)
+#define XML_PM_TYPE_PRINTGRID (XML_PM_TYPES_START + 9)
+#define XML_PM_TYPE_PRINTHEADERS (XML_PM_TYPES_START + 10)
+#define XML_PM_TYPE_PRINTOBJECTS (XML_PM_TYPES_START + 11)
+#define XML_PM_TYPE_PRINTZEROVALUES (XML_PM_TYPES_START + 12)
+#define XML_PM_TYPE_PRINTPAGEORDER (XML_PM_TYPES_START + 13)
+#define XML_PM_TYPE_FIRSTPAGENUMBER (XML_PM_TYPES_START + 14)
+#define XML_PM_TYPE_CENTER_HORIZONTAL (XML_PM_TYPES_START + 15)
+#define XML_PM_TYPE_CENTER_VERTICAL (XML_PM_TYPES_START + 16)
+
+// control flags
+#define CTF_PM_FLAGMASK (XML_PM_CTF_START + 0x0F00)
+#define CTF_PM_HEADERFLAG (XML_PM_CTF_START + 0x0100)
+#define CTF_PM_FOOTERFLAG (XML_PM_CTF_START + 0x0200)
+#define CTF_PM_PRINTMASK (XML_PM_CTF_START + 0x1000)
+// page master
+#define CTF_PM_BORDERALL (XML_PM_CTF_START + 0x0001)
+#define CTF_PM_BORDERTOP (XML_PM_CTF_START + 0x0002)
+#define CTF_PM_BORDERBOTTOM (XML_PM_CTF_START + 0x0003)
+#define CTF_PM_BORDERLEFT (XML_PM_CTF_START + 0x0004)
+#define CTF_PM_BORDERRIGHT (XML_PM_CTF_START + 0x0005)
+#define CTF_PM_BORDERWIDTHALL (XML_PM_CTF_START + 0x0006)
+#define CTF_PM_BORDERWIDTHTOP (XML_PM_CTF_START + 0x0007)
+#define CTF_PM_BORDERWIDTHBOTTOM (XML_PM_CTF_START + 0x0008)
+#define CTF_PM_BORDERWIDTHLEFT (XML_PM_CTF_START + 0x0009)
+#define CTF_PM_BORDERWIDTHRIGHT (XML_PM_CTF_START + 0x000A)
+#define CTF_PM_PADDINGALL (XML_PM_CTF_START + 0x000B)
+#define CTF_PM_PADDINGTOP (XML_PM_CTF_START + 0x000C)
+#define CTF_PM_PADDINGBOTTOM (XML_PM_CTF_START + 0x000D)
+#define CTF_PM_PADDINGLEFT (XML_PM_CTF_START + 0x000E)
+#define CTF_PM_PADDINGRIGHT (XML_PM_CTF_START + 0x000F)
+#define CTF_PM_TEXTCOLUMNS (XML_PM_CTF_START + 0x0010)
+#define CTF_PM_REGISTER_STYLE (XML_PM_CTF_START + 0x0011)
+#define CTF_PM_PRINT_ANNOTATIONS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0012))
+#define CTF_PM_PRINT_CHARTS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0013))
+#define CTF_PM_PRINT_DRAWING (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0014))
+#define CTF_PM_PRINT_FORMULAS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0015))
+#define CTF_PM_PRINT_GRID (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0016))
+#define CTF_PM_PRINT_HEADERS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0017))
+#define CTF_PM_PRINT_OBJECTS (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0018))
+#define CTF_PM_PRINT_ZEROVALUES (CTF_PM_PRINTMASK|(XML_PM_CTF_START + 0x0019))
+
+#define CTF_PM_PAGEUSAGE (XML_PM_CTF_START + 0x0031)
+#define CTF_PM_GRAPHICPOSITION (XML_PM_CTF_START + 0x0032)
+#define CTF_PM_GRAPHICFILTER (XML_PM_CTF_START + 0x0033)
+#define CTF_PM_GRAPHICURL (XML_PM_CTF_START + 0x0034)
+
+#define CTF_PM_SCALETO (XML_PM_CTF_START + 0x0051) // calc specific
+#define CTF_PM_SCALETOPAGES (XML_PM_CTF_START + 0x0052)
+#define CTF_PM_SCALETOX (XML_PM_CTF_START + 0x0053)
+#define CTF_PM_SCALETOY (XML_PM_CTF_START + 0x0054)
+#define CTF_PM_STANDARD_MODE (XML_PM_CTF_START + 0x0055)
+#define CTP_PM_GRID_BASE_WIDTH (XML_PM_CTF_START + 0x0056)
+#define CTP_PM_GRID_SNAP_TO_CHARS (XML_PM_CTF_START + 0x0057)
+// header
+#define CTF_PM_HEADERBORDERALL (CTF_PM_HEADERFLAG|CTF_PM_BORDERALL)
+#define CTF_PM_HEADERBORDERTOP (CTF_PM_HEADERFLAG|CTF_PM_BORDERTOP)
+#define CTF_PM_HEADERBORDERBOTTOM (CTF_PM_HEADERFLAG|CTF_PM_BORDERBOTTOM)
+#define CTF_PM_HEADERBORDERLEFT (CTF_PM_HEADERFLAG|CTF_PM_BORDERLEFT)
+#define CTF_PM_HEADERBORDERRIGHT (CTF_PM_HEADERFLAG|CTF_PM_BORDERRIGHT)
+#define CTF_PM_HEADERBORDERWIDTHALL (CTF_PM_HEADERFLAG|CTF_PM_BORDERWIDTHALL)
+#define CTF_PM_HEADERBORDERWIDTHTOP (CTF_PM_HEADERFLAG|CTF_PM_BORDERWIDTHTOP)
+#define CTF_PM_HEADERBORDERWIDTHBOTTOM (CTF_PM_HEADERFLAG|CTF_PM_BORDERWIDTHBOTTOM)
+#define CTF_PM_HEADERBORDERWIDTHLEFT (CTF_PM_HEADERFLAG|CTF_PM_BORDERWIDTHLEFT)
+#define CTF_PM_HEADERBORDERWIDTHRIGHT (CTF_PM_HEADERFLAG|CTF_PM_BORDERWIDTHRIGHT)
+#define CTF_PM_HEADERPADDINGALL (CTF_PM_HEADERFLAG|CTF_PM_PADDINGALL)
+#define CTF_PM_HEADERPADDINGTOP (CTF_PM_HEADERFLAG|CTF_PM_PADDINGTOP)
+#define CTF_PM_HEADERPADDINGBOTTOM (CTF_PM_HEADERFLAG|CTF_PM_PADDINGBOTTOM)
+#define CTF_PM_HEADERPADDINGLEFT (CTF_PM_HEADERFLAG|CTF_PM_PADDINGLEFT)
+#define CTF_PM_HEADERPADDINGRIGHT (CTF_PM_HEADERFLAG|CTF_PM_PADDINGRIGHT)
+#define CTF_PM_HEADERHEIGHT (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0031))
+#define CTF_PM_HEADERMINHEIGHT (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0032))
+#define CTF_PM_HEADERDYNAMIC (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0033))
+#define CTF_PM_HEADERGRAPHICPOSITION (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0034))
+#define CTF_PM_HEADERGRAPHICFILTER (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0035))
+#define CTF_PM_HEADERGRAPHICURL (CTF_PM_HEADERFLAG|(XML_PM_CTF_START + 0x0036))
+// footer
+#define CTF_PM_FOOTERBORDERALL (CTF_PM_FOOTERFLAG|CTF_PM_BORDERALL)
+#define CTF_PM_FOOTERBORDERTOP (CTF_PM_FOOTERFLAG|CTF_PM_BORDERTOP)
+#define CTF_PM_FOOTERBORDERBOTTOM (CTF_PM_FOOTERFLAG|CTF_PM_BORDERBOTTOM)
+#define CTF_PM_FOOTERBORDERLEFT (CTF_PM_FOOTERFLAG|CTF_PM_BORDERLEFT)
+#define CTF_PM_FOOTERBORDERRIGHT (CTF_PM_FOOTERFLAG|CTF_PM_BORDERRIGHT)
+#define CTF_PM_FOOTERBORDERWIDTHALL (CTF_PM_FOOTERFLAG|CTF_PM_BORDERWIDTHALL)
+#define CTF_PM_FOOTERBORDERWIDTHTOP (CTF_PM_FOOTERFLAG|CTF_PM_BORDERWIDTHTOP)
+#define CTF_PM_FOOTERBORDERWIDTHBOTTOM (CTF_PM_FOOTERFLAG|CTF_PM_BORDERWIDTHBOTTOM)
+#define CTF_PM_FOOTERBORDERWIDTHLEFT (CTF_PM_FOOTERFLAG|CTF_PM_BORDERWIDTHLEFT)
+#define CTF_PM_FOOTERBORDERWIDTHRIGHT (CTF_PM_FOOTERFLAG|CTF_PM_BORDERWIDTHRIGHT)
+#define CTF_PM_FOOTERPADDINGALL (CTF_PM_FOOTERFLAG|CTF_PM_PADDINGALL)
+#define CTF_PM_FOOTERPADDINGTOP (CTF_PM_FOOTERFLAG|CTF_PM_PADDINGTOP)
+#define CTF_PM_FOOTERPADDINGBOTTOM (CTF_PM_FOOTERFLAG|CTF_PM_PADDINGBOTTOM)
+#define CTF_PM_FOOTERPADDINGLEFT (CTF_PM_FOOTERFLAG|CTF_PM_PADDINGLEFT)
+#define CTF_PM_FOOTERPADDINGRIGHT (CTF_PM_FOOTERFLAG|CTF_PM_PADDINGRIGHT)
+#define CTF_PM_FOOTERHEIGHT (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0031))
+#define CTF_PM_FOOTERMINHEIGHT (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0032))
+#define CTF_PM_FOOTERDYNAMIC (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0033))
+#define CTF_PM_FOOTERGRAPHICPOSITION (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0034))
+#define CTF_PM_FOOTERGRAPHICFILTER (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0035))
+#define CTF_PM_FOOTERGRAPHICURL (CTF_PM_FOOTERFLAG|(XML_PM_CTF_START + 0x0036))
+#define CTF_PM_FTN_HEIGTH (XML_PM_CTF_START + 0x0060)
+#define CTF_PM_FTN_LINE_WEIGTH (XML_PM_CTF_START + 0x0061)
+#define CTF_PM_FTN_LINE_COLOR (XML_PM_CTF_START + 0x0062)
+#define CTF_PM_FTN_LINE_WIDTH (XML_PM_CTF_START + 0x0063)
+#define CTF_PM_FTN_LINE_ADJUST (XML_PM_CTF_START + 0x0064)
+#define CTF_PM_FTN_LINE_DISTANCE (XML_PM_CTF_START + 0x0065)
+#define CTF_PM_FTN_DISTANCE (XML_PM_CTF_START + 0x0066)
+
+extern const XMLPropertyMapEntry aXMLPageMasterStyleMap[];
+extern const XMLPropertyMapEntry aXMLPageMasterHeaderImportStyleMap[];
+extern const XMLPropertyMapEntry aXMLPageMasterFooterImportStyleMap[];
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/ProgressBarHelper.hxx b/xmloff/inc/xmloff/ProgressBarHelper.hxx
new file mode 100644
index 000000000000..ff35ded20485
--- /dev/null
+++ b/xmloff/inc/xmloff/ProgressBarHelper.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROGRESSBARHELPER_HXX
+#define _XMLOFF_PROGRESSBARHELPER_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+#define XML_PROGRESSRANGE "ProgressRange"
+#define XML_PROGRESSMAX "ProgressMax"
+#define XML_PROGRESSCURRENT "ProgressCurrent"
+#define XML_PROGRESSREPEAT "ProgressRepeat"
+
+class XMLOFF_DLLPUBLIC ProgressBarHelper
+{
+ ::com::sun::star::uno::Reference < ::com::sun::star::task::XStatusIndicator > xStatusIndicator;
+ sal_Int32 nRange;
+ sal_Int32 nReference;
+ sal_Int32 nValue;
+ double fOldPercent;
+ sal_Bool bStrict;
+ // #96469#; if the value goes over the Range the progressbar starts again
+ sal_Bool bRepeat;
+
+#ifdef DBG_UTIL
+ sal_Bool bFailure;
+#endif
+public:
+ ProgressBarHelper(const ::com::sun::star::uno::Reference < ::com::sun::star::task::XStatusIndicator>& xStatusIndicator,
+ const sal_Bool bStrict);
+ ~ProgressBarHelper();
+
+ void SetText(::rtl::OUString& rText) { if (xStatusIndicator.is()) xStatusIndicator->setText(rText); }
+ void SetRange(sal_Int32 nVal) { nRange = nVal; }
+ void SetReference(sal_Int32 nVal) { nReference = nVal; }
+ void SetValue(sal_Int32 nValue);
+ void SetRepeat(sal_Bool bValue) { bRepeat = bValue; }
+ inline void Increment(sal_Int32 nInc = 1) { SetValue( nValue+nInc ); }
+ void End() { if (xStatusIndicator.is()) xStatusIndicator->end(); }
+
+ // set the new reference and returns the new value which gives the
+ // Progress Bar the sam position as before
+ sal_Int32 ChangeReference(sal_Int32 nNewReference);
+
+ sal_Int32 GetReference() { return nReference; }
+ sal_Int32 GetValue() { return nValue; }
+ sal_Bool GetRepeat() { return bRepeat; }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/PropertySetInfoHash.hxx b/xmloff/inc/xmloff/PropertySetInfoHash.hxx
new file mode 100644
index 000000000000..ee02e1b8c71d
--- /dev/null
+++ b/xmloff/inc/xmloff/PropertySetInfoHash.hxx
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPERTYSETINFOHASH_HXX
+#define _XMLOFF_PROPERTYSETINFOHASH_HXX
+
+#include <xmloff/PropertySetInfoKey.hxx>
+
+#include <string.h>
+#include <memory>
+
+struct PropertySetInfoHash
+{
+ inline size_t operator()( const PropertySetInfoKey& r ) const;
+ inline bool operator()( const PropertySetInfoKey& r1,
+ const PropertySetInfoKey& r2 ) const;
+};
+
+inline size_t PropertySetInfoHash::operator()(
+ const PropertySetInfoKey& r ) const
+{
+ const sal_Int32* pBytesAsInt32Array =
+ (const sal_Int32*)r.aImplementationId.getConstArray();
+ sal_Int32 nId32 = pBytesAsInt32Array[0] ^
+ pBytesAsInt32Array[1] ^
+ pBytesAsInt32Array[2] ^
+ pBytesAsInt32Array[3];
+ return (size_t)nId32 ^ (size_t)r.xPropInfo.get();
+}
+
+inline bool PropertySetInfoHash::operator()(
+ const PropertySetInfoKey& r1,
+ const PropertySetInfoKey& r2 ) const
+{
+ if( r1.xPropInfo != r2.xPropInfo )
+ return sal_False;
+
+ const sal_Int8* pId1 = r1.aImplementationId.getConstArray();
+ const sal_Int8* pId2 = r2.aImplementationId.getConstArray();
+ return memcmp( pId1, pId2, 16 * sizeof( sal_Int8 ) ) == 0;
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/PropertySetInfoKey.hxx b/xmloff/inc/xmloff/PropertySetInfoKey.hxx
new file mode 100644
index 000000000000..3cbbe6d3f825
--- /dev/null
+++ b/xmloff/inc/xmloff/PropertySetInfoKey.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPERTYSETINFOKEY_HXX
+#define _XMLOFF_PROPERTYSETINFOKEY_HXX
+
+#include <osl/diagnose.h>
+#include <com/sun/star/uno/Sequence.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace beans { class XPropertySetInfo; }
+} } }
+
+
+struct PropertySetInfoKey
+{
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > xPropInfo;
+ ::com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
+
+ inline PropertySetInfoKey();
+ inline PropertySetInfoKey(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo >& rPropInfo,
+ const ::com::sun::star::uno::Sequence < sal_Int8 >& rImplId );
+};
+
+inline PropertySetInfoKey::PropertySetInfoKey()
+{
+ OSL_ENSURE( aImplementationId.getLength()==16, "illegal constructor call" );
+}
+
+inline PropertySetInfoKey::PropertySetInfoKey(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo >& rPropInfo,
+ const ::com::sun::star::uno::Sequence < sal_Int8 >& rImplId ) :
+ xPropInfo( rPropInfo ),
+ aImplementationId( rImplId )
+{
+ OSL_ENSURE( rPropInfo.is(), "prop info missing" );
+ OSL_ENSURE( aImplementationId.getLength()==16, "invalid implementation id" );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/SchXMLExportHelper.hxx b/xmloff/inc/xmloff/SchXMLExportHelper.hxx
new file mode 100644
index 000000000000..3a909f37438f
--- /dev/null
+++ b/xmloff/inc/xmloff/SchXMLExportHelper.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SCH_XMLEXPORTHELPER_HXX_
+#define _XMLOFF_SCH_XMLEXPORTHELPER_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <xmloff/uniref.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <com/sun/star/util/XStringMapping.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <xmloff/xmlprmap.hxx>
+
+#include <queue>
+#include <vector>
+
+class SvXMLAutoStylePoolP;
+class SvXMLExport;
+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
+ the latter case you have to provide a table address mapper if the
+ cell addressing set at the document is not in XML format.
+ */
+class XMLOFF_DLLPUBLIC SchXMLExportHelper : public UniRefBase
+{
+public:
+ SchXMLExportHelper( SvXMLExport& rExport,
+ SvXMLAutoStylePoolP& rASPool );
+
+ virtual ~SchXMLExportHelper();
+
+ /// returns the string corresponding to the current FileFormat CLSID for Chart
+ const rtl::OUString& getChartCLSID();
+
+private:
+ SchXMLExportHelper(); // not defined
+ SchXMLExportHelper(SchXMLExportHelper &); // not defined
+ void operator =(SchXMLExportHelper &); // not defined
+
+private:
+ SchXMLExportHelper_Impl* m_pImpl;
+ friend class SchXMLExport;
+};
+
+#endif // _XMLOFF_SCH_XMLEXPORTHELPER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/SchXMLImportHelper.hxx b/xmloff/inc/xmloff/SchXMLImportHelper.hxx
new file mode 100644
index 000000000000..55e518a5e339
--- /dev/null
+++ b/xmloff/inc/xmloff/SchXMLImportHelper.hxx
@@ -0,0 +1,172 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SCH_XMLIMPORTHELPER_HXX_
+#define _XMLOFF_SCH_XMLIMPORTHELPER_HXX_
+
+#include <xmloff/uniref.hxx>
+#include <xmloff/families.hxx>
+#include <com/sun/star/util/XStringMapping.hpp>
+#include <com/sun/star/chart/XChartDocument.hpp>
+
+namespace com { namespace sun { namespace star {
+ namespace frame {
+ class XModel;
+ }
+ namespace task {
+ class XStatusIndicator;
+ }
+ namespace xml {
+ namespace sax {
+ class XAttributeList;
+ }
+ }
+ namespace chart2 {
+ namespace data {
+ class XDataProvider;
+ class XLabeledDataSequence;
+ }
+ class XChartDocument;
+ class XDataSeries;
+ }
+}}}
+
+class SvXMLUnitConverter;
+class SvXMLStylesContext;
+class XMLChartImportPropertyMapper;
+class SvXMLTokenMap;
+class SvXMLImportContext;
+class SvXMLImport;
+
+// ========================================
+
+/** With this class you can import a <chart:chart> element containing
+ its data as <table:table> element or without internal table. In
+ the latter case you have to provide a table address mapper that
+ converts table addresses in XML format to the appropriate application
+ format.
+ */
+class SchXMLImportHelper : public UniRefBase
+{
+private:
+ com::sun::star::uno::Reference< com::sun::star::chart::XChartDocument > mxChartDoc;
+ SvXMLStylesContext* mpAutoStyles;
+
+ SvXMLTokenMap* mpChartDocElemTokenMap;
+ SvXMLTokenMap* mpTableElemTokenMap;
+ SvXMLTokenMap* mpChartElemTokenMap;
+ SvXMLTokenMap* mpPlotAreaElemTokenMap;
+ SvXMLTokenMap* mpSeriesElemTokenMap;
+ SvXMLTokenMap* mpAxisElemTokenMap;
+
+ SvXMLTokenMap* mpChartAttrTokenMap;
+ SvXMLTokenMap* mpPlotAreaAttrTokenMap;
+ SvXMLTokenMap* mpAxisAttrTokenMap;
+ SvXMLTokenMap* mpLegendAttrTokenMap;
+ SvXMLTokenMap* mpAutoStyleAttrTokenMap;
+ SvXMLTokenMap* mpCellAttrTokenMap;
+ SvXMLTokenMap* mpSeriesAttrTokenMap;
+ SvXMLTokenMap* mpRegEquationAttrTokenMap;
+
+public:
+
+ SchXMLImportHelper();
+ ~SchXMLImportHelper();
+
+ /** get the context for reading the <chart:chart> element with subelements.
+ The result is stored in the XModel given if it also implements
+ XChartDocument
+ */
+ SvXMLImportContext* CreateChartContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference<
+ com::sun::star::frame::XModel > xChartModel,
+ const com::sun::star::uno::Reference<
+ com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ /** set the auto-style context that will be used to retrieve auto-styles
+ used inside the following <chart:chart> element to parse
+ */
+ void SetAutoStylesContext( SvXMLStylesContext* pAutoStyles ) { mpAutoStyles = pAutoStyles; }
+ SvXMLStylesContext* GetAutoStylesContext() const { return mpAutoStyles; }
+
+ const com::sun::star::uno::Reference<
+ com::sun::star::chart::XChartDocument >& GetChartDocument()
+ { return mxChartDoc; }
+
+ const SvXMLTokenMap& GetDocElemTokenMap();
+ const SvXMLTokenMap& GetTableElemTokenMap();
+ const SvXMLTokenMap& GetChartElemTokenMap();
+ const SvXMLTokenMap& GetPlotAreaElemTokenMap();
+ const SvXMLTokenMap& GetSeriesElemTokenMap();
+ const SvXMLTokenMap& GetAxisElemTokenMap();
+
+ const SvXMLTokenMap& GetChartAttrTokenMap();
+ const SvXMLTokenMap& GetPlotAreaAttrTokenMap();
+ const SvXMLTokenMap& GetAxisAttrTokenMap();
+ const SvXMLTokenMap& GetLegendAttrTokenMap();
+ const SvXMLTokenMap& GetAutoStyleAttrTokenMap();
+ const SvXMLTokenMap& GetCellAttrTokenMap();
+ const SvXMLTokenMap& GetSeriesAttrTokenMap();
+ const SvXMLTokenMap& GetRegEquationAttrTokenMap();
+
+ static sal_uInt16 GetChartFamilyID() { return XML_STYLE_FAMILY_SCH_CHART_ID; }
+
+ /** @param bPushLastChartType If </FALSE>, in case a new chart type has to
+ be added (because it does not exist yet), it is appended at the
+ end of the chart-type container. When </TRUE>, a new chart type
+ is added at one position before the last one, i.e. the formerly
+ last chart type is pushed back, so that it remains the last one.
+
+ This is needed when the global chart type is set to type A, but
+ the first series has type B. Then B should appear before A (done
+ by passing true). Once a series of type A has been read,
+ following new chart types are again be added at the end (by
+ passing false).
+ */
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries > GetNewDataSeries(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xDoc,
+ sal_Int32 nCoordinateSystemIndex,
+ const ::rtl::OUString & rChartTypeName,
+ bool bPushLastChartType = false );
+
+ static void DeleteDataSeries(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries >& xSeries,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xDoc );
+
+ static ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::data::XLabeledDataSequence > GetNewLabeledDataSequence();
+};
+
+#endif // _XMLOFF_SCH_XMLIMPORTHELPER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/SettingsExportHelper.hxx b/xmloff/inc/xmloff/SettingsExportHelper.hxx
new file mode 100644
index 000000000000..115ddadeb815
--- /dev/null
+++ b/xmloff/inc/xmloff/SettingsExportHelper.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SETTINGSEXPORTHELPER_HXX
+#define _XMLOFF_SETTINGSEXPORTHELPER_HXX
+
+#include "xmloff/dllapi.h"
+
+#include <com/sun/star/awt/Rectangle.hpp>
+#include <com/sun/star/formula/SymbolDescriptor.hpp>
+#include <com/sun/star/util/XStringSubstitution.hpp>
+#include <xmloff/xmlexp.hxx>
+
+namespace com
+{
+ namespace sun { namespace star {
+ namespace container { class XNameAccess; class XIndexAccess; }
+ namespace util { struct DateTime; }
+ } }
+}
+
+namespace xmloff
+{
+ class XMLSettingsExportContext;
+}
+
+class XMLOFF_DLLPUBLIC XMLSettingsExportHelper
+{
+ ::xmloff::XMLSettingsExportContext& m_rContext;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XStringSubstitution > mxStringSubsitution;
+
+ const rtl::OUString msPrinterIndependentLayout;
+ const rtl::OUString msColorTableURL;
+ const rtl::OUString msLineEndTableURL;
+ const rtl::OUString msHatchTableURL;
+ const rtl::OUString msDashTableURL;
+ const rtl::OUString msGradientTableURL;
+ const rtl::OUString msBitmapTableURL;
+
+ void ManipulateSetting( com::sun::star::uno::Any& rAny, const rtl::OUString& rName ) const;
+
+ void CallTypeFunction(const com::sun::star::uno::Any& rAny,
+ const rtl::OUString& rName) const;
+
+ void exportBool(const sal_Bool bValue, const rtl::OUString& rName) const;
+ void exportByte(const sal_Int8 nValue, const rtl::OUString& rName) const;
+ void exportShort(const sal_Int16 nValue, const rtl::OUString& rName) const;
+ void exportInt(const sal_Int32 nValue, const rtl::OUString& rName) const;
+ void exportLong(const sal_Int64 nValue, const rtl::OUString& rName) const;
+ void exportDouble(const double fValue, const rtl::OUString& rName) const;
+ void exportString(const rtl::OUString& sValue, const rtl::OUString& rName) const;
+ void exportDateTime(const com::sun::star::util::DateTime& aValue, const rtl::OUString& rName) const;
+ void exportSequencePropertyValue(
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps,
+ const rtl::OUString& rName) const;
+ void exportbase64Binary(
+ const com::sun::star::uno::Sequence<sal_Int8>& aProps,
+ const rtl::OUString& rName) const;
+ void exportMapEntry(const com::sun::star::uno::Any& rAny,
+ const rtl::OUString& rName,
+ const sal_Bool bNameAccess) const;
+ void exportNameAccess(
+ const com::sun::star::uno::Reference<com::sun::star::container::XNameAccess>& aNamed,
+ const rtl::OUString& rName) const;
+ void exportIndexAccess(
+ const com::sun::star::uno::Reference<com::sun::star::container::XIndexAccess> aIndexed,
+ const rtl::OUString rName) const;
+
+ void exportSymbolDescriptors(
+ const com::sun::star::uno::Sequence < com::sun::star::formula::SymbolDescriptor > &rProps,
+ const rtl::OUString rName) const;
+ void exportForbiddenCharacters(
+ const com::sun::star::uno::Any &rAny,
+ const rtl::OUString rName) const;
+
+public:
+ XMLSettingsExportHelper( ::xmloff::XMLSettingsExportContext& i_rContext );
+ ~XMLSettingsExportHelper();
+
+ void exportAllSettings(
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps,
+ const rtl::OUString& rName) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx b/xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx
new file mode 100644
index 000000000000..eea140486c78
--- /dev/null
+++ b/xmloff/inc/xmloff/SinglePropertySetInfoCache.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SINGEPROPERTYSETINFOCACHE_HXX
+#define _XMLOFF_SINGEPROPERTYSETINFOCACHE_HXX
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#include <hash_map>
+#include <xmloff/PropertySetInfoHash.hxx>
+
+typedef std::hash_map
+<
+ PropertySetInfoKey,
+ sal_Bool,
+ PropertySetInfoHash,
+ PropertySetInfoHash
+>
+SinglePropertySetInfoMap_Impl;
+
+class SinglePropertySetInfoCache : private SinglePropertySetInfoMap_Impl
+{
+ ::rtl::OUString sName;
+
+public:
+
+ inline SinglePropertySetInfoCache( const ::rtl::OUString& rName );
+ ~SinglePropertySetInfoCache() {};
+
+ sal_Bool hasProperty(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet >& rPropSet,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo >& rPropSetInfo );
+ inline sal_Bool hasProperty(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>& rPropSet );
+};
+
+inline SinglePropertySetInfoCache::SinglePropertySetInfoCache(
+ const ::rtl::OUString& rName ) :
+ sName( rName )
+{
+}
+
+inline sal_Bool SinglePropertySetInfoCache::hasProperty(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>& rPropSet )
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo > xInfo;
+ return hasProperty( rPropSet, xInfo );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx b/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx
new file mode 100644
index 000000000000..ea57ad315456
--- /dev/null
+++ b/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_WORDWRAPPROPERTYHANDLER_HXX
+#define _XMLOFF_WORDWRAPPROPERTYHANDLER_HXX
+
+#include <xmloff/xmlprhdl.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <com/sun/star/uno/Type.h>
+#include <xmloff/xmlement.hxx>
+
+/**
+ PropertyHandler for a named xml bool type:
+*/
+class SvXMLImport;
+class XMLWordWrapPropertyHdl : public XMLPropertyHandler
+{
+private:
+ SvXMLImport* mpImport;
+
+public:
+ XMLWordWrapPropertyHdl( SvXMLImport* pImport );
+ virtual ~XMLWordWrapPropertyHdl();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLBase64ImportContext.hxx b/xmloff/inc/xmloff/XMLBase64ImportContext.hxx
new file mode 100644
index 000000000000..f12cd1ebaa2e
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLBase64ImportContext.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLBASE64IMPORTCONTEXT_HXX
+#define _XMLOFF_XMLBASE64IMPORTCONTEXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <xmloff/xmlictxt.hxx>
+
+namespace com { namespace sun { namespace star { namespace io {
+ class XOutputStream; } } } }
+
+class XMLOFF_DLLPUBLIC XMLBase64ImportContext : public SvXMLImportContext
+{
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::io::XOutputStream > xOut;
+ ::rtl::OUString sBase64CharsLeft;
+
+public:
+ TYPEINFO();
+
+ XMLBase64ImportContext( SvXMLImport& rImport, USHORT nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::io::XOutputStream >& rOut );
+
+ virtual ~XMLBase64ImportContext();
+
+ virtual void EndElement();
+
+ virtual void Characters( const ::rtl::OUString& rChars );
+
+};
+
+#endif // _XMLOFF_XMLBASE64IMPORTCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLCharContext.hxx b/xmloff/inc/xmloff/XMLCharContext.hxx
new file mode 100644
index 000000000000..06881b274e3f
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLCharContext.hxx
@@ -0,0 +1,74 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 INCLUDED__XMLOFF_CHARCONTEXT_HXX
+#define INCLUDED__XMLOFF_CHARCONTEXT_HXX
+
+#include "xmloff/dllapi.h"
+#include <com/sun/star/uno/Reference.h>
+#include "xmlictxt.hxx"
+
+class XMLOFF_DLLPUBLIC XMLCharContext : public SvXMLImportContext
+{
+ XMLCharContext(const XMLCharContext&);
+ void operator =(const XMLCharContext&);
+protected:
+ sal_Int16 m_nControl;
+ sal_uInt16 m_nCount;
+ sal_Unicode m_c;
+public:
+
+ TYPEINFO();
+
+ XMLCharContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Unicode c,
+ sal_Bool bCount );
+ XMLCharContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Int16 nControl );
+
+ virtual ~XMLCharContext();
+
+ // EndElement is called before a context will be destructed, but
+ // after a elements context has been parsed. It may be used for actions
+ // that require virtual methods. The default is to do nothing.
+ virtual void EndElement();
+
+ virtual void InsertControlCharacter(sal_Int16 _nControl);
+ virtual void InsertString(const ::rtl::OUString& _sString);
+};
+// ---------------------------------------------------------------------
+#endif // INCLUDED__XMLOFF_CHARCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx b/xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx
new file mode 100644
index 000000000000..41c063753f23
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLConstantsPropertyHandler.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLCONSTANTSPROPERTYHANDLER_HXX
+#define _XMLOFF_XMLCONSTANTSPROPERTYHANDLER_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlprhdl.hxx>
+#include <xmloff/xmltoken.hxx>
+
+struct SvXMLEnumMapEntry;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Abstract base-class for different XML-types. Derivations of this class
+ knows how to compare, im/export a special XML-type
+*/
+class XMLOFF_DLLPUBLIC XMLConstantsPropertyHandler: public XMLPropertyHandler
+{
+ const SvXMLEnumMapEntry *pMap;
+ const enum ::xmloff::token::XMLTokenEnum eDefault;
+
+public:
+
+ XMLConstantsPropertyHandler( const SvXMLEnumMapEntry *pM,
+ enum ::xmloff::token::XMLTokenEnum eDflt);
+
+ // Just needed for virtual destruction
+ virtual ~XMLConstantsPropertyHandler();
+
+ /// Imports the given value in cas of the given XML-data-type
+ virtual sal_Bool importXML(
+ const ::rtl::OUString& rStrImpValue,
+ ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+
+ /// Exports the given value in cas of the given XML-data-type
+ virtual sal_Bool exportXML(
+ ::rtl::OUString& rStrExpValue,
+ const ::com::sun::star::uno::Any& rValue,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+};
+
+#endif // _XMLOFF_XMLCONSTANTSPROPERTYHANDLER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLEventExport.hxx b/xmloff/inc/xmloff/XMLEventExport.hxx
new file mode 100644
index 000000000000..cd030fb62cba
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLEventExport.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEVENTEXPORT_HXX
+#define _XMLOFF_XMLEVENTEXPORT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <rtl/ustring.hxx>
+#include <xmloff/xmlevent.hxx>
+
+#include <map>
+
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace document { class XEventsSupplier; }
+ namespace container { class XNameReplace; }
+ namespace container { class XNameAccess; }
+ namespace beans { struct PropertyValue; }
+} } }
+
+typedef ::std::map< ::rtl::OUString, XMLEventExportHandler* > HandlerMap;
+typedef ::std::map< ::rtl::OUString, XMLEventName > NameMap;
+
+/**
+ * Export instances of EventsSupplier services. To use this class you
+ * must fulfill two conditions:
+ *
+ * 1) provide a translation from the API event names to XML event
+ * names
+ * 2) Register XMLEventExportHandler instances for all script types
+ * that you would like to export.
+ *
+ * The Export()-Methods all have a bUseWhitespace parameter that
+ * causes the exported elements to be surrounded by whitespace, which
+ * in turn causes the elements to be indented properly. By default,
+ * whitespace is used, but it may not be called for in all cases (e.g
+ * events attached to hyperlink within a paragraph.)
+ */
+class XMLOFF_DLLPUBLIC XMLEventExport
+{
+ const ::rtl::OUString sEventType;
+
+ SvXMLExport& rExport;
+
+ HandlerMap aHandlerMap;
+ NameMap aNameTranslationMap;
+
+ bool bExtNamespace;
+
+public:
+ XMLEventExport(SvXMLExport& rExport,
+ const XMLEventNameTranslation* pTranslationTable = NULL);
+ ~XMLEventExport();
+
+ /// register an EventExportHandler for a particular script type
+ ///
+ /// The handlers will be deleted when the object is destroyed, hence
+ /// no pointers to a handler registered with AddHandler() should be
+ /// held by anyone.
+ void AddHandler( const ::rtl::OUString& rName,
+ XMLEventExportHandler* rHandler );
+
+ /// register additional event names
+ void AddTranslationTable( const XMLEventNameTranslation* pTransTable );
+
+ /// export the events (calls EventExport::Export(Reference<XNameAcess>) )
+ void Export( ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XEventsSupplier> & xAccess,
+ sal_Bool bUseWhitespace = sal_True);
+
+ /// export the events (calls EventExport::Export(Reference<XNameAcess>) )
+ void Export( ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameReplace> & xAccess,
+ sal_Bool bUseWhitespace = sal_True);
+
+ /// export the events (writes <office:events> element)
+ void Export( ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameAccess> & xAccess,
+ sal_Bool bUseWhitespace = sal_True);
+
+ /// export the events, but write <officeooo:events> element
+ /// (for new file format additions)
+ void ExportExt( ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameAccess> & xAccess,
+ sal_Bool bUseWhitespace = sal_True);
+
+ /// export a single event (writes <office:events> element)
+ void ExportSingleEvent(
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& rEventValues,
+ const ::rtl::OUString& rApiEventName,
+ sal_Bool bUseWhitespace = sal_True );
+
+private:
+
+ /// export one event (start container-element if necessary)
+ SAL_DLLPRIVATE void ExportEvent(
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& rEventValues,
+ const XMLEventName& rXmlEventName,
+ sal_Bool bUseWhitespace,
+ sal_Bool& rExported);
+
+ /// export the start element
+ SAL_DLLPRIVATE void StartElement(sal_Bool bUseWhitespace);
+
+ /// export the end element
+ SAL_DLLPRIVATE void EndElement(sal_Bool bUseWhitespace);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLEventsImportContext.hxx b/xmloff/inc/xmloff/XMLEventsImportContext.hxx
new file mode 100644
index 000000000000..669190a9fb6c
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLEventsImportContext.hxx
@@ -0,0 +1,141 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEVENTSIMPORTCONTEXT_HXX
+#define _XMLOFF_XMLEVENTSIMPORTCONTEXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/xmlevent.hxx>
+
+#include <map>
+#include <vector>
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace beans { struct PropertyValue; }
+ namespace container { class XNameReplace; }
+ namespace document { class XEventsSupplier; }
+} } }
+namespace rtl { class OUString; }
+
+typedef ::std::pair<
+ ::rtl::OUString,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> > EventNameValuesPair;
+
+typedef ::std::vector< EventNameValuesPair > EventsVector;
+
+/**
+ * Import <script:events> element.
+ *
+ * The import context usually sets the events immediatly at the event
+ * XNameReplace. If none was given on construction, it operates in
+ * delayed mode: All events are collected and may then be set
+ * with the setEvents() method.
+ */
+class XMLOFF_DLLPUBLIC XMLEventsImportContext : public SvXMLImportContext
+{
+protected:
+ // the event XNameReplace; may be empty
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameReplace> xEvents;
+
+ // if no XNameReplace is given, use this vector to collect events
+ EventsVector aCollectEvents;
+
+public:
+
+ TYPEINFO();
+
+ XMLEventsImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName);
+
+ XMLEventsImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XEventsSupplier> & xEventsSupplier);
+
+ XMLEventsImportContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameReplace> & xNameRepl);
+
+ ~XMLEventsImportContext();
+
+ void AddEventValues(
+ const ::rtl::OUString& rEventName,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> & rValues);
+
+ /// if the import operates in delayed mode, you can use this method
+ /// to set all events that have been read on the XEventsSupplier
+ void SetEvents(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XEventsSupplier> & xEventsSupplier);
+
+ /// if the import operates in delayed mode, you can use this method
+ /// to set all events that have been read on the XNameReplace
+ void SetEvents(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameReplace> & xNameRepl);
+
+ /// if the import operates indelayed mode, you can use this method
+ /// to obtain the value sequence for a specific event
+ sal_Bool GetEventSequence(
+ const ::rtl::OUString& rName,
+ ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue> & rSequence );
+
+protected:
+
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
+
+ virtual void EndElement();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx b/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx
new file mode 100644
index 000000000000..114b790a8e0b
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLFONTAUTOSTYLEPOOL_HXX
+#define _XMLOFF_XMLFONTAUTOSTYLEPOOL_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <rtl/ustring.hxx>
+#include <xmloff/uniref.hxx>
+
+class XMLFontAutoStylePool_Impl;
+class XMLFontAutoStylePoolNames_Impl;
+class SvXMLExport;
+
+class XMLOFF_DLLPUBLIC XMLFontAutoStylePool : public UniRefBase
+{
+ SvXMLExport& rExport;
+
+ XMLFontAutoStylePool_Impl *pPool;
+ XMLFontAutoStylePoolNames_Impl *pNames;
+ sal_uInt32 nName;
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+
+public:
+
+ XMLFontAutoStylePool( SvXMLExport& rExport );
+ ~XMLFontAutoStylePool();
+
+ ::rtl::OUString Add(
+ const ::rtl::OUString& rFamilyName,
+ const ::rtl::OUString& rStyleName,
+ sal_Int16 nFamily,
+ sal_Int16 nPitch,
+ rtl_TextEncoding eEnc );
+
+ ::rtl::OUString Find(
+ const ::rtl::OUString& rFamilyName,
+ const ::rtl::OUString& rStyleName,
+ sal_Int16 nFamily,
+ sal_Int16 nPitch,
+ rtl_TextEncoding eEnc )const;
+ ::rtl::OUString Find( const ::rtl::OUString& rInternalName ) const;
+
+ void exportXML();
+};
+
+#endif // _XMLOFF_XMLFONTAUTOSTYLEPOOL_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLFontStylesContext.hxx b/xmloff/inc/xmloff/XMLFontStylesContext.hxx
new file mode 100644
index 000000000000..8194a86e9a86
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLFontStylesContext.hxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLFONTSTYLESCONTEXT_HXX_
+#define _XMLOFF_XMLFONTSTYLESCONTEXT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+
+#ifndef __SGI_STL_VECTOR
+#include <vector>
+#endif
+
+#include <xmloff/xmlstyle.hxx>
+
+struct XMLPropertyState;
+class SvXMLTokenMap;
+class XMLFontFamilyNamePropHdl;
+class XMLFontFamilyPropHdl;
+class XMLFontPitchPropHdl;
+class XMLFontEncodingPropHdl;
+
+class XMLOFF_DLLPUBLIC XMLFontStylesContext : public SvXMLStylesContext
+{
+ XMLFontFamilyNamePropHdl *pFamilyNameHdl;
+ XMLFontFamilyPropHdl *pFamilyHdl;
+ XMLFontPitchPropHdl *pPitchHdl;
+ XMLFontEncodingPropHdl *pEncHdl;
+
+ SvXMLTokenMap *pFontStyleAttrTokenMap;
+
+ rtl_TextEncoding eDfltEncoding;
+
+protected:
+
+ virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+public:
+
+ TYPEINFO();
+
+ XMLFontStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ rtl_TextEncoding eDfltEnc );
+ virtual ~XMLFontStylesContext();
+
+ const SvXMLTokenMap& GetFontStyleAttrTokenMap() const
+ {
+ return *pFontStyleAttrTokenMap;
+ }
+
+ sal_Bool FillProperties( const ::rtl::OUString& rName,
+ ::std::vector< XMLPropertyState > &rProps,
+ sal_Int32 nFamilyNameIdx,
+ sal_Int32 nStyleNameIdx,
+ sal_Int32 nFamilyIdx,
+ sal_Int32 nPitchIdx,
+ sal_Int32 nCharsetIdx ) const;
+
+ rtl_TextEncoding GetDfltCharset() const { return eDfltEncoding; }
+
+ XMLFontFamilyNamePropHdl& GetFamilyNameHdl() const { return *pFamilyNameHdl; }
+ XMLFontFamilyPropHdl& GetFamilyHdl() const { return *pFamilyHdl; }
+ XMLFontPitchPropHdl& GetPitchHdl() const { return *pPitchHdl; }
+ XMLFontEncodingPropHdl& GetEncodingHdl() const { return *pEncHdl; }
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx b/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx
new file mode 100644
index 000000000000..de6f2fc0694d
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLGraphicsDefaultStyle.hxx
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLGRAPHICSDEFAULTSTYLE_HXX
+#define _XMLOFF_XMLGRAPHICSDEFAULTSTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/prstylei.hxx>
+
+namespace com { namespace sun { namespace star { namespace container
+{
+ class XNameContainer;
+} } } }
+
+class XMLOFF_DLLPUBLIC XMLGraphicsDefaultStyle : public XMLPropStyleContext
+{
+public:
+ TYPEINFO();
+
+ XMLGraphicsDefaultStyle( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ SvXMLStylesContext& rStyles);
+
+ virtual ~XMLGraphicsDefaultStyle();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ // This method is called for every default style
+ virtual void SetDefaults();
+};
+
+#endif // _XMLOFF_XMLGRAPHICSDEFAULTSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLPageExport.hxx b/xmloff/inc/xmloff/XMLPageExport.hxx
new file mode 100644
index 000000000000..22f42041bf9e
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLPageExport.hxx
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLPAGEEXPORT_HXX
+#define _XMLOFF_XMLPAGEEXPORT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <rtl/ustring.hxx>
+#ifndef __SGI_STL_VECTOR
+#include <vector>
+#endif
+#include <xmloff/attrlist.hxx>
+#include <xmloff/uniref.hxx>
+#include <com/sun/star/container/XIndexAccess.hpp>
+
+namespace com { namespace sun { namespace star {
+ namespace style { class XStyle; }
+ namespace container { class XIndexReplace; class XNameAccess;}
+ namespace beans { class XPropertySet; }
+} } }
+
+class SvXMLExport;
+class XMLPropertyHandlerFactory;
+class XMLPropertySetMapper;
+class SvXMLExportPropertyMapper;
+
+//______________________________________________________________________________
+
+struct XMLPageExportNameEntry
+{
+ ::rtl::OUString sPageMasterName;
+ ::rtl::OUString sStyleName;
+};
+
+//______________________________________________________________________________
+
+class XMLOFF_DLLPUBLIC XMLPageExport : public UniRefBase
+{
+ SvXMLExport& rExport;
+
+ const ::rtl::OUString sIsPhysical;
+ const ::rtl::OUString sFollowStyle;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XNameAccess > xPageStyles;
+
+ ::std::vector< XMLPageExportNameEntry > aNameVector;
+ SAL_DLLPRIVATE sal_Bool findPageMasterName( const ::rtl::OUString& rStyleName, ::rtl::OUString& rPMName ) const;
+
+ UniReference < XMLPropertyHandlerFactory > xPageMasterPropHdlFactory;
+ UniReference < XMLPropertySetMapper > xPageMasterPropSetMapper;
+ UniReference < SvXMLExportPropertyMapper > xPageMasterExportPropMapper;
+
+protected:
+
+ SvXMLExport& GetExport() { return rExport; }
+
+ virtual void collectPageMasterAutoStyle(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ ::rtl::OUString& rPageMasterName );
+
+ virtual void exportMasterPageContent(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ sal_Bool bAutoStyles );
+
+ sal_Bool exportStyle(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle >& rStyle,
+ sal_Bool bAutoStyles );
+
+ void exportStyles( sal_Bool bUsed, sal_Bool bAutoStyles );
+
+public:
+ XMLPageExport( SvXMLExport& rExp );
+ ~XMLPageExport();
+
+ void collectAutoStyles( sal_Bool bUsed ) { exportStyles( bUsed, sal_True ); }
+ void exportAutoStyles();
+ void exportMasterStyles( sal_Bool bUsed ) { exportStyles( bUsed, sal_False ); }
+
+ //text grid enhancement for better CJK support
+ void exportDefaultStyle();
+};
+
+#endif // _XMLOFF_XMLTEXTMASTERPAGEEXPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLSettingsExportContext.hxx b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx
new file mode 100644
index 000000000000..2847cf0dee8b
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLSettingsExportContext.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* 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 XML_SETTINGS_EXPORT_CONTEXT_HXX
+#define XML_SETTINGS_EXPORT_CONTEXT_HXX
+
+/** === begin UNO includes === **/
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+/** === end UNO includes === **/
+
+#include "xmloff/xmltoken.hxx"
+
+//........................................................................
+namespace xmloff
+{
+//........................................................................
+
+ //====================================================================
+ //= XMLExporter
+ //====================================================================
+ class SAL_NO_VTABLE XMLSettingsExportContext
+ {
+ public:
+ virtual void AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName,
+ const ::rtl::OUString& i_rValue ) = 0;
+ virtual void AddAttribute( enum ::xmloff::token::XMLTokenEnum i_eName,
+ enum ::xmloff::token::XMLTokenEnum i_eValue ) = 0;
+
+ virtual void StartElement( enum ::xmloff::token::XMLTokenEnum i_eName,
+ const sal_Bool i_bIgnoreWhitespace ) = 0;
+ virtual void EndElement( const sal_Bool i_bIgnoreWhitespace ) = 0;
+
+ virtual void Characters( const ::rtl::OUString& i_rCharacters ) = 0;
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
+ GetServiceFactory() const = 0;
+
+ };
+
+//........................................................................
+} // namespace xmloff
+//........................................................................
+
+#endif // XML_SETTINGS_EXPORT_CONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLShapeStyleContext.hxx b/xmloff/inc/xmloff/XMLShapeStyleContext.hxx
new file mode 100644
index 000000000000..27a428e69010
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLShapeStyleContext.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSHAPESTYLECONTEXT_HXX
+#define _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/prstylei.hxx>
+#include <xmloff/families.hxx>
+
+class SvXMLImport;
+
+//////////////////////////////////////////////////////////////////////////////
+// style:style context
+
+class XMLOFF_DLLPUBLIC XMLShapeStyleContext: public XMLPropStyleContext
+{
+protected:
+ ::rtl::OUString m_sControlDataStyleName;
+ ::rtl::OUString m_sListStyleName;
+ sal_Bool m_bIsNumRuleAlreadyConverted;
+
+protected:
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+public:
+ TYPEINFO();
+
+ XMLShapeStyleContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ SvXMLStylesContext& rStyles,
+ sal_uInt16 nFamily = XML_STYLE_FAMILY_SD_GRAPHICS_ID);
+ virtual ~XMLShapeStyleContext();
+
+ SvXMLImportContext * CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void Finish( sal_Bool bOverwrite );
+
+ virtual void FillPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropSet );
+};
+
+#endif // _XMLOFF_XMLSHAPESTYLECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLStringVector.hxx b/xmloff/inc/xmloff/XMLStringVector.hxx
new file mode 100644
index 000000000000..6e933fbe50a4
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLStringVector.hxx
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSTRINGVECTOR_HXX
+#define _XMLOFF_XMLSTRINGVECTOR_HXX
+
+#include <rtl/ustring.hxx>
+
+#include <vector>
+
+typedef ::std::vector < ::rtl::OUString> XMLStringVector;
+
+
+#endif // _XMLOFF_XMLSTRINGVECTOR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx b/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx
new file mode 100644
index 000000000000..45c9e009845e
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TEXTMASTERPAGECONTEXT_HXX_
+#define _XMLOFF_TEXTMASTERPAGECONTEXT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+
+#include <xmloff/xmlstyle.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace style { class XStyle; }
+} } }
+
+class XMLOFF_DLLPUBLIC XMLTextMasterPageContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString sIsPhysical;
+ const ::rtl::OUString sPageStyleLayout;
+ const ::rtl::OUString sFollowStyle;
+ ::rtl::OUString sFollow;
+ ::rtl::OUString sPageMasterName;
+
+ ::com::sun::star::uno::Reference < ::com::sun::star::style::XStyle > xStyle;
+
+ sal_Bool bInsertHeader;
+ sal_Bool bInsertFooter;
+ sal_Bool bInsertHeaderLeft;
+ sal_Bool bInsertFooterLeft;
+ sal_Bool bHeaderInserted;
+ sal_Bool bFooterInserted;
+ sal_Bool bHeaderLeftInserted;
+ sal_Bool bFooterLeftInserted;
+
+ SAL_DLLPRIVATE ::com::sun::star::uno::Reference <
+ ::com::sun::star::style::XStyle > Create();
+protected:
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::style::XStyle > GetStyle() { return xStyle; }
+public:
+
+ TYPEINFO();
+
+ XMLTextMasterPageContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bOverwrite );
+ virtual ~XMLTextMasterPageContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual SvXMLImportContext *CreateHeaderFooterContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ const sal_Bool bFooter,
+ const sal_Bool bLeft );
+
+ virtual void Finish( sal_Bool bOverwrite );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx
new file mode 100644
index 000000000000..ef12331b7cc3
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLTextMasterPageExport.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTEXTMASTERPAGEEXPORT_HXX
+#define _XMLOFF_XMLTEXTMASTERPAGEEXPORT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <rtl/ustring.hxx>
+#include <xmloff/attrlist.hxx>
+#include <xmloff/XMLPageExport.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XText; }
+} } }
+
+class XMLOFF_DLLPUBLIC XMLTextMasterPageExport : public XMLPageExport
+{
+ const ::rtl::OUString sHeaderText;
+ const ::rtl::OUString sHeaderOn;
+ const ::rtl::OUString sHeaderShareContent;
+ const ::rtl::OUString sHeaderTextLeft;
+
+ const ::rtl::OUString sFooterText;
+ const ::rtl::OUString sFooterOn;
+ const ::rtl::OUString sFooterShareContent;
+ const ::rtl::OUString sFooterTextLeft;
+
+protected:
+
+ virtual void exportHeaderFooterContent(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText >& rText,
+ sal_Bool bAutoStyles, sal_Bool bExportParagraph = sal_True );
+
+ virtual void exportMasterPageContent(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ sal_Bool bAutoStyles );
+
+public:
+ XMLTextMasterPageExport( SvXMLExport& rExp );
+ ~XMLTextMasterPageExport();
+};
+
+#endif // _XMLOFF_XMLTEXTMASTERPAGEEXPORT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx b/xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx
new file mode 100644
index 000000000000..632de6592a59
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLTextMasterStylesContext.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTEXTMASTERSTYLESCONTEXT_HXX
+#define _XMLOFF_XMLTEXTMASTERSTYLESCONTEXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlstyle.hxx>
+
+class XMLOFF_DLLPUBLIC XMLTextMasterStylesContext : public SvXMLStylesContext
+{
+protected:
+ virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual SvXMLStyleContext *CreateStyleStyleChildContext( sal_uInt16 nFamily,
+ sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual sal_Bool InsertStyleFamily( sal_uInt16 nFamily ) const;
+
+public:
+ TYPEINFO();
+
+ XMLTextMasterStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList);
+
+ virtual ~XMLTextMasterStylesContext();
+};
+
+#endif // _XMLOFF_XMLTEXTMASTERSTYLECONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx b/xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx
new file mode 100644
index 000000000000..60b837917fbf
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLTextShapeStyleContext.hxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTEXTSHAPESTYLECONTEXT_HXX_
+#define _XMLOFF_XMLTEXTSHAPESTYLECONTEXT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/XMLShapeStyleContext.hxx>
+
+class XMLOFF_DLLPUBLIC XMLTextShapeStyleContext : public XMLShapeStyleContext
+{
+ const ::rtl::OUString sIsAutoUpdate;
+
+ sal_Bool bAutoUpdate : 1;
+
+ SvXMLImportContextRef xEventContext;
+
+protected:
+
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+
+public:
+
+ TYPEINFO();
+
+ XMLTextShapeStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
+ sal_Bool bDefaultStyle = sal_False );
+ virtual ~XMLTextShapeStyleContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ sal_Bool IsAutoUpdate() const { return bAutoUpdate; }
+
+ virtual void CreateAndInsert( sal_Bool bOverwrite );
+
+ virtual void Finish( sal_Bool bOverwrite );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/XMLTextTableContext.hxx b/xmloff/inc/xmloff/XMLTextTableContext.hxx
new file mode 100644
index 000000000000..e07cda5855e8
--- /dev/null
+++ b/xmloff/inc/xmloff/XMLTextTableContext.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _XMLTEXTTABLECONTEXT_HXX
+#define _XMLTEXTTABLECONTEXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlictxt.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com { namespace sun { namespace star {
+ namespace text { class XTextContent; }
+} } }
+
+#define XML_TEXT_FRAME_TEXTBOX 1
+#define XML_TEXT_FRAME_GRAPHIC 2
+
+class XMLOFF_DLLPUBLIC XMLTextTableContext : public SvXMLImportContext
+{
+
+public:
+
+ TYPEINFO();
+
+ XMLTextTableContext( SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName );
+ virtual ~XMLTextTableContext();
+
+ virtual ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > GetXTextContent() const = 0;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/animexp.hxx b/xmloff/inc/xmloff/animexp.hxx
new file mode 100644
index 000000000000..3af1585b2955
--- /dev/null
+++ b/xmloff/inc/xmloff/animexp.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ANIMEXP_HXX
+#define _XMLOFF_ANIMEXP_HXX
+
+#include <com/sun/star/drawing/XShape.hpp>
+#include <xmloff/uniref.hxx>
+
+class AnimExpImpl;
+class SvXMLExport;
+class XMLShapeExport;
+
+class XMLAnimationsExporter : public UniRefBase
+{
+ AnimExpImpl* mpImpl;
+
+public:
+ XMLAnimationsExporter( XMLShapeExport* pShapeExp );
+ virtual ~XMLAnimationsExporter();
+
+ void prepare( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape, SvXMLExport& rExport );
+ void collect( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape, SvXMLExport& rExport );
+ void exportAnimations( SvXMLExport& rExport );
+};
+
+#endif // _XMLOFF_ANIMEXP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/attrlist.hxx b/xmloff/inc/xmloff/attrlist.hxx
new file mode 100644
index 000000000000..efc034da4660
--- /dev/null
+++ b/xmloff/inc/xmloff/attrlist.hxx
@@ -0,0 +1,96 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_ATTRLIST_HXX
+#define _XMLOFF_ATTRLIST_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/xml/sax/SAXParseException.hpp>
+#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/xml/sax/XLocator.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+
+#include <cppuhelper/implbase3.hxx>
+
+struct SvXMLAttributeList_Impl;
+
+class XMLOFF_DLLPUBLIC SvXMLAttributeList : public ::cppu::WeakImplHelper3<
+ ::com::sun::star::xml::sax::XAttributeList,
+ ::com::sun::star::util::XCloneable,
+ ::com::sun::star::lang::XUnoTunnel>
+{
+ SvXMLAttributeList_Impl *m_pImpl;
+
+public:
+ SvXMLAttributeList();
+ SvXMLAttributeList( const SvXMLAttributeList& );
+ SvXMLAttributeList( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList> & rAttrList );
+ ~SvXMLAttributeList();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ static SvXMLAttributeList* getImplementation( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ) throw();
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // ::com::sun::star::xml::sax::XAttributeList
+ virtual sal_Int16 SAL_CALL getLength(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getNameByIndex(sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getTypeByIndex(sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getTypeByName(const ::rtl::OUString& aName) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getValueByIndex(sal_Int16 i) throw( ::com::sun::star::uno::RuntimeException );
+ virtual ::rtl::OUString SAL_CALL getValueByName(const ::rtl::OUString& aName) throw( ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::util::XCloneable
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() throw( ::com::sun::star::uno::RuntimeException );
+
+ // methods that are not contained in any interface
+ void AddAttribute( const ::rtl::OUString &sName , const ::rtl::OUString &sValue );
+ void Clear();
+ void RemoveAttribute( const ::rtl::OUString sName );
+ void SetAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & );
+ void AppendAttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & );
+ void SetValueByIndex( sal_Int16 i, const ::rtl::OUString& rValue );
+ void RemoveAttributeByIndex( sal_Int16 i );
+ void RenameAttributeByIndex( sal_Int16 i, const ::rtl::OUString& rNewName );
+ sal_Int16 GetIndexByName( const ::rtl::OUString& rName ) const;
+
+ private:
+ const ::rtl::OUString sType; // "CDATA"
+};
+
+
+#endif // _XMLOFF_ATTRLIST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/contextid.hxx b/xmloff/inc/xmloff/contextid.hxx
new file mode 100644
index 000000000000..4e81e79bdbda
--- /dev/null
+++ b/xmloff/inc/xmloff/contextid.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_CONTEXTID_HXX_
+#define _XMLOFF_CONTEXTID_HXX_
+
+/** These defines determine the unique ids for XML style-context-id's
+ used in the SvXMLAutoStylePoolP.
+ */
+
+#define XML_SC_CTF_START 0x00001000
+#define XML_SD_CTF_START 0x00002000
+#define XML_TEXT_CTF_START 0x00003000
+#define XML_SCH_CTF_START 0x00004000
+#define XML_PM_CTF_START 0x00005000 // page master
+#define XML_FORM_CTF_START 0x00006000
+#define XML_DB_CTF_START 0x00007000
+
+
+#define CTF_SD_CONTROL_SHAPE_DATA_STYLE ( XML_SD_CTF_START + 1 )
+#define CTF_SD_NUMBERINGRULES_NAME ( XML_SD_CTF_START + 2 )
+#define CTF_SD_SHAPE_PARA_ADJUST ( XML_SD_CTF_START + 3 )
+
+#define CTF_FORMS_DATA_STYLE ( XML_FORM_CTF_START + 0 )
+
+/** use together with MID_FLAG_NO_PROPERTY to import the specified
+ attribute into the alien attribute container */
+
+#define CTF_ALIEN_ATTRIBUTE_IMPORT 0x00007fff
+
+#endif // _XMLOFF_CONTEXTID_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/controlpropertyhdl.hxx b/xmloff/inc/xmloff/controlpropertyhdl.hxx
new file mode 100644
index 000000000000..cc06f1a3dcaa
--- /dev/null
+++ b/xmloff/inc/xmloff/controlpropertyhdl.hxx
@@ -0,0 +1,145 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_FORMS_CONTROLPROPERTYHDL_HXX_
+#define _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/prhdlfac.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <xmloff/xmlexppr.hxx>
+#include <xmloff/XMLConstantsPropertyHandler.hxx>
+
+struct SvXMLEnumMapEntry;
+class Color;
+//.........................................................................
+namespace xmloff
+{
+//.........................................................................
+
+ class IFormsExportContext;
+ class OFormLayerXMLImport_Impl;
+
+ //=====================================================================
+ //= ORotationAngleHandler
+ //=====================================================================
+ class ORotationAngleHandler : public XMLPropertyHandler
+ {
+ public:
+ ORotationAngleHandler();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ };
+
+ //=====================================================================
+ //= OFontWidthHandler
+ //=====================================================================
+ class OFontWidthHandler : public XMLPropertyHandler
+ {
+ public:
+ OFontWidthHandler();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ };
+
+ //=====================================================================
+ //= OControlBorderHandlerBase
+ //=====================================================================
+ class OControlBorderHandler : public XMLPropertyHandler
+ {
+ public:
+ enum BorderFacet
+ {
+ STYLE,
+ COLOR
+ };
+
+ OControlBorderHandler( const BorderFacet _eFacet );
+
+ virtual sal_Bool importXML( const ::rtl::OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+
+ private:
+ BorderFacet m_eFacet;
+ };
+
+ //=====================================================================
+ //= OControlTextEmphasisHandler
+ //=====================================================================
+ class OControlTextEmphasisHandler : public XMLPropertyHandler
+ {
+ public:
+ OControlTextEmphasisHandler();
+
+ virtual sal_Bool importXML( const ::rtl::OUString& _rStrImpValue, ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ virtual sal_Bool exportXML( ::rtl::OUString& _rStrExpValue, const ::com::sun::star::uno::Any& _rValue, const SvXMLUnitConverter& _rUnitConverter ) const;
+ };
+
+ //=====================================================================
+ //= ImageScaleModeHandler
+ //=====================================================================
+ class XMLOFF_DLLPUBLIC ImageScaleModeHandler : public XMLConstantsPropertyHandler
+ {
+ public:
+ ImageScaleModeHandler();
+ };
+
+ //=====================================================================
+ //= OControlPropertyHandlerFactory
+ //=====================================================================
+ class XMLOFF_DLLPUBLIC OControlPropertyHandlerFactory : public XMLPropertyHandlerFactory
+ {
+ protected:
+ mutable XMLConstantsPropertyHandler* m_pTextAlignHandler;
+ mutable OControlBorderHandler* m_pControlBorderStyleHandler;
+ mutable OControlBorderHandler* m_pControlBorderColorHandler;
+ mutable ORotationAngleHandler* m_pRotationAngleHandler;
+ mutable OFontWidthHandler* m_pFontWidthHandler;
+ mutable XMLConstantsPropertyHandler* m_pFontEmphasisHandler;
+ mutable XMLConstantsPropertyHandler* m_pFontReliefHandler;
+
+ protected:
+ virtual ~OControlPropertyHandlerFactory();
+
+ public:
+ OControlPropertyHandlerFactory();
+
+ virtual const XMLPropertyHandler* GetPropertyHandler(sal_Int32 _nType) const;
+ };
+
+//.........................................................................
+} // namespace xmloff
+//.........................................................................
+
+#endif // _XMLOFF_FORMS_CONTROLPROPERTYHDL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/dllapi.h b/xmloff/inc/xmloff/dllapi.h
new file mode 100644
index 000000000000..61bd1ce03d13
--- /dev/null
+++ b/xmloff/inc/xmloff/dllapi.h
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 INCLUDED_XMLOFF_DLLAPI_H
+#define INCLUDED_XMLOFF_DLLAPI_H
+
+#include "sal/config.h"
+#include "sal/types.h"
+
+#if defined XMLOFF_DLLIMPLEMENTATION
+#define XMLOFF_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define XMLOFF_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/families.hxx b/xmloff/inc/xmloff/families.hxx
new file mode 100644
index 000000000000..74e7c51f086c
--- /dev/null
+++ b/xmloff/inc/xmloff/families.hxx
@@ -0,0 +1,119 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_FAMILIES_HXX_
+#define _XMLOFF_FAMILIES_HXX_
+
+/** These defines determine the unique ids for XML style-families
+ used in the SvXMLAutoStylePoolP.
+ */
+
+// Misc (Pool)
+// reserved: 0..99
+#define XML_STYLE_FAMILY_DATA_STYLE 0
+#define XML_STYLE_FAMILY_DATA_STYLE_NAME "data-style"
+#define XML_STYLE_FAMILY_PAGE_MASTER 1
+#define XML_STYLE_FAMILY_PAGE_MASTER_NAME "page-layout"
+#define XML_STYLE_FAMILY_PAGE_MASTER_PREFIX "pm"
+#define XML_STYLE_FAMILY_MASTER_PAGE 2
+
+// Text
+// reserved: 100..199
+#define XML_STYLE_FAMILY_TEXT_PARAGRAPH 100
+#define XML_STYLE_FAMILY_TEXT_TEXT 101
+#define XML_STYLE_FAMILY_TEXT_LIST 102
+#define XML_STYLE_FAMILY_TEXT_OUTLINE 103
+#define XML_STYLE_FAMILY_TEXT_FOOTNOTECONFIG 105
+#define XML_STYLE_FAMILY_TEXT_ENDNOTECONFIG 106
+#define XML_STYLE_FAMILY_TEXT_SECTION 107
+#define XML_STYLE_FAMILY_TEXT_FRAME 108 // export only
+#define XML_STYLE_FAMILY_TEXT_RUBY 109
+#define XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG 110
+#define XML_STYLE_FAMILY_TEXT_LINENUMBERINGCONFIG 111
+
+// Table
+// reserved: 200..299
+#define XML_STYLE_FAMILY_TABLE_TABLE 200
+#define XML_STYLE_FAMILY_TABLE_TABLE_STYLES_NAME "table"
+#define XML_STYLE_FAMILY_TABLE_TABLE_STYLES_PREFIX "ta"
+#define XML_STYLE_FAMILY_TABLE_COLUMN 202
+#define XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME "table-column"
+#define XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_PREFIX "co"
+#define XML_STYLE_FAMILY_TABLE_ROW 203
+#define XML_STYLE_FAMILY_TABLE_ROW_STYLES_NAME "table-row"
+#define XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX "ro"
+#define XML_STYLE_FAMILY_TABLE_CELL 204
+#define XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME "table-cell"
+#define XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX "ce"
+#define XML_STYLE_FAMILY_TABLE_TEMPLATE_ID 205
+
+// Impress/Draw
+// reserved: 300..399
+#define XML_STYLE_FAMILY_SD_GRAPHICS_ID 300
+#define XML_STYLE_FAMILY_SD_GRAPHICS_NAME "graphic"
+#define XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX "gr"
+
+#define XML_STYLE_FAMILY_SD_PRESENTATION_ID 301
+#define XML_STYLE_FAMILY_SD_PRESENTATION_NAME "presentation"
+#define XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX "pr"
+// families for derived from SvXMLStyleContext
+#define XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID 302
+#define XML_STYLE_FAMILY_SD_PAGEMASTERSTYLECONEXT_ID 306
+#define XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID 303
+// family for draw pool
+#define XML_STYLE_FAMILY_SD_POOL_ID 304
+#define XML_STYLE_FAMILY_SD_POOL_NAME "default"
+// family for presentation drawpage properties
+#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID 305
+#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME "drawing-page"
+#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_PREFIX "dp"
+
+#define XML_STYLE_FAMILY_SD_GRADIENT_ID 306
+#define XML_STYLE_FAMILY_SD_HATCH_ID 307
+#define XML_STYLE_FAMILY_SD_FILL_IMAGE_ID 308
+#define XML_STYLE_FAMILY_SD_MARKER_ID 309
+#define XML_STYLE_FAMILY_SD_STROKE_DASH_ID 310
+
+// Chart
+// reserved: 400..499
+#define XML_STYLE_FAMILY_SCH_CHART_ID 400
+#define XML_STYLE_FAMILY_SCH_CHART_NAME "chart"
+#define XML_STYLE_FAMILY_SCH_CHART_PREFIX "ch"
+
+// Math
+// reserved: 500..599
+
+
+// Forms/Controls
+// reserved 600..649
+#define XML_STYLE_FAMILY_CONTROL_ID 600
+#define XML_STYLE_FAMILY_CONTROL_NAME "control"
+#define XML_STYLE_FAMILY_CONTROL_PREFIX "ctrl"
+
+#endif // _XMLOFF_FAMILIES_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/formlayerexport.hxx b/xmloff/inc/xmloff/formlayerexport.hxx
new file mode 100644
index 000000000000..1ff5491015c3
--- /dev/null
+++ b/xmloff/inc/xmloff/formlayerexport.hxx
@@ -0,0 +1,214 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_FORMLAYEREXPORT_HXX_
+#define _XMLOFF_FORMLAYEREXPORT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+#include <xmloff/xmlexppr.hxx>
+
+namespace com { namespace sun { namespace star { namespace awt {
+ class XControlModel;
+} } } }
+
+class SvXMLExport;
+//.........................................................................
+namespace xmloff
+{
+//.........................................................................
+
+ class OFormLayerXMLExport_Impl;
+ class OFormsRootExport;
+
+ //=====================================================================
+ //= OFormLayerXMLExport
+ //=====================================================================
+ /** provides functionallity for exporting a complete form layer.
+ */
+ class XMLOFF_DLLPUBLIC OFormLayerXMLExport
+ :public ::salhelper::SimpleReferenceObject
+ {
+ protected:
+ /// our export context
+ SvXMLExport& m_rContext;
+ // impl class
+ OFormLayerXMLExport_Impl* m_pImpl;
+
+ protected:
+ ~OFormLayerXMLExport();
+
+ public:
+ OFormLayerXMLExport(SvXMLExport& _rContext);
+
+ /** initial the object
+
+ <p>To be called if you want to reuse the same object for exportin different documents.</p>
+
+ <p>You don't need to call this if you just constructed the object, in this case it is already
+ initialized..</p>
+ */
+ void initialize();
+
+ /** initializes some internal structures for fast access to the given page
+
+ <p>This method has to be called before you use getControlId for controls on the given page.
+ This way a performance optimization can be done for faster access to the control ids</p>
+
+ @return
+ <TRUE/> if the page has been examined before. If <FALSE/> is returned, this is a serious error.
+
+ @see getControlId
+ @see examineForms
+ */
+ sal_Bool seekPage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& _rxDrawPage);
+
+ /** get the id for the given control
+
+ <p>The page the control belongs to must have been examined and sought to.</p>
+
+ @param _rxControl
+ the control which's id should be retrieved. Must not be <NULL/>.
+
+ @see examineForms
+ @see seekPage
+
+ */
+ ::rtl::OUString getControlId(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControl);
+
+ /** retrieves the style name for the control's number style.
+
+ <p>For performance reasons, this method is allowed to be called for any controls, even those which
+ do not have a number style. In this case, an empty string is returned.</p>
+
+ @param _rxControl
+ the control which's id should be retrieved. Must not be <NULL/>.
+
+ @see examineForms
+ @see seekPage
+ */
+ ::rtl::OUString getControlNumberStyle(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControl );
+
+ /** examines the forms collection given.
+
+ <p>This method will collect all form layer related data of the given draw page</p>
+
+ @param _rxDrawPage
+ the draw page to examine. The object will be queried for a <type scope="com.sun.star.form">XFormsSupplier</type>
+ interface to obtain the forms container.
+ */
+ void examineForms(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& _rxDrawPage);
+
+ /** exports the structure of a form layer
+
+ <p>This method does not export styles (e.g. font properties of the controls), or any references
+ external instances may have to the control models contained in the form layer (e.g. uno control
+ shapes in the drawing layer may have such references)</p>
+
+ <p>No top level element describing the whole collection is inserted. I.e. if within your document, you
+ expect the the forms collection to be stored like
+ <listing>
+ &lt;Forms&gt;
+ .... // all the forms stuff here
+ &lt;/Forms&gt;
+ </listing>
+ you have to start the Forms element yourself.</p>
+
+ @param _rxDrawPage
+ the draw page to examine. The object will be queried for a <type scope="com.sun.star.form">XFormsSupplier</type>
+ interface to obtain the forms container.
+ */
+ void exportForms(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& _rxDrawPage);
+
+ /** exports the XForms model data
+ */
+ void exportXForms() const;
+
+ /** determines whether the given page contains logical forms
+ */
+ bool pageContainsForms( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& _rxDrawPage ) const;
+
+ /** determines whether the given page contains XForm instances
+ */
+ bool documentContainsXForms() const;
+
+ /// retrieves the property mapper for control styles
+ ::rtl::Reference< SvXMLExportPropertyMapper > getStylePropertyMapper();
+
+ /** exports the controls number styles
+ */
+ void exportControlNumberStyles();
+
+ /** exports the automatic controls number styles
+ */
+ void exportAutoControlNumberStyles();
+
+ /** exports the auto-styles collected during the examineForms calls
+ */
+ void exportAutoStyles();
+
+ /** exclude the given control (model) from export.
+
+ <p>If your document contains form controls which are not to be exported for whatever reason,
+ you need to announce the models of these controls (can be retrieved from XControlShape::getControl)
+ to the form layer exporter.<br/>
+ Of course you have to do this before calling <member>exportForms</member></p>
+ */
+ void excludeFromExport( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > _rxControl );
+ };
+
+ //=========================================================================
+ //= OOfficeFormsExport
+ //=========================================================================
+ /// export helper for the office::forms element
+ class XMLOFF_DLLPUBLIC OOfficeFormsExport
+ {
+ private:
+ OFormsRootExport* m_pImpl;
+
+ public:
+ OOfficeFormsExport( SvXMLExport& _rExp );
+ ~OOfficeFormsExport();
+ };
+
+//.........................................................................
+} // namespace xmloff
+//.........................................................................
+
+#endif // _XMLOFF_FORMLAYEREXPORT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/formlayerimport.hxx b/xmloff/inc/xmloff/formlayerimport.hxx
new file mode 100644
index 000000000000..6dcdcda41451
--- /dev/null
+++ b/xmloff/inc/xmloff/formlayerimport.hxx
@@ -0,0 +1,173 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_FORMLAYERIMPORT_HXX_
+#define _XMLOFF_FORMLAYERIMPORT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <rtl/ref.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+#include <xmloff/xmlimppr.hxx>
+
+class SvXMLImport;
+class SvXMLImportContext;
+class SvXMLStylesContext;
+class XMLPropStyleContext;
+
+//.........................................................................
+namespace xmloff
+{
+//.........................................................................
+
+ //=====================================================================
+ //= OFormLayerXMLImport
+ //=====================================================================
+ class OFormLayerXMLImport_Impl;
+ /** allows you to import a &lt;form:form&gt; element
+ */
+ class XMLOFF_DLLPUBLIC OFormLayerXMLImport
+ :public ::salhelper::SimpleReferenceObject
+ {
+ OFormLayerXMLImport_Impl* m_pImpl;
+
+ public:
+ OFormLayerXMLImport(SvXMLImport& _rImporter);
+ ~OFormLayerXMLImport();
+
+ /** retrieves the property mapper form form related auto styles.
+ */
+ ::rtl::Reference< SvXMLImportPropertyMapper >
+ getStylePropertyMapper() const;
+
+ /** start importing the forms of the given page
+
+ <p>starting the import of a new page (by using this method) invalidates the current page position
+ you may have set with <method>seekPage</method>.</p>
+
+ @see endPage
+ @see seekPage
+ */
+ void startPage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& _rxDrawPage);
+
+ /** creates an import context for the office:forms element
+ */
+ SvXMLImportContext* createOfficeFormsContext(
+ SvXMLImport& _rImport,
+ sal_uInt16 _nPrefix,
+ const rtl::OUString& _rLocalName);
+
+ /** create an <type>SvXMLImportContext</type> instance which is able to import the &lt;form:form&gt;
+ element.
+
+ <p>You must have called <method>startPage</method> before you can create such an import context.</p>
+
+ @see startPage
+ @see endPage
+ */
+ SvXMLImportContext* createContext(
+ const sal_uInt16 _nPrefix,
+ const rtl::OUString& _rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& _rxAttribs);
+
+ /** lookup a control given by id.
+
+ <p>The control must be part of the page which is currently beeing imported, or you must have used
+ seekPage for the page which the control belongs to.</p>
+
+ <p>(And, of course, the control must have been imported already at the moment you call this.)</p>
+
+ @see startPage
+ @see seekPage
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
+ lookupControl(const ::rtl::OUString& _rId);
+
+ /** end importing the forms of the current page
+
+ <p>You must call this method if you want the import to be finished correctly. Without calling
+ it, you will lose information.</p>
+
+ @see startPage
+ @see seekPage
+ */
+ void endPage();
+
+ /** seek to the given page.
+
+ <p>This method should be used if you want to call lookupControl outside of a startPage-endPage frame.</p>
+
+ <p>You can't seek to a page which hasn't been imported yet. This means that you must have called
+ <method>endPage</method> for the page in question.</p>
+
+ <p>The "current page" position you have set with this method is invalidated as soon as you call
+ <method>startPage</method> for a new page.</p>
+
+ <p>You should not call seekPage while importing a page (i.e. between startPage and endPage). This will
+ smash this other page beeing imported (seeking back to it will not help you :).</p>
+
+ @see lookupControl
+ */
+ void seekPage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& _rxDrawPage);
+
+ /** announces the auto-style context to the form importer
+ */
+ void setAutoStyleContext(SvXMLStylesContext* _pNewContext);
+
+ /** sets the given number style on the given control
+ @param _rxControlModel
+ the control model which's style is to be set
+ @param _rControlNumerStyleName
+ the style name for the control's number style
+ */
+ void applyControlNumberStyle(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel,
+ const ::rtl::OUString& _rControlNumerStyleName
+ );
+
+ /** to be called when the document has been completely imported
+
+ <p>For some documents (currently: only some spreadsheet documents) it's necessary
+ do to a post processing, since not all information from the file can be processed
+ if the document is not completed, yet.</p>
+ */
+ void documentDone( );
+ };
+
+//.........................................................................
+} // namespace xmloff
+//.........................................................................
+
+#endif // _XMLOFF_FORMLAYERIMPORT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/formsimp.hxx b/xmloff/inc/xmloff/formsimp.hxx
new file mode 100644
index 000000000000..2e28ee2965ae
--- /dev/null
+++ b/xmloff/inc/xmloff/formsimp.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_FORMSIMP_HXX
+#define _XMLOFF_FORMSIMP_HXX
+
+#include <xmloff/xmlictxt.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// presentations:animations
+
+class XMLFormsContext : public SvXMLImportContext
+{
+public:
+ TYPEINFO();
+
+ XMLFormsContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLocalName);
+ virtual ~XMLFormsContext();
+
+ virtual SvXMLImportContext * CreateChildContext( USHORT nPrefix, const ::rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList>& xAttrList );
+};
+
+#endif // _XMLOFF_ANIMIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/maptype.hxx b/xmloff/inc/xmloff/maptype.hxx
new file mode 100644
index 000000000000..d96e28bf82c7
--- /dev/null
+++ b/xmloff/inc/xmloff/maptype.hxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPMAPPINGTYPES_HXX
+#define _XMLOFF_PROPMAPPINGTYPES_HXX
+
+#include <tools/solar.h>
+#include <com/sun/star/uno/Any.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <unotools/saveopt.hxx>
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Represents a property with its API-name, its XML-name and the type of
+ its value.
+*/
+struct XMLPropertyMapEntry
+{
+ const sal_Char* msApiName; /// Property-Name
+ sal_Int32 nApiNameLength; /// length of property name
+ sal_uInt16 mnNameSpace; /** declares the Namespace in wich this
+ property exists */
+ enum ::xmloff::token::XMLTokenEnum meXMLName; /// XML-Name
+ sal_Int32 mnType; /** Bit 0..23 : XML-Type of its value
+ Bit 24..31: The flags specifies
+ additional rules how
+ to im/export the porperty */
+ sal_Int16 mnContextId; /// User defined id for context filtering
+ SvtSaveOptions::ODFDefaultVersion mnEarliestODFVersionForExport;// no export when the used ODF version is lower than this
+};
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Smart struct to transport an Any with an index to the appropriate
+ property-name
+*/
+struct XMLPropertyState
+{
+ sal_Int32 mnIndex;
+ ::com::sun::star::uno::Any maValue;
+
+ XMLPropertyState( sal_Int32 nIndex )
+ : mnIndex( nIndex ) {}
+ XMLPropertyState( sal_Int32 nIndex, const ::com::sun::star::uno::Any& rValue )
+ : mnIndex( nIndex ), maValue( rValue ) {}
+ XMLPropertyState( const XMLPropertyState& rPropState )
+ : mnIndex( rPropState.mnIndex ), maValue( rPropState.maValue ) {}
+};
+
+#endif // _XMLOFF_PROPMAPPINGTYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/nmspmap.hxx b/xmloff/inc/xmloff/nmspmap.hxx
new file mode 100644
index 000000000000..15c8df05bd5b
--- /dev/null
+++ b/xmloff/inc/xmloff/nmspmap.hxx
@@ -0,0 +1,188 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_NMSPMAP_HXX
+#define _XMLOFF_NMSPMAP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <rtl/ustring.hxx>
+#include <hash_map>
+#ifndef __SGI_STL_MAP
+#include <map>
+#endif
+#include <rtl/ref.hxx>
+#include <cppuhelper/weak.hxx>
+
+#include <limits.h>
+
+const sal_uInt16 XML_NAMESPACE_XMLNS = (USHRT_MAX-2);
+const sal_uInt16 XML_NAMESPACE_NONE = (USHRT_MAX-1);
+const sal_uInt16 XML_NAMESPACE_UNKNOWN = (USHRT_MAX);
+const sal_uInt16 XML_NAMESPACE_UNKNOWN_FLAG = 0x8000;
+
+class NameSpaceEntry : public cppu::OWeakObject
+{
+public:
+ // sName refers to the full namespace name
+ ::rtl::OUString sName;
+ // sPrefix is the prefix used to declare a given item to be from a given namespace
+ ::rtl::OUString sPrefix;
+ // nKey is the unique identifier of a namespace
+ sal_uInt16 nKey;
+};
+
+struct OUStringEqFunc
+{
+ sal_Bool operator()( const rtl::OUString &r1,
+ const rtl::OUString &r2) const
+ {
+ return r1 == r2;
+ }
+};
+
+struct uInt32lt
+{
+ sal_Bool operator()( const sal_uInt32 &r1,
+ const sal_uInt32 &r2) const
+ {
+ return r1 < r2;
+ }
+};
+typedef ::std::pair < sal_uInt16, const ::rtl::OUString* > QNamePair;
+
+struct QNamePairHash
+{
+ size_t operator()( const QNamePair &r1 ) const
+ {
+ return (size_t) r1.second->hashCode() + r1.first;
+ }
+};
+struct QNamePairEq
+{
+ bool operator()( const QNamePair &r1,
+ const QNamePair &r2 ) const
+ {
+ return r1.first == r2.first && *(r1.second) == *(r2.second);
+ }
+};
+
+typedef ::std::hash_map < QNamePair, ::rtl::OUString, QNamePairHash, QNamePairEq > QNameCache;
+typedef ::std::hash_map < ::rtl::OUString, ::rtl::Reference <NameSpaceEntry >, rtl::OUStringHash, OUStringEqFunc > NameSpaceHash;
+typedef ::std::map < sal_uInt16, ::rtl::Reference < NameSpaceEntry >, uInt32lt > NameSpaceMap;
+
+class XMLOFF_DLLPUBLIC SvXMLNamespaceMap
+{
+ const ::rtl::OUString sXMLNS;
+ const ::rtl::OUString sEmpty;
+
+ NameSpaceHash aNameHash, aNameCache;
+ NameSpaceMap aNameMap;
+ QNameCache aQNameCache;
+ SAL_DLLPRIVATE sal_uInt16 _Add( const rtl::OUString& rPrefix, const rtl::OUString &rName, sal_uInt16 nKey );
+
+public:
+
+ SvXMLNamespaceMap();
+ ~SvXMLNamespaceMap();
+
+ SvXMLNamespaceMap( const SvXMLNamespaceMap& );
+
+ void operator =( const SvXMLNamespaceMap& rCmp );
+ int operator ==( const SvXMLNamespaceMap& rCmp ) const;
+
+ sal_uInt16 Add( const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rName,
+ sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN );
+ sal_uInt16 AddIfKnown( const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rName );
+
+ sal_uInt16 GetKeyByName( const ::rtl::OUString& rName ) const;
+ const ::rtl::OUString& GetNameByKey( sal_uInt16 nKey ) const;
+
+ sal_uInt16 GetKeyByPrefix( const ::rtl::OUString& rPrefix ) const;
+ const ::rtl::OUString& GetPrefixByKey( sal_uInt16 nKey ) const;
+
+ ::rtl::OUString GetQNameByKey( sal_uInt16 nKey,
+ const ::rtl::OUString& rLocalName,
+ sal_Bool bCache = sal_True) const;
+
+ ::rtl::OUString GetAttrNameByKey( sal_uInt16 nKey ) const;
+
+ /* This will replace the version with the unused 5th default parameter */
+ sal_uInt16 _GetKeyByAttrName( const ::rtl::OUString& rAttrName,
+ ::rtl::OUString *pPrefix,
+ ::rtl::OUString *pLocalName,
+ ::rtl::OUString *pNamespace = 0,
+ sal_Bool bCache = sal_True) const;
+
+ /* This will replace the version with the unused 3rd default parameter */
+ sal_uInt16 _GetKeyByAttrName( const ::rtl::OUString& rAttrName,
+ ::rtl::OUString *pLocalName = 0,
+ sal_Bool bCache = sal_True) const;
+
+ sal_uInt16 GetFirstKey() const;
+ sal_uInt16 GetNextKey( sal_uInt16 nOldKey ) const;
+
+ /* Give access to all namespace definitions, including multiple entries
+ for the same key (needed for saving sheets separately in Calc).
+ This might be replaced by a better interface later. */
+ const NameSpaceHash& GetAllEntries() const { return aNameHash; }
+
+ static sal_Bool NormalizeOasisURN( ::rtl::OUString& rName );
+ static sal_Bool NormalizeW3URI( ::rtl::OUString& rName );
+ static sal_Bool NormalizeURI( ::rtl::OUString& rName );
+
+/* deprecated */ sal_Bool AddAtIndex( sal_uInt16 nIdx, const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rName, sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN );
+/* deprecated */ sal_Bool AddAtIndex( sal_uInt16 nIdx, const sal_Char *pPrefix,
+ const sal_Char *pName, sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN );
+/* deprecated */ sal_uInt16 GetIndexByKey( sal_uInt16 nKey ) const;
+/* deprecated */ sal_uInt16 GetKeyByIndex( sal_uInt16 nIdx ) const;
+/* deprecated */ sal_uInt16 GetIndexByPrefix( const ::rtl::OUString& rPrefix ) const;
+/* deprecated */ sal_uInt16 GetFirstIndex() const;
+/* deprecated */ sal_uInt16 GetNextIndex( sal_uInt16 nOldIdx ) const;
+/* deprecated */ const ::rtl::OUString& GetPrefixByIndex( sal_uInt16 nIdx ) const;
+/* deprecated */ const ::rtl::OUString& GetNameByIndex( sal_uInt16 nIdx ) const;
+/* deprecated */ ::rtl::OUString GetAttrNameByIndex( sal_uInt16 nIdx ) const;
+/* deprecated */ ::rtl::OUString GetQNameByIndex( sal_uInt16 nIdx,
+ const ::rtl::OUString& rLocalName ) const;
+/* deprecated */ sal_uInt16 GetKeyByAttrName( const ::rtl::OUString& rAttrName,
+ ::rtl::OUString *pPrefix,
+ ::rtl::OUString *pLocalName,
+ ::rtl::OUString *pNamespace=0,
+ sal_uInt16 nIdxGuess = USHRT_MAX ) const;
+/* deprecated */ sal_uInt16 GetKeyByAttrName( const ::rtl::OUString& rAttrName,
+ ::rtl::OUString *pLocalName = 0,
+ sal_uInt16 nIdxGuess = USHRT_MAX ) const;
+};
+
+#endif // _XMLOFF_NMSPMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/odffields.hxx b/xmloff/inc/xmloff/odffields.hxx
new file mode 100644
index 000000000000..792846e03474
--- /dev/null
+++ b/xmloff/inc/xmloff/odffields.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: $
+ * $Revision: $
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+/*
+ * Copyright 2008 by Novell, Inc.
+ */
+
+#ifndef _ODFFIELDS_HXX
+#define _ODFFIELDS_HXX
+
+
+#define ODF_FORMTEXT "vnd.oasis.opendocument.field.FORMTEXT"
+
+#define ODF_FORMCHECKBOX "vnd.oasis.opendocument.field.FORMCHECKBOX"
+#define ODF_FORMCHECKBOX_HELPTEXT "Checkbox_HelpText"
+#define ODF_FORMCHECKBOX_NAME "Checkbox_Name"
+#define ODF_FORMCHECKBOX_RESULT "Checkbox_Checked"
+
+#define ODF_FORMDROPDOWN "vnd.oasis.opendocument.field.FORMDROPDOWN"
+#define ODF_FORMDROPDOWN_LISTENTRY "Dropdown_ListEntry"
+#define ODF_FORMDROPDOWN_RESULT "Dropdown_Selected"
+
+#define ODF_TOC "vnd.oasis.opendocument.field.TOC"
+
+#define ODF_HYPERLINK "vnd.oasis.opendocument.field.HYPERLINK"
+
+#define ODF_PAGEREF "vnd.oasis.opendocument.field.PAGEREF"
+
+#define ODF_UNHANDLED "vnd.oasis.opendocument.field.UNHANDLED"
+#define ODF_OLE_PARAM "vnd.oasis.opendocument.field.ole"
+#define ODF_ID_PARAM "vnd.oasis.opendocument.field.id"
+#define ODF_CODE_PARAM "vnd.oasis.opendocument.field.code"
+
+#endif /* _ODFFIELDS_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/prhdlfac.hxx b/xmloff/inc/xmloff/prhdlfac.hxx
new file mode 100644
index 000000000000..435eb08a4ec5
--- /dev/null
+++ b/xmloff/inc/xmloff/prhdlfac.hxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPERTYHANDLERFACTORY_HXX
+#define _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+
+#ifndef __SGI_STL_MAP
+#include <map>
+#endif
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmlprhdl.hxx>
+
+/**
+ This class is a base-class to create XMLPropertyHandler.
+ It creates PropertyHandler for given XML-types and store
+ them in an internal cache. They'll be deleted at destruction-
+ time.
+ For create your own PropertyHandler for specific XML-types
+ you have to override the virtual method GetPropertyHandler
+ ( see below ).
+*/
+class XMLOFF_DLLPUBLIC XMLPropertyHandlerFactory : public UniRefBase
+{
+public:
+ virtual ~XMLPropertyHandlerFactory();
+
+ /**
+ This method retrieves a PropertyHandler for the given XML-type.
+ To extend this method for more XML-types override this method
+ like the example below. If you call the method of the base-class
+ you get propertyhandler for basic-XML-types ( e.g. for color, percent, ... ).
+ Afetr that you could create your new XML-types. After creating a new type
+ you have to put the pointer into the cache via the method
+ PutHdlCache( sal_Int32 , XMLPropertyHandler* ).
+
+ virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const
+ {
+ XMLPropertyHandler* pHdl = XMLPropertyHandlerFactory::GetPropertyHandler( nType );
+
+ if( !pHdl )
+ {
+ switch( nType )
+ {
+ case XML_TYPE_XYZ :
+ pHdl = new XML_xyz_PropHdl;
+ break;
+ case ...
+ :
+ :
+ }
+
+ if( pHdl )
+ PutHdlCache( nType, pHdl );
+ }
+
+ return pHdl;
+ }
+ */
+ virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
+
+ /** helper method to statically create a property handler; this will not
+ * use the handler cache. This method should only be called in special
+ * circumstances; calling GetPropertyHandler is almost always
+ * preferable. */
+ static const XMLPropertyHandler* CreatePropertyHandler( sal_Int32 nType );
+
+protected:
+ /** Retrieves a PropertyHandler from the internal cache */
+ XMLPropertyHandler* GetHdlCache( sal_Int32 nType ) const;
+ /** Puts a PropertyHandler into the internal cache */
+ void PutHdlCache( sal_Int32 nType, const XMLPropertyHandler* pHdl ) const;
+
+private:
+ /** Retrieves ( creates if necessary ) PropertyHandler for
+ basic XML-types */
+ SAL_DLLPRIVATE const XMLPropertyHandler* GetBasicHandler( sal_Int32 nType )
+ const;
+
+ typedef ::std::map< sal_Int32, XMLPropertyHandler* > CacheMap;
+ CacheMap maHandlerCache;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLERFACTORY_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/prstylei.hxx b/xmloff/inc/xmloff/prstylei.hxx
new file mode 100644
index 000000000000..e044f8f12ff6
--- /dev/null
+++ b/xmloff/inc/xmloff/prstylei.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PRSTYLEI_HXX_
+#define _XMLOFF_PRSTYLEI_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/style/XStyle.hpp>
+#ifndef __SGI_STL_VECTOR
+#include <vector>
+#endif
+#include <xmloff/xmlstyle.hxx>
+
+struct XMLPropertyState;
+class SvXMLStylesContext;
+
+namespace com { namespace sun { namespace star {
+ namespace beans { class XPropertySet; }
+} } }
+
+class XMLOFF_DLLPUBLIC XMLPropStyleContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString msIsPhysical;
+ const ::rtl::OUString msFollowStyle;
+ ::std::vector< XMLPropertyState > maProperties;
+ ::com::sun::star::uno::Reference < ::com::sun::star::style::XStyle > mxStyle;
+ SvXMLImportContextRef mxStyles;
+
+ SAL_DLLPRIVATE XMLPropStyleContext(XMLPropStyleContext &); // not defined
+ SAL_DLLPRIVATE void operator =(XMLPropStyleContext &); // not defined
+
+protected:
+
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+ SvXMLStylesContext *GetStyles() { return (SvXMLStylesContext *)&mxStyles; }
+ ::std::vector< XMLPropertyState > & GetProperties() { return maProperties; }
+
+ // This methos my be overloaded to create a new style. Its called by
+ // CreateInsert to create a style if a style with the requested family and
+ // name couldn't be found. The st
+ virtual ::com::sun::star::uno::Reference <
+ ::com::sun::star::style::XStyle > Create();
+
+public:
+
+ TYPEINFO();
+
+ XMLPropStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily = 0,
+ sal_Bool bDefaultStyle=sal_False );
+ virtual ~XMLPropStyleContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void FillPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropSet );
+
+ const SvXMLStylesContext *GetStyles() const { return (const SvXMLStylesContext *)&mxStyles; }
+ const ::std::vector< XMLPropertyState > & GetProperties() const { return maProperties; }
+
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::style::XStyle >&
+ GetStyle() const { return mxStyle; }
+ void SetStyle(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle >& xStl) { mxStyle = xStl; }
+
+ virtual void SetDefaults();
+
+ virtual void CreateAndInsert( sal_Bool bOverwrite );
+ virtual void Finish( sal_Bool bOverwrite );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/shapeexport.hxx b/xmloff/inc/xmloff/shapeexport.hxx
new file mode 100644
index 000000000000..2f8ef85c172e
--- /dev/null
+++ b/xmloff/inc/xmloff/shapeexport.hxx
@@ -0,0 +1,340 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SHAPEEXPORT_HXX_
+#define _XMLOFF_SHAPEEXPORT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <xmloff/uniref.hxx>
+
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+#include <map>
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/xmlexppr.hxx>
+#include <xmloff/animexp.hxx>
+#include <xmloff/families.hxx>
+
+#include "xmloff/table/XMLTableExport.hxx"
+
+// shape export features are bits used for the nFeature
+// parameter of XMLShapeExport::exportShape
+
+#define SEF_EXPORT_X 0x0001
+#define SEF_EXPORT_Y 0x0002
+#define SEF_EXPORT_POSITION 0x0003
+
+#define SEF_EXPORT_WIDTH 0x0004
+#define SEF_EXPORT_HEIGHT 0x0008
+#define SEF_EXPORT_SIZE 0x000c
+
+// when you set this flag a chart does NOT export its own data as table element
+#define SEF_EXPORT_NO_CHART_DATA 0x0010
+
+// When setting the flag below no ignorableWhiteSpace will be called around
+// the drawing object elements
+#define SEF_EXPORT_NO_WS 0x0020
+
+// When setting the flag below a callout shape is exported as office:annotation
+#define SEF_EXPORT_ANNOTATION 0x0040
+
+#define SEF_DEFAULT SEF_EXPORT_POSITION|SEF_EXPORT_SIZE
+
+enum XmlShapeType
+{
+ XmlShapeTypeUnknown, // not known
+
+ XmlShapeTypeDrawRectangleShape, // "com.sun.star.drawing.RectangleShape"
+ XmlShapeTypeDrawEllipseShape, // "com.sun.star.drawing.EllipseShape"
+ XmlShapeTypeDrawControlShape, // "com.sun.star.drawing.ControlShape"
+ XmlShapeTypeDrawConnectorShape, // "com.sun.star.drawing.ConnectorShape"
+ XmlShapeTypeDrawMeasureShape, // "com.sun.star.drawing.MeasureShape"
+ XmlShapeTypeDrawLineShape, // "com.sun.star.drawing.LineShape"
+ XmlShapeTypeDrawPolyPolygonShape, // "com.sun.star.drawing.PolyPolygonShape"
+ XmlShapeTypeDrawPolyLineShape, // "com.sun.star.drawing.PolyLineShape"
+ XmlShapeTypeDrawOpenBezierShape, // "com.sun.star.drawing.OpenBezierShape"
+ XmlShapeTypeDrawClosedBezierShape, // "com.sun.star.drawing.ClosedBezierShape"
+ XmlShapeTypeDrawGraphicObjectShape, // "com.sun.star.drawing.GraphicObjectShape"
+ XmlShapeTypeDrawGroupShape, // "com.sun.star.drawing.GroupShape"
+ XmlShapeTypeDrawTextShape, // "com.sun.star.drawing.TextShape"
+ XmlShapeTypeDrawOLE2Shape, // "com.sun.star.drawing.OLE2Shape"
+ XmlShapeTypeDrawChartShape, // embedded com.sun.star.chart
+ XmlShapeTypeDrawSheetShape, // embedded com.sun.star.sheet
+ XmlShapeTypeDrawPageShape, // "com.sun.star.drawing.PageShape"
+ XmlShapeTypeDrawFrameShape, // "com.sun.star.drawing.FrameShape"
+ XmlShapeTypeDrawCaptionShape, // "com.sun.star.drawing.CaptionShape"
+ XmlShapeTypeDrawAppletShape, // "com.sun.star.drawing.AppletShape"
+ XmlShapeTypeDrawPluginShape, // "com.sun.star.drawing.PlugginShape"
+
+ XmlShapeTypeDraw3DSceneObject, // "com.sun.star.drawing.Shape3DSceneObject"
+ XmlShapeTypeDraw3DCubeObject, // "com.sun.star.drawing.Shape3DCubeObject"
+ XmlShapeTypeDraw3DSphereObject, // "com.sun.star.drawing.Shape3DSphereObject"
+ XmlShapeTypeDraw3DLatheObject, // "com.sun.star.drawing.Shape3DLatheObject"
+ XmlShapeTypeDraw3DExtrudeObject, // "com.sun.star.drawing.Shape3DExtrudeObject"
+
+ XmlShapeTypePresTitleTextShape, // "com.sun.star.presentation.TitleTextShape"
+ XmlShapeTypePresOutlinerShape, // "com.sun.star.presentation.OutlinerShape"
+ XmlShapeTypePresSubtitleShape, // "com.sun.star.presentation.SubtitleShape"
+ XmlShapeTypePresGraphicObjectShape, // "com.sun.star.presentation.GraphicObjectShape"
+ XmlShapeTypePresPageShape, // "com.sun.star.presentation.PageShape"
+ XmlShapeTypePresOLE2Shape, // "com.sun.star.presentation.OLE2Shape"
+ XmlShapeTypePresChartShape, // "com.sun.star.presentation.ChartShape"
+ 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"
+
+ XmlShapeTypePresHeaderShape, // "com.sun.star.presentation.HeaderShape"
+ XmlShapeTypePresFooterShape, // "com.sun.star.presentation.FooterShape"
+ XmlShapeTypePresSlideNumberShape, // "com.sun.star.presentation.SlideNumberShape"
+ XmlShapeTypePresDateTimeShape, // "com.sun.star.presentation.DateTimeShape"
+
+ XmlShapeTypeDrawCustomShape, // "com.sun.star.drawing.CustomShape"
+ XmlShapeTypeDrawMediaShape, // "com.sun.star.drawing.MediaShape"
+ XmlShapeTypePresMediaShape, // "com.sun.star.presentation.MediaShape"
+
+ XmlShapeTypeDrawTableShape, // "com.sun.star.drawing.TableShape"
+
+ XmlShapeTypeNotYetSet
+};
+
+/** caches style and type info after a collectShapeAutostyle for later use in exportShape */
+struct ImplXMLShapeExportInfo
+{
+ rtl::OUString msStyleName;
+ rtl::OUString msTextStyleName;
+ sal_Int32 mnFamily;
+ XmlShapeType meShapeType;
+
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape > xCustomShapeReplacement;
+
+ ImplXMLShapeExportInfo() : mnFamily( XML_STYLE_FAMILY_SD_GRAPHICS_ID ), meShapeType( XmlShapeTypeNotYetSet ) {}
+};
+
+/** a vector for shape style and type cache information */
+typedef std::vector< ImplXMLShapeExportInfo > ImplXMLShapeExportInfoVector;
+
+/** a map to store all cache data for already collected XShapes */
+typedef std::map< com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >, ImplXMLShapeExportInfoVector > ShapesInfos;
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SvXMLExport;
+class SvXMLExportPropertyMapper;
+
+namespace basegfx
+{
+ class B2DTuple;
+ class B2DHomMatrix;
+} // end of namespace basegfx
+
+class XMLOFF_DLLPUBLIC XMLShapeExport : public UniRefBase
+{
+private:
+
+ SvXMLExport& mrExport;
+ UniReference< XMLPropertyHandlerFactory > mxSdPropHdlFactory;
+ UniReference< SvXMLExportPropertyMapper > mxPropertySetMapper;
+ UniReference< XMLAnimationsExporter > mxAnimationsExporter;
+ sal_Int32 mnNextUniqueShapeId;
+ ShapesInfos maShapesInfos;
+ ShapesInfos::iterator maCurrentShapesIter;
+ sal_Bool mbExportLayer;
+ ImplXMLShapeExportInfoVector maShapeInfos;
+ ImplXMLShapeExportInfoVector::iterator maCurrentInfo;
+ rtl::OUString msPresentationStylePrefix;
+
+ // #88546# possibility to swich progress bar handling on/off
+ sal_Bool mbHandleProgressBar;
+
+ rtl::Reference< XMLTableExport > mxShapeTableExport;
+
+protected:
+ SvXMLExport& GetExport() { return mrExport; }
+ const SvXMLExport& GetExport() const { return mrExport; }
+private:
+
+ SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; }
+
+ const rtl::OUString msZIndex;
+ const rtl::OUString msPrintable;
+ const rtl::OUString msVisible;
+
+ const rtl::OUString msEmptyPres;
+ const rtl::OUString msModel;
+ const rtl::OUString msStartShape;
+ const rtl::OUString msEndShape;
+ const rtl::OUString msOnClick;
+ const rtl::OUString msEventType;
+ const rtl::OUString msPresentation;
+ const rtl::OUString msMacroName;
+ const rtl::OUString msScript;
+ const rtl::OUString msLibrary;
+ const rtl::OUString msClickAction;
+ const rtl::OUString msBookmark;
+ const rtl::OUString msEffect;
+ const rtl::OUString msPlayFull;
+ const rtl::OUString msVerb;
+ const rtl::OUString msSoundURL;
+ const rtl::OUString msSpeed;
+ const rtl::OUString msStarBasic;
+
+ rtl::OUStringBuffer msBuffer;
+
+ SAL_DLLPRIVATE void ImpCalcShapeType(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType& eShapeType);
+
+ SAL_DLLPRIVATE void ImpExportNewTrans(const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet, sal_Int32 nFeatures, com::sun::star::awt::Point* pRefPoint);
+ SAL_DLLPRIVATE void ImpExportNewTrans_GetB2DHomMatrix(::basegfx::B2DHomMatrix& rMatrix, const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet);
+ SAL_DLLPRIVATE void ImpExportNewTrans_DecomposeAndRefPoint(const ::basegfx::B2DHomMatrix& rMat, ::basegfx::B2DTuple& rTRScale, double& fTRShear, double& fTRRotate, ::basegfx::B2DTuple& rTRTranslate, com::sun::star::awt::Point* pRefPoint);
+ SAL_DLLPRIVATE void ImpExportNewTrans_FeaturesAndWrite(::basegfx::B2DTuple& rTRScale, double fTRShear, double fTRRotate, ::basegfx::B2DTuple& rTRTranslate, const sal_Int32 nFeatures);
+ SAL_DLLPRIVATE sal_Bool ImpExportPresentationAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet, const rtl::OUString& rClass );
+ SAL_DLLPRIVATE void ImpExportText( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
+ SAL_DLLPRIVATE void ImpExportEvents( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
+ SAL_DLLPRIVATE void ImpExportDescription( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape ); // #i68101#
+ SAL_DLLPRIVATE void ImpExportGluePoints( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape );
+
+ // single shape exporters
+ SAL_DLLPRIVATE void ImpExportGroupShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExport3DSceneShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportRectangleShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportLineShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportEllipseShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportPolygonShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportTextBoxShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportGraphicObjectShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportChartShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL );
+ SAL_DLLPRIVATE void ImpExportControlShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportConnectorShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportMeasureShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportOLE2Shape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL, SvXMLAttributeList* pAttrList = NULL );
+ SAL_DLLPRIVATE void ImpExportPageShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportCaptionShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExport3DShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportFrameShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportPluginShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportAppletShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportCustomShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportMediaShape( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+ SAL_DLLPRIVATE void ImpExportTableShape(const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, XmlShapeType eShapeType, sal_Int32 nFeatures = SEF_DEFAULT, com::sun::star::awt::Point* pRefPoint = NULL );
+public:
+ XMLShapeExport(SvXMLExport& rExp, SvXMLExportPropertyMapper *pExtMapper=0 );
+ virtual ~XMLShapeExport();
+
+ // This method collects all automatic styles for the given XShape
+ void collectShapeAutoStyles(
+ const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape);
+
+ // This method exports the given XShape
+ void exportShape(
+ const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape,
+ sal_Int32 nFeatures = SEF_DEFAULT,
+ com::sun::star::awt::Point* pRefPoint = NULL,
+ SvXMLAttributeList* pAttrList = NULL
+ );
+
+ // This method collects all automatic styles for the shapes inside the given XShapes collection
+ void collectShapesAutoStyles(
+ const com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >& xShapes);
+
+ // This method exports all XShape inside the given XShapes collection
+ void exportShapes(
+ const com::sun::star::uno::Reference < com::sun::star::drawing::XShapes >& xShapes,
+ sal_Int32 nFeatures = SEF_DEFAULT,
+ com::sun::star::awt::Point* pRefPoint = NULL
+ );
+
+ /** initializes some internal structures for fast access to the given XShapes collection
+
+ <p>This method has to be called before you use exportShape or collectShapeAutoStyles.
+ It is automaticly called if you use collectShapesAutoStyles and exportShapes.
+
+ @see collectShapeAutoStyles
+ @see exportShape
+ @see collectShapesAutoStyles
+ @see exportShapes
+ */
+ void seekShapes(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xShapes ) throw();
+
+ void exportAutoStyles();
+
+ /** sets a new reference to an XMLAnimationExporter.
+ If this is a non NULL reference, the animation information from all shapes given to exportShape()
+ from now on are collected.
+ */
+ void setAnimationsExporter( UniReference< XMLAnimationsExporter > xAnimExport ) { mxAnimationsExporter = xAnimExport; }
+
+ /** returns the last set XMLAnimationExport */
+ UniReference< XMLAnimationsExporter > getAnimationsExporter() const { return mxAnimationsExporter; }
+
+ /// returns the export property mapper for external chaining
+ static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport );
+
+ void enableLayerExport( sal_Bool bEnable = sal_True ) { mbExportLayer = bEnable; }
+ sal_Bool IsLayerExportEnabled() const { return mbExportLayer; }
+
+ // #88546#
+ /** defines if the export should increment the progress bar or not */
+ void enableHandleProgressBar( sal_Bool bEnable = sal_True ) { mbHandleProgressBar = bEnable; }
+ sal_Bool IsHandleProgressBarEnabled() const { return mbHandleProgressBar; }
+
+ void setPresentationStylePrefix( const rtl::OUString& rPrefix ) { msPresentationStylePrefix = rPrefix; }
+
+ /** helper for chart that adds all attributes of a 3d scene element to the export */
+ void export3DSceneAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
+
+ /** helper for chart that exports all lamps from the propertyset */
+ void export3DLamps( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
+
+ /** sj: replacing CustomShapes with standard objects that are also supported in OpenOffice.org format */
+ com::sun::star::uno::Reference < com::sun::star::drawing::XShape > checkForCustomShapeReplacement(
+ const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& );
+
+ /** helper to export the style for graphic defaults */
+ void ExportGraphicDefaults();
+
+ /** is called before a shape element for the given XShape is exported */
+ virtual void onExport( const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape );
+
+ const rtl::Reference< XMLTableExport >& GetShapeTableExport();
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/shapeimport.hxx b/xmloff/inc/xmloff/shapeimport.hxx
new file mode 100644
index 000000000000..6354dc1b41c7
--- /dev/null
+++ b/xmloff/inc/xmloff/shapeimport.hxx
@@ -0,0 +1,442 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_SHAPEIMPORT_HXX_
+#define _XMLOFF_SHAPEIMPORT_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/drawing/HomogenMatrix.hpp>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <tools/color.hxx>
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmlictxt.hxx>
+
+#include "xmloff/table/XMLTableImport.hxx"
+#include <basegfx/vector/b3dvector.hxx>
+
+class SvXMLImport;
+class SvXMLImportContext;
+class SvXMLTokenMap;
+class SvXMLStylesContext;
+class XMLSdPropHdlFactory;
+class XMLPropertySetMapper;
+class SvXMLImportPropertyMapper;
+
+//////////////////////////////////////////////////////////////////////////////
+
+enum SdXMLGroupShapeElemTokenMap
+{
+ XML_TOK_GROUP_GROUP,
+ XML_TOK_GROUP_RECT,
+ XML_TOK_GROUP_LINE,
+ XML_TOK_GROUP_CIRCLE,
+ XML_TOK_GROUP_ELLIPSE,
+ XML_TOK_GROUP_POLYGON,
+ XML_TOK_GROUP_POLYLINE,
+ XML_TOK_GROUP_PATH,
+
+ XML_TOK_GROUP_CONTROL,
+ XML_TOK_GROUP_CONNECTOR,
+ XML_TOK_GROUP_MEASURE,
+ XML_TOK_GROUP_PAGE,
+ XML_TOK_GROUP_CAPTION,
+
+ XML_TOK_GROUP_CHART,
+ XML_TOK_GROUP_3DSCENE,
+
+ XML_TOK_GROUP_FRAME,
+
+ XML_TOK_GROUP_CUSTOM_SHAPE,
+
+ XML_TOK_GROUP_ANNOTATION,
+
+ XML_TOK_GROUP_A,
+
+ XML_TOK_GROUP_LAST
+};
+
+enum SdXMLFrameShapeElemTokenMap
+{
+ XML_TOK_FRAME_TEXT_BOX,
+ XML_TOK_FRAME_IMAGE,
+ XML_TOK_FRAME_OBJECT,
+ XML_TOK_FRAME_OBJECT_OLE,
+ XML_TOK_FRAME_PLUGIN,
+ XML_TOK_FRAME_FRAME,
+ XML_TOK_FRAME_FLOATING_FRAME,
+ XML_TOK_FRAME_APPLET,
+ XML_TOK_FRAME_TABLE,
+
+ XML_TOK_FRAME_LAST
+};
+
+enum SdXML3DSceneShapeElemTokenMap
+{
+ XML_TOK_3DSCENE_3DSCENE,
+ XML_TOK_3DSCENE_3DCUBE,
+ XML_TOK_3DSCENE_3DSPHERE,
+ XML_TOK_3DSCENE_3DLATHE,
+ XML_TOK_3DSCENE_3DEXTRUDE,
+
+ XML_TOK_3DSCENE_LAST
+};
+
+enum SdXMLShapeAttrTokenMap
+{
+ XML_TOK_SHAPE_NAME,
+ XML_TOK_SHAPE_DRAWSTYLE_NAME_GRAPHICS,
+ XML_TOK_SHAPE_PRESENTATION_CLASS,
+ XML_TOK_SHAPE_DRAWSTYLE_NAME_PRESENTATION,
+ XML_TOK_SHAPE_TRANSFORM,
+ XML_TOK_SHAPE_IS_PLACEHOLDER,
+ XML_TOK_SHAPE_IS_USER_TRANSFORMED
+};
+
+enum SdXML3DObjectAttrTokenMap
+{
+ XML_TOK_3DOBJECT_DRAWSTYLE_NAME,
+ XML_TOK_3DOBJECT_TRANSFORM
+};
+
+enum SdXML3DPolygonBasedAttrTokenMap
+{
+ XML_TOK_3DPOLYGONBASED_VIEWBOX,
+ XML_TOK_3DPOLYGONBASED_D
+};
+
+enum SdXML3DCubeObjectAttrTokenMap
+{
+ XML_TOK_3DCUBEOBJ_MINEDGE,
+ XML_TOK_3DCUBEOBJ_MAXEDGE
+};
+
+enum SdXML3DSphereObjectAttrTokenMap
+{
+ XML_TOK_3DSPHEREOBJ_CENTER,
+ XML_TOK_3DSPHEREOBJ_SIZE
+};
+
+enum SdXMLPolygonShapeAttrTokenMap
+{
+ XML_TOK_POLYGONSHAPE_VIEWBOX,
+ XML_TOK_POLYGONSHAPE_POINTS
+};
+
+enum SdXMLPathShapeAttrTokenMap
+{
+ XML_TOK_PATHSHAPE_VIEWBOX,
+ XML_TOK_PATHSHAPE_D
+};
+
+enum SdXML3DSceneShapeAttrTokenMap
+{
+ XML_TOK_3DSCENESHAPE_TRANSFORM,
+ XML_TOK_3DSCENESHAPE_VRP,
+ XML_TOK_3DSCENESHAPE_VPN,
+ XML_TOK_3DSCENESHAPE_VUP,
+ XML_TOK_3DSCENESHAPE_PROJECTION,
+ XML_TOK_3DSCENESHAPE_DISTANCE,
+ XML_TOK_3DSCENESHAPE_FOCAL_LENGTH,
+ XML_TOK_3DSCENESHAPE_SHADOW_SLANT,
+ XML_TOK_3DSCENESHAPE_SHADE_MODE,
+ XML_TOK_3DSCENESHAPE_AMBIENT_COLOR,
+ XML_TOK_3DSCENESHAPE_LIGHTING_MODE
+};
+
+enum SdXML3DLightAttrTokenMap
+{
+ XML_TOK_3DLIGHT_DIFFUSE_COLOR,
+ XML_TOK_3DLIGHT_DIRECTION,
+ XML_TOK_3DLIGHT_ENABLED,
+ XML_TOK_3DLIGHT_SPECULAR
+};
+
+//////////////////////////////////////////////////////////////////////////////
+// dr3d:3dlight context
+
+class SdXML3DLightContext: public SvXMLImportContext
+{
+ // local parameters which need to be read
+ Color maDiffuseColor;
+ ::basegfx::B3DVector maDirection;
+ bool mbEnabled;
+ bool mbSpecular;
+
+public:
+ SdXML3DLightContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrfx,
+ const rtl::OUString& rLName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+ virtual ~SdXML3DLightContext();
+
+ const Color& GetDiffuseColor() { return maDiffuseColor; }
+ const ::basegfx::B3DVector& GetDirection() { return maDirection; }
+ BOOL GetEnabled() { return mbEnabled; }
+ BOOL GetSpecular() { return mbSpecular; }
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+DECLARE_LIST(Imp3DLightList, SdXML3DLightContext*)
+
+class SdXML3DSceneAttributesHelper
+{
+protected:
+ SvXMLImport& mrImport;
+
+ // list for local light contexts
+ Imp3DLightList maList;
+
+ // local parameters which need to be read
+ com::sun::star::drawing::HomogenMatrix mxHomMat;
+ BOOL mbSetTransform;
+
+ com::sun::star::drawing::ProjectionMode mxPrjMode;
+ sal_Int32 mnDistance;
+ sal_Int32 mnFocalLength;
+ sal_Int32 mnShadowSlant;
+ com::sun::star::drawing::ShadeMode mxShadeMode;
+ Color maAmbientColor;
+ bool mbLightingMode;
+
+ ::basegfx::B3DVector maVRP;
+ ::basegfx::B3DVector maVPN;
+ ::basegfx::B3DVector maVUP;
+ BOOL mbVRPUsed;
+ BOOL mbVPNUsed;
+ BOOL mbVUPUsed;
+
+public:
+ SdXML3DSceneAttributesHelper( SvXMLImport& rImporter );
+ ~SdXML3DSceneAttributesHelper();
+
+ /** creates a 3d ligth context and adds it to the internal list for later processing */
+ SvXMLImportContext * create3DLightContext( sal_uInt16 nPrfx, const rtl::OUString& rLName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList);
+
+ /** this should be called for each scene attribute */
+ void processSceneAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue );
+
+ /** this sets the scene attributes at this propertyset */
+ void setSceneAttributes( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xPropSet );
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class SvXMLShapeContext : public SvXMLImportContext
+{
+protected:
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxShape;
+ sal_Bool mbTemporaryShape;
+ rtl::OUString msHyperlink;
+
+public:
+ SvXMLShapeContext( SvXMLImport& rImp, USHORT nPrfx,
+ const ::rtl::OUString& rLName, sal_Bool bTemporaryShape ) : SvXMLImportContext( rImp, nPrfx, rLName ), mbTemporaryShape(bTemporaryShape) {}
+
+ TYPEINFO();
+
+ const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& getShape() const { return mxShape; }
+
+ void setHyperlink( const ::rtl::OUString& rHyperlink );
+};
+
+//////////////////////////////////////////////////////////////////////////////
+
+class ShapeSortContext;
+struct XMLShapeImportHelperImpl;
+struct XMLShapeImportPageContextImpl;
+
+class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public UniRefBase
+{
+ XMLShapeImportHelperImpl* mpImpl;
+
+ XMLShapeImportPageContextImpl* mpPageContext;
+
+ com::sun::star::uno::Reference< com::sun::star::frame::XModel > mxModel;
+
+ // PropertySetMappers and factory
+ XMLSdPropHdlFactory* mpSdPropHdlFactory;
+ SvXMLImportPropertyMapper* mpPropertySetMapper;
+ SvXMLImportPropertyMapper* mpPresPagePropsMapper;
+
+ // contexts for Style and AutoStyle import
+ SvXMLStylesContext* mpStylesContext;
+ SvXMLStylesContext* mpAutoStylesContext;
+
+ // contexts for xShape contents TokenMaps
+ SvXMLTokenMap* mpGroupShapeElemTokenMap;
+ SvXMLTokenMap* mpFrameShapeElemTokenMap;
+ SvXMLTokenMap* mp3DSceneShapeElemTokenMap;
+ SvXMLTokenMap* mp3DObjectAttrTokenMap;
+ SvXMLTokenMap* mp3DPolygonBasedAttrTokenMap;
+ SvXMLTokenMap* mp3DCubeObjectAttrTokenMap;
+ SvXMLTokenMap* mp3DSphereObjectAttrTokenMap;
+ SvXMLTokenMap* mp3DSceneShapeAttrTokenMap;
+ SvXMLTokenMap* mp3DLightAttrTokenMap;
+ SvXMLTokenMap* mpPathShapeAttrTokenMap;
+ SvXMLTokenMap* mpPolygonShapeAttrTokenMap;
+
+ const ::rtl::OUString msStartShape;
+ const ::rtl::OUString msEndShape;
+ const ::rtl::OUString msStartGluePointIndex;
+ const ::rtl::OUString msEndGluePointIndex;
+
+ rtl::Reference< XMLTableImport > mxShapeTableImport;
+
+protected:
+ SvXMLImport& mrImporter;
+
+public:
+ XMLShapeImportHelper( SvXMLImport& rImporter,
+ const com::sun::star::uno::Reference< com::sun::star::frame::XModel>& rModel,
+ SvXMLImportPropertyMapper *pExtMapper=0 );
+
+ ~XMLShapeImportHelper();
+
+ SvXMLShapeContext* CreateGroupChildContext(
+ SvXMLImport& rImport, sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
+ sal_Bool bTemporaryShape = sal_False);
+
+ SvXMLShapeContext* CreateFrameChildContext(
+ SvXMLImport& rImport, sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xFrameAttrList);
+ SvXMLImportContext* CreateFrameChildContext(
+ SvXMLImportContext *pThisContext, USHORT nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ SvXMLShapeContext* Create3DSceneChildContext(
+ SvXMLImport& rImport, sal_uInt16 nPrefix, const rtl::OUString& rLocalName,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+
+ const SvXMLTokenMap& GetGroupShapeElemTokenMap();
+ const SvXMLTokenMap& GetFrameShapeElemTokenMap();
+ const SvXMLTokenMap& Get3DSceneShapeElemTokenMap();
+ const SvXMLTokenMap& Get3DObjectAttrTokenMap();
+ const SvXMLTokenMap& Get3DPolygonBasedAttrTokenMap();
+ const SvXMLTokenMap& Get3DCubeObjectAttrTokenMap();
+ const SvXMLTokenMap& Get3DSphereObjectAttrTokenMap();
+ const SvXMLTokenMap& Get3DSceneShapeAttrTokenMap();
+ const SvXMLTokenMap& Get3DLightAttrTokenMap();
+ const SvXMLTokenMap& GetPathShapeAttrTokenMap();
+ const SvXMLTokenMap& GetPolygonShapeAttrTokenMap();
+
+ // Styles and AutoStyles contexts
+ SvXMLStylesContext* GetStylesContext() const { return mpStylesContext; }
+ void SetStylesContext(SvXMLStylesContext* pNew);
+ SvXMLStylesContext* GetAutoStylesContext() const { return mpAutoStylesContext; }
+ void SetAutoStylesContext(SvXMLStylesContext* pNew);
+
+ // get factories and mappers
+ SvXMLImportPropertyMapper* GetPropertySetMapper() const { return mpPropertySetMapper; }
+ SvXMLImportPropertyMapper* GetPresPagePropsMapper() const { return mpPresPagePropsMapper; }
+
+ // this function is called whenever the implementation classes like to add this new
+ // shape to the given XShapes.
+ virtual void addShape(
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+
+ // this function is called whenever the implementation classes have finished importing
+ // a shape to the given XShapes. The shape is already inserted into its XShapes and
+ // all properties and styles are set.
+ virtual void finishShape(
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
+ const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes);
+
+ // helper functions for z-order sorting
+ void pushGroupForSorting( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes );
+ void popGroupAndSort();
+
+ void shapeWithZIndexAdded( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rShape,
+ sal_Int32 nZIndex );
+
+ void addShapeConnection( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& rConnectorShape,
+ sal_Bool bStart,
+ const rtl::OUString& rDestShapeId,
+ sal_Int32 nDestGlueId );
+
+ /** adds a mapping for a glue point identifier from an xml file to the identifier created after inserting
+ the new glue point into the core. The saved mappings can be retrieved by getGluePointId() */
+ void addGluePointMapping( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape,
+ sal_Int32 nSourceId, sal_Int32 nDestinnationId );
+
+ /** moves all current DestinationId's for rXShape by n */
+ void moveGluePointMapping( const com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, const sal_Int32 n );
+
+ /** retrieves a mapping for a glue point identifier from the current xml file to the identifier created after
+ inserting the new glue point into the core. The mapping must be initialized first with addGluePointMapping() */
+ sal_Int32 getGluePointId( com::sun::star::uno::Reference< com::sun::star::drawing::XShape >& xShape, sal_Int32 nSourceId );
+
+ /** this method must be calling before the first shape is imported for the given page.
+ Calls to this method can be nested */
+ void startPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes );
+
+ /** this method must be calling after the last shape is imported for the given page
+ Calls to this method can be nested */
+ void endPage( com::sun::star::uno::Reference< com::sun::star::drawing::XShapes >& rShapes );
+
+ void restoreConnections();
+
+ /** creates a property mapper for external chaining */
+ static SvXMLImportPropertyMapper* CreateShapePropMapper(
+ const com::sun::star::uno::Reference< com::sun::star::frame::XModel>& rModel, SvXMLImport& rImport );
+
+ /** creates a shape property set mapper that can be used for non shape elements */
+ static SvXMLImportPropertyMapper* CreateExternalShapePropMapper(
+ const com::sun::star::uno::Reference< com::sun::star::frame::XModel>& rModel, SvXMLImport& rImport );
+
+ // #88546#
+ /** defines if the import should increment the progress bar or not */
+ void enableHandleProgressBar( sal_Bool bEnable = sal_True );
+ sal_Bool IsHandleProgressBarEnabled() const;
+
+ /** queries the capability of the current model to create presentation shapes */
+ sal_Bool IsPresentationShapesSupported();
+
+ XMLSdPropHdlFactory* GetSdPropHdlFactory() const { return mpSdPropHdlFactory; }
+
+ const rtl::Reference< XMLTableImport >& GetShapeTableImport();
+};
+
+#endif // _XMLOFF_SHAPEIMPORT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/styleexp.hxx b/xmloff/inc/xmloff/styleexp.hxx
new file mode 100644
index 000000000000..d65a26094ddf
--- /dev/null
+++ b/xmloff/inc/xmloff/styleexp.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_STYLEEXP_HXX_
+#define _XMLOFF_STYLEEXP_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.h>
+
+#include <xmloff/uniref.hxx>
+
+namespace com { namespace sun { namespace star
+{
+ namespace style
+ {
+ class XStyle;
+ }
+ namespace beans
+ {
+ class XPropertySet;
+ }
+ namespace container //#outline level,add by zhaojianwei
+ {
+ class XNameAccess;
+ } //<-end,zhaojianwei
+
+} } }
+
+class XMLPropertySetMapper;
+class SvXMLExportPropertyMapper;
+class SvXMLAutoStylePoolP;
+class SvXMLExport;
+
+class XMLOFF_DLLPUBLIC XMLStyleExport : public UniRefBase
+{
+ SvXMLExport& rExport;
+protected:
+ const ::rtl::OUString sIsPhysical;
+ const ::rtl::OUString sIsAutoUpdate;
+ const ::rtl::OUString sFollowStyle;
+ const ::rtl::OUString sNumberingStyleName;
+ const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei
+
+ SvXMLExport& GetExport() { return rExport; }
+ const SvXMLExport& GetExport() const { return rExport; }
+
+private:
+
+ const ::rtl::OUString sPoolStyleName;
+
+ SvXMLAutoStylePoolP *pAutoStylePool;
+
+protected:
+
+ //virtual sal_Bool exportStyle( //#outline level,zhaojianwei
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::style::XStyle > & rStyle,
+ // const ::rtl::OUString& rXMLFamily,
+ // const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ // const ::rtl::OUString* pPrefix = 0L );
+ virtual sal_Bool exportStyle( //add by zhaojianwei
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle > & rStyle,
+ const ::rtl::OUString& rXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xStyles,
+ const ::rtl::OUString* pPrefix = 0L ); //<-end,zhaojianwei
+
+ virtual void exportStyleAttributes(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle > & rStyle );
+
+ virtual void exportStyleContent(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle > & rStyle );
+public:
+ XMLStyleExport(
+ SvXMLExport& rExp,
+ const ::rtl::OUString& rPoolStyleName,
+ SvXMLAutoStylePoolP *pAutoStyleP=0 );
+ virtual ~XMLStyleExport();
+
+// void exportStyleFamily(
+// const ::rtl::OUString& rFamily, const ::rtl::OUString& rXMLFamily,
+// const UniReference < XMLPropertySetMapper >& rPropMapper,
+// sal_Bool bUsed, sal_uInt16 nFamily = 0,
+// const ::rtl::OUString* pPrefix = 0L);
+
+// void exportStyleFamily(
+// const sal_Char *pFamily, const ::rtl::OUString& rXMLFamily,
+// const UniReference < XMLPropertySetMapper >& rPropMapper,
+// sal_Bool bUsed, sal_uInt16 nFamily = 0,
+// const ::rtl::OUString* pPrefix = 0L);
+
+ virtual sal_Bool exportDefaultStyle(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & xPropSet,
+ const ::rtl::OUString& rXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper );
+
+ void exportStyleFamily(
+ const ::rtl::OUString& rFamily, const ::rtl::OUString& rXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ sal_Bool bUsed, sal_uInt16 nFamily = 0,
+ const ::rtl::OUString* pPrefix = 0L);
+
+ void exportStyleFamily(
+ const sal_Char *pFamily, const ::rtl::OUString& rXMLFamily,
+ const UniReference < SvXMLExportPropertyMapper >& rPropMapper,
+ sal_Bool bUsed, sal_uInt16 nFamily = 0,
+ const ::rtl::OUString* pPrefix = 0L);
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/table/XMLTableExport.hxx b/xmloff/inc/xmloff/table/XMLTableExport.hxx
new file mode 100644
index 000000000000..a9ce59ab1152
--- /dev/null
+++ b/xmloff/inc/xmloff/table/XMLTableExport.hxx
@@ -0,0 +1,115 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTABLEEXPORT_HXX
+#define _XMLOFF_XMLTABLEEXPORT_HXX
+
+#include "sal/config.h"
+
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <map>
+#include <vector>
+
+#include <com/sun/star/table/XTableColumns.hpp>
+#include <com/sun/star/table/XColumnRowRange.hpp>
+#include <com/sun/star/table/XCell.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
+
+#include <rtl/ref.hxx>
+
+#include "xmloff/dllapi.h"
+#include "xmloff/uniref.hxx"
+#include "xmloff/xmlprmap.hxx"
+#include "xmloff/xmlexppr.hxx"
+
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class SvXMLExport;
+class SvXMLExportPropertyMapper;
+
+typedef ::std::map< const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >, rtl::OUString > TableStyleMap;
+
+struct XMLTableInfo
+{
+ TableStyleMap maColumnStyleMap;
+ TableStyleMap maRowStyleMap;
+ TableStyleMap maCellStyleMap;
+ std::vector< ::rtl::OUString > maDefaultRowCellStyles;
+};
+
+typedef ::std::map< const ::com::sun::star::uno::Reference< com::sun::star::table::XColumnRowRange >, boost::shared_ptr< XMLTableInfo > > TableInfoMap;
+
+class XMLOFF_DLLPUBLIC XMLTableExport : public UniRefBase
+{
+public:
+ XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExportPropertyMapper >& xCellExportPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef );
+ virtual ~XMLTableExport();
+
+ // This method collects all automatic styles for the given table
+ void collectTableAutoStyles(const com::sun::star::uno::Reference < com::sun::star::table::XColumnRowRange >& xColumnRowRange);
+
+ // This method exports the given table
+ void exportTable(const com::sun::star::uno::Reference < com::sun::star::table::XColumnRowRange >& xColumnRowRange);
+
+ // export the styles from the cell style family
+ void exportTableStyles();
+
+ // Export the collected automatic styles
+ void exportAutoStyles();
+
+private:
+ void exportTableTemplates();
+
+ SvXMLExport& mrExport;
+ rtl::Reference< SvXMLExportPropertyMapper > mxCellExportPropertySetMapper;
+ rtl::Reference< SvXMLExportPropertyMapper > mxRowExportPropertySetMapper;
+ rtl::Reference< SvXMLExportPropertyMapper > mxColumnExportPropertySetMapper;
+ TableInfoMap maTableInfoMap;
+ bool mbExportTables;
+
+protected:
+ SvXMLExport& GetExport() { return mrExport; }
+ const SvXMLExport& GetExport() const { return mrExport; }
+private:
+
+ SAL_DLLPRIVATE void ImpExportText( const com::sun::star::uno::Reference < com::sun::star::table::XCell >& xCell );
+
+ void ExportCell( const com::sun::star::uno::Reference < com::sun::star::table::XCell >& xCell, const boost::shared_ptr< XMLTableInfo >& pTableInfo, const ::rtl::OUString& sDefaultCellStyle );
+ void ExportTableColumns( const com::sun::star::uno::Reference < com::sun::star::container::XIndexAccess >& xtableColumns, const boost::shared_ptr< XMLTableInfo >& pTableInfo );
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/table/XMLTableImport.hxx b/xmloff/inc/xmloff/table/XMLTableImport.hxx
new file mode 100644
index 000000000000..211c4548cdc2
--- /dev/null
+++ b/xmloff/inc/xmloff/table/XMLTableImport.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 XMLTABLEIMPORT_HXX_
+#define XMLTABLEIMPORT_HXX_
+
+#include <com/sun/star/table/XColumnRowRange.hpp>
+
+#include "xmloff/dllapi.h"
+#include "xmloff/xmlictxt.hxx"
+#include "xmloff/uniref.hxx"
+#include "xmloff/xmlimppr.hxx"
+#include "xmloff/prhdlfac.hxx"
+
+#include <rtl/ref.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <map>
+
+class SvXMLStyleContext;
+
+typedef std::map< ::rtl::OUString, ::rtl::OUString > XMLTableTemplate;
+typedef std::map < ::rtl::OUString, boost::shared_ptr< XMLTableTemplate > > XMLTableTemplateMap;
+
+class XMLTableImport : public UniRefBase
+{
+ friend class XMLTableImportContext;
+
+public:
+ XMLTableImport( SvXMLImport& rImport, const rtl::Reference< XMLPropertySetMapper >& xCellPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef );
+ virtual ~XMLTableImport();
+
+ SvXMLImportContext* CreateTableContext( USHORT nPrfx, const ::rtl::OUString& rLName,
+ ::com::sun::star::uno::Reference< ::com::sun::star::table::XColumnRowRange >& xColumnRowRange );
+
+ SvXMLStyleContext* CreateTableTemplateContext( USHORT nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ rtl::Reference< SvXMLImportPropertyMapper > GetCellImportPropertySetMapper() const { return mxCellImportPropertySetMapper; }
+ rtl::Reference< SvXMLImportPropertyMapper > GetRowImportPropertySetMapper() const { return mxRowImportPropertySetMapper; }
+ rtl::Reference< SvXMLImportPropertyMapper > GetColumnImportPropertySetMapper() const { return mxColumnImportPropertySetMapper; }
+
+ void addTableTemplate( const rtl::OUString& rsStyleName, XMLTableTemplate& xTableTemplate );
+ void finishStyles();
+
+private:
+ SvXMLImport& mrImport;
+ rtl::Reference< SvXMLImportPropertyMapper > mxCellImportPropertySetMapper;
+ rtl::Reference< SvXMLImportPropertyMapper > mxRowImportPropertySetMapper;
+ rtl::Reference< SvXMLImportPropertyMapper > mxColumnImportPropertySetMapper;
+
+ XMLTableTemplateMap maTableTemplates;
+};
+
+#endif /*XMLTABLEIMPORT_HXX_*/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx
new file mode 100644
index 000000000000..ac8ee609da1d
--- /dev/null
+++ b/xmloff/inc/xmloff/txtimp.hxx
@@ -0,0 +1,761 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TEXTIMP_HXX
+#define XMLOFF_TEXTIMP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/uno/Reference.h>
+
+#include <map>
+#include <memory>
+#include <boost/utility.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <tools/list.hxx>
+#include <xmloff/xmltkmap.hxx>
+
+// functional.hxx is obsolete and should be replaced by its comphelper
+// counterpart
+#include <comphelper/stl_types.hxx>
+#include <xmloff/uniref.hxx>
+
+
+// --> OD 2008-04-25 #refactorlists#
+class XMLTextListsHelper;
+// <--
+
+class SvXMLImportContext;
+class SvXMLTokenMap;
+class SvXMLImportPropertyMapper;
+class SvXMLNamespaceMap;
+class SvXMLImport;
+class SvXMLStylesContext;
+class XMLTextListBlockContext;
+class SvxXMLListStyleContext;
+class XMLPropStyleContext;
+class SvI18NMap;
+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;
+ 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; }
+} } }
+
+enum SwXMLTextElemTokens
+{
+ XML_TOK_TEXT_P,
+ XML_TOK_TEXT_H,
+ XML_TOK_TEXT_LIST,
+ XML_TOK_TEXT_FRAME_PAGE,
+ XML_TOK_TABLE_TABLE,
+ XML_TOK_TEXT_VARFIELD_DECLS,
+ XML_TOK_TEXT_USERFIELD_DECLS,
+ XML_TOK_TEXT_SEQUENCE_DECLS,
+ XML_TOK_TEXT_DDE_DECLS,
+ XML_TOK_DRAW_A_PAGE,
+ XML_TOK_TEXT_SECTION,
+ XML_TOK_TEXT_TOC,
+ XML_TOK_TEXT_OBJECT_INDEX,
+ XML_TOK_TEXT_TABLE_INDEX,
+ XML_TOK_TEXT_ILLUSTRATION_INDEX,
+ XML_TOK_TEXT_USER_INDEX,
+ XML_TOK_TEXT_ALPHABETICAL_INDEX,
+ XML_TOK_TEXT_BIBLIOGRAPHY_INDEX,
+ XML_TOK_TEXT_INDEX_TITLE,
+ XML_TOK_TEXT_TRACKED_CHANGES,
+ XML_TOK_TEXT_CHANGE_START,
+ XML_TOK_TEXT_CHANGE_END,
+ XML_TOK_TEXT_CHANGE,
+ XML_TOK_TEXT_FORMS,
+ XML_TOK_TEXT_CALCULATION_SETTINGS,
+ XML_TOK_TEXT_AUTOMARK,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH,
+ XML_TOK_TEXT_ELEM_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextPElemTokens
+{
+ XML_TOK_TEXT_SPAN,
+ XML_TOK_TEXT_TAB_STOP,
+ XML_TOK_TEXT_LINE_BREAK,
+ XML_TOK_TEXT_SOFT_PAGE_BREAK,
+ XML_TOK_TEXT_S,
+ XML_TOK_TEXT_FRAME,
+ XML_TOK_TEXT_HYPERLINK,
+ XML_TOK_TEXT_RUBY,
+
+ XML_TOK_TEXT_NOTE,
+ XML_TOK_TEXT_BOOKMARK,
+ XML_TOK_TEXT_BOOKMARK_START,
+ XML_TOK_TEXT_BOOKMARK_END,
+ XML_TOK_TEXT_REFERENCE,
+ XML_TOK_TEXT_REFERENCE_START,
+ XML_TOK_TEXT_REFERENCE_END,
+
+ XML_TOK_TEXT_TOC_MARK, // index marks
+ XML_TOK_TEXT_TOC_MARK_START,
+ XML_TOK_TEXT_TOC_MARK_END,
+ XML_TOK_TEXT_USER_INDEX_MARK,
+ XML_TOK_TEXT_USER_INDEX_MARK_START,
+ XML_TOK_TEXT_USER_INDEX_MARK_END,
+ XML_TOK_TEXT_ALPHA_INDEX_MARK,
+ XML_TOK_TEXT_ALPHA_INDEX_MARK_START,
+ XML_TOK_TEXT_ALPHA_INDEX_MARK_END,
+
+ XML_TOK_TEXT_SENDER_FIRSTNAME, // sender fields
+ XML_TOK_TEXT_SENDER_LASTNAME,
+ XML_TOK_TEXT_SENDER_INITIALS,
+ XML_TOK_TEXT_SENDER_TITLE,
+ XML_TOK_TEXT_SENDER_POSITION,
+ XML_TOK_TEXT_SENDER_EMAIL,
+ XML_TOK_TEXT_SENDER_PHONE_PRIVATE,
+ XML_TOK_TEXT_SENDER_FAX,
+ XML_TOK_TEXT_SENDER_COMPANY,
+ XML_TOK_TEXT_SENDER_PHONE_WORK,
+ XML_TOK_TEXT_SENDER_STREET,
+ XML_TOK_TEXT_SENDER_CITY,
+ XML_TOK_TEXT_SENDER_POSTAL_CODE,
+ XML_TOK_TEXT_SENDER_COUNTRY,
+ XML_TOK_TEXT_SENDER_STATE_OR_PROVINCE,
+
+ XML_TOK_TEXT_AUTHOR_NAME, // author fields
+ XML_TOK_TEXT_AUTHOR_INITIALS,
+
+ XML_TOK_TEXT_DATE, // date & time fields
+ XML_TOK_TEXT_TIME,
+
+ XML_TOK_TEXT_PAGE_NUMBER, // page number fields
+ XML_TOK_TEXT_PAGE_CONTINUATION_STRING,
+
+ XML_TOK_TEXT_VARIABLE_SET, // variable fields
+ XML_TOK_TEXT_VARIABLE_GET,
+ XML_TOK_TEXT_VARIABLE_INPUT,
+ XML_TOK_TEXT_USER_FIELD_GET,
+ XML_TOK_TEXT_USER_FIELD_INPUT,
+ XML_TOK_TEXT_SEQUENCE,
+ XML_TOK_TEXT_EXPRESSION,
+ XML_TOK_TEXT_TEXT_INPUT,
+
+ XML_TOK_TEXT_DATABASE_DISPLAY, // database fields
+ XML_TOK_TEXT_DATABASE_NEXT,
+ XML_TOK_TEXT_DATABASE_SELECT,
+ XML_TOK_TEXT_DATABASE_ROW_NUMBER,
+ XML_TOK_TEXT_DATABASE_NAME,
+
+ XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR, //document info fields
+ XML_TOK_TEXT_DOCUMENT_CREATION_DATE,
+ XML_TOK_TEXT_DOCUMENT_CREATION_TIME,
+ XML_TOK_TEXT_DOCUMENT_DESCRIPTION,
+ XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR,
+ XML_TOK_TEXT_DOCUMENT_PRINT_DATE,
+ XML_TOK_TEXT_DOCUMENT_PRINT_TIME,
+ XML_TOK_TEXT_DOCUMENT_TITLE,
+ XML_TOK_TEXT_DOCUMENT_SUBJECT,
+ XML_TOK_TEXT_DOCUMENT_KEYWORDS,
+ XML_TOK_TEXT_DOCUMENT_REVISION,
+ XML_TOK_TEXT_DOCUMENT_EDIT_DURATION,
+ XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR,
+ XML_TOK_TEXT_DOCUMENT_SAVE_DATE,
+ XML_TOK_TEXT_DOCUMENT_SAVE_TIME,
+ XML_TOK_TEXT_DOCUMENT_USER_DEFINED,
+
+ XML_TOK_TEXT_PLACEHOLDER, // misc. fields
+ XML_TOK_TEXT_CONDITIONAL_TEXT,
+ XML_TOK_TEXT_HIDDEN_TEXT,
+ XML_TOK_TEXT_HIDDEN_PARAGRAPH,
+ XML_TOK_TEXT_FILENAME,
+ XML_TOK_TEXT_CHAPTER,
+ XML_TOK_TEXT_TEMPLATENAME,
+ XML_TOK_TEXT_WORD_COUNT, // statistics/count fields
+ XML_TOK_TEXT_PARAGRAPH_COUNT,
+ XML_TOK_TEXT_TABLE_COUNT,
+ XML_TOK_TEXT_CHARACTER_COUNT,
+ XML_TOK_TEXT_IMAGE_COUNT,
+ XML_TOK_TEXT_OBJECT_COUNT,
+ XML_TOK_TEXT_PAGE_COUNT,
+ XML_TOK_TEXT_GET_PAGE_VAR,
+ XML_TOK_TEXT_SET_PAGE_VAR,
+ XML_TOK_TEXT_MACRO,
+ XML_TOK_TEXT_DDE,
+ XML_TOK_TEXT_REFERENCE_REF,
+ XML_TOK_TEXT_BOOKMARK_REF,
+ XML_TOK_TEXT_SEQUENCE_REF,
+ XML_TOK_TEXT_NOTE_REF,
+ XML_TOK_TEXT_SHEET_NAME,
+ XML_TOK_TEXT_BIBLIOGRAPHY_MARK,
+ XML_TOK_TEXT_ANNOTATION,
+ XML_TOK_TEXT_SCRIPT,
+ XML_TOK_TEXT_TABLE_FORMULA,
+ XML_TOK_TEXT_DROPDOWN,
+
+ // RDF metadata
+ XML_TOK_TEXT_META,
+ XML_TOK_TEXT_META_FIELD,
+
+ // misc
+ XML_TOK_TEXTP_CHANGE_START, // TEXTP avoids clash with SwXMLTextElemTokens
+ XML_TOK_TEXTP_CHANGE_END,
+ XML_TOK_TEXTP_CHANGE,
+ XML_TOK_DRAW_A,
+ XML_TOK_TEXT_MEASURE,
+
+ XML_TOK_DRAW_HEADER,
+ XML_TOK_DRAW_FOOTER,
+ XML_TOK_DRAW_DATE_TIME,
+ XML_TOK_TEXT_PAGE_CONTINUATION,
+
+ XML_TOK_TEXT_FIELDMARK,
+ XML_TOK_TEXT_FIELDMARK_START,
+ XML_TOK_TEXT_FIELDMARK_END,
+
+ XML_TOK_TEXT_P_ELEM_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextPAttrTokens
+{
+ XML_TOK_TEXT_P_XMLID,
+ XML_TOK_TEXT_P_ABOUT,
+ 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_IS_LIST_HEADER,
+ XML_TOK_TEXT_P_RESTART_NUMBERING,
+ XML_TOK_TEXT_P_START_VALUE,
+ XML_TOK_TEXT_P_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextNumberedParagraphAttrTokens
+{
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_XMLID,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_LIST_ID,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_LEVEL,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_STYLE_NAME,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_CONTINUE_NUMBERING,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_START_VALUE,
+ XML_TOK_TEXT_NUMBERED_PARAGRAPH_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextListBlockAttrTokens
+{
+ XML_TOK_TEXT_LIST_BLOCK_XMLID,
+ XML_TOK_TEXT_LIST_BLOCK_STYLE_NAME,
+ XML_TOK_TEXT_LIST_BLOCK_CONTINUE_NUMBERING,
+ // --> OD 2008-04-22 #refactorlists#
+ XML_TOK_TEXT_LIST_BLOCK_ID,
+ XML_TOK_TEXT_LIST_BLOCK_CONTINUE_LIST,
+ // <--
+ XML_TOK_TEXT_LIST_BLOCK_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextListBlockElemTokens
+{
+ XML_TOK_TEXT_LIST_HEADER,
+ XML_TOK_TEXT_LIST_ITEM,
+ XML_TOK_TEXT_LIST_BLOCK_ELEM_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextFrameAttrTokens
+{
+ XML_TOK_TEXT_FRAME_STYLE_NAME,
+ XML_TOK_TEXT_FRAME_NAME,
+ XML_TOK_TEXT_FRAME_ANCHOR_TYPE,
+ XML_TOK_TEXT_FRAME_ANCHOR_PAGE_NUMBER,
+ XML_TOK_TEXT_FRAME_X,
+ XML_TOK_TEXT_FRAME_Y,
+ XML_TOK_TEXT_FRAME_WIDTH,
+ XML_TOK_TEXT_FRAME_REL_WIDTH,
+ XML_TOK_TEXT_FRAME_HEIGHT,
+ XML_TOK_TEXT_FRAME_MIN_HEIGHT,
+ XML_TOK_TEXT_FRAME_REL_HEIGHT,
+ XML_TOK_TEXT_FRAME_NEXT_CHAIN_NAME,
+ XML_TOK_TEXT_FRAME_HREF,
+ XML_TOK_TEXT_FRAME_FILTER_NAME,
+ XML_TOK_TEXT_FRAME_Z_INDEX,
+ XML_TOK_TEXT_FRAME_TRANSFORM,
+ XML_TOK_TEXT_FRAME_CLASS_ID,
+ XML_TOK_TEXT_FRAME_CODE,
+ XML_TOK_TEXT_FRAME_OBJECT,
+ XML_TOK_TEXT_FRAME_ARCHIVE,
+ XML_TOK_TEXT_FRAME_MAY_SCRIPT,
+ XML_TOK_TEXT_FRAME_MIME_TYPE,
+ XML_TOK_TEXT_FRAME_APPLET_NAME,
+ XML_TOK_TEXT_FRAME_FRAME_NAME,
+ XML_TOK_TEXT_FRAME_NOTIFY_ON_UPDATE,
+ XML_TOK_TEXT_FRAME_MIN_WIDTH,
+ XML_TOK_TEXT_FRAME_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextHyperlinkAttrTokens
+{
+ XML_TOK_TEXT_HYPERLINK_HREF,
+ XML_TOK_TEXT_HYPERLINK_NAME,
+ XML_TOK_TEXT_HYPERLINK_TARGET_FRAME,
+ XML_TOK_TEXT_HYPERLINK_SHOW,
+ XML_TOK_TEXT_HYPERLINK_STYLE_NAME,
+ XML_TOK_TEXT_HYPERLINK_VIS_STYLE_NAME,
+ XML_TOK_TEXT_HYPERLINK_SERVER_MAP,
+ XML_TOK_TEXT_HYPERLINK_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextPageMasterElemTokens
+{
+ XML_TOK_TEXT_MP_HEADER,
+ XML_TOK_TEXT_MP_FOOTER,
+ XML_TOK_TEXT_MP_HEADER_LEFT,
+ XML_TOK_TEXT_MP_FOOTER_LEFT,
+ XML_TOK_TEXT_MP_END=XML_TOK_UNKNOWN
+};
+
+enum XMLTextContourAttrTokens
+{
+ XML_TOK_TEXT_CONTOUR_WIDTH,
+ XML_TOK_TEXT_CONTOUR_HEIGHT,
+ XML_TOK_TEXT_CONTOUR_VIEWBOX,
+ XML_TOK_TEXT_CONTOUR_POINTS,
+ XML_TOK_TEXT_CONTOUR_D,
+ XML_TOK_TEXT_CONTOUR_AUTO,
+ XML_TOK_TEXT_CONTOUR_END=XML_TOK_UNKNOWN
+};
+enum XMLTextType
+{
+ XML_TEXT_TYPE_BODY,
+ XML_TEXT_TYPE_CELL,
+ XML_TEXT_TYPE_SHAPE,
+ XML_TEXT_TYPE_TEXTBOX,
+ XML_TEXT_TYPE_HEADER_FOOTER,
+ XML_TEXT_TYPE_SECTION,
+ XML_TEXT_TYPE_FOOTNOTE,
+ XML_TEXT_TYPE_CHANGED_REGION
+};
+
+#define XML_TEXT_RENAME_TYPE_FRAME 10
+#define XML_TEXT_RENAME_TYPE_TABLE 20
+
+// create type for section list, XMLSectionList_Impl
+DECLARE_LIST( XMLSectionList_Impl, XMLSectionImportContext* )
+
+class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase,
+ private boost::noncopyable
+{
+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(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ // access, lazy initialization and destruction of backpatchers
+ // Code is implemented in XMLPropertyBackpatcher.cxx
+ inline XMLPropertyBackpatcher<sal_Int16>& GetFootnoteBP();
+ inline XMLPropertyBackpatcher<sal_Int16>& GetSequenceIdBP();
+ inline XMLPropertyBackpatcher< ::rtl::OUString> & GetSequenceNameBP();
+
+public:
+
+ XMLTextImportHelper(
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::frame::XModel> const& rModel,
+ SvXMLImport& rImport,
+ bool const bInsertMode = false, bool const bStylesOnlyMode = false,
+ bool const bProgress = false, bool const bBlockMode = false,
+ bool const bOrganizerMode = false);
+
+ ~XMLTextImportHelper();
+
+ void SetCursor(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextCursor >& rCursor );
+ void ResetCursor();
+
+ void SetAutoStyles( SvXMLStylesContext *pStyles );
+
+ void SetFontDecls( XMLFontStylesContext *pFontDecls );
+ const XMLFontStylesContext *GetFontDecls() const;
+
+ SvXMLImportContext *CreateTextChildContext(
+ SvXMLImport& rImport,
+ sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ XMLTextType eType = XML_TEXT_TYPE_SHAPE );
+
+ 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();
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor > & GetCursor();
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange > & GetCursorAsRange();
+
+ bool IsInsertMode() const;
+ bool IsStylesOnlyMode() const;
+ bool IsBlockMode() const;
+ bool IsOrganizerMode() const;
+ bool IsProgress() const;
+
+ XMLSectionList_Impl & GetSectionList();
+
+ ::rtl::OUString ConvertStarFonts( const ::rtl::OUString& rChars,
+ const ::rtl::OUString& rStyleName,
+ sal_uInt8& rFlags,
+ sal_Bool bPara,
+ SvXMLImport& rImport ) const;
+ // insert a string without special whitespace processing enabled
+ void InsertString( const ::rtl::OUString& rChars );
+ // insert a string with special whitespace processing enabled
+ void InsertString( const ::rtl::OUString& rChars,
+ sal_Bool& rIgnoreLeadingSpace );
+ // Delete current paragraph
+ void DeleteParagraph();
+
+ void InsertControlCharacter( sal_Int16 nControl );
+ void InsertTextContent( ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & xContent);
+
+ // --> OD 2007-07-25 #i73509# - add parameter <bOutlineLevelAttrFound>
+ // --> OD 2007-08-17 #i80724#
+ // add parameter <bSetListAttrs> in order to suppress the handling of the list attributes
+ ::rtl::OUString SetStyleAndAttrs(
+ SvXMLImport& rImport,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextCursor >& rCursor,
+ const ::rtl::OUString& rStyleName,
+ sal_Bool bPara,
+ sal_Bool bOutlineLevelAttrFound = sal_False,
+ sal_Int8 nOutlineLevel = -1,
+ sal_Bool bSetListAttrs = sal_True );
+ // <--
+
+ /** Find a suitable name for the given outline level.
+ * If rStyleName is empty, change it to a previously used or default style
+ * name for that level. Otherwise, leave rStyleName unmodified.
+ */
+ // --> OD 2006-10-12 #i69629# - adjust 2nd parameter
+ void FindOutlineStyleName( ::rtl::OUString& rStyleName,
+ sal_Int8 nOutlineLevel );
+ // <--
+
+ // --> OD 2006-10-12 #i69629#
+ // change method name to reflect change of data structure
+ void AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel,
+ const ::rtl::OUString& rStyleName );
+ // <--
+ void SetOutlineStyles( sal_Bool bSetEmpty );
+
+ void SetHyperlink(
+ SvXMLImport& rImport,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextCursor >& rCursor,
+ const ::rtl::OUString& rHRef,
+ const ::rtl::OUString& rName,
+ const ::rtl::OUString& rTargetFrameName,
+ const ::rtl::OUString& rStyleName,
+ const ::rtl::OUString& rVisitedStyleName,
+ XMLEventsImportContext* pEvents = NULL);
+ void SetRuby(
+ SvXMLImport& rImport,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextCursor >& rCursor,
+ const ::rtl::OUString& rStyleName,
+ const ::rtl::OUString& rTextStyleName,
+ const ::rtl::OUString& rText );
+
+ /// return key appropriate for use with NumberFormat property
+ /// return -1 if style is not found
+ /// (may return whether data style uses the system language)
+ sal_Int32 GetDataStyleKey( const ::rtl::OUString& sStyleName,
+ sal_Bool* pIsSystemLanguage = NULL );
+
+ const SvxXMLListStyleContext *FindAutoListStyle(
+ const ::rtl::OUString& rName ) const;
+ XMLPropStyleContext *FindAutoFrameStyle(
+ const ::rtl::OUString& rName ) const;
+ XMLPropStyleContext* FindSectionStyle(
+ const ::rtl::OUString& rName ) const;
+ XMLPropStyleContext* FindPageMaster(
+ const ::rtl::OUString& rName ) const;
+
+ 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::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,
+ const ::rtl::OUString& rNextFrmName,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet >& rFrmPropSet );
+
+ 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);
+ static SvXMLImportPropertyMapper* CreateParaDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls = NULL);
+ static SvXMLImportPropertyMapper* CreateTableDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls = NULL);
+ static SvXMLImportPropertyMapper* CreateTableRowDefaultExtPropMapper(SvXMLImport&, XMLFontStylesContext* pFontDecls = NULL);
+
+ static sal_Bool HasDrawNameAttribute(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLNamespaceMap& rNamespaceMap );
+
+ SvI18NMap& GetRenameMap();
+
+ /// save the start of a range reference
+ void InsertBookmarkStartRange(
+ const ::rtl::OUString sName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextRange> & rRange,
+ ::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,
+ ::boost::shared_ptr< ::xmloff::ParsedRDFaAttributes > &
+ o_rpRDFaAttributes);
+
+ ::rtl::OUString FindActiveBookmarkName();
+ ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetRangeFor(::rtl::OUString &sName);
+
+ void pushFieldCtx( ::rtl::OUString name, ::rtl::OUString type );
+ void popFieldCtx();
+ void addFieldParam( ::rtl::OUString name, ::rtl::OUString value );
+ void setCurrentFieldParamsTo(::com::sun::star::uno::Reference< ::com::sun::star::text::XFormField> &xFormField);
+ ::rtl::OUString getCurrentFieldName();
+ ::rtl::OUString getCurrentFieldType();
+ bool hasCurrentFieldCtx();
+
+
+ /// insert new footnote ID.
+ /// Also fixup open references from the backpatch list to this ID.
+ // Code is implemented in XMLPropertyBackpatcher.cxx
+ void InsertFootnoteID(const ::rtl::OUString& sXMLId, sal_Int16 nAPIId);
+
+ /// set the proper footnote reference ID,
+ /// or put into backpatch list if ID is unknown
+ // Code is implemented in XMLPropertyBackpatcher.cxx
+ void ProcessFootnoteReference(
+ const ::rtl::OUString& sXMLId,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropSet);
+
+ /// insert new sequence ID
+ /// Also fixup open references from backpatch list to this ID.
+ // Code is implemented in XMLPropertyBackpatcher.cxx
+ void InsertSequenceID(const ::rtl::OUString& sXMLId,
+ const ::rtl::OUString& sName,
+ sal_Int16 nAPIId);
+
+ /// set sequence ID or insert into backpatch list
+ // Code is implemented in XMLPropertyBackpatcher.cxx
+ void ProcessSequenceReference(
+ const ::rtl::OUString& sXMLId,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropSet);
+
+ sal_Bool IsInFrame() const;
+ virtual sal_Bool IsInHeaderFooter() const;
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>
+ createAndInsertOLEObject( SvXMLImport& rImport,
+ const ::rtl::OUString& rHRef,
+ const ::rtl::OUString &rStyleName,
+ const ::rtl::OUString &rTblName,
+ sal_Int32 nWidth, sal_Int32 nHeight );
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>
+ createAndInsertOOoLink( SvXMLImport& rImport,
+ const ::rtl::OUString& rHRef,
+ const ::rtl::OUString &rStyleName,
+ const ::rtl::OUString &rTblName,
+ sal_Int32 nWidth, sal_Int32 nHeight );
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>
+ createAndInsertApplet(
+ const ::rtl::OUString &rName,
+ const ::rtl::OUString &rCode,
+ sal_Bool bMayScript,
+ const ::rtl::OUString& rHRef,
+ sal_Int32 nWidth, sal_Int32 nHeight );
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>
+ createAndInsertPlugin(
+ const ::rtl::OUString &rMimeType,
+ const ::rtl::OUString& rHRef,
+ sal_Int32 nWidth, sal_Int32 nHeight );
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet>
+ createAndInsertFloatingFrame(
+ const ::rtl::OUString &rName,
+ const ::rtl::OUString &rHRef,
+ const ::rtl::OUString &rStyleName,
+ sal_Int32 nWidth, sal_Int32 nHeight );
+
+ virtual void endAppletOrPlugin(
+ const com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> &rPropSet,
+ ::std::map < const ::rtl::OUString, ::rtl::OUString, ::comphelper::UStringLess > &rParamMap );
+
+ // applet helper methods
+ // implemented in sw/filter/xml/txtparai.hxx
+
+ // redlining helper methods
+ // (to be implemented in sw/filter/xml/txtparai.hxx)
+
+ virtual void RedlineAdd(
+ const ::rtl::OUString& rType, /// redline type (insert, del,... )
+ const ::rtl::OUString& rId, /// use to identify this redline
+ const ::rtl::OUString& rAuthor, /// name of the author
+ const ::rtl::OUString& rComment, /// redline comment
+ const ::com::sun::star::util::DateTime& rDateTime, /// date+time
+ sal_Bool bMergeLastParagraph); /// merge last paras
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCursor> RedlineCreateText(
+ ::com::sun::star::uno::Reference< /// needed to get the document
+ ::com::sun::star::text::XTextCursor> & rOldCursor,
+ const ::rtl::OUString& rId); /// ID used to RedlineAdd() call
+ virtual void RedlineSetCursor(
+ const ::rtl::OUString& rId, /// ID used to RedlineAdd() call
+ sal_Bool bStart, /// start or end Cursor
+ sal_Bool bIsOutsideOfParagraph); /// range is not within <text:p>
+ virtual void RedlineAdjustStartNodeCursor(
+ sal_Bool bStart);
+ virtual void SetShowChanges( sal_Bool bShowChanges );
+ virtual void SetRecordChanges( sal_Bool bRecordChanges );
+ virtual void SetChangesProtectionKey(
+ const ::com::sun::star::uno::Sequence<sal_Int8> & rProtectionKey );
+
+ // access to the last open redline ID:
+ ::rtl::OUString GetOpenRedlineId();
+ void SetOpenRedlineId( ::rtl::OUString& rId);
+ void ResetOpenRedlineId();
+
+ // #107848#
+ // Access methods to the inside_deleted_section flag (redlining)
+ void SetInsideDeleteContext(bool const bNew);
+ bool IsInsideDeleteContext() const;
+
+ SvXMLImport & GetXMLImport();
+
+ // --> OD 2008-04-25 #refactorlists#
+ XMLTextListsHelper & GetTextListHelper();
+ // <--
+
+ // forwards to TextListHelper; these are used in many places
+ /// push a list context on the list context stack
+ void PushListContext(XMLTextListBlockContext *i_pListBlock = 0);
+ /// pop the list context stack
+ void PopListContext();
+
+ void SetCellParaStyleDefault(::rtl::OUString const& rNewValue);
+ ::rtl::OUString const& GetCellParaStyleDefault();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
new file mode 100644
index 000000000000..1a63106822ca
--- /dev/null
+++ b/xmloff/inc/xmloff/txtparae.hxx
@@ -0,0 +1,748 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TEXTPARAE_HXX_
+#define _XMLOFF_TEXTPARAE_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmlexppr.hxx>
+#include <xmloff/styleexp.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <xmloff/SinglePropertySetInfoCache.hxx>
+#include <xmloff/XMLStringVector.hxx>
+
+// --> OD 2008-04-25 #refactorlists#
+class XMLTextListsHelper;
+#include <vector>
+// <--
+
+class SvXMLExport;
+class SvXMLAutoStylePoolP;
+class XMLTextFieldExport;
+class OUStrings_Impl;
+class OUStringsSort_Impl;
+class XMLTextNumRuleInfo;
+class XMLTextListAutoStylePool;
+class SvLongs;
+class XMLSectionExport;
+class XMLIndexMarkExport;
+class XMLRedlineExport;
+struct XMLPropertyState;
+class MultiPropertySetHelper;
+
+namespace com { namespace sun { namespace star
+{
+ namespace beans { class XPropertySet; class XPropertyState;
+ class XPropertySetInfo; }
+ namespace container { class XEnumerationAccess; class XEnumeration; class XIndexAccess; }
+ namespace text { class XTextContent; class XTextRange; class XText;
+ class XFootnote; class XTextFrame; class XTextSection;
+ class XTextField;
+ class XDocumentIndex; class XTextShapesSupplier; }
+} } }
+
+namespace xmloff
+{
+ class OFormLayerXMLExport;
+ class BoundFrameSets;
+}
+
+class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
+{
+
+// SvXMLExport& rExport;
+ SvXMLAutoStylePoolP& rAutoStylePool;
+ UniReference < SvXMLExportPropertyMapper > xParaPropMapper;
+ UniReference < SvXMLExportPropertyMapper > xTextPropMapper;
+ UniReference < SvXMLExportPropertyMapper > xFramePropMapper;
+ UniReference < SvXMLExportPropertyMapper > xAutoFramePropMapper;
+ UniReference < SvXMLExportPropertyMapper > xSectionPropMapper;
+ UniReference < SvXMLExportPropertyMapper > xRubyPropMapper;
+
+ const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets;
+ XMLTextFieldExport *pFieldExport;
+ OUStrings_Impl *pListElements;
+ // --> OD 2008-05-07 #refactorlists# - no longer needed
+// OUStringsSort_Impl *pExportedLists;
+ // <--
+ XMLTextListAutoStylePool *pListAutoPool;
+ XMLSectionExport *pSectionExport;
+ XMLIndexMarkExport *pIndexMarkExport;
+
+ /// may be NULL (if no redlines should be exported; e.g. in block mode)
+ XMLRedlineExport *pRedlineExport;
+ XMLStringVector *pHeadingStyles;
+
+ sal_Bool bProgress;
+
+ sal_Bool bBlock;
+
+ // keep track of open rubies
+ ::rtl::OUString sOpenRubyText;
+ ::rtl::OUString sOpenRubyCharStyle;
+ sal_Bool bOpenRuby;
+
+ // --> OD 2008-05-07 #refactorlists#
+ XMLTextListsHelper* mpTextListsHelper;
+ ::std::vector< XMLTextListsHelper* > maTextListsHelperStack;
+ // <--
+
+ enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE };
+
+protected:
+
+ const ::rtl::OUString sActualSize;
+ // --> OD 2009-07-22 #i73249#
+// const ::rtl::OUString sAlternativeText;
+ const ::rtl::OUString sTitle;
+ const ::rtl::OUString sDescription;
+ // <--
+ const ::rtl::OUString sAnchorCharStyleName;
+ const ::rtl::OUString sAnchorPageNo;
+ const ::rtl::OUString sAnchorType;
+ const ::rtl::OUString sBeginNotice;
+ const ::rtl::OUString sBookmark;
+ const ::rtl::OUString sCategory;
+ const ::rtl::OUString sChainNextName;
+ const ::rtl::OUString sCharStyleName;
+ const ::rtl::OUString sCharStyleNames;
+ const ::rtl::OUString sContourPolyPolygon;
+ const ::rtl::OUString sDocumentIndex;
+ const ::rtl::OUString sDocumentIndexMark;
+ const ::rtl::OUString sEndNotice;
+ const ::rtl::OUString sFootnote;
+ const ::rtl::OUString sFootnoteCounting;
+ const ::rtl::OUString sFrame;
+ const ::rtl::OUString sFrameHeightAbsolute;
+ const ::rtl::OUString sFrameHeightPercent;
+ const ::rtl::OUString sFrameStyleName;
+ const ::rtl::OUString sFrameWidthAbsolute;
+ const ::rtl::OUString sFrameWidthPercent;
+ const ::rtl::OUString sGraphicFilter;
+ const ::rtl::OUString sGraphicRotation;
+ const ::rtl::OUString sGraphicURL;
+ const ::rtl::OUString sHeight;
+ const ::rtl::OUString sHoriOrient;
+ const ::rtl::OUString sHoriOrientPosition;
+ const ::rtl::OUString sHyperLinkName;
+ const ::rtl::OUString sHyperLinkTarget;
+ const ::rtl::OUString sHyperLinkURL;
+ const ::rtl::OUString sIsAutomaticContour;
+ const ::rtl::OUString sIsCollapsed;
+ const ::rtl::OUString sIsPixelContour;
+ const ::rtl::OUString sIsStart;
+ const ::rtl::OUString sIsSyncHeightToWidth;
+ const ::rtl::OUString sIsSyncWidthToHeight;
+ const ::rtl::OUString sNumberingRules;
+ const ::rtl::OUString sNumberingType;
+ const ::rtl::OUString sPageDescName;
+ const ::rtl::OUString sPageStyleName;
+ const ::rtl::OUString sParaChapterNumberingLevel;
+ const ::rtl::OUString sParaConditionalStyleName;
+ const ::rtl::OUString sParagraphService;
+ const ::rtl::OUString sParaStyleName;
+ const ::rtl::OUString sPositionEndOfDoc;
+ const ::rtl::OUString sPrefix;
+ const ::rtl::OUString sRedline;
+ const ::rtl::OUString sReferenceId;
+ const ::rtl::OUString sReferenceMark;
+ const ::rtl::OUString sRelativeHeight;
+ const ::rtl::OUString sRelativeWidth;
+ const ::rtl::OUString sRuby;
+ const ::rtl::OUString sRubyAdjust;
+ const ::rtl::OUString sRubyCharStyleName;
+ const ::rtl::OUString sRubyText;
+ const ::rtl::OUString sServerMap;
+ const ::rtl::OUString sShapeService;
+ const ::rtl::OUString sSizeType;
+ const ::rtl::OUString sSoftPageBreak;
+ const ::rtl::OUString sStartAt;
+ const ::rtl::OUString sSuffix;
+ const ::rtl::OUString sTableService;
+ const ::rtl::OUString sText;
+ const ::rtl::OUString sTextContentService;
+ const ::rtl::OUString sTextEmbeddedService;
+ const ::rtl::OUString sTextEndnoteService;
+ const ::rtl::OUString sTextField;
+ const ::rtl::OUString sTextFieldService;
+ const ::rtl::OUString sTextFrameService;
+ const ::rtl::OUString sTextGraphicService;
+ const ::rtl::OUString sTextPortionType;
+ const ::rtl::OUString sTextSection;
+ const ::rtl::OUString sUnvisitedCharStyleName;
+ const ::rtl::OUString sVertOrient;
+ const ::rtl::OUString sVertOrientPosition;
+ const ::rtl::OUString sVisitedCharStyleName;
+ const ::rtl::OUString sWidth;
+ const ::rtl::OUString sWidthType;
+ const ::rtl::OUString sTextFieldStart;
+ const ::rtl::OUString sTextFieldEnd;
+ const ::rtl::OUString sTextFieldStartEnd;
+
+ SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
+
+// SvXMLExport& GetExport() { return rExport; }
+// const SvXMLExport& GetExport() const { return rExport; }
+
+ UniReference < SvXMLExportPropertyMapper > GetParaPropMapper() const
+ {
+ return xParaPropMapper;
+ }
+
+ UniReference < SvXMLExportPropertyMapper > GetTextPropMapper() const
+ {
+ return xTextPropMapper;
+ }
+
+ UniReference < SvXMLExportPropertyMapper > GetFramePropMapper() const
+ {
+ return xFramePropMapper;
+ }
+ UniReference < SvXMLExportPropertyMapper > GetAutoFramePropMapper() const
+ {
+ return xAutoFramePropMapper;
+ }
+ UniReference < SvXMLExportPropertyMapper > GetSectionPropMapper() const
+ {
+ return xSectionPropMapper;
+ }
+ UniReference < SvXMLExportPropertyMapper > GetRubyPropMapper() const
+ {
+ return xRubyPropMapper;
+ }
+
+
+ SvXMLAutoStylePoolP& GetAutoStylePool() { return rAutoStylePool; }
+ const SvXMLAutoStylePoolP& GetAutoStylePool() const { return rAutoStylePool; }
+
+public:
+ ::rtl::OUString FindTextStyle(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ sal_Bool& rbHasCharStyle ) const;
+ ::rtl::OUString FindTextStyleAndHyperlink(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ sal_Bool& rbHyperlink,
+ sal_Bool& rbHasCharStyle,
+ sal_Bool& rbHasAutoStyle,
+ const XMLPropertyState** pAddState = NULL) const;
+ sal_Bool addHyperlinkAttributes(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertyState > & rPropState,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
+
+ void exportTextRangeEnumeration(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XEnumeration > & rRangeEnum,
+ sal_Bool bAutoStyles, sal_Bool bProgress,
+ sal_Bool bPrvChrIsSpc = sal_True );
+
+protected:
+
+ sal_Int32 addTextFrameAttributes(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet >& rPropSet,
+ sal_Bool bShape,
+ ::rtl::OUString *pMinHeightValue = 0 );
+
+ virtual void exportStyleAttributes(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle > & rStyle );
+
+ void exportPageFrames( sal_Bool bAutoStyles, sal_Bool bProgress );
+ void exportFrameFrames( sal_Bool bAutoStyles, sal_Bool bProgress,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextFrame > *pParentTxtFrame = 0 );
+
+ void exportNumStyles( sal_Bool bUsed );
+
+ void exportText(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportParagraph );
+
+ void exportText(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rBaseSection,
+ sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportParagraph );
+
+ sal_Bool exportTextContentEnumeration(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XEnumeration > & rContentEnum,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rBaseSection,
+ sal_Bool bProgress,
+ sal_Bool bExportParagraph = sal_True,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0,
+ sal_Bool bExportLevels = sal_True );
+ void exportParagraph(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles, sal_Bool bProgress,
+ sal_Bool bExportParagraph,
+ MultiPropertySetHelper& rPropSetHelper);
+ virtual void exportTable(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles, sal_Bool bProgress );
+
+ void exportTextField(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextRange > & rTextRange,
+ sal_Bool bAutoStyles, sal_Bool bProgress );
+
+ void exportTextField(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextField> & xTextField,
+ const sal_Bool bAutoStyles, const sal_Bool bProgress,
+ const sal_Bool bRecursive );
+
+ void exportAnyTextFrame(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ FrameType eTxpe,
+ sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportContent,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
+ void _exportTextFrame(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo,
+ sal_Bool bProgress );
+ inline void exportTextFrame(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportContent,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
+ inline void exportShape(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
+
+ void exportContour(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
+ void _exportTextGraphic(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
+ inline void exportTextGraphic(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
+
+ virtual void _collectTextEmbeddedAutoStyles(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet );
+ virtual void _exportTextEmbedded(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
+ inline void exportTextEmbedded(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
+ virtual void setTextEmbeddedGraphicURL(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet >& rPropSet,
+ ::rtl::OUString& rStreamName ) const;
+
+ /// export a footnote and styles
+ void exportTextFootnote(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::rtl::OUString& sString,
+ sal_Bool bAutoStyles, sal_Bool bProgress );
+
+ /// helper for exportTextFootnote
+ void exportTextFootnoteHelper(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XFootnote > & rPropSet,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XText> & rText,
+ const ::rtl::OUString& sString,
+ sal_Bool bAutoStyles,
+ sal_Bool bIsEndnote, sal_Bool bProgress );
+
+ /// export footnote and endnote configuration elements
+ void exportTextFootnoteConfiguration();
+
+ void exportTextFootnoteConfigurationHelper(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rFootnoteSupplier,
+ sal_Bool bIsEndnote);
+
+ void exportTextMark(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & xPropSet,
+ const ::rtl::OUString sProperty,
+ const enum ::xmloff::token::XMLTokenEnum pElements[],
+ sal_Bool bAutoStyles);
+
+ void exportIndexMark(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropSet,
+ sal_Bool bAutoStyles);
+
+ void exportSoftPageBreak(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropSet,
+ sal_Bool bAutoStyles);
+
+ void exportTextRange(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextRange > & rTextRange,
+ sal_Bool bAutoStyles,
+ sal_Bool& rPrevCharWasSpace );
+
+ void exportListChange( const XMLTextNumRuleInfo& rPrvInfo,
+ const XMLTextNumRuleInfo& rNextInfo );
+
+ /// check if current section or current list has changed;
+ /// calls exortListChange as appropriate
+ void exportListAndSectionChange(
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rOldSection,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rNewSection,
+ const XMLTextNumRuleInfo& rOldList,
+ const XMLTextNumRuleInfo& rNewList,
+ sal_Bool bAutoStyles );
+
+ /// overload for exportListAndSectionChange;
+ /// takes new content rather than new section.
+ void exportListAndSectionChange(
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rOldSection,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rNewContent,
+ const XMLTextNumRuleInfo& rOldList,
+ const XMLTextNumRuleInfo& rNewList,
+ sal_Bool bAutoStyles );
+ void exportListAndSectionChange(
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rOldSection,
+ MultiPropertySetHelper& rPropSetHelper,
+ sal_Int16 nTextSectionId,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rNewContent,
+ const XMLTextNumRuleInfo& rOldList,
+ const XMLTextNumRuleInfo& rNewList,
+ sal_Bool bAutoStyles );
+
+ /// export a redline text portion
+ void exportChange(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ sal_Bool bAutoStyle);
+
+ /// export a ruby
+ void exportRuby(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPortionPropSet,
+ sal_Bool bAutoStyles );
+
+ /// export a text:meta
+ void exportMeta(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & i_xPortion,
+ sal_Bool i_bAutoStyles, sal_Bool i_isProgress );
+
+public:
+
+ XMLTextParagraphExport(
+ SvXMLExport& rExp,
+ SvXMLAutoStylePoolP & rASP
+ );
+ virtual ~XMLTextParagraphExport();
+
+ /// add autostyle for specified family
+ void Add(
+ sal_uInt16 nFamily,
+ MultiPropertySetHelper& rPropSetHelper,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const XMLPropertyState** pAddState = NULL );
+ void Add(
+ sal_uInt16 nFamily,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const XMLPropertyState** pAddState = NULL, bool bDontSeek = false );
+
+ /// find style name for specified family and parent
+ ::rtl::OUString Find(
+ sal_uInt16 nFamily,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::rtl::OUString& rParent,
+ const XMLPropertyState** pAddState = NULL ) const;
+
+ static SvXMLExportPropertyMapper *CreateShapeExtPropMapper(
+ SvXMLExport& rExport );
+ static SvXMLExportPropertyMapper *CreateCharExtPropMapper(
+ SvXMLExport& rExport);
+ static SvXMLExportPropertyMapper *CreateParaExtPropMapper(
+ SvXMLExport& rExport);
+ static SvXMLExportPropertyMapper *CreateParaDefaultExtPropMapper(
+ SvXMLExport& rExport);
+
+ // This methods exports all (or all used) styles
+ void exportTextStyles( sal_Bool bUsed
+ , sal_Bool bProg = sal_False
+ );
+
+ /// This method exports (text field) declarations etc.
+ void exportTextDeclarations();
+
+ /// export the (text field) declarations for a particular XText
+ void exportTextDeclarations(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText );
+
+ /// true: export only those declarations that are used;
+ /// false: export all declarations
+ void exportUsedDeclarations( sal_Bool bOnlyUsed );
+
+ /// Export the list of change information (enclosed by <tracked-changes>)
+ /// (or the necessary automatic styles)
+ void exportTrackedChanges(sal_Bool bAutoStyle);
+
+ /// Export the list of change information (enclosed by <tracked-changes>)
+ /// (or the necessary automatic styles)
+ void exportTrackedChanges(const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ sal_Bool bAutoStyle );
+
+ /// Record tracked changes for this particular XText
+ /// (empty reference stop recording)
+ /// This should be used if tracked changes for e.g. footers are to
+ /// be exported seperately via the exportTrackedChanges(sal_Bool,
+ /// Reference<XText>) method.
+ void recordTrackedChangesForXText(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText );
+
+
+ /// Stop recording tracked changes.
+ /// This is the same as calling recordTrackedChanges(...) with an
+ /// empty reference.
+ void recordTrackedChangesNoXText();
+
+
+ // This method exports the given OUString
+ void exportText(
+ const ::rtl::OUString& rText,
+ sal_Bool& rPrevCharWasSpace );
+
+ // This method collects all automatic styles for the given XText
+ void collectTextAutoStyles(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ sal_Bool bIsProgress = sal_False,
+ sal_Bool bExportParagraph = sal_True )
+ {
+ exportText( rText, sal_True, bIsProgress, bExportParagraph );
+ }
+
+ void collectTextAutoStyles(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rBaseSection,
+ sal_Bool bIsProgress = sal_False,
+ sal_Bool bExportParagraph = sal_True )
+ {
+ exportText( rText, rBaseSection, sal_True, bIsProgress, bExportParagraph );
+ }
+
+ // It the model implements the xAutoStylesSupplier interface, the automatic
+ // styles can exported without iterating over the text portions
+ bool collectTextAutoStylesOptimized(
+ sal_Bool bIsProgress = sal_False );
+
+ // This method exports all automatic styles that have been collected.
+ virtual void exportTextAutoStyles();
+
+ void exportEvents( const ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > & rPropSet );
+ // --> OD 2009-07-22 #i73249#
+// void exportAlternativeText( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet,
+// const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
+ void exportTitleAndDescription( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet,
+ const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
+ // <--
+
+ // This method exports the given XText
+ void exportText(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ sal_Bool bIsProgress = sal_False,
+ sal_Bool bExportParagraph = sal_True)
+ {
+ exportText( rText, sal_False, bIsProgress, bExportParagraph );
+ }
+
+ void exportText(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XText > & rText,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextSection > & rBaseSection,
+ sal_Bool bIsProgress = sal_False,
+ sal_Bool bExportParagraph = sal_True)
+ {
+ exportText( rText, rBaseSection, sal_False, bIsProgress, bExportParagraph );
+ }
+
+ void exportFramesBoundToPage( sal_Bool bIsProgress = sal_False )
+ {
+ exportPageFrames( sal_False, bIsProgress );
+ }
+ void exportFramesBoundToFrame(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextFrame >& rParentTxtFrame,
+ sal_Bool bIsProgress = sal_False )
+ {
+ exportFrameFrames( sal_False, bIsProgress, &rParentTxtFrame );
+ }
+ inline const XMLTextListAutoStylePool& GetListAutoStylePool() const;
+
+ void SetBlockMode( sal_Bool bSet ) { bBlock = bSet; }
+ sal_Bool IsBlockMode() const { return bBlock; }
+
+
+ UniReference < SvXMLExportPropertyMapper > GetParagraphPropertyMapper() const
+ {
+ return xParaPropMapper;
+ }
+
+
+ /** exclude form controls which are in mute sections.
+ *
+ * This method is necessary to prevent the form layer export from exporting
+ * control models whose controls are not represented in the document. To
+ * achieve this, this method iterates over all shapes, checks to see if
+ * they are control shapes, and if so, whether they should be exported or
+ * not. If not, the form layer export will be notified accordingly.
+ *
+ * The reason this method is located here is tha it needs to access the
+ * XMLSectionExport, which is only available here.
+ */
+ void PreventExportOfControlsInMuteSections(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexAccess> & rShapes,
+ UniReference<xmloff::OFormLayerXMLExport> xFormExport );
+
+ SinglePropertySetInfoCache& GetCharStyleNamesPropInfoCache() { return aCharStyleNamesPropInfoCache; }
+
+ sal_Int32 GetHeadingLevel( const ::rtl::OUString& rStyleName );
+
+ // --> OD 2008-05-08 #refactorlists#
+ void PushNewTextListsHelper();
+ void PopTextListsHelper();
+ // <--
+ private:
+ XMLTextParagraphExport(XMLTextParagraphExport &); // private copy-ctor because of explicit copy-ctor of auto_ptr
+};
+
+inline const XMLTextListAutoStylePool&
+ XMLTextParagraphExport::GetListAutoStylePool() const
+{
+ return *pListAutoPool;
+}
+
+inline void XMLTextParagraphExport::exportTextFrame(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles, sal_Bool bIsProgress, sal_Bool bExportContent,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet)
+{
+ exportAnyTextFrame( rTextContent, FT_TEXT, bAutoStyles, bIsProgress,
+ bExportContent, pRangePropSet );
+}
+
+inline void XMLTextParagraphExport::exportTextGraphic(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet )
+{
+ exportAnyTextFrame( rTextContent, FT_GRAPHIC, bAutoStyles, sal_False,
+ sal_True, pRangePropSet );
+}
+
+inline void XMLTextParagraphExport::exportTextEmbedded(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet )
+{
+ exportAnyTextFrame( rTextContent, FT_EMBEDDED, bAutoStyles, sal_False,
+ sal_True, pRangePropSet );
+}
+
+inline void XMLTextParagraphExport::exportShape(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::text::XTextContent > & rTextContent,
+ sal_Bool bAutoStyles,
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::beans::XPropertySet > *pRangePropSet )
+{
+ exportAnyTextFrame( rTextContent, FT_SHAPE, bAutoStyles, sal_False,
+ sal_True, pRangePropSet );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/txtprmap.hxx b/xmloff/inc/xmloff/txtprmap.hxx
new file mode 100644
index 000000000000..1fda25d4cc8e
--- /dev/null
+++ b/xmloff/inc/xmloff/txtprmap.hxx
@@ -0,0 +1,205 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TEXTPRMAP_HXX_
+#define _XMLOFF_TEXTPRMAP_HXX_
+
+#include <xmloff/contextid.hxx>
+#include <xmloff/xmlprmap.hxx>
+
+#define CTF_CHARHEIGHT (XML_TEXT_CTF_START + 1)
+#define CTF_CHARHEIGHT_REL (XML_TEXT_CTF_START + 2)
+#define CTF_PARALEFTMARGIN (XML_TEXT_CTF_START + 3)
+#define CTF_PARALEFTMARGIN_REL (XML_TEXT_CTF_START + 4)
+#define CTF_PARARIGHTMARGIN (XML_TEXT_CTF_START + 5)
+#define CTF_PARARIGHTMARGIN_REL (XML_TEXT_CTF_START + 6)
+#define CTF_PARAFIRSTLINE (XML_TEXT_CTF_START + 7)
+#define CTF_PARAFIRSTLINE_REL (XML_TEXT_CTF_START + 8)
+#define CTF_PARATOPMARGIN (XML_TEXT_CTF_START + 9)
+#define CTF_PARATOPMARGIN_REL (XML_TEXT_CTF_START + 10)
+#define CTF_PARABOTTOMMARGIN (XML_TEXT_CTF_START + 11)
+#define CTF_PARABOTTOMMARGIN_REL (XML_TEXT_CTF_START + 12)
+#define CTF_ALLBORDERWIDTH (XML_TEXT_CTF_START + 13)
+#define CTF_LEFTBORDERWIDTH (XML_TEXT_CTF_START + 14)
+#define CTF_RIGHTBORDERWIDTH (XML_TEXT_CTF_START + 15)
+#define CTF_TOPBORDERWIDTH (XML_TEXT_CTF_START + 16)
+#define CTF_BOTTOMBORDERWIDTH (XML_TEXT_CTF_START + 17)
+#define CTF_ALLBORDERDISTANCE (XML_TEXT_CTF_START + 18)
+#define CTF_LEFTBORDERDISTANCE (XML_TEXT_CTF_START + 19)
+#define CTF_RIGHTBORDERDISTANCE (XML_TEXT_CTF_START + 20)
+#define CTF_TOPBORDERDISTANCE (XML_TEXT_CTF_START + 21)
+#define CTF_BOTTOMBORDERDISTANCE (XML_TEXT_CTF_START + 22)
+#define CTF_ALLBORDER (XML_TEXT_CTF_START + 23)
+#define CTF_LEFTBORDER (XML_TEXT_CTF_START + 24)
+#define CTF_RIGHTBORDER (XML_TEXT_CTF_START + 25)
+#define CTF_TOPBORDER (XML_TEXT_CTF_START + 26)
+#define CTF_BOTTOMBORDER (XML_TEXT_CTF_START + 27)
+#define CTF_DROPCAPWHOLEWORD (XML_TEXT_CTF_START + 28)
+#define CTF_DROPCAPFORMAT (XML_TEXT_CTF_START + 29)
+#define CTF_DROPCAPCHARSTYLE (XML_TEXT_CTF_START + 30)
+#define CTF_TABSTOP (XML_TEXT_CTF_START + 31)
+#define CTF_NUMBERINGSTYLENAME (XML_TEXT_CTF_START + 32)
+#define CTF_OLDTEXTBACKGROUND (XML_TEXT_CTF_START + 33)
+#define CTF_FONTFAMILYNAME (XML_TEXT_CTF_START + 34)
+#define CTF_FONTSTYLENAME (XML_TEXT_CTF_START + 35)
+#define CTF_FONTFAMILY (XML_TEXT_CTF_START + 36)
+#define CTF_FONTPITCH (XML_TEXT_CTF_START + 37)
+#define CTF_FONTCHARSET (XML_TEXT_CTF_START + 38)
+#define CTF_TEXTWRITINGMODE (XML_TEXT_CTF_START + 39)
+#define CTF_SYNCHEIGHT_MIN (XML_TEXT_CTF_START + 40)
+#define CTF_FRAMEHEIGHT_ABS (XML_TEXT_CTF_START + 41)
+#define CTF_FRAMEHEIGHT_REL (XML_TEXT_CTF_START + 42)
+#define CTF_FRAMEHEIGHT_MIN_ABS (XML_TEXT_CTF_START + 43)
+#define CTF_FRAMEHEIGHT_MIN_REL (XML_TEXT_CTF_START + 44)
+#define CTF_SIZETYPE (XML_TEXT_CTF_START + 45)
+#define CTF_SYNCHEIGHT (XML_TEXT_CTF_START + 46)
+#define CTF_WRAP (XML_TEXT_CTF_START + 47)
+#define CTF_WRAP_CONTOUR (XML_TEXT_CTF_START + 48)
+#define CTF_WRAP_CONTOUR_MODE (XML_TEXT_CTF_START + 49)
+#define CTF_WRAP_PARAGRAPH_ONLY (XML_TEXT_CTF_START + 50)
+#define CTF_ANCHORTYPE (XML_TEXT_CTF_START + 51)
+#define CTF_ANCHORPAGENUMBER (XML_TEXT_CTF_START + 52)
+#define CTF_TEXTCOLUMNS (XML_TEXT_CTF_START + 53)
+#define CTF_HORIZONTALPOS (XML_TEXT_CTF_START + 54)
+#define CTF_HORIZONTALPOS_MIRRORED (XML_TEXT_CTF_START + 55)
+#define CTF_HORIZONTALREL (XML_TEXT_CTF_START + 56)
+#define CTF_HORIZONTALREL_FRAME (XML_TEXT_CTF_START + 57)
+#define CTF_HORIZONTALMIRROR (XML_TEXT_CTF_START + 58)
+#define CTF_VERTICALPOS (XML_TEXT_CTF_START + 59)
+#define CTF_VERTICALREL (XML_TEXT_CTF_START + 60)
+#define CTF_VERTICALREL_PAGE (XML_TEXT_CTF_START + 61)
+#define CTF_VERTICALREL_FRAME (XML_TEXT_CTF_START + 62)
+#define CTF_VERTICALREL_ASCHAR (XML_TEXT_CTF_START + 63)
+#define CTF_PAGEDESCNAME (XML_TEXT_CTF_START + 64)
+#define CTF_BACKGROUND_URL (XML_TEXT_CTF_START + 66)
+#define CTF_BACKGROUND_POS (XML_TEXT_CTF_START + 67)
+#define CTF_BACKGROUND_FILTER (XML_TEXT_CTF_START + 68)
+#define CTF_CHARHEIGHT_DIFF (XML_TEXT_CTF_START + 69)
+#define CTF_FONTNAME (XML_TEXT_CTF_START + 70)
+#define CTF_FONTNAME_CJK (XML_TEXT_CTF_START + 71)
+#define CTF_FONTFAMILYNAME_CJK (XML_TEXT_CTF_START + 72)
+#define CTF_FONTSTYLENAME_CJK (XML_TEXT_CTF_START + 73)
+#define CTF_FONTFAMILY_CJK (XML_TEXT_CTF_START + 74)
+#define CTF_FONTPITCH_CJK (XML_TEXT_CTF_START + 75)
+#define CTF_FONTCHARSET_CJK (XML_TEXT_CTF_START + 76)
+#define CTF_CHARHEIGHT_CJK (XML_TEXT_CTF_START + 77)
+#define CTF_CHARHEIGHT_REL_CJK (XML_TEXT_CTF_START + 78)
+#define CTF_CHARHEIGHT_DIFF_CJK (XML_TEXT_CTF_START + 79)
+#define CTF_FONTNAME_CTL (XML_TEXT_CTF_START + 80)
+#define CTF_FONTFAMILYNAME_CTL (XML_TEXT_CTF_START + 81)
+#define CTF_FONTSTYLENAME_CTL (XML_TEXT_CTF_START + 82)
+#define CTF_FONTFAMILY_CTL (XML_TEXT_CTF_START + 83)
+#define CTF_FONTPITCH_CTL (XML_TEXT_CTF_START + 84)
+#define CTF_FONTCHARSET_CTL (XML_TEXT_CTF_START + 85)
+#define CTF_CHARHEIGHT_CTL (XML_TEXT_CTF_START + 86)
+#define CTF_CHARHEIGHT_REL_CTL (XML_TEXT_CTF_START + 87)
+#define CTF_CHARHEIGHT_DIFF_CTL (XML_TEXT_CTF_START + 88)
+#define CTF_UNDERLINE (XML_TEXT_CTF_START + 89)
+#define CTF_UNDERLINE_COLOR (XML_TEXT_CTF_START + 90)
+#define CTF_UNDERLINE_HASCOLOR (XML_TEXT_CTF_START + 91)
+#define CTF_SECTION_FOOTNOTE_END (XML_TEXT_CTF_START + 92)
+#define CTF_SECTION_FOOTNOTE_NUM_RESTART (XML_TEXT_CTF_START + 93)
+#define CTF_SECTION_FOOTNOTE_NUM_RESTART_AT (XML_TEXT_CTF_START + 94)
+#define CTF_SECTION_FOOTNOTE_NUM_TYPE (XML_TEXT_CTF_START + 95)
+#define CTF_SECTION_FOOTNOTE_NUM_PREFIX (XML_TEXT_CTF_START + 96)
+#define CTF_SECTION_FOOTNOTE_NUM_SUFFIX (XML_TEXT_CTF_START + 97)
+#define CTF_SECTION_FOOTNOTE_NUM_OWN (XML_TEXT_CTF_START + 98)
+#define CTF_SECTION_ENDNOTE_END (XML_TEXT_CTF_START + 99)
+#define CTF_SECTION_ENDNOTE_NUM_RESTART (XML_TEXT_CTF_START + 100)
+#define CTF_SECTION_ENDNOTE_NUM_RESTART_AT (XML_TEXT_CTF_START + 101)
+#define CTF_SECTION_ENDNOTE_NUM_TYPE (XML_TEXT_CTF_START + 102)
+#define CTF_SECTION_ENDNOTE_NUM_PREFIX (XML_TEXT_CTF_START + 103)
+#define CTF_SECTION_ENDNOTE_NUM_SUFFIX (XML_TEXT_CTF_START + 104)
+#define CTF_SECTION_ENDNOTE_NUM_OWN (XML_TEXT_CTF_START + 105)
+#define CTF_PAGE_FOOTNOTE (XML_TEXT_CTF_START + 106)
+#define CTF_FRAME_DISPLAY_SCROLLBAR (XML_TEXT_CTF_START + 107)
+#define CTF_FRAME_DISPLAY_BORDER (XML_TEXT_CTF_START + 108)
+#define CTF_FRAME_MARGIN_HORI (XML_TEXT_CTF_START + 109)
+#define CTF_FRAME_MARGIN_VERT (XML_TEXT_CTF_START + 110)
+#define CTF_COMBINED_CHARACTERS_FIELD (XML_TEXT_CTF_START + 111)
+#define CTF_OLE_VIS_AREA_TOP (XML_TEXT_CTF_START + 112)
+#define CTF_OLE_VIS_AREA_LEFT (XML_TEXT_CTF_START + 113)
+#define CTF_OLE_VIS_AREA_WIDTH (XML_TEXT_CTF_START + 114)
+#define CTF_OLE_VIS_AREA_HEIGHT (XML_TEXT_CTF_START + 115)
+#define CTF_OLE_DRAW_ASPECT (XML_TEXT_CTF_START + 116)
+#define CTF_HYPERLINK_URL (XML_TEXT_CTF_START + 117)
+#define CTF_CHAR_STYLE_NAME (XML_TEXT_CTF_START + 118)
+#define CTF_VERTICALPOS_ATCHAR (XML_TEXT_CTF_START + 119)
+#define CTF_BACKGROUND_TRANSPARENCY (XML_TEXT_CTF_START + 120)
+#define CTF_BACKGROUND_TRANSPARENT (XML_TEXT_CTF_START + 121)
+#define CTF_KEEP_TOGETHER (XML_TEXT_CTF_START + 122)
+#define CTF_FRAMEWIDTH_ABS (XML_TEXT_CTF_START + 123)
+#define CTF_FRAMEWIDTH_MIN_ABS (XML_TEXT_CTF_START + 124)
+#define CTF_FRAMEWIDTH_MIN_REL (XML_TEXT_CTF_START + 125)
+#define CTF_FRAMEWIDTH_REL (XML_TEXT_CTF_START + 126)
+#define CTF_FRAMEWIDTH_TYPE (XML_TEXT_CTF_START + 127)
+#define CTF_BORDER_MODEL (XML_TEXT_CTF_START + 128)
+// --> OD 2004-08-09 #i28749# - define CTF ids for positioning properties of
+// shapes, because on export to OpenOffice.org file format these have to
+// be handled special, if shape isn't anchored as-character.
+#define CTF_SHAPE_HORIZONTALPOS (XML_TEXT_CTF_START + 129)
+#define CTF_SHAPE_HORIZONTALPOS_MIRRORED (XML_TEXT_CTF_START + 130)
+#define CTF_SHAPE_HORIZONTALREL (XML_TEXT_CTF_START + 131)
+#define CTF_SHAPE_HORIZONTALREL_FRAME (XML_TEXT_CTF_START + 132)
+#define CTF_SHAPE_HORIZONTALMIRROR (XML_TEXT_CTF_START + 133)
+#define CTF_SHAPE_VERTICALPOS (XML_TEXT_CTF_START + 134)
+#define CTF_SHAPE_VERTICALPOS_ATCHAR (XML_TEXT_CTF_START + 135)
+#define CTF_SHAPE_VERTICALREL (XML_TEXT_CTF_START + 136)
+#define CTF_SHAPE_VERTICALREL_PAGE (XML_TEXT_CTF_START + 137)
+#define CTF_SHAPE_VERTICALREL_FRAME (XML_TEXT_CTF_START + 138)
+// <--
+#define CTF_PARA_ADJUSTLAST (XML_TEXT_CTF_START + 139)
+#define CTF_DEFAULT_OUTLINE_LEVEL (XML_TEXT_CTF_START + 140)
+#define CTF_OLD_FLOW_WITH_TEXT (XML_TEXT_CTF_START + 141)
+#define CTF_ISNUMBERING (XML_TEXT_CTF_START + 142)
+#define CTF_TEXT_DISPLAY (XML_TEXT_CTF_START + 143)
+#define CTF_TEXT_CLIP (XML_TEXT_CTF_START + 144)
+#define CTF_TEXT_CLIP11 (XML_TEXT_CTF_START + 145)
+#define TEXT_PROP_MAP_TEXT 0
+#define TEXT_PROP_MAP_PARA 1
+#define TEXT_PROP_MAP_FRAME 2
+#define TEXT_PROP_MAP_AUTO_FRAME 3
+#define TEXT_PROP_MAP_SECTION 4
+#define TEXT_PROP_MAP_SHAPE 5
+#define TEXT_PROP_MAP_RUBY 6
+#define TEXT_PROP_MAP_SHAPE_PARA 7
+#define TEXT_PROP_MAP_TEXT_ADDITIONAL_DEFAULTS 8
+#define TEXT_PROP_MAP_TABLE_DEFAULTS 9
+#define TEXT_PROP_MAP_TABLE_ROW_DEFAULTS 10
+
+class XMLOFF_DLLPUBLIC XMLTextPropertySetMapper : public XMLPropertySetMapper
+{
+public:
+ XMLTextPropertySetMapper( sal_uInt16 nType );
+ virtual ~XMLTextPropertySetMapper();
+
+ static const XMLPropertyMapEntry* getPropertyMapForType( sal_uInt16 _nType );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/txtstyle.hxx b/xmloff/inc/xmloff/txtstyle.hxx
new file mode 100644
index 000000000000..208a45b34796
--- /dev/null
+++ b/xmloff/inc/xmloff/txtstyle.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TEXTSTYLE_HXX_
+#define _XMLOFF_TEXTSTYLE_HXX_
+
+#include <xmloff/styleexp.hxx>
+#include <xmloff/uniref.hxx>
+
+class XMLPropertySetMapper;
+
+class XMLTextStyleExport : public XMLStyleExport
+{
+ UniReference < XMLPropertySetMapper > xParaPropMapper;
+
+ void exportNumStyles( sal_Bool bUsed );
+
+public:
+
+ XMLTextStyleExport(
+ SvXMLExport& rExp,
+// const ::com::sun::star::uno::Reference<
+// ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+// const ::com::sun::star::uno::Reference<
+// ::com::sun::star::frame::XModel > & rModel,
+ const ::rtl::OUString& rPoolStyleName,
+// const SvXMLNamespaceMap &rNamespaceMap,
+// MapUnit eDUnit,
+ SvXMLAutoStylePoolP *pAutoStyleP=0 );
+ virtual ~XMLTextStyleExport();
+
+ void exportStyles( sal_Bool bUsed );
+
+ UniReference < XMLPropertySetMapper >& getParaPropMapper();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/txtstyli.hxx b/xmloff/inc/xmloff/txtstyli.hxx
new file mode 100644
index 000000000000..00f0e5aa3e88
--- /dev/null
+++ b/xmloff/inc/xmloff/txtstyli.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_TXTSTYLI_HXX_
+#define _XMLOFF_TXTSTYLI_HXX_
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/prstylei.hxx>
+
+class SvXMLTokenMap;
+class XMLEventsImportContext;
+
+class XMLOFF_DLLPUBLIC XMLTextStyleContext : public XMLPropStyleContext
+{
+ ::rtl::OUString sListStyleName;
+ ::rtl::OUString sCategoryVal;
+ ::rtl::OUString sDropCapTextStyleName;
+ ::rtl::OUString sMasterPageName;
+ ::rtl::OUString sDataStyleName; // for grid columns only
+ const ::rtl::OUString sIsAutoUpdate;
+ const ::rtl::OUString sCategory;
+ const ::rtl::OUString sNumberingStyleName;
+ const ::rtl::OUString sOutlineLevel; //#outline level,add by zhaojianwei
+
+public:
+ const ::rtl::OUString sDropCapCharStyleName;
+private:
+ const ::rtl::OUString sPageDescName;
+
+ sal_Int8 nOutlineLevel;
+
+ sal_Bool bAutoUpdate : 1;
+ sal_Bool bHasMasterPageName : 1;
+
+ sal_Bool bHasCombinedCharactersLetter : 1;
+
+ // --> OD 2006-09-21 #i69523#
+ // introduce import of empty list style
+ sal_Bool mbListStyleSet : 1;
+ // <--
+
+ XMLEventsImportContext* pEventContext;
+
+protected:
+
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+
+public:
+
+ TYPEINFO();
+
+ XMLTextStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
+ sal_Bool bDefaultStyle = sal_False );
+ virtual ~XMLTextStyleContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ sal_Bool IsAutoUpdate() const { return bAutoUpdate; }
+
+ const ::rtl::OUString& GetListStyle() const { return sListStyleName; }
+ // --> OD 2006-10-13 #i69629#
+ sal_Bool IsListStyleSet() const
+ {
+ return mbListStyleSet;
+ }
+ // <--
+ const ::rtl::OUString& GetMasterPageName() const { return sMasterPageName; }
+ sal_Bool HasMasterPageName() const { return bHasMasterPageName; }
+ const ::rtl::OUString& GetDropCapStyleName() const { return sDropCapTextStyleName; }
+ const ::rtl::OUString& GetDataStyleName() const { return sDataStyleName; }
+
+ virtual void CreateAndInsert( sal_Bool bOverwrite );
+ virtual void Finish( sal_Bool bOverwrite );
+ virtual void SetDefaults();
+
+ // overload FillPropertySet, so we can get at the combined characters
+ virtual void FillPropertySet(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropSet );
+
+ inline sal_Bool HasCombinedCharactersLetter()
+ { return bHasCombinedCharactersLetter; }
+
+ const ::std::vector< XMLPropertyState > & _GetProperties() { return GetProperties(); }
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/uniref.hxx b/xmloff/inc/xmloff/uniref.hxx
new file mode 100644
index 000000000000..5ed097a5417d
--- /dev/null
+++ b/xmloff/inc/xmloff/uniref.hxx
@@ -0,0 +1,232 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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 _UNIVERSALL_REFERENCE_HXX
+#define _UNIVERSALL_REFERENCE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+#include <osl/interlck.h>
+
+/**
+ * An instance of this class holds a pointer to an object. The lifetime of
+ * the object is controled by the instance. The constructor calls
+ * acquire() and the destructor calls release().
+ * You could delive your class from the baseclass UniRefBase wich implements
+ * the methods acquire and release, yet.
+ */
+template< class T > class UniReference
+{
+private:
+ T* mpElement;
+
+public:
+ /** Create an empty reference.*/
+ UniReference()
+ : mpElement( NULL )
+ {}
+
+ /** Destroy the reference and releases the element.*/
+ inline ~UniReference();
+
+ /** Create a new reference with the same element as in rRef and acquire this one.*/
+ inline UniReference( const UniReference< T > & rRef );
+
+ /**
+ * Create a new reference with the given element pElement and acquire this one.
+ */
+ inline UniReference( T * pElement );
+
+ /**
+ * Release the reference and set the new one pObj.
+ */
+ inline UniReference< T > & operator = ( T * pElement );
+
+ /**
+ * Release the reference and set the new one from rObj.
+ */
+ inline UniReference< T > & operator = ( const UniReference< T > & rRef );
+
+ /**
+ * Return the pointer to the element, may be null.
+ */
+ inline T* operator -> () const;
+
+ /**
+ * Returns true if the pointer to the element is valid.
+ */
+ inline sal_Bool is() const;
+
+ /**
+ * Return true if both elements refer to the same object.
+ */
+ inline sal_Bool operator == ( const UniReference & rRef ) const;
+
+ /**
+ * Return true if both elements does not refer to the same object.
+ */
+ inline sal_Bool operator != ( const UniReference & rRef ) const;
+
+ /** Gets implementation pointer.
+ This call does <b>not</b> acquire the implementation.
+ <br>
+ @return <b>un</b>acquired implementation pointer
+ */
+ inline T* get() const;
+};
+
+class XMLOFF_DLLPUBLIC UniRefBase
+{
+private:
+ /**
+ * The reference counter.
+ */
+ oslInterlockedCount m_refCount;
+
+public:
+ UniRefBase() : m_refCount( 0 )
+ {}
+ virtual ~UniRefBase();
+
+ void acquire() { osl_incrementInterlockedCount( &m_refCount ); }
+ void release();
+};
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Inline-implementations of UniReference
+//
+
+/** Create a new reference with the same element as in rRef and acquire this one.*/
+template< class T >
+inline UniReference< T >::UniReference( const UniReference< T > & rRef )
+ : mpElement( rRef.mpElement )
+{
+ if( mpElement )
+ mpElement->acquire();
+}
+
+template< class T >
+inline UniReference< T >::~UniReference()
+{
+ if( mpElement )
+ mpElement->release();
+}
+
+/**
+ * Create a new reference with the given element pElement and acquire this one.
+ * @param pInterface the interface, pointer may be null.
+ */
+template< class T >
+inline UniReference< T >::UniReference( T * pElement )
+ : mpElement( pElement )
+{
+ if( mpElement )
+ mpElement->acquire();
+}
+
+/**
+ * Release the reference and set the new one pObj.<BR>
+ * <B>The operation is not thread save. You must protect all assigns to a reference class.</B>
+ */
+template< class T >
+inline UniReference< T > & UniReference< T >::operator = ( T * pElement )
+{
+ if( pElement )
+ pElement->acquire();
+ if( mpElement )
+ mpElement->release();
+
+ mpElement = pElement;
+
+ return *this;
+}
+
+/**
+ * Release the reference and set the new one from rObj.<BR>
+ * <B>The operation is not thread save. You must protect all assigns to a reference class.</B>
+ */
+template< class T >
+inline UniReference< T > & UniReference< T >::operator = ( const UniReference< T > & rRef )
+{
+ return operator = ( rRef.mpElement );
+}
+
+/**
+ * Return the pointer to the interface, may be null.
+ */
+template< class T >
+inline T* UniReference< T >::operator -> () const
+{
+ return get();
+}
+
+/**
+ * Return the pointer to the interface, may be null.
+ */
+template< class T >
+inline T* UniReference< T >::get () const
+{
+ return static_cast< T * >( mpElement );
+}
+
+/**
+ * Returns true if the pointer to the interface is valid.
+ */
+template< class T >
+inline sal_Bool UniReference< T >::is() const
+{
+ return (mpElement != 0);
+}
+/**
+ * Return true if both interfaces refer to the same object. The operation can be
+ * much more expensive than a pointer comparision.<BR>
+ *
+ * @param rRef another interface reference
+ */
+template< class T >
+inline sal_Bool UniReference< T >::operator == ( const UniReference & rRef ) const
+{
+ return ( mpElement == rRef.mpElement );
+}
+/**
+ * Return true if both interfaces does not refer to the same object. The operation can be
+ * much more expensive than a pointer comparision.<BR>
+ *
+ * @param rRef another interface reference
+ */
+template< class T >
+inline sal_Bool UniReference< T >::operator != ( const UniReference & rRef ) const
+{
+ return ( ! operator == ( rRef ) );
+}
+
+#endif // _UNIVERSALL_REFERENCE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlaustp.hxx b/xmloff/inc/xmloff/xmlaustp.hxx
new file mode 100644
index 000000000000..40ecda155824
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlaustp.hxx
@@ -0,0 +1,140 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLASTPLP_HXX
+#define _XMLOFF_XMLASTPLP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/uniref.hxx>
+
+class SvXMLExportPropertyMapper;
+class SvXMLNamespaceMap;
+class SvXMLAutoStylePoolP_Impl;
+class SvXMLAttributeList;
+class SvXMLExport;
+namespace com { namespace sun { namespace star { namespace uno
+ { template<typename A> class Sequence; }
+} } }
+
+class XMLOFF_DLLPUBLIC SvXMLAutoStylePoolP : public UniRefBase
+{
+ friend class SvXMLAutoStylePoolP_Impl;
+
+ SvXMLAutoStylePoolP_Impl *pImpl;
+
+protected:
+
+ virtual void exportStyleAttributes(
+ SvXMLAttributeList& rAttrList,
+ sal_Int32 nFamily,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLExportPropertyMapper& rPropExp
+ , const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap
+ ) const;
+
+// this methode is executed after Properties Export, so you can e.g. export a map or so on
+ virtual void exportStyleContent(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ sal_Int32 nFamily,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLExportPropertyMapper& rPropExp
+ , const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap
+ ) const;
+
+
+public:
+
+ SvXMLAutoStylePoolP( SvXMLExport& rExport);
+
+ SvXMLAutoStylePoolP();
+ virtual ~SvXMLAutoStylePoolP();
+
+ SvXMLExport& GetExport() const;
+
+ /** register a new family with its appropriate instance of a derivation of XMLPropertySetMapper
+ for family numbers see families.hxx
+ if bAsFamily is sal_False, the family name is used as element name
+ */
+ // TODO: Remove this ugly method as soon as possible
+ void AddFamily( sal_Int32 nFamily, const ::rtl::OUString& rStrName, SvXMLExportPropertyMapper* pMapper, ::rtl::OUString aStrPrefix, sal_Bool bAsFamily = sal_True );
+ void AddFamily( sal_Int32 nFamily, const ::rtl::OUString& rStrName,
+ const UniReference< SvXMLExportPropertyMapper >& rMapper,
+ const ::rtl::OUString& rStrPrefix, sal_Bool bAsFamily = sal_True );
+
+ /// Register a name that must not be used as a generated name.
+ void RegisterName( sal_Int32 nFamily, const ::rtl::OUString& rName );
+
+ /// retrieve the registered names (names + families)
+ void GetRegisteredNames(
+ com::sun::star::uno::Sequence<sal_Int32>& aFamilies,
+ com::sun::star::uno::Sequence<rtl::OUString>& aNames );
+
+ /// register (families + names)
+ void RegisterNames(
+ com::sun::star::uno::Sequence<sal_Int32>& aFamilies,
+ com::sun::star::uno::Sequence<rtl::OUString>& aNames );
+
+ /// Add an item set to the pool and return its generated name.
+ ::rtl::OUString Add( sal_Int32 nFamily, const ::std::vector< XMLPropertyState >& rProperties );
+ ::rtl::OUString Add( sal_Int32 nFamily, const ::rtl::OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties, bool bDontSeek = false );
+ sal_Bool Add( ::rtl::OUString& rName, sal_Int32 nFamily, const ::std::vector< XMLPropertyState >& rProperties );
+ sal_Bool Add( ::rtl::OUString& rName, sal_Int32 nFamily, const ::rtl::OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties );
+
+ /// Add an item set with a pre-defined name (needed for saving sheets separately in Calc).
+ sal_Bool AddNamed( const ::rtl::OUString& rName, sal_Int32 nFamily, const ::rtl::OUString& rParent,
+ const ::std::vector< XMLPropertyState >& rProperties );
+
+ /// Find an item set's name.
+ ::rtl::OUString Find( sal_Int32 nFamily, const ::std::vector< XMLPropertyState >& rProperties ) const;
+ ::rtl::OUString Find( sal_Int32 nFamily, const ::rtl::OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties ) const;
+
+ // Add a property set to the pool and cache its name.
+ ::rtl::OUString AddAndCache( sal_Int32 nFamily, const ::std::vector< XMLPropertyState >& rProperties );
+ ::rtl::OUString AddAndCache( sal_Int32 nFamily, const ::rtl::OUString& rParent, const ::std::vector< XMLPropertyState >& rProperties );
+ ::rtl::OUString AddAndCache( sal_Int32 nFamily, const ::rtl::OUString& rParent );
+
+ ::rtl::OUString FindAndRemoveCached( sal_Int32 nFamily ) const;
+
+ /** Export all item sets ofs a certain class in the order in that they have been added. */
+ void exportXML( sal_Int32 nFamily
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap
+ ) const;
+
+ void ClearEntries();
+};
+
+#endif // _XMLOFF_XMLASTPLP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlcnimp.hxx b/xmloff/inc/xmloff/xmlcnimp.hxx
new file mode 100644
index 000000000000..a4c2303c6654
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlcnimp.hxx
@@ -0,0 +1,131 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLCNIMP_HXX
+#define _XMLOFF_XMLCNIMP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/container/XNameAccess.hpp>
+#include <svl/svarray.hxx>
+#include <xmloff/nmspmap.hxx>
+
+#define _SVSTDARR_USHORTS
+#include <svl/svstdarr.hxx>
+
+namespace rtl { class OUString; }
+
+class SvXMLAttrContainerData_Impl;
+
+class XMLOFF_DLLPUBLIC SvXMLAttrContainerData
+{
+ SvXMLNamespaceMap aNamespaceMap;
+ SvUShorts aPrefixPoss;
+ SvXMLAttrContainerData_Impl *pLNames;
+ SvXMLAttrContainerData_Impl *pValues;
+
+ SAL_DLLPRIVATE inline sal_uInt16 GetPrefixPos( sal_uInt16 i ) const;
+public:
+
+ SvXMLAttrContainerData( const SvXMLAttrContainerData& rImpl );
+ SvXMLAttrContainerData();
+ ~SvXMLAttrContainerData();
+
+ int operator ==( const SvXMLAttrContainerData& rCmp ) const;
+
+ BOOL AddAttr( const ::rtl::OUString& rLName, const rtl::OUString& rValue );
+ BOOL AddAttr( const ::rtl::OUString& rPrefix, const rtl::OUString& rNamespace,
+ const ::rtl::OUString& rLName, const rtl::OUString& rValue );
+ BOOL AddAttr( const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rLName,
+ const ::rtl::OUString& rValue );
+
+ sal_uInt16 GetAttrCount() const;
+ inline ::rtl::OUString GetAttrNamespace( sal_uInt16 i ) const;
+ inline ::rtl::OUString GetAttrPrefix( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetAttrLName( sal_uInt16 i ) const;
+ const ::rtl::OUString& GetAttrValue( sal_uInt16 i ) const;
+
+ sal_uInt16 GetFirstNamespaceIndex() const { return aNamespaceMap.GetFirstIndex(); }
+ sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const { return aNamespaceMap.GetNextIndex( nIdx ); }
+ inline const ::rtl::OUString& GetNamespace( sal_uInt16 i ) const;
+ inline const ::rtl::OUString& GetPrefix( sal_uInt16 i ) const;
+
+ BOOL SetAt( sal_uInt16 i,
+ const ::rtl::OUString& rLName, const rtl::OUString& rValue );
+ BOOL SetAt( sal_uInt16 i,
+ const ::rtl::OUString& rPrefix, const rtl::OUString& rNamespace,
+ const ::rtl::OUString& rLName, const rtl::OUString& rValue );
+ BOOL SetAt( sal_uInt16 i,
+ const ::rtl::OUString& rPrefix,
+ const ::rtl::OUString& rLName,
+ const ::rtl::OUString& rValue );
+
+ void Remove( sal_uInt16 i );
+};
+
+inline sal_uInt16 SvXMLAttrContainerData::GetPrefixPos( sal_uInt16 i ) const
+{
+// DBG_ASSERT( i >= 0 && i < aPrefixPoss.Count(),
+// "SvXMLAttrContainerData::GetPrefixPos: illegal index" );
+ return aPrefixPoss[i];
+}
+
+inline ::rtl::OUString SvXMLAttrContainerData::GetAttrNamespace( sal_uInt16 i ) const
+{
+ ::rtl::OUString sRet;
+ sal_uInt16 nPos = GetPrefixPos( i );
+ if( USHRT_MAX != nPos )
+ sRet = aNamespaceMap.GetNameByIndex( nPos );
+ return sRet;
+}
+
+inline ::rtl::OUString SvXMLAttrContainerData::GetAttrPrefix( sal_uInt16 i ) const
+{
+ ::rtl::OUString sRet;
+ sal_uInt16 nPos = GetPrefixPos( i );
+ if( USHRT_MAX != nPos )
+ sRet = aNamespaceMap.GetPrefixByIndex( nPos );
+ return sRet;
+}
+
+inline const ::rtl::OUString& SvXMLAttrContainerData::GetNamespace(
+ sal_uInt16 i ) const
+{
+ return aNamespaceMap.GetNameByIndex( i );
+}
+
+inline const ::rtl::OUString& SvXMLAttrContainerData::GetPrefix( sal_uInt16 i ) const
+{
+ return aNamespaceMap.GetPrefixByIndex( i );
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlement.hxx b/xmloff/inc/xmloff/xmlement.hxx
new file mode 100644
index 000000000000..3977320d4348
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlement.hxx
@@ -0,0 +1,60 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEMENT_HXX
+#define _XMLOFF_XMLEMENT_HXX
+
+#include <sal/types.h>
+#include <xmloff/xmltoken.hxx>
+
+/** Map an XMLTokenEnum to a sal_uInt16 value.
+ * To be used with SvXMLUnitConverter::convertEnum(...)
+ */
+struct SvXMLEnumMapEntry
+{
+ ::xmloff::token::XMLTokenEnum eToken;
+ sal_uInt16 nValue;
+};
+
+#define ENUM_STRING_MAP_ENTRY(name,tok) { name, sizeof(name)-1, tok }
+
+#define ENUM_STRING_MAP_END() { NULL, 0, 0 }
+
+/** Map a const sal_Char* (with length) to a sal_uInt16 value.
+ * To be used with SvXMLUnitConverter::convertEnum(...)
+ */
+struct SvXMLEnumStringMapEntry
+{
+ const sal_Char * pName;
+ sal_Int32 nNameLength;
+ sal_uInt16 nValue;
+};
+
+#endif // _XMLOFF_XMLEMENT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlevent.hxx b/xmloff/inc/xmloff/xmlevent.hxx
new file mode 100644
index 000000000000..a1b3d54d1338
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlevent.hxx
@@ -0,0 +1,155 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEVENT_HXX
+#define _XMLOFF_XMLEVENT_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+
+
+/**
+ * @#file
+ *
+ * Several definition used in im- and export of events
+ */
+
+namespace com { namespace sun { namespace star {
+ namespace xml { namespace sax { class XAttributeList; } }
+ namespace beans { struct PropertyValue; }
+} } }
+namespace rtl { class OUString; }
+
+class SvXMLExport;
+class SvXMLImportContext;
+class SvXMLImport;
+class XMLEventsImportContext;
+
+
+struct XMLEventName
+{
+ sal_uInt16 m_nPrefix;
+ ::rtl::OUString m_aName;
+
+ XMLEventName() : m_nPrefix( 0 ) {}
+ XMLEventName( sal_uInt16 n, const sal_Char *p ) :
+ m_nPrefix( n ),
+ m_aName( ::rtl::OUString::createFromAscii(p) )
+ {}
+
+ XMLEventName( sal_uInt16 n, const ::rtl::OUString& r ) :
+ m_nPrefix( n ),
+ m_aName( r )
+ {}
+
+ bool operator<( const XMLEventName& r ) const
+ {
+ return m_nPrefix < r.m_nPrefix ||
+ (m_nPrefix == r.m_nPrefix && m_aName < r.m_aName );
+ }
+
+};
+
+/**
+ * XMLEventNameTranslation: define tables that translate between event names
+ * as used in the XML file format and in the StarOffice API.
+ * The last entry in the table must be { NULL, 0, NULL }.
+ */
+struct XMLEventNameTranslation
+{
+ const sal_Char* sAPIName;
+ sal_uInt16 nPrefix; // namespace prefix
+ const sal_Char* sXMLName;
+};
+
+/// a translation table for the events defined in the XEventsSupplier service
+/// (implemented in XMLEventExport.cxx)
+extern const XMLEventNameTranslation aStandardEventTable[];
+
+
+/**
+ * Handle export of an event for a certain event type (event type as
+ * defined by the PropertyValue "EventType" in API).
+ *
+ * The Handler has to generate the full <script:event> element.
+ */
+class XMLEventExportHandler
+{
+public:
+ virtual ~XMLEventExportHandler() {};
+
+ virtual void Export(
+ SvXMLExport& rExport, /// the current XML export
+ const ::rtl::OUString& rEventQName, /// the XML name of the event
+ ::com::sun::star::uno::Sequence< /// the values for the event
+ ::com::sun::star::beans::PropertyValue> & rValues,
+ sal_Bool bUseWhitespace) = 0; /// create whitespace around elements?
+};
+
+
+/**
+ * Handle import of an event for a certain event type (as defined by
+ * the PropertyValue "EventType" in the API).
+ *
+ * EventContextFactories must be registered with the EventImportHelper
+ * that is attached to the SvXMLImport.
+ *
+ * The factory has to create an import context for a <script:event>
+ * element. The context has to call the
+ * EventsImportContext::AddEventValues() method to fave its event
+ * registered with the enclosing element. For events consisting only
+ * of attributes (and an empty element) an easy solution is to handle
+ * all attributes in the CreateContext()-method and return a default
+ * context.
+ *
+ * EventContextFactory objects have to be registered with the
+ * EventsImportHelper.
+ */
+class XMLEventContextFactory
+{
+public:
+ virtual ~XMLEventContextFactory() {};
+
+ virtual SvXMLImportContext* CreateContext(
+ SvXMLImport& rImport, /// import context
+ sal_uInt16 nPrefix, /// element: namespace prefix
+ const ::rtl::OUString& rLocalName, /// element: local name
+ const ::com::sun::star::uno::Reference< /// attribute list
+ ::com::sun::star::xml::sax::XAttributeList> & xAttrList,
+ /// the context for the enclosing <script:events> element
+ XMLEventsImportContext* rEvents,
+ /// the event name (as understood by the API)
+ const ::rtl::OUString& rApiEventName,
+ /// the event type name (as registered)
+ const ::rtl::OUString& rApiLanguage) = 0;
+};
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx
new file mode 100644
index 000000000000..c377ea0436dd
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlexp.hxx
@@ -0,0 +1,731 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEXP_HXX
+#define _XMLOFF_XMLEXP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+
+#include <com/sun/star/embed/XStorage.hpp>
+#include <com/sun/star/xml/sax/SAXParseException.hpp>
+#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/xml/sax/XLocator.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <rtl/ustring.hxx>
+#include <tools/mapunit.hxx>
+#include <xmloff/txtparae.hxx>
+#include <xmloff/formlayerexport.hxx>
+#include <xmloff/xmlnumfe.hxx>
+#include <xmloff/xmlaustp.hxx>
+#include <xmloff/shapeexport.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <xmloff/SchXMLExportHelper.hxx>
+#include <xmloff/XMLFontAutoStylePool.hxx>
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/document/XGraphicObjectResolver.hpp>
+#include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+
+#include <unotools/saveopt.hxx>
+
+#include <xmloff/XMLPageExport.hxx>
+#include <xmloff/ProgressBarHelper.hxx>
+#include <cppuhelper/implbase6.hxx>
+
+#include <list>
+
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvXMLExport_Impl;
+class SvXMLUnitConverter;
+class ProgressBarHelper;
+class XMLEventExport;
+class XMLSettingsExportHelper;
+class XMLImageMapExport;
+class XMLErrors;
+
+// --> OD 2006-03-14 #i51726#
+#include <unotools/moduleoptions.hxx>
+// <--
+
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star {
+ namespace uno { class XComponentContext; }
+ namespace frame { class XModel; }
+ namespace container { class XIndexContainer; }
+} } }
+namespace comphelper { class UnoInterfaceToUniqueIdentifierMapper; }
+
+#define EXPORT_META 0x0001
+#define EXPORT_STYLES 0x0002
+#define EXPORT_MASTERSTYLES 0x0004
+#define EXPORT_AUTOSTYLES 0x0008
+#define EXPORT_CONTENT 0x0010
+#define EXPORT_SCRIPTS 0x0020
+#define EXPORT_SETTINGS 0x0040
+#define EXPORT_FONTDECLS 0x0080
+#define EXPORT_EMBEDDED 0x0100
+#define EXPORT_NODOCTYPE 0x0200
+#define EXPORT_PRETTY 0x0400
+#define EXPORT_SAVEBACKWARDCOMPATIBLE 0x0800
+#define EXPORT_OASIS 0x8000
+#define EXPORT_ALL 0x7fff
+
+class XMLOFF_DLLPUBLIC SvXMLExport : public ::cppu::WeakImplHelper6<
+ ::com::sun::star::document::XFilter,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::document::XExporter,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::container::XNamed,
+ ::com::sun::star::lang::XUnoTunnel>
+{
+ SvXMLExport_Impl *mpImpl; // dummy
+
+ // #110680#
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > mxHandler; // the handlers
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XExtendedDocumentHandler > mxExtHandler;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > mxNumberFormatsSupplier;
+ ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > mxGraphicResolver;
+ ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedObjectResolver > mxEmbeddedResolver;
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > mxStatusIndicator;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxExportInfo;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > mxEventListener;
+
+ SvXMLAttributeList *mpAttrList; // a common attribute list
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > mxAttrList; // and an interface of it
+
+ ::rtl::OUString msOrigFileName; // the original URL
+ ::rtl::OUString msPicturesPath;
+ ::rtl::OUString msGraphicObjectProtocol;
+ ::rtl::OUString msEmbeddedObjectProtocol;
+ ::rtl::OUString msObjectsPath;
+ ::rtl::OUString msFilterName;
+ SvXMLNamespaceMap *mpNamespaceMap; // the namepspace map
+ SvXMLUnitConverter *mpUnitConv; // the unit converter
+ SvXMLNumFmtExport *mpNumExport;
+ ProgressBarHelper *mpProgressBarHelper;
+
+ UniReference< XMLTextParagraphExport > mxTextParagraphExport;
+ UniReference< XMLShapeExport > mxShapeExport;
+ UniReference< SvXMLAutoStylePoolP > mxAutoStylePool;
+ UniReference< SchXMLExportHelper > mxChartExport;
+ UniReference< XMLPageExport > mxPageExport;
+ UniReference< XMLFontAutoStylePool > mxFontAutoStylePool;
+ UniReference< xmloff::OFormLayerXMLExport > mxFormExport;
+ XMLEventExport* mpEventExport;
+ XMLImageMapExport* mpImageMapExport;
+ XMLErrors* mpXMLErrors;
+
+ sal_Bool mbExtended; // Does document contain extens.
+
+ const enum ::xmloff::token::XMLTokenEnum meClass;
+ SAL_DLLPRIVATE void _InitCtor();
+
+ sal_uInt16 mnExportFlags;
+ sal_uInt16 mnErrorFlags;
+ bool mbEnableExperimentalOdfExport;
+
+public:
+
+ const ::rtl::OUString msWS; // " "
+
+private:
+
+ // --> OD 2006-03-10 #i51726#
+ SvtModuleOptions::EFactory meModelType;
+ SAL_DLLPRIVATE void _DetermineModelType();
+ // <--
+
+ SAL_DLLPRIVATE void ImplExportMeta(); // <office:meta>
+ SAL_DLLPRIVATE void ImplExportSettings(); // <office:settings>
+ SAL_DLLPRIVATE void ImplExportStyles( sal_Bool bUsed ); // <office:styles>
+ SAL_DLLPRIVATE void ImplExportAutoStyles( sal_Bool bUsed );
+ // <office:automatic-styles>
+ SAL_DLLPRIVATE void ImplExportMasterStyles( sal_Bool bUsed );
+ // <office:master-styles>
+ SAL_DLLPRIVATE void ImplExportContent(); // <office:body>
+ virtual void SetBodyAttributes();
+ void GetViewSettingsAndViews(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProps);
+
+protected:
+ void setExportFlags( sal_uInt16 nExportFlags ) { mnExportFlags = nExportFlags; }
+
+ // Get (modifyable) namespace map
+ SvXMLNamespaceMap& _GetNamespaceMap() { return *mpNamespaceMap; }
+
+ // get a new namespave map (used in starmath to have a default namespace)
+ void ResetNamespaceMap();
+
+ // This method can be overloaded to export the content of <office:meta>.
+ // There is a default implementation.
+ virtual void _ExportMeta();
+
+ // This method can be overloaded to export the content of <office:scripts>.
+ // There is a default implementation.
+ virtual void _ExportScripts();
+
+ // This method can be overloaded to export the font declarations
+ // The default implementation will export the contents of the
+ // XMLFontAutoStylePool if it has been created.
+ virtual void _ExportFontDecls();
+
+ // This method should be overloaded to export the content of <style:styles>.
+ // If bUsed is set, used styles should be exported only.
+ // Overloaded Methods must call this method !
+ virtual void _ExportStyles( sal_Bool bUsed ) ;
+
+ // This method must be overloaded to export the contents of
+ // <style:auto-styles>
+ virtual void _ExportAutoStyles() = 0;
+
+ // This method must be overloaded to export the contents of
+ // <style:master-styles>
+ virtual void _ExportMasterStyles() = 0;
+
+ // This method must be overloaded to export the content of <office:body>.
+ virtual void _ExportContent() = 0;
+
+ void SetExtended( sal_Bool bSet=sal_True ) { mbExtended = bSet; }
+
+ // save linked sections? (may be false in global documents)
+ sal_Bool mbSaveLinkedSections;
+
+ virtual XMLTextParagraphExport* CreateTextParagraphExport();
+ virtual XMLShapeExport* CreateShapeExport();
+ virtual SvXMLAutoStylePoolP* CreateAutoStylePool();
+ virtual SchXMLExportHelper* CreateChartExport();
+ virtual XMLPageExport* CreatePageExport();
+ virtual XMLFontAutoStylePool* CreateFontAutoStylePool();
+ virtual xmloff::OFormLayerXMLExport* CreateFormExport();
+ virtual void GetViewSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps);
+ virtual void GetConfigurationSettings(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps);
+
+ struct SettingsGroup
+ {
+ ::xmloff::token::XMLTokenEnum eGroupName;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSettings;
+
+ SettingsGroup()
+ :eGroupName( ::xmloff::token::XML_TOKEN_INVALID )
+ ,aSettings()
+ {
+ }
+
+ SettingsGroup(
+ const ::xmloff::token::XMLTokenEnum _eGroupName,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rSettings )
+ :eGroupName( _eGroupName )
+ ,aSettings( _rSettings )
+ {
+ }
+ };
+ /** returns the current document settings
+
+ The default implementation will obtain the view settings by calling GetViewSettingsAndViews, and the
+ configuration settings by calling GetConfigurationSettings, and return them together with the proper XML token.
+
+ @return
+ the accumulated count of all settings in all groups
+ */
+ virtual sal_Int32 GetDocumentSpecificSettings( ::std::list< SettingsGroup >& _out_rSettings );
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedObjectResolver >& GetEmbeddedResolver() const { return mxEmbeddedResolver; }
+ inline void SetEmbeddedResolver( com::sun::star::uno::Reference< com::sun::star::document::XEmbeddedObjectResolver >& _xEmbeddedResolver );
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver >& GetGraphicResolver() const { return mxGraphicResolver; }
+ void SetGraphicResolver( com::sun::star::uno::Reference< com::sun::star::document::XGraphicObjectResolver >& _xGraphicResolver );
+
+ void SetDocHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > &rHandler );
+
+public:
+
+ // #110680#
+ //SvXMLExport( MapUnit eDfltUnit,
+ // const enum ::xmloff::token::XMLTokenEnum eClass = xmloff::token::XML_TOKEN_INVALID,
+ // sal_uInt16 nExportFlag = EXPORT_ALL );
+ SvXMLExport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ MapUnit eDfltUnit,
+ const enum ::xmloff::token::XMLTokenEnum eClass = xmloff::token::XML_TOKEN_INVALID,
+ sal_uInt16 nExportFlag = EXPORT_ALL );
+
+ // #110680#
+ //SvXMLExport( const ::rtl::OUString& rFileName,
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ // MapUnit eDfltUnit = MAP_INCH );
+ SvXMLExport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const ::rtl::OUString& rFileName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ MapUnit eDfltUnit = MAP_INCH );
+
+ // #110680#
+ //SvXMLExport( const ::rtl::OUString& rFileName,
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::frame::XModel > &,
+ // sal_Int16 eDfltUnit );
+ SvXMLExport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const ::rtl::OUString& rFileName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &,
+ sal_Int16 eDfltUnit );
+
+ // #110680#
+ //SvXMLExport( const ::rtl::OUString& rFileName,
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::frame::XModel > &,
+ // const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::document::XGraphicObjectResolver > &,
+ // sal_Int16 eDfltUnit );
+ SvXMLExport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const ::rtl::OUString& rFileName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & rHandler,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > &,
+ sal_Int16 eDfltUnit );
+
+ virtual ~SvXMLExport();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ static SvXMLExport* getImplementation( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ) throw();
+
+ // XExporter
+ virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // XFilter
+ virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancel() throw(::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XNamed
+ virtual ::rtl::OUString SAL_CALL getName( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ /** ensures that the given namespace is in scope at the next started
+ element.
+
+ <p>If the namespace is not yet declared, the necessary attribute will
+ be added, as well.</p>
+
+ @param i_rNamespace the namespace to be declared
+ @param i_rPreferredPrefix (opt.) preferred prefix for the namespace
+
+ @returns the actual prefix that the namespace is associated with
+ */
+ ::rtl::OUString
+ EnsureNamespace(::rtl::OUString const & i_rNamespace,
+ ::rtl::OUString const & i_rPreferredPrefix
+ = ::rtl::OUString::createFromAscii("gen") );
+
+ // Check if common attribute list is empty.
+#ifndef DBG_UTIL
+ void CheckAttrList() {}
+#else
+ void CheckAttrList();
+#endif
+
+ // Clear common attribute list.
+ void ClearAttrList();
+
+ // Add an attribute to the common attribute list.
+ void AddAttributeASCII( sal_uInt16 nPrefix, const sal_Char *pName,
+ const sal_Char *pValue );
+ void AddAttribute( sal_uInt16 nPrefix, const sal_Char *pName,
+ const ::rtl::OUString& rValue );
+ void AddAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rName,
+ const ::rtl::OUString& rValue );
+ void AddAttribute( sal_uInt16 nPrefix,
+ enum ::xmloff::token::XMLTokenEnum eName,
+ const ::rtl::OUString& rValue );
+ void AddAttribute( sal_uInt16 nPrefix,
+ enum ::xmloff::token::XMLTokenEnum eName,
+ enum ::xmloff::token::XMLTokenEnum eValue );
+ void AddAttribute( const ::rtl::OUString& rQName,
+ const ::rtl::OUString& rValue );
+ void AddAttribute( const ::rtl::OUString& rQName,
+ enum ::xmloff::token::XMLTokenEnum eValue );
+ // add several attributes to the common attribute list
+ void AddAttributeList( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ // Get common attribute list as implementation or interface.
+ SvXMLAttributeList &GetAttrList() { return *mpAttrList; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & GetXAttrList() { return mxAttrList; }
+
+ // Get document handler. This methods are not const, because the
+ // reference allowes modifications through the handler.
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > & GetDocHandler() { return mxHandler; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XExtendedDocumentHandler > & GetExtDocHandler()
+ {
+ return mxExtHandler;
+ }
+
+ // Get original ::com::sun::star::util::URL.
+ const ::rtl::OUString& GetOrigFileName() const { return msOrigFileName; }
+
+ // Get the relative path for embedded pictures
+ const ::rtl::OUString& GetPicturesPath() const { return msPicturesPath; }
+
+ // Get the relative path for embedded objects
+ const ::rtl::OUString& GetObjectsPath() const { return msObjectsPath; }
+
+ // Get (const) namespace map.
+ const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; }
+
+ // Get unit converter
+ const SvXMLUnitConverter& GetMM100UnitConverter() const { return *mpUnitConv; }
+
+ SvXMLUnitConverter& GetMM100UnitConverter() { return *mpUnitConv; }
+
+ // Export the document.
+ virtual sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass = ::xmloff::token::XML_TOKEN_INVALID );
+
+ virtual void addDataStyle(const sal_Int32 nNumberFormat, sal_Bool bTimeFormat = sal_False );
+ virtual void exportDataStyles();
+ virtual void exportAutoDataStyles();
+ virtual rtl::OUString getDataStyleName(const sal_Int32 nNumberFormat, sal_Bool bTimeFormat = sal_False ) const;
+ sal_Int32 dataStyleForceSystemLanguage(sal_Int32 nFormat) const;
+
+ virtual void exportAnnotationMeta( const com::sun::star::uno::Reference < com::sun::star::drawing::XShape >& xShape);
+
+ // Get XModel
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &
+ GetModel() const { return mxModel; }
+ // Get XNumberFormatsSupplier
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & GetNumberFormatsSupplier() { return mxNumberFormatsSupplier; }
+ inline void SetNumberFormatsSupplier(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& _xNumberFormatSupplier)
+ {
+ mxNumberFormatsSupplier = _xNumberFormatSupplier;
+ if ( mxNumberFormatsSupplier.is() && mxHandler.is() )
+ mpNumExport = new SvXMLNumFmtExport(*this, mxNumberFormatsSupplier);
+ }
+
+ // get export helper for text
+ inline UniReference< XMLTextParagraphExport > GetTextParagraphExport();
+
+ // get export helper for shapes
+ inline UniReference< XMLShapeExport > GetShapeExport();
+
+ // get auto style pool
+ inline UniReference< SvXMLAutoStylePoolP > GetAutoStylePool();
+
+ // get Page Export
+ inline UniReference< XMLPageExport > GetPageExport();
+
+ // get chart export helper
+ inline UniReference< SchXMLExportHelper > GetChartExport();
+
+ // get font auto style pool
+ inline UniReference< XMLFontAutoStylePool > GetFontAutoStylePool();
+
+ ProgressBarHelper* GetProgressBarHelper();
+
+ // get Formlayer Export
+ inline UniReference< xmloff::OFormLayerXMLExport > GetFormExport();
+ inline bool HasFormExport();
+
+ // get XPropertySet with export information
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getExportInfo() const { return mxExportInfo; }
+
+ com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > GetStatusIndicator() { return mxStatusIndicator; }
+
+ /// get Event export, with handlers for script types "None" and
+ /// "StarBasic" already registered; other handlers may be registered, too.
+ XMLEventExport& GetEventExport();
+
+ /// get the export for image maps
+ XMLImageMapExport& GetImageMapExport();
+
+ ::rtl::OUString AddEmbeddedGraphicObject(
+ const ::rtl::OUString& rGraphicObjectURL );
+ sal_Bool AddEmbeddedGraphicObjectAsBase64(
+ const ::rtl::OUString& rGraphicObjectURL );
+
+ ::rtl::OUString AddEmbeddedObject(
+ const ::rtl::OUString& rEmbeddedObjectURL );
+ sal_Bool AddEmbeddedObjectAsBase64(
+ const ::rtl::OUString& rEmbeddedObjectURL );
+
+ ::rtl::OUString EncodeStyleName( const ::rtl::OUString& rName,
+ sal_Bool *pEncoded=0 ) const;
+
+ // save linked sections?
+ inline sal_Bool IsSaveLinkedSections() { return mbSaveLinkedSections; }
+
+ // get export flags
+ sal_uInt16 getExportFlags() const { return mnExportFlags; }
+
+ sal_Bool ExportEmbeddedOwnObject(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XComponent >& rComp );
+
+ rtl::OUString GetRelativeReference(const rtl::OUString& rValue);
+
+ // methods for accessing the document handler and handling SAX errors
+ void StartElement(sal_uInt16 nPrefix,
+ enum ::xmloff::token::XMLTokenEnum eName,
+ sal_Bool bIgnWSOutside );
+ void StartElement(const ::rtl::OUString& rName,
+ sal_Bool bIgnWSOutside );
+ void Characters(const ::rtl::OUString& rChars);
+ void EndElement(sal_uInt16 nPrefix,
+ enum ::xmloff::token::XMLTokenEnum eName,
+ sal_Bool bIgnWSInside );
+ void EndElement(const ::rtl::OUString& rName,
+ sal_Bool bIgnWSInside );
+ void IgnorableWhitespace();
+
+ /**
+ * Record an error condition that occured during export. The
+ * behavior of SetError can be modified using the error flag
+ * constants.
+ */
+ void SetError(
+ /// error ID, may contain an error flag
+ sal_Int32 nId,
+ /// string parameters for the error message
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString> & rMsgParams,
+ /// original exception message (if applicable)
+ const ::rtl::OUString& rExceptionMessage,
+ /// error location (if applicable)
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XLocator> & rLocator );
+
+ void SetError(
+ sal_Int32 nId,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString> & rMsgParams);
+
+ /** return list of errors */
+ XMLErrors* GetErrors();
+
+ /** return current error flags (logical 'or' of all error flags so far) */
+ sal_uInt16 GetErrorFlags() { return mnErrorFlags; }
+
+ virtual void DisposingModel();
+
+ ::comphelper::UnoInterfaceToUniqueIdentifierMapper& getInterfaceToIdentifierMapper();
+
+ // #110680#
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceFactory();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ GetComponentContext() const;
+
+ // --> OD 2006-03-10 #i51726#
+ SvtModuleOptions::EFactory GetModelType() const
+ {
+ return meModelType;
+ }
+ // <--
+
+ // --> OD 2006-09-27 #i69627#
+ sal_Bool writeOutlineStyleAsNormalListStyle() const;
+ // <--
+ bool isExperimentalOdfExportEnabled() const { return mbEnableExperimentalOdfExport; }
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetTargetStorage();
+
+ /// returns the currently configured default version for odf export
+ SvtSaveOptions::ODFDefaultVersion getDefaultVersion() const;
+
+ /// 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);
+
+ /// add RDFa attributes for a metadatable text content
+ void AddAttributesRDFa( ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextContent> const & i_xTextContent);
+
+ // --> OD 2008-11-26 #158694#
+ sal_Bool exportTextNumberElement() const;
+ // <--
+
+ /// set null date from model to unit converter, if not already done
+ sal_Bool SetNullDateOnUnitConverter();
+};
+
+inline UniReference< XMLTextParagraphExport > SvXMLExport::GetTextParagraphExport()
+{
+ if( !mxTextParagraphExport.is() )
+ mxTextParagraphExport = CreateTextParagraphExport();
+
+ return mxTextParagraphExport;
+}
+
+inline UniReference< XMLShapeExport > SvXMLExport::GetShapeExport()
+{
+ if( !mxShapeExport.is() )
+ mxShapeExport = CreateShapeExport();
+
+ return mxShapeExport;
+}
+
+inline UniReference< SvXMLAutoStylePoolP > SvXMLExport::GetAutoStylePool()
+{
+ if( !mxAutoStylePool.is() )
+ mxAutoStylePool = CreateAutoStylePool();
+
+ return mxAutoStylePool;
+}
+
+inline UniReference< SchXMLExportHelper > SvXMLExport::GetChartExport()
+{
+ if( !mxChartExport.is() )
+ mxChartExport = CreateChartExport();
+
+ return mxChartExport;
+}
+
+inline UniReference< XMLPageExport > SvXMLExport::GetPageExport()
+{
+ if( !mxPageExport.is() )
+ mxPageExport = CreatePageExport();
+
+ return mxPageExport;
+}
+
+inline UniReference< XMLFontAutoStylePool > SvXMLExport::GetFontAutoStylePool()
+{
+ if( !mxFontAutoStylePool.is() )
+ mxFontAutoStylePool = CreateFontAutoStylePool();
+
+ return mxFontAutoStylePool;
+}
+
+inline UniReference< xmloff::OFormLayerXMLExport > SvXMLExport::GetFormExport()
+{
+ if( !mxFormExport.is() )
+ mxFormExport = CreateFormExport();
+
+ return mxFormExport;
+}
+
+inline bool SvXMLExport::HasFormExport()
+{
+ return mxFormExport.is();
+}
+
+inline void SvXMLExport::SetEmbeddedResolver(
+ com::sun::star::uno::Reference< com::sun::star::document::XEmbeddedObjectResolver >& _xEmbeddedResolver )
+{
+ mxEmbeddedResolver = _xEmbeddedResolver;
+}
+
+inline void SvXMLExport::SetGraphicResolver(
+ com::sun::star::uno::Reference< com::sun::star::document::XGraphicObjectResolver >& _xGraphicResolver )
+{
+ mxGraphicResolver = _xGraphicResolver;
+}
+
+// Helper class to export an element.
+class XMLOFF_DLLPUBLIC SvXMLElementExport
+{
+ SvXMLExport& rExport;
+ ::rtl::OUString aName;
+ sal_Bool bIgnWS : 1;
+ sal_Bool bDoSomething : 1;
+
+ SAL_DLLPRIVATE void StartElement( SvXMLExport& rExp, sal_uInt16 nPrefix,
+ const ::rtl::OUString& rName,
+ sal_Bool bIgnWSOutside );
+
+public:
+
+ // The constructor prints a start tag that has the common attributes
+ // of the XMLExport instance attached.
+ SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix,
+ const sal_Char *pName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+ SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix,
+ const ::rtl::OUString& rName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+ SvXMLElementExport( SvXMLExport& rExp, sal_uInt16 nPrefix,
+ enum ::xmloff::token::XMLTokenEnum eName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+ SvXMLElementExport( SvXMLExport& rExp, const ::rtl::OUString& rQName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+
+ // Thes constructors do nothing if bDoSomething is not set
+ SvXMLElementExport( SvXMLExport& rExp, sal_Bool bDoSomething,
+ sal_uInt16 nPrefix, const sal_Char *pName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+ SvXMLElementExport( SvXMLExport& rExp, sal_Bool bDoSomething,
+ sal_uInt16 nPrefix, const ::rtl::OUString& rName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+ SvXMLElementExport( SvXMLExport& rExp, sal_Bool bDoSomething,
+ sal_uInt16 nPrefix,
+ enum ::xmloff::token::XMLTokenEnum eName,
+ sal_Bool bIgnWSOutside, sal_Bool bIgnWSInside );
+
+ // The destructor prints an end tag.
+ ~SvXMLElementExport();
+};
+
+#endif // _XMLOFF_SVXMLEXP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlexppr.hxx b/xmloff/inc/xmloff/xmlexppr.hxx
new file mode 100644
index 000000000000..b285c9348d64
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlexppr.hxx
@@ -0,0 +1,207 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLEXPPR_HXX
+#define _XMLOFF_XMLEXPPR_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/uniref.hxx>
+
+namespace rtl { class OUString; }
+
+class SvXMLUnitConverter;
+class SvXMLAttributeList;
+class SvXMLNamespaceMap;
+class SvUShorts;
+class FilterPropertiesInfos_Impl;
+class SvXMLExport;
+
+#define XML_EXPORT_FLAG_DEFAULTS 0x0001 // export also default items
+#define XML_EXPORT_FLAG_DEEP 0x0002 // export also items from
+ // parent item sets
+#define XML_EXPORT_FLAG_EMPTY 0x0004 // export attribs element
+ // even if its empty
+#define XML_EXPORT_FLAG_IGN_WS 0x0008
+
+class XMLOFF_DLLPUBLIC SvXMLExportPropertyMapper : public UniRefBase
+{
+ UniReference< SvXMLExportPropertyMapper> mxNextMapper;
+
+ FilterPropertiesInfos_Impl *pCache;
+
+protected:
+ UniReference< XMLPropertySetMapper > maPropMapper;
+
+ rtl::OUString maStyleName;
+
+ /** Filter all properties we don't want to export:
+ Take all properties of the XPropertySet which are also found in the
+ XMLPropertyMapEntry-array and which are not set directly (so, the value isn't
+ default and isn't inherited, apart from bDefault is true)
+ After this process It'll called 'Contextfilter' for application-specific
+ filter-processes. */
+ ::std::vector< XMLPropertyState > _Filter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet,
+ const sal_Bool bDefault ) const;
+
+ /** Application-specific filter. By default do nothing. */
+ virtual void ContextFilter(
+ ::std::vector< XMLPropertyState >& rProperties,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet ) const;
+
+ /** fills the given attribute list with the items in the given set */
+ void _exportXML( sal_uInt16 nPropType, sal_uInt16& rPropTypeFlags,
+ SvXMLAttributeList& rAttrList,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags,
+ SvUShorts* pIndexArray,
+ sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx ) const;
+
+ void _exportXML( SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags,
+ const ::std::vector< XMLPropertyState > *pProperties = 0,
+ sal_uInt32 nIdx = 0 ) const;
+
+ void exportElementItems(
+ SvXMLExport& rExport,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ sal_uInt16 nFlags,
+ const SvUShorts& rIndexArray ) const;
+
+public:
+
+ SvXMLExportPropertyMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper );
+ virtual ~SvXMLExportPropertyMapper();
+
+ // Add a ExportPropertyMapper at the end of the import mapper chain.
+ // The added mapper MUST not be used outside the Mapper chain any longer,
+ // because its PropertyMapper will be replaced.
+ void ChainExportMapper(
+ const UniReference< SvXMLExportPropertyMapper>& rMapper );
+
+ /** Filter all properties we don't want to export:
+ Take all properties of the XPropertySet which are also found in the
+ XMLPropertyMapEntry-array and which are not set directly (so, the value isn't
+ default and isn't inherited)
+ After this process It'll called 'Contextfilter' for application-specific
+ filter-processes. */
+ ::std::vector< XMLPropertyState > Filter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet ) const
+ { return _Filter(rPropSet, sal_False); }
+
+ /** Like Filter(), excepti that:
+ * - only properties that have the map flag MID_FLAG_DEFAULT_ITEM_EXPORT
+ * set are exported,
+ * - instead of the property's value, its defualt value is exported.
+ */
+ ::std::vector< XMLPropertyState > FilterDefaults(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet ) const
+ { return _Filter(rPropSet, sal_True); }
+
+ /** Compare to arrays of XMLPropertyState */
+ sal_Bool Equals( const ::std::vector< XMLPropertyState >& aProperties1,
+ const ::std::vector< XMLPropertyState >& aProperties2 ) const;
+
+ /** fills the given attribute list with the items in the given set */
+ void exportXML(
+ SvXMLAttributeList& rAttrList,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags = 0 ) const;
+ /** like above but only properties whose property map index is within the
+ specified range are exported */
+ void exportXML(
+ SvXMLAttributeList& rAttrList,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx,
+ sal_uInt16 nFlags = 0 ) const;
+
+ /** fills the given attribute list with the representation of one item */
+ void exportXML(
+ SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt16 nFlags = 0 ) const;
+
+ void exportXML(
+ SvXMLExport& rExport,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ sal_uInt16 nFlags = 0 ) const;
+
+ /** like above but only properties whose property map index is within the
+ specified range are exported */
+ void exportXML(
+ SvXMLExport& rExport,
+ const ::std::vector< XMLPropertyState >& rProperties,
+ sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx,
+ sal_uInt16 nFlags = 0 ) const;
+
+ /** this method is called for every item that has the
+ MID_FLAG_ELEMENT_EXPORT flag set */
+ virtual void handleElementItem(
+ SvXMLExport& rExport,
+ const XMLPropertyState& rProperty,
+ sal_uInt16 nFlags,
+ const ::std::vector< XMLPropertyState > *pProperties = 0,
+ sal_uInt32 nIdx = 0 ) const;
+
+ /** this method is called for every item that has the
+ MID_FLAG_SPECIAL_ITEM_EXPORT flag set */
+ virtual void handleSpecialItem(
+ SvXMLAttributeList& rAttrList,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ const ::std::vector< XMLPropertyState > *pProperties = 0,
+ sal_uInt32 nIdx = 0 ) const;
+
+ inline const UniReference< XMLPropertySetMapper >&
+ getPropertySetMapper() const { return maPropMapper; }
+
+ void SetStyleName( const rtl::OUString& rStyleName ) { maStyleName = rStyleName; }
+};
+
+#endif // _XMLOFF_XMLEXPPR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlictxt.hxx b/xmloff/inc/xmloff/xmlictxt.hxx
new file mode 100644
index 000000000000..8ac88f744237
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlictxt.hxx
@@ -0,0 +1,110 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLICTXT_HXX
+#define _XMLOFF_XMLICTXT_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <tools/solar.h>
+#include <tools/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/rtti.hxx>
+
+class SvXMLNamespaceMap;
+class SvXMLImport;
+
+class XMLOFF_DLLPUBLIC SvXMLImportContext : public SvRefBase
+{
+ friend class SvXMLImport;
+
+ SvXMLImport& mrImport;
+
+ USHORT mnPrefix;
+ ::rtl::OUString maLocalName;
+
+ SvXMLNamespaceMap *mpRewindMap;
+
+ SAL_DLLPRIVATE SvXMLNamespaceMap *GetRewindMap() const
+ { return mpRewindMap; }
+ SAL_DLLPRIVATE void SetRewindMap( SvXMLNamespaceMap *p ) { mpRewindMap = p; }
+
+protected:
+
+ SvXMLImport& GetImport() { return mrImport; }
+ const SvXMLImport& GetImport() const { return mrImport; }
+
+public:
+ TYPEINFO();
+
+ USHORT GetPrefix() const { return mnPrefix; }
+ const ::rtl::OUString& GetLocalName() const { return maLocalName; }
+
+ // A contexts constructor does anything that is required if an element
+ // starts. Namespace processing has been done already.
+ // Note that virtual methods cannot be used inside constructors. Use
+ // StartElement instead if this is required.
+ SvXMLImportContext( SvXMLImport& rImport, USHORT nPrfx,
+ const ::rtl::OUString& rLName );
+
+ // A contexts destructor does anything that is required if an element
+ // ends. By default, nothing is done.
+ // Note that virtual methods cannot be used inside destructors. Use
+ // EndElement instead if this is required.
+ virtual ~SvXMLImportContext();
+
+ // Create a childs element context. By default, the import's
+ // CreateContext method is called to create a new default context.
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ // StartElement is called after a context has been constructed and
+ // before a elements context is parsed. It may be used for actions that
+ // require virtual methods. The default is to do nothing.
+ virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ // EndElement is called before a context will be destructed, but
+ // after a elements context has been parsed. It may be used for actions
+ // that require virtual methods. The default is to do nothing.
+ virtual void EndElement();
+
+ // This method is called for all characters that are contained in the
+ // current element. The default is to ignore them.
+ virtual void Characters( const ::rtl::OUString& rChars );
+};
+
+SV_DECL_REF( SvXMLImportContext )
+SV_IMPL_REF( SvXMLImportContext )
+
+
+#endif // _XMLOFF_XMLICTXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlimp.hxx b/xmloff/inc/xmloff/xmlimp.hxx
new file mode 100644
index 000000000000..e79968285c99
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlimp.hxx
@@ -0,0 +1,539 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLIMP_HXX
+#define _XMLOFF_XMLIMP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/xml/sax/SAXParseException.hpp>
+#include <com/sun/star/xml/sax/XExtendedDocumentHandler.hpp>
+#include <com/sun/star/xml/sax/SAXException.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/xml/sax/XLocator.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/document/XImporter.hpp>
+#include <com/sun/star/document/XFilter.hpp>
+#include <com/sun/star/document/XGraphicObjectResolver.hpp>
+#include <com/sun/star/document/XEmbeddedObjectResolver.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <cppuhelper/weak.hxx>
+#include <xmloff/txtimp.hxx>
+#include <xmloff/shapeimport.hxx>
+#include <xmloff/SchXMLImportHelper.hxx>
+#include <xmloff/ProgressBarHelper.hxx>
+#include <cppuhelper/implbase6.hxx>
+#include <xmloff/formlayerimport.hxx>
+
+#include <com/sun/star/beans/NamedValue.hpp>
+
+namespace rtl { class OUString; }
+namespace com { namespace sun { namespace star {
+ namespace uno { class XComponentContext; }
+ namespace frame { class XModel; }
+ namespace io { class XOutputStream; }
+ namespace rdf { class XMetadatable; }
+} } }
+namespace comphelper { class UnoInterfaceToUniqueIdentifierMapper; }
+
+class SvXMLNamespaceMap;
+class SvXMLImportContext;
+class SvXMLImportContexts_Impl;
+class SvXMLImport_Impl;
+class SvXMLUnitConverter;
+class SvXMLNumFmtHelper;
+class XMLFontStylesContext;
+class XMLEventImportHelper;
+class XMLErrors;
+class StyleMap;
+class String;
+
+namespace xmloff {
+ class RDFaImportHelper;
+}
+
+#define IMPORT_META 0x0001
+#define IMPORT_STYLES 0x0002
+#define IMPORT_MASTERSTYLES 0x0004
+#define IMPORT_AUTOSTYLES 0x0008
+#define IMPORT_CONTENT 0x0010
+#define IMPORT_SCRIPTS 0x0020
+#define IMPORT_SETTINGS 0x0040
+#define IMPORT_FONTDECLS 0x0080
+#define IMPORT_EMBEDDED 0x0100
+#define IMPORT_OOO_NAMESPACES 0x0100
+#define IMPORT_ALL 0xffff
+
+
+
+class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper6<
+ ::com::sun::star::xml::sax::XExtendedDocumentHandler,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::document::XImporter,
+ ::com::sun::star::document::XFilter,
+ ::com::sun::star::lang::XUnoTunnel>
+{
+ friend class SvXMLImportContext;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > mxLocator;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > mxModel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > mxNumberFormatsSupplier;
+ ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > mxGraphicResolver;
+ ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedObjectResolver > mxEmbeddedResolver;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxImportInfo;
+
+ UniReference< XMLTextImportHelper > mxTextImport;
+ UniReference< XMLShapeImportHelper > mxShapeImport;
+ UniReference< SchXMLImportHelper > mxChartImport;
+ UniReference< ::xmloff::OFormLayerXMLImport > mxFormImport;
+
+ SvXMLImportContextRef mxFontDecls;
+ SvXMLImportContextRef mxStyles;
+ SvXMLImportContextRef mxAutoStyles;
+ SvXMLImportContextRef mxMasterStyles;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxGradientHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxHatchHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxBitmapHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxTransGradientHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxMarkerHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxDashHelper;
+ ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > mxNumberStyles;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > mxEventListener;
+
+ SvXMLImport_Impl *mpImpl; // dummy
+
+ SvXMLNamespaceMap *mpNamespaceMap;
+ SvXMLUnitConverter *mpUnitConv;
+ SvXMLImportContexts_Impl *mpContexts;
+ SvXMLNumFmtHelper *mpNumImport;
+ ProgressBarHelper *mpProgressBarHelper;
+ XMLEventImportHelper *mpEventImportHelper;
+ XMLErrors *mpXMLErrors;
+ StyleMap *mpStyleMap;
+ ::rtl::OUString msPackageProtocol;
+
+ SAL_DLLPRIVATE void _InitCtor();
+
+ sal_uInt16 mnImportFlags;
+ sal_uInt16 mnErrorFlags;
+
+protected:
+ // #110680#
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory;
+
+ ::com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
+ sal_Bool mbIsFormsSupported;
+ bool mbIsTableShapeSupported;
+ bool mbIsGraphicLoadOnDemandSupported;
+
+ // This method is called after the namespace map has been updated, but
+ // before a context for the current element has been pushed.
+ virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual XMLTextImportHelper* CreateTextImport();
+ virtual XMLShapeImportHelper* CreateShapeImport();
+ inline sal_Bool HasShapeImport() const { return mxShapeImport.is(); }
+ inline void ClearShapeImport() { mxShapeImport = 0; }
+
+ virtual SchXMLImportHelper* CreateChartImport();
+ virtual ::xmloff::OFormLayerXMLImport* CreateFormImport();
+
+ void SetFontDecls( XMLFontStylesContext *pFontDecls );
+ void SetStyles( SvXMLStylesContext *pStyles );
+ void SetAutoStyles( SvXMLStylesContext *pAutoStyles );
+ void SetMasterStyles( SvXMLStylesContext *pMasterStyles );
+
+ sal_Bool IsODFVersionConsistent( const ::rtl::OUString& aODFVersion );
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedObjectResolver >& GetEmbeddedResolver() const { return mxEmbeddedResolver; }
+ inline void SetEmbeddedResolver( com::sun::star::uno::Reference< com::sun::star::document::XEmbeddedObjectResolver >& _xEmbeddedResolver );
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver >& GetGraphicResolver() const { return mxGraphicResolver; }
+ void SetGraphicResolver( com::sun::star::uno::Reference< com::sun::star::document::XGraphicObjectResolver >& _xGraphicResolver );
+
+
+ void _CreateNumberFormatsSupplier();
+ void _CreateDataStylesImport();
+
+public:
+ // #110680#
+ // SvXMLImport( sal_uInt16 nImportFlags = IMPORT_ALL ) throw();
+ SvXMLImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ sal_uInt16 nImportFlags = IMPORT_ALL ) throw();
+
+ // #110680#
+ //SvXMLImport( const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::frame::XModel > & ) throw();
+ SvXMLImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & ) throw();
+
+ // #110680#
+ //SvXMLImport( const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::frame::XModel > &,
+ // const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > & ) throw();
+ SvXMLImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::document::XGraphicObjectResolver > & ) throw();
+
+ virtual ~SvXMLImport() throw();
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
+ static SvXMLImport* getImplementation( ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > ) throw();
+
+ // ::com::sun::star::xml::sax::XDocumentHandler
+ virtual void SAL_CALL startDocument(void)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL endDocument(void)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL startElement(const ::rtl::OUString& aName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttribs)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL endElement(const ::rtl::OUString& aName)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL characters(const ::rtl::OUString& aChars)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL ignorableWhitespace(const ::rtl::OUString& aWhitespaces)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL processingInstruction(const ::rtl::OUString& aTarget,
+ const ::rtl::OUString& aData)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setDocumentLocator(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > & xLocator)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+
+ // ::com::sun::star::xml::sax::XExtendedDocumentHandler
+ virtual void SAL_CALL startCDATA(void) throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL endCDATA(void) throw( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL comment(const ::rtl::OUString& sComment)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL allowLineBreak(void)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL unknown(const ::rtl::OUString& sString)
+ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+
+ // XImporter
+ virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
+ // XFilter
+ virtual sal_Bool SAL_CALL filter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL cancel( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XUnoTunnel
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // may be called by certain subclasses that handle document meta-data
+ // override to provide customized handling of document statistics
+ // the base class implementation initializes the progress bar and should
+ // be called by overriding methods
+ virtual void SetStatistics(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > & i_rStats);
+
+ // get import helper for text
+ inline UniReference< XMLTextImportHelper > GetTextImport();
+ sal_Bool HasTextImport() const { return mxTextImport.is(); }
+ inline SvXMLNumFmtHelper* GetDataStylesImport();
+
+ // get import helper for shapes
+ inline UniReference< XMLShapeImportHelper > GetShapeImport();
+
+ // get import helper for charts
+ inline UniReference< SchXMLImportHelper > GetChartImport();
+
+ // get import helper for form layer
+ inline UniReference< ::xmloff::OFormLayerXMLImport > GetFormImport();
+
+ // get XPropertySet with import information
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getImportInfo() const { return mxImportInfo; }
+
+ // get import helper for events
+ XMLEventImportHelper& GetEventImport();
+
+ SvXMLNamespaceMap& GetNamespaceMap() { return *mpNamespaceMap; }
+ const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; }
+ const SvXMLUnitConverter& GetMM100UnitConverter() const { return *mpUnitConv; }
+ SvXMLUnitConverter& GetMM100UnitConverter() { return *mpUnitConv; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XLocator > & GetLocator() const { return mxLocator; }
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > &
+ GetModel() const { return mxModel; }
+
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & GetGradientHelper();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & GetHatchHelper();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & GetBitmapHelper();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & GetTransGradientHelper();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & GetMarkerHelper();
+ const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > & GetDashHelper();
+ inline ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & GetNumberFormatsSupplier();
+ inline void SetNumberFormatsSupplier(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& _xNumberFormatSupplier)
+ {
+ mxNumberFormatsSupplier = _xNumberFormatSupplier;
+ }
+
+ // Convert a local packe URL into either a graphic manager or a
+ // internal package URL. The later one happens only if bLoadURL is true
+ ::rtl::OUString ResolveGraphicObjectURL( const ::rtl::OUString& rURL, sal_Bool bLoadOnDemand );
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
+ GetStreamForGraphicObjectURLFromBase64();
+ ::rtl::OUString ResolveGraphicObjectURLFromBase64(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOut );
+
+ sal_Bool IsPackageURL( const ::rtl::OUString& rURL ) const;
+ ::rtl::OUString ResolveEmbeddedObjectURL( const ::rtl::OUString& rURL,
+ const ::rtl::OUString& rClassId );
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
+ GetStreamForEmbeddedObjectURLFromBase64();
+ ::rtl::OUString ResolveEmbeddedObjectURLFromBase64();
+
+ void AddStyleDisplayName( sal_uInt16 nFamily,
+ const ::rtl::OUString& rName,
+ const ::rtl::OUString& rDisplayName );
+ ::rtl::OUString GetStyleDisplayName( sal_uInt16 nFamily,
+ const ::rtl::OUString& rName ) const;
+
+ ProgressBarHelper* GetProgressBarHelper();
+
+ void AddNumberStyle(sal_Int32 nKey, const rtl::OUString& sName);
+
+ virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
+ virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aConfigProps);
+ virtual void SetDocumentSpecificSettings(const ::rtl::OUString& _rSettingsGroupName,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& _rSettings);
+
+ XMLFontStylesContext *GetFontDecls();
+ SvXMLStylesContext *GetStyles();
+ SvXMLStylesContext *GetAutoStyles();
+ SvXMLStylesContext *GetMasterStyles();
+ const XMLFontStylesContext *GetFontDecls() const;
+ const SvXMLStylesContext *GetStyles() const;
+ const SvXMLStylesContext *GetAutoStyles() const;
+ const SvXMLStylesContext *GetMasterStyles() const;
+
+ sal_uInt16 getImportFlags() const { return mnImportFlags; }
+ sal_Bool IsFormsSupported() const { return mbIsFormsSupported; }
+ rtl::OUString GetAbsoluteReference(const rtl::OUString& rValue) const;
+
+ sal_Unicode ConvStarBatsCharToStarSymbol( sal_Unicode c );
+ sal_Unicode ConvStarMathCharToStarSymbol( sal_Unicode c );
+
+ bool IsTableShapeSupported() const { return mbIsTableShapeSupported; }
+
+ ::rtl::OUString GetODFVersion() const;
+
+ /**
+ * Record an error condition that occured during import. The
+ * behavior of SetError can be modified using the error flag
+ * constants.
+ */
+ void SetError(
+ /// error ID, may contain an error flag
+ sal_Int32 nId,
+ /// string parameters for the error message
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString> & rMsgParams,
+ /// original exception message (if applicable)
+ const ::rtl::OUString& rExceptionMessage,
+ /// error location (if applicable)
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XLocator> & rLocator );
+
+ void SetError(
+ sal_Int32 nId,
+ const ::com::sun::star::uno::Sequence< ::rtl::OUString> & rMsgParams);
+
+ void SetError( sal_Int32 nId );
+ void SetError( sal_Int32 nId, const rtl::OUString& rMsg1 );
+ void SetError( sal_Int32 nId, const rtl::OUString& rMsg1,
+ const rtl::OUString& rMsg2 );
+ void SetError( sal_Int32 nId, const rtl::OUString& rMsg1,
+ const rtl::OUString& rMsg2,
+ const rtl::OUString& rMsg3 );
+ void SetError( sal_Int32 nId, const rtl::OUString& rMsg1,
+ const rtl::OUString& rMsg2,
+ const rtl::OUString& rMsg3,
+ const rtl::OUString& rMsg4 );
+
+ /** return list of errors */
+ XMLErrors* GetErrors();
+
+ /** return current error flags */
+ sal_uInt16 GetErrorFlags() { return mnErrorFlags; }
+
+ virtual void DisposingModel();
+
+ ::comphelper::UnoInterfaceToUniqueIdentifierMapper& getInterfaceToIdentifierMapper();
+
+ // #110680#
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getServiceFactory();
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ GetComponentContext() const;
+
+ // --> OD 2004-08-10 #i28749#
+ sal_Bool IsShapePositionInHoriL2R() const;
+ // <--
+
+ // --> OD 2007-12-19 #152540#
+ sal_Bool IsTextDocInOOoFileFormat() const;
+ // <--
+
+ String GetBaseURL() const;
+ String GetDocumentBase() const;
+
+ /// name of stream in package, e.g., "content.xml"
+ ::rtl::OUString GetStreamName() const;
+
+ /// set the XmlId attribute of given UNO object (for RDF metadata)
+ void SetXmlId(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface> const & i_xIfc,
+ ::rtl::OUString const & i_rXmlId);
+
+ /// Add a RDFa statement; parameters are XML attribute values
+ void AddRDFa(
+ ::com::sun::star::uno::Reference< ::com::sun::star::rdf::XMetadatable>
+ i_xObject,
+ ::rtl::OUString const & i_rAbout,
+ ::rtl::OUString const & i_rProperty,
+ ::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();
+
+ /** returns the upd and build id (f.e. "680m124$Build-8964" gives rMaster = 680 and rBuild = 8964)
+ from the metafile.
+ this only works if the meta.xml was already imported and the
+ import propertyset contains the string property "BuildId".
+ If false is returned the build ids are not available (yet).
+ **/
+ bool getBuildIds( sal_Int32& rUPD, sal_Int32& rBuild ) const;
+
+ static const sal_uInt16 OOo_1x = 10;
+ static const sal_uInt16 OOo_2x = 20;
+ static const sal_uInt16 OOo_Current = 30;
+
+ /** this checks the build ID and returns
+
+ * OOo_1x for files created with OpenOffice.org 1.x or StarOffice 7 (this also includes binary import over binfilter)
+ * OOo_2x for files created with OpenOffice.org 2.x or StarOffice 8
+ * OOo_Current for files created with OpenOffice.org 3.x and StarOffice9 or newer or for files not created with OpenOffice.org or StarOffice
+ */
+ sal_uInt16 getGeneratorVersion() const;
+
+ /** If true, the URL for graphic shapes may be stored as a package URL and
+ loaded later (on demand) by the application. Otherwise graphics are
+ loaded immediately and the graphic shape gets the graphic manager URL.
+
+ @see <member>mbIsGraphicLoadOnDemandSupported</member>
+ */
+ bool isGraphicLoadOnDemandSupported() const;
+};
+
+inline UniReference< XMLTextImportHelper > SvXMLImport::GetTextImport()
+{
+ if( !mxTextImport.is() )
+ mxTextImport = CreateTextImport();
+
+ return mxTextImport;
+}
+
+inline UniReference< XMLShapeImportHelper > SvXMLImport::GetShapeImport()
+{
+ if( !mxShapeImport.is() )
+ mxShapeImport = CreateShapeImport();
+
+ return mxShapeImport;
+}
+
+inline UniReference< SchXMLImportHelper > SvXMLImport::GetChartImport()
+{
+ if( !mxChartImport.is() )
+ mxChartImport = CreateChartImport();
+
+ return mxChartImport;
+}
+
+inline UniReference< ::xmloff::OFormLayerXMLImport > SvXMLImport::GetFormImport()
+{
+ if( !mxFormImport.is() )
+ mxFormImport = CreateFormImport();
+
+ return mxFormImport;
+}
+
+inline void SvXMLImport::SetEmbeddedResolver(
+ com::sun::star::uno::Reference< com::sun::star::document::XEmbeddedObjectResolver >& _xEmbeddedResolver )
+{
+ mxEmbeddedResolver = _xEmbeddedResolver;
+}
+
+inline void SvXMLImport::SetGraphicResolver(
+ com::sun::star::uno::Reference< com::sun::star::document::XGraphicObjectResolver >& _xGraphicResolver )
+{
+ mxGraphicResolver = _xGraphicResolver;
+}
+
+inline ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > & SvXMLImport::GetNumberFormatsSupplier()
+{
+ if ( ! mxNumberFormatsSupplier.is() && mxModel.is() )
+ _CreateNumberFormatsSupplier();
+
+ return mxNumberFormatsSupplier;
+}
+
+inline SvXMLNumFmtHelper* SvXMLImport::GetDataStylesImport()
+{
+ if ( mpNumImport == NULL)
+ _CreateDataStylesImport();
+
+ return mpNumImport;
+}
+
+
+#endif // _XMLOFF_XMLIMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlimppr.hxx b/xmloff/inc/xmloff/xmlimppr.hxx
new file mode 100644
index 000000000000..9482bd6beca0
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlimppr.hxx
@@ -0,0 +1,212 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLIMPPR_HXX
+#define _XMLOFF_XMLIMPPR_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <tools/solar.h>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/beans/XMultiPropertySet.hpp>
+#include <com/sun/star/beans/XTolerantMultiPropertySet.hpp>
+
+#ifndef __SGI_STL_VECTOR
+#include <vector>
+#endif
+#include <xmloff/uniref.hxx>
+
+struct XMLPropertyState;
+class XMLPropertySetMapper;
+
+namespace rtl { class OUString; }
+
+class SvXMLUnitConverter;
+class SvXMLNamespaceMap;
+class SvXMLImport;
+
+/** This struct is used as an optional parameter to the static
+ * _FillPropertySet() methods.
+ *
+ * It should not be used in any other context.
+ */
+struct _ContextID_Index_Pair
+{
+ sal_Int16 nContextID;
+ sal_Int32 nIndex;
+};
+
+class XMLOFF_DLLPUBLIC SvXMLImportPropertyMapper : public UniRefBase
+{
+ UniReference< SvXMLImportPropertyMapper> mxNextMapper;
+
+ SvXMLImport& rImport; // access to error handling
+
+ SAL_DLLPRIVATE SvXMLImportPropertyMapper(SvXMLImportPropertyMapper &);
+ // not defined
+ SAL_DLLPRIVATE void operator =(SvXMLImportPropertyMapper &); // not defined
+
+protected:
+
+ UniReference< XMLPropertySetMapper > maPropMapper;
+ SvXMLImport& GetImport() const { return rImport;}
+
+public:
+
+ SvXMLImportPropertyMapper(
+ const UniReference< XMLPropertySetMapper >& rMapper,
+ SvXMLImport& rImport);
+ virtual ~SvXMLImportPropertyMapper();
+
+ // Add a ImportPropertyMapper at the end of the import mapper chain.
+ // The added mapper MUST not be used outside the Mapper chain any longer,
+ // because its PropertyMapper will be replaced.
+ void ChainImportMapper(
+ const UniReference< SvXMLImportPropertyMapper>& rMapper );
+
+ /** fills the given itemset with the attributes in the given list */
+ void importXML(
+ ::std::vector< XMLPropertyState >& rProperties,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > xAttrList,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt32 nPropType ) const;
+
+ /** like above, except that the mart is only serached within the range
+ * [nStartIdx, nEndIdx[
+ */
+ void importXML(
+ ::std::vector< XMLPropertyState >& rProperties,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > xAttrList,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap,
+ sal_uInt32 nPropType,
+ sal_Int32 nStartIdx, sal_Int32 nEndIdx ) const;
+
+ /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */
+ virtual bool handleSpecialItem(
+ XMLPropertyState& rProperty,
+ ::std::vector< XMLPropertyState >& rProperties,
+ const ::rtl::OUString& rValue,
+ const SvXMLUnitConverter& rUnitConverter,
+ const SvXMLNamespaceMap& rNamespaceMap ) const;
+
+ /** This method is called when all attributes have benn processed. It may be used to remove items that are incomplete */
+ virtual void finished(
+ ::std::vector< XMLPropertyState >& rProperties,
+ sal_Int32 nStartIndex, sal_Int32 nEndIndex ) const;
+
+ void CheckSpecialContext(
+ const ::std::vector< XMLPropertyState >& aProperties,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet,
+ _ContextID_Index_Pair* pSpecialContextIds ) const;
+
+ sal_Bool FillPropertySet(
+ const ::std::vector< XMLPropertyState >& aProperties,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > rPropSet,
+ _ContextID_Index_Pair* pSpecialContextIds = NULL ) const;
+
+ void FillPropertySequence(
+ const ::std::vector< XMLPropertyState >& aProperties,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues )
+ const;
+
+ inline const UniReference< XMLPropertySetMapper >&
+ getPropertySetMapper() const;
+
+
+
+ /** implementation helper for FillPropertySet: fill an XPropertySet.
+ * Exceptions will be asserted. */
+ static sal_Bool _FillPropertySet(
+ const ::std::vector<XMLPropertyState> & rProperties,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet> & rPropSet,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo> & rPropSetInfo,
+ const UniReference<XMLPropertySetMapper> & rPropMapper,
+ SvXMLImport& rImport,
+
+ // parameter for use by txtstyli.cxx; allows efficient
+ // catching the combined characters property
+ _ContextID_Index_Pair* pSpecialContextIds = NULL );
+
+ /** implementation helper for FillPropertySet: fill an XMultiPropertySet.
+ * If unsuccessul, set return value. */
+ static sal_Bool _FillMultiPropertySet(
+ const ::std::vector<XMLPropertyState> & rProperties,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XMultiPropertySet> & rMultiPropSet,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo> & rPropSetInfo,
+ const UniReference<XMLPropertySetMapper> & rPropMapper,
+
+ // parameters for use by txtstyli.cxx; allows efficient
+ // catching the combined characters property
+ _ContextID_Index_Pair* pSpecialContextIds = NULL );
+
+ /** implementation helper for FillPropertySet: fill an XTolerantMultiPropertySet.
+ * If unsuccessul, set return value. */
+ static sal_Bool _FillTolerantMultiPropertySet(
+ const ::std::vector<XMLPropertyState> & rProperties,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XTolerantMultiPropertySet> & rTolPropSet,
+ const UniReference<XMLPropertySetMapper> & rPropMapper,
+ SvXMLImport& rImport,
+
+ // parameters for use by txtstyli.cxx; allows efficient
+ // catching the combined characters property
+ _ContextID_Index_Pair* pSpecialContextIds = NULL );
+
+
+ static void _PrepareForMultiPropertySet(
+ const ::std::vector<XMLPropertyState> & rProperties,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySetInfo> & rPropSetInfo,
+ const UniReference<XMLPropertySetMapper> & rPropMapper,
+ _ContextID_Index_Pair* pSpecialContextIds,
+ ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rValues);
+};
+
+
+inline const UniReference< XMLPropertySetMapper >&
+ SvXMLImportPropertyMapper::getPropertySetMapper() const
+{
+ return maPropMapper;
+}
+
+#endif // _XMLOFF_XMLIMPPR_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlmetae.hxx b/xmloff/inc/xmloff/xmlmetae.hxx
new file mode 100644
index 000000000000..9af30233ca49
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlmetae.hxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLMETAE_HXX
+#define _XMLOFF_XMLMETAE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+
+#include <cppuhelper/implbase1.hxx>
+#include <xmloff/xmltoken.hxx>
+
+#include <vector>
+
+#include <com/sun/star/beans/StringPair.hpp>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+
+
+class SvXMLExport;
+
+/** export meta data from an <type>XDocumentProperties</type> instance.
+
+ <p>
+ This class will start the export at the office:meta element,
+ not at the root element. This means that when <method>Export</method>
+ is called here, the document root element must already be written, but
+ office:meta must <em>not</em> be written.
+ </p>
+ */
+class XMLOFF_DLLPUBLIC SvXMLMetaExport : public ::cppu::WeakImplHelper1<
+ ::com::sun::star::xml::sax::XDocumentHandler >
+{
+private:
+ SvXMLExport& mrExport;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> mxDocProps;
+ /// counts levels of the xml document. necessary for special handling.
+ int m_level;
+ /// preserved namespaces. necessary because we do not write the root node.
+ std::vector< ::com::sun::star::beans::StringPair > m_preservedNSs;
+
+ SAL_DLLPRIVATE void SimpleStringElement(
+ const ::rtl::OUString& rText, sal_uInt16 nNamespace,
+ enum ::xmloff::token::XMLTokenEnum eElementName );
+ SAL_DLLPRIVATE void SimpleDateTimeElement(
+ const ::com::sun::star::util::DateTime & rDate, sal_uInt16 nNamespace,
+ enum ::xmloff::token::XMLTokenEnum eElementName );
+
+ /// currently unused; for exporting via the XDocumentProperties interface
+ SAL_DLLPRIVATE void _MExport();
+
+public:
+ SvXMLMetaExport( SvXMLExport& i_rExport,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties>& i_rDocProps);
+
+ virtual ~SvXMLMetaExport();
+
+ /// export via XSAXWriter interface, with fallback to _MExport
+ void Export();
+
+ static ::rtl::OUString GetISODateTimeString(
+ const ::com::sun::star::util::DateTime& rDateTime );
+
+ // ::com::sun::star::xml::sax::XDocumentHandler:
+ virtual void SAL_CALL startDocument()
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL endDocument()
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL startElement(const ::rtl::OUString & i_rName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & i_xAttribs)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL endElement(const ::rtl::OUString & i_rName)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL characters(const ::rtl::OUString & i_rChars)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL ignorableWhitespace(
+ const ::rtl::OUString & i_rWhitespaces)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL processingInstruction(
+ const ::rtl::OUString & i_rTarget, const ::rtl::OUString & i_rData)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+ virtual void SAL_CALL setDocumentLocator(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XLocator > & i_xLocator)
+ throw (::com::sun::star::uno::RuntimeException,
+ ::com::sun::star::xml::sax::SAXException);
+
+};
+
+#endif // _XMLOFF_XMLMETAE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlmetai.hxx b/xmloff/inc/xmloff/xmlmetai.hxx
new file mode 100644
index 000000000000..88020e4c2afa
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlmetai.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLMETAI_HXX
+#define _XMLOFF_XMLMETAI_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlictxt.hxx>
+
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+
+
+/// handles the top-level office:document-meta element of meta.xml documents
+// NB: virtual inheritance is needed so that the context that handles the
+// flat xml file format can multiply inherit properly
+class XMLOFF_DLLPUBLIC SvXMLMetaDocumentContext
+ : public virtual SvXMLImportContext
+{
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties> mxDocProps;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler> mxDocBuilder;
+
+public:
+ SvXMLMetaDocumentContext(SvXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::document::XDocumentProperties>& xDocProps,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XDocumentHandler>& xDocBuilder);
+
+ virtual ~SvXMLMetaDocumentContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+
+ virtual void StartElement( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ virtual void EndElement();
+
+protected:
+ /// initialize DocumentProperties object with DOM and base URL
+ void initDocumentProperties();
+ // set the BuildId property at the importer
+ void setBuildId(const ::rtl::OUString & i_rBuildId);
+
+public:
+ static void setBuildId(const ::rtl::OUString & rGenerator,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& xImportInfo );
+};
+
+#endif // _XMLOFF_XMLMETAI_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlnume.hxx b/xmloff/inc/xmloff/xmlnume.hxx
new file mode 100644
index 000000000000..765d84f393e0
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlnume.hxx
@@ -0,0 +1,118 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLNUME_HXX
+#define _XMLOFF_XMLNUME_HXX
+
+#include <rtl/ustring.hxx>
+#include <tools/mapunit.hxx>
+#include <xmloff/XMLStringVector.hxx>
+#include <xmloff/attrlist.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace frame { class XModel; }
+ namespace style { class XStyle; }
+ namespace container { class XIndexReplace; }
+ namespace beans { struct PropertyValue; }
+} } }
+
+class SvXMLNamespaceMap;
+class SvXMLUnitConverter;
+class SvXMLExportItemMapper;
+class SvXMLExport;
+class XMLTextListAutoStylePool;
+
+class SvxXMLNumRuleExport
+{
+ SvXMLExport& rExport;
+ const ::rtl::OUString sCDATA;
+ const ::rtl::OUString sWS;
+ const ::rtl::OUString sNumberingRules;
+ const ::rtl::OUString sIsPhysical;
+ const ::rtl::OUString sIsContinuousNumbering;
+ // --> OD 2008-06-06 #i89178#
+ // Boolean indicating, if properties for position-and-space-mode LABEL_ALIGNEMNT
+ // are exported or not.
+ // These properties have been introduced in ODF 1.2. Thus, its export have
+ // to be suppressed on writing ODF 1.0 respectively ODF 1.1
+ bool mbExportPositionAndSpaceModeLabelAlignment;
+ // <--
+
+ void exportLevelStyles(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace > & xNumRule,
+ sal_Bool bOutline=sal_False );
+
+ void exportLevelStyle(
+ sal_Int32 nLevel,
+ const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue>& rProps,
+ sal_Bool bOutline=sal_False );
+
+protected:
+
+ // This method may be overloaded to add attributes to the <list-style>
+ // element.
+ virtual void AddListStyleAttributes();
+
+ sal_Bool exportStyle( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::style::XStyle >& rStyle );
+ void exportOutline();
+
+ SvXMLExport& GetExport() { return rExport; }
+
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > GetUNONumRule() const;
+
+public:
+
+ SvxXMLNumRuleExport( SvXMLExport& rExport );
+ virtual ~SvxXMLNumRuleExport();
+
+ void exportStyles( sal_Bool bUsed,
+ XMLTextListAutoStylePool *pPool,
+ sal_Bool bExportChapterNumbering = sal_True );
+ void exportNumberingRule(
+ const ::rtl::OUString& rName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace > & xNumRule );
+
+ // --> OD 2008-06-17 #i90780#
+ // refactoring: removing unused methods
+// void Export( const ::rtl::OUString& rOutline, sal_Bool bContNumbering );
+// void ExportOutline();
+ // <--
+
+ static sal_Bool GetOutlineStyles( XMLStringVector& rStyleNames,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & rModel );
+
+};
+
+#endif // _XMLOFF_XMLNUME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlnumfe.hxx b/xmloff/inc/xmloff/xmlnumfe.hxx
new file mode 100644
index 000000000000..7e69d2735e47
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlnumfe.hxx
@@ -0,0 +1,142 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLNUMFE_HXX
+#define _XMLOFF_XMLNUMFE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/uno/Sequence.h>
+#include <rtl/ustrbuf.hxx>
+
+#define XML_WRITTENNUMBERSTYLES "WrittenNumberStyles"
+
+class Color;
+class LocaleDataWrapper;
+class CharClass;
+class SvXMLExport;
+class SvXMLNamespaceMap;
+class SvXMLAttributeList;
+class SvNumberFormatter;
+class SvNumberformat;
+class SvXMLNumUsedList_Impl;
+class SvXMLEmbeddedTextEntryArr;
+
+class XMLOFF_DLLPUBLIC SvXMLNumFmtExport
+{
+private:
+ SvXMLExport& rExport;
+ ::rtl::OUString sPrefix;
+ SvNumberFormatter* pFormatter;
+ ::rtl::OUStringBuffer sTextContent;
+ SvXMLNumUsedList_Impl* pUsedList;
+ CharClass* pCharClass;
+ LocaleDataWrapper* pLocaleData;
+
+ SAL_DLLPRIVATE void AddCalendarAttr_Impl( const ::rtl::OUString& rCalendar );
+ SAL_DLLPRIVATE void AddStyleAttr_Impl( sal_Bool bLong );
+ SAL_DLLPRIVATE void AddTextualAttr_Impl( sal_Bool bText );
+ SAL_DLLPRIVATE void AddLanguageAttr_Impl( sal_Int32 nLang );
+
+ SAL_DLLPRIVATE void AddToTextElement_Impl( const ::rtl::OUString& rString );
+ SAL_DLLPRIVATE void FinishTextElement_Impl();
+
+ SAL_DLLPRIVATE void WriteColorElement_Impl( const Color& rColor );
+ SAL_DLLPRIVATE void WriteNumberElement_Impl( sal_Int32 nDecimals, sal_Int32 nInteger,
+ const ::rtl::OUString& rDashStr, sal_Bool bVarDecimals,
+ sal_Bool bGrouping, sal_Int32 nTrailingThousands,
+ const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries );
+ SAL_DLLPRIVATE void WriteScientificElement_Impl( sal_Int32 nDecimals, sal_Int32 nInteger,
+ sal_Bool bGrouping, sal_Int32 nExp );
+ SAL_DLLPRIVATE void WriteFractionElement_Impl( sal_Int32 nInteger, sal_Bool bGrouping,
+ sal_Int32 nNumerator, sal_Int32 nDenominator );
+ SAL_DLLPRIVATE void WriteCurrencyElement_Impl( const ::rtl::OUString& rString,
+ const ::rtl::OUString& rExt );
+ SAL_DLLPRIVATE void WriteBooleanElement_Impl();
+ SAL_DLLPRIVATE void WriteTextContentElement_Impl();
+ SAL_DLLPRIVATE void WriteDayElement_Impl( const ::rtl::OUString& rCalendar, sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteMonthElement_Impl( const ::rtl::OUString& rCalendar, sal_Bool bLong, sal_Bool bText );
+ SAL_DLLPRIVATE void WriteYearElement_Impl( const ::rtl::OUString& rCalendar, sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteEraElement_Impl( const ::rtl::OUString& rCalendar, sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteDayOfWeekElement_Impl( const ::rtl::OUString& rCalendar, sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteWeekElement_Impl( const ::rtl::OUString& rCalendar );
+ SAL_DLLPRIVATE void WriteQuarterElement_Impl( const ::rtl::OUString& rCalendar, sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteHoursElement_Impl( sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteMinutesElement_Impl( sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDecimals );
+ SAL_DLLPRIVATE void WriteAMPMElement_Impl();
+ SAL_DLLPRIVATE void WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
+ sal_Int32 nKey, sal_Int32 nPart );
+
+ SAL_DLLPRIVATE sal_Bool WriteTextWithCurrency_Impl( const ::rtl::OUString& rString,
+ const ::com::sun::star::lang::Locale& rLocale );
+ SAL_DLLPRIVATE void ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt32 nKey,
+ sal_uInt16 nPart, sal_Bool bDefPart );
+
+ SAL_DLLPRIVATE void ExportFormat_Impl( const SvNumberformat& rFormat, sal_uInt32 nKey );
+
+public:
+ SvXMLNumFmtExport( SvXMLExport& rExport,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XNumberFormatsSupplier >& rSupp );
+ SvXMLNumFmtExport( SvXMLExport& rExport,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XNumberFormatsSupplier >& rSupp,
+ const rtl::OUString& rPrefix );
+
+ virtual ~SvXMLNumFmtExport();
+
+ // core API
+ void Export( sal_Bool bIsAutoStyle);
+
+ // mark number format as used
+ void SetUsed( sal_uInt32 nKey );
+
+ // get the style name that was generated for a key
+ ::rtl::OUString GetStyleName( sal_uInt32 nKey );
+
+ void GetWasUsed(com::sun::star::uno::Sequence<sal_Int32>& rWasUsed);
+ void SetWasUsed(const com::sun::star::uno::Sequence<sal_Int32>& rWasUsed);
+
+
+
+ // two methods to allow the field import/export to treat system languages
+ // properly:
+
+ /// obtain number format with system languange for a given key
+ sal_uInt32 ForceSystemLanguage( sal_uInt32 nKey );
+
+ /// determine whether number format uses system language
+ bool IsSystemLanguage( sal_uInt32 nKey );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlnumfi.hxx b/xmloff/inc/xmloff/xmlnumfi.hxx
new file mode 100644
index 000000000000..619fde019f8b
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlnumfi.hxx
@@ -0,0 +1,235 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLNUMFI_HXX
+#define _XMLOFF_XMLNUMFI_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <xmloff/xmlstyle.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <i18npool/lang.h>
+#ifndef __SGI_STL_VECTOR
+#include <vector>
+#endif
+#include <unotools/localedatawrapper.hxx>
+
+#define XML_NUMBERSTYLES "NumberStyles"
+
+enum SvXMLStylesTokens
+{
+ XML_TOK_STYLES_NUMBER_STYLE,
+ XML_TOK_STYLES_CURRENCY_STYLE,
+ XML_TOK_STYLES_PERCENTAGE_STYLE,
+ XML_TOK_STYLES_DATE_STYLE,
+ XML_TOK_STYLES_TIME_STYLE,
+ XML_TOK_STYLES_BOOLEAN_STYLE,
+ XML_TOK_STYLES_TEXT_STYLE
+};
+
+enum SvXMLDateElementAttributes
+{
+ XML_DEA_NONE,
+ XML_DEA_ANY,
+ XML_DEA_SHORT,
+ XML_DEA_LONG,
+ XML_DEA_TEXTSHORT,
+ XML_DEA_TEXTLONG
+};
+
+class Color;
+class SvXMLNumImpData;
+class SvXMLImport;
+class SvXMLStyleContext;
+class SvXMLStylesContext;
+struct SvXMLNumberInfo;
+class SvNumberFormatter;
+class SvtSysLocale;
+
+// use SvXMLNumFmtHelper in the context for <office:styles> to create
+// child contexts for data styles
+
+class SvXMLNumFmtHelper
+{
+ SvXMLNumImpData* pData;
+
+ // #110680#
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory;
+
+public:
+ // #110680#
+ //SvXMLNumFmtHelper( const ::com::sun::star::uno::Reference<
+ // ::com::sun::star::util::XNumberFormatsSupplier >& rSupp );
+ //SvXMLNumFmtHelper( SvNumberFormatter* pNumberFormatter );
+ SvXMLNumFmtHelper(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& rSupp,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory );
+
+ SvXMLNumFmtHelper(
+ SvNumberFormatter* pNumberFormatter,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory );
+
+ ~SvXMLNumFmtHelper();
+
+ SvXMLStyleContext* CreateChildContext( SvXMLImport& rImport,
+ USHORT nPrefix, const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ SvXMLStylesContext& rStyles);
+
+ SvXMLNumImpData* getData() { return pData; }
+
+ const SvXMLTokenMap& GetStylesElemTokenMap();
+
+// sal_uInt32 GetKeyForName( const rtl::OUString& rName );
+};
+
+// SvXMLNumFmtDefaults is used in import and export
+
+class SvXMLNumFmtDefaults
+{
+public:
+ static sal_Bool IsSystemLongDay( const SvtSysLocale& rSysLoc, BOOL bLong );
+ static sal_Bool IsSystemLongMonth( const SvtSysLocale& rSysLoc, BOOL bLong );
+ static sal_Bool IsSystemTextualMonth( const SvtSysLocale& rSysLoc, BOOL bLong );
+ static sal_Bool IsSystemLongYear( const SvtSysLocale& rSysLoc, BOOL bLong );
+ static sal_Bool IsSystemLongEra( const SvtSysLocale& rSysLoc, BOOL bLong );
+ static sal_Bool IsSystemLongDayOfWeek( const SvtSysLocale& rSysLoc, BOOL bLong );
+
+ // return value is NfIndexTableOffset
+ static sal_uInt16 GetDefaultDateFormat( SvXMLDateElementAttributes eDOW,
+ SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth,
+ SvXMLDateElementAttributes eYear, SvXMLDateElementAttributes eHours,
+ SvXMLDateElementAttributes eMins, SvXMLDateElementAttributes eSecs,
+ sal_Bool bSystem );
+};
+
+struct MyCondition
+{
+ rtl::OUString sCondition;
+ rtl::OUString sMapName;
+};
+
+class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext
+{
+ SvXMLNumImpData* pData;
+ SvXMLStylesContext* pStyles;
+ std::vector <MyCondition> aMyConditions;
+ sal_uInt16 nType;
+ sal_Int32 nKey;
+// rtl::OUString sFormatName;
+ rtl::OUString sFormatTitle;
+// rtl::OUString sMapName;
+ rtl::OUString sCalendar;
+ rtl::OUString sFormatString;
+ LanguageType nFormatLang;
+ com::sun::star::lang::Locale aLocale;
+ sal_Bool bAutoOrder;
+ sal_Bool bFromSystem;
+ sal_Bool bTruncate;
+ sal_Bool bAutoDec; // set in AddNumber
+ sal_Bool bAutoInt; // set in AddNumber
+ sal_Bool bHasExtraText;
+ rtl::OUStringBuffer aFormatCode;
+ rtl::OUStringBuffer aConditions;
+ sal_Bool bHasLongDoW;
+ sal_Bool bHasEra;
+ sal_Bool bHasDateTime;
+ sal_Bool bRemoveAfterUse;
+
+ // contained date elements, used to recognize default date formats
+ SvXMLDateElementAttributes eDateDOW;
+ SvXMLDateElementAttributes eDateDay;
+ SvXMLDateElementAttributes eDateMonth;
+ SvXMLDateElementAttributes eDateYear;
+ SvXMLDateElementAttributes eDateHours;
+ SvXMLDateElementAttributes eDateMins;
+ SvXMLDateElementAttributes eDateSecs;
+ sal_Bool bDateNoDefault;
+
+ SAL_DLLPRIVATE sal_Int32 PrivateGetKey();
+
+public:
+ SvXMLNumFormatContext( SvXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLName,
+ SvXMLNumImpData* pNewData, sal_uInt16 nNewType,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ SvXMLStylesContext& rStyles );
+ SvXMLNumFormatContext( SvXMLImport& rImport, USHORT nPrfx,
+ const rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList,
+ const sal_Int32 nKey,
+ SvXMLStylesContext& rStyles );
+ virtual ~SvXMLNumFormatContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+ virtual void CreateAndInsert(sal_Bool bOverwrite);
+ virtual void Finish(sal_Bool bOverwrite);
+
+ SvXMLNumImpData* GetData() const { return pData; }
+ sal_Int32 GetKey();
+ sal_Int32 CreateAndInsert( SvNumberFormatter* pFormatter );
+ sal_Int32 CreateAndInsert( com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >& xFormatsSupplier );
+ sal_uInt16 GetType() const { return nType; } // SvXMLStylesTokens
+
+ sal_Bool IsFromSystem() const { return bFromSystem; }
+ sal_Bool HasLongDoW() const { return bHasLongDoW; }
+ void SetHasLongDoW(sal_Bool bSet) { bHasLongDoW = bSet; }
+ sal_Bool HasEra() const { return bHasEra; }
+ void SetHasEra(sal_Bool bSet) { bHasEra = bSet; }
+
+ void UpdateCalendar( const rtl::OUString& rNewCalendar );
+
+ const LocaleDataWrapper& GetLocaleData() const;
+
+ void AddToCode( const rtl::OUString& rString );
+ void AddNumber( const SvXMLNumberInfo& rInfo );
+ void AddCurrency( const rtl::OUString& rContent, LanguageType nLang );
+
+ void AddNfKeyword( sal_uInt16 nIndex );
+ sal_Bool ReplaceNfKeyword( sal_uInt16 nOld, sal_uInt16 nNew );
+ void AddCondition( const sal_Int32 nIndex );
+ void AddCondition( const sal_Int32 nIndex, const rtl::OUString& rFormat, const LocaleDataWrapper& rData );
+ void AddCondition( const rtl::OUString& rCondition, const rtl::OUString& rApplyName );
+ void AddColor( const Color& rColor );
+
+ /// determine whether number format uses the system language
+ sal_Bool IsSystemLanguage();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlnumi.hxx b/xmloff/inc/xmloff/xmlnumi.hxx
new file mode 100644
index 000000000000..ba26c0f8499a
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlnumi.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLNUMI_HXX
+#define _XMLOFF_XMLNUMI_HXX
+
+#include <com/sun/star/container/XIndexReplace.hpp>
+
+#include <xmloff/xmlstyle.hxx>
+#include <com/sun/star/style/NumberingType.hpp>
+
+namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
+class SvI18NMap;
+class SvxXMLListStyle_Impl;
+
+class SvxXMLListStyleContext : public SvXMLStyleContext
+{
+ const ::rtl::OUString sIsPhysical;
+ const ::rtl::OUString sNumberingRules;
+ const ::rtl::OUString sName;
+ const ::rtl::OUString sIsContinuousNumbering;
+
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace > xNumRules;
+
+ SvxXMLListStyle_Impl *pLevelStyles;
+
+ sal_Int32 nLevels;
+ sal_Bool bConsecutive : 1;
+ sal_Bool bOutline : 1;
+
+protected:
+
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+
+public:
+
+ TYPEINFO();
+
+ SvxXMLListStyleContext(
+ SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ sal_Bool bOutl=sal_False );
+
+ virtual ~SvxXMLListStyleContext();
+
+ virtual SvXMLImportContext *CreateChildContext(
+ sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ void FillUnoNumRule(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::container::XIndexReplace > & rNumRule,
+ const SvI18NMap *pI18NMap ) const;
+
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace >& GetNumRules() const
+ { return xNumRules; }
+ sal_Bool IsOutline() const { return bOutline; }
+ sal_Bool IsConsecutive() const { return bConsecutive; }
+ sal_Int32 GetLevels() const { return nLevels; }
+
+ static ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace >
+ CreateNumRule(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::frame::XModel > & rModel );
+
+ static void SetDefaultStyle(
+ const ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XIndexReplace > & rNumRule,
+ sal_Int16 nLevel,
+ sal_Bool bOrdered );
+
+ virtual void CreateAndInsertLate( sal_Bool bOverwrite );
+
+ void CreateAndInsertAuto() const;
+};
+
+#endif // _XMLOFF_XMLNUMI_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlprcon.hxx b/xmloff/inc/xmloff/xmlprcon.hxx
new file mode 100644
index 000000000000..be949ac88ec6
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlprcon.hxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLPROPERTYSETCONTEXT_HXX
+#define _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
+
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/xmlimppr.hxx>
+#include <xmloff/xmlprmap.hxx>
+#include <xmloff/uniref.hxx>
+
+namespace rtl { class OUString; }
+
+class SvXMLImportPropertyMapper;
+
+class SvXMLPropertySetContext : public SvXMLImportContext
+{
+protected:
+ sal_Int32 mnStartIdx;
+ sal_Int32 mnEndIdx;
+ sal_uInt32 mnFamily;
+ ::std::vector< XMLPropertyState > &mrProperties;
+ UniReference < SvXMLImportPropertyMapper > mxMapper;
+
+public:
+
+ SvXMLPropertySetContext(
+ SvXMLImport& rImport, USHORT nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ sal_uInt32 nFamily,
+ ::std::vector< XMLPropertyState > &rProps,
+ const UniReference < SvXMLImportPropertyMapper > &rMap,
+ sal_Int32 nStartIdx = -1, sal_Int32 nEndIdx = -1 );
+
+ virtual ~SvXMLPropertySetContext();
+
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
+
+ // This method is called from this instance implementation of
+ // CreateChildContext if the element matches an entry in the
+ // SvXMLImportItemMapper with the mid flag MID_FLAG_ELEMENT_ITEM_IMPORT
+ virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ ::std::vector< XMLPropertyState > &rProperties,
+ const XMLPropertyState& rProp );
+
+};
+
+#endif // _XMLOFF_XMLPROPERTYSETCONTEXT_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlprhdl.hxx b/xmloff/inc/xmloff/xmlprhdl.hxx
new file mode 100644
index 000000000000..748991f06891
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlprhdl.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPERTYHANDLERBASE_HXX
+#define _XMLOFF_PROPERTYHANDLERBASE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+
+namespace com{ namespace sun{ namespace star{ namespace uno{ class Any; } } } }
+namespace rtl{ class OUString; }
+
+class SvXMLUnitConverter;
+struct XMLPropertyState;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Abstract base-class for different XML-types. Derivations of this class
+ knows how to compare, im/export a special XML-type
+*/
+class XMLOFF_DLLPUBLIC XMLPropertyHandler
+{
+ // ??? const SvXMLUnitConverter& rUnitConverter Do we need this ?
+
+public:
+ // Just needed for virtual destruction
+ virtual ~XMLPropertyHandler();
+
+ /** Compares two Any's in case of the given XML-data-type.
+ By default the Any-equal-operator is called. */
+ virtual bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
+
+ /// Imports the given value in cas of the given XML-data-type
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const =0;
+ /// Exports the given value in cas of the given XML-data-type
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const =0;
+};
+
+#endif // _XMLOFF_PROPERTYHANDLERBASE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlprmap.hxx b/xmloff/inc/xmloff/xmlprmap.hxx
new file mode 100644
index 000000000000..d90a5a936b25
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlprmap.hxx
@@ -0,0 +1,192 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_PROPERTYSETMAPPER_HXX
+#define _XMLOFF_PROPERTYSETMAPPER_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+#ifndef __SGI_STL_VECTOR
+#include <vector>
+#endif
+#include <xmloff/uniref.hxx>
+#include <xmloff/maptype.hxx>
+#include <xmloff/xmltypes.hxx>
+#include <xmloff/prhdlfac.hxx>
+
+#include <tools/debug.hxx>
+
+class SvXMLUnitConverter;
+class XMLPropertyHandler;
+
+///////////////////////////////////////////////////////////////////////////
+//
+/** Helper-class for XML-im/export:
+ - Holds a pointer to a given array of XMLPropertyMapEntry
+ - Provides several methods to access data from this array
+ - Holds a Sequence of XML-names (for properties)
+ - The filter takes all properties of the XPropertySet which are also
+ in the XMLPropertyMapEntry and which are have not a default value
+ and put them into a vector of XMLPropertyStae
+ - this class knows how to compare, im/export properties
+
+ Attention: At all methods, which get an index as parameter, there is no
+ range validation to save runtime !!
+*/
+struct XMLPropertySetMapperEntry_Impl
+{
+ ::rtl::OUString sXMLAttributeName;
+ ::rtl::OUString sAPIPropertyName;
+ sal_uInt16 nXMLNameSpace;
+ sal_Int32 nType;
+ sal_Int16 nContextId;
+ SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
+ const XMLPropertyHandler *pHdl;
+
+ XMLPropertySetMapperEntry_Impl(
+ const XMLPropertyMapEntry& rMapEntry,
+ const UniReference< XMLPropertyHandlerFactory >& rFactory );
+
+ XMLPropertySetMapperEntry_Impl(
+ const XMLPropertySetMapperEntry_Impl& rEntry );
+
+ sal_uInt32 GetPropType() const { return nType & XML_TYPE_PROP_MASK; }
+};
+
+class XMLOFF_DLLPUBLIC XMLPropertySetMapper : public UniRefBase
+{
+ ::std::vector< XMLPropertySetMapperEntry_Impl > aMapEntries;
+ ::std::vector< UniReference < XMLPropertyHandlerFactory > > aHdlFactories;
+
+public:
+ /** The last element of the XMLPropertyMapEntry-array must contain NULL-values */
+ XMLPropertySetMapper(
+ const XMLPropertyMapEntry* pEntries,
+ const UniReference< XMLPropertyHandlerFactory >& rFactory );
+ virtual ~XMLPropertySetMapper();
+
+ void AddMapperEntry( const UniReference < XMLPropertySetMapper >& rMapper );
+
+ /** Return number of entries in input-array */
+ sal_Int32 GetEntryCount() const { return aMapEntries.size(); }
+
+ /** Returns the flags of an entry */
+ sal_uInt32 GetEntryFlags( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= 0) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return aMapEntries[nIndex].nType & ~MID_FLAG_MASK;
+ }
+
+ /** Returns the type of an entry */
+ sal_uInt32 GetEntryType( sal_Int32 nIndex,
+ sal_Bool bWithFlags = sal_True ) const
+ {
+ DBG_ASSERT( (nIndex >= 0) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ sal_uInt32 nType = aMapEntries[nIndex].nType;
+ if( !bWithFlags )
+ nType = nType & MID_FLAG_MASK;
+ return nType;
+ }
+
+ /** Returns the namespace-key of an entry */
+ sal_uInt16 GetEntryNameSpace( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= 0) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return aMapEntries[nIndex].nXMLNameSpace;
+ }
+
+ /** Returns the 'local' XML-name of the entry */
+ const ::rtl::OUString& GetEntryXMLName( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= 0) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return aMapEntries[nIndex].sXMLAttributeName;
+ }
+
+ /** Returns the entry API name */
+ const ::rtl::OUString& GetEntryAPIName( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= 0) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return aMapEntries[nIndex].sAPIPropertyName;
+ }
+
+ /** returns the entry context id. -1 is a valid index here. */
+ sal_Int16 GetEntryContextId( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= -1) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return nIndex == -1 ? 0 : aMapEntries[nIndex].nContextId;
+ }
+
+ /** returns the earliest odf version for which this property should be exported. */
+ SvtSaveOptions::ODFDefaultVersion GetEarliestODFVersionForExport( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= -1) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return nIndex == -1 ? SvtSaveOptions::ODFVER_UNKNOWN : aMapEntries[nIndex].nEarliestODFVersionForExport;
+ }
+
+ /** Returns the index of an entry with the given XML-name and namespace
+ If there is no matching entry the method returns -1 */
+ sal_Int32 GetEntryIndex( sal_uInt16 nNamespace,
+ const ::rtl::OUString& rStrName,
+ sal_uInt32 nPropType,
+ sal_Int32 nStartAt = -1 ) const;
+
+ /** Retrieves a PropertyHandler for that property wich placed at nIndex in the XMLPropertyMapEntry-array */
+ const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nIndex ) const
+ {
+ DBG_ASSERT( (nIndex >= 0) && (nIndex < (sal_Int32)aMapEntries.size() ), "illegal access to invalid entry!" );
+ return aMapEntries[nIndex].pHdl;
+ }
+
+ /** import/export
+ This methods calls the respective im/export-method of the respective PropertyHandler. */
+ virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue,
+ const XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+ virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue,
+ XMLPropertyState& rProperty,
+ const SvXMLUnitConverter& rUnitConverter ) const;
+
+ /** searches for an entry that matches the given api name, namespace and local name or -1 if nothing found */
+ sal_Int32 FindEntryIndex( const sal_Char* sApiName,
+ sal_uInt16 nNameSpace,
+ const ::rtl::OUString& sXMLName ) const;
+
+ /** searches for an entry that matches the given ContextId or gives -1 if nothing found */
+ sal_Int32 FindEntryIndex( const sal_Int16 nContextId ) const;
+
+ /** Remove an entry */
+ void RemoveEntry( sal_Int32 nIndex );
+};
+
+#endif // _XMLOFF_PROPERTYSETMAPPER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlscripti.hxx b/xmloff/inc/xmloff/xmlscripti.hxx
new file mode 100644
index 000000000000..b441fae78d0d
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlscripti.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSCRIPTI_HXX
+#define _XMLOFF_XMLSCRIPTI_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <xmloff/xmlictxt.hxx>
+
+namespace com { namespace sun { namespace star { namespace frame {
+ class XModel;
+}}}}
+
+class XMLOFF_DLLPUBLIC XMLScriptContext : public SvXMLImportContext
+{
+private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xModel;
+
+public:
+ XMLScriptContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel>& rDocModel );
+ virtual ~XMLScriptContext();
+
+ // Create child element.
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
+
+ virtual void EndElement();
+};
+
+#endif // _XMLOFF_XMLSCRIPTI_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmlstyle.hxx b/xmloff/inc/xmloff/xmlstyle.hxx
new file mode 100644
index 000000000000..049530b3117a
--- /dev/null
+++ b/xmloff/inc/xmloff/xmlstyle.hxx
@@ -0,0 +1,271 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLSTYLE_HXX
+#define _XMLOFF_XMLSTYLE_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+#include <rsc/rscsfx.hxx>
+#include <tools/rtti.hxx>
+#include <xmloff/uniref.hxx>
+#include <xmloff/xmltkmap.hxx>
+#include <xmloff/xmlictxt.hxx>
+
+class SvXMLStylesContext_Impl;
+class SvXMLUnitConverter;
+class SvXMLImportPropertyMapper;
+
+namespace com { namespace sun { namespace star {
+namespace container { class XNameContainer; }
+namespace style { class XAutoStyleFamily; }
+} } }
+
+enum XMLStyleStylesElemTokens
+{
+ XML_TOK_STYLE_STYLE,
+ XML_TOK_STYLE_PAGE_MASTER,
+ XML_TOK_TEXT_LIST_STYLE,
+ XML_TOK_TEXT_OUTLINE,
+ XML_TOK_STYLES_GRADIENTSTYLES,
+ XML_TOK_STYLES_HATCHSTYLES,
+ XML_TOK_STYLES_BITMAPSTYLES,
+ XML_TOK_STYLES_TRANSGRADIENTSTYLES,
+ XML_TOK_STYLES_MARKERSTYLES,
+ XML_TOK_STYLES_DASHSTYLES,
+ XML_TOK_TEXT_NOTE_CONFIG,
+ XML_TOK_TEXT_BIBLIOGRAPHY_CONFIG,
+ XML_TOK_TEXT_LINENUMBERING_CONFIG,
+ XML_TOK_STYLE_DEFAULT_STYLE,
+ XML_TOK_STYLE_DEFAULT_PAGE_LAYOUT, //text grid enhancement
+ XML_TOK_STYLE_STYLES_ELEM_END=XML_TOK_UNKNOWN
+};
+
+class XMLOFF_DLLPUBLIC SvXMLStyleContext : public SvXMLImportContext
+{
+ ::rtl::OUString maName;
+ ::rtl::OUString maDisplayName;
+ ::rtl::OUString maAutoName;
+ ::rtl::OUString maParentName;// Will be moved to XMLPropStyle soon!!!!
+ ::rtl::OUString maFollow; // Will be moved to XMLPropStyle soon!!!!
+
+ ::rtl::OUString maHelpFile; // Will be removed very soon!!!!
+
+ sal_uInt32 mnHelpId; // Will be removed very soon!!!!
+ sal_uInt16 mnFamily;
+
+ sal_Bool mbValid : 1; // Set this to false in CreateAndInsert
+ // if the style shouldn't be processed
+ // by Finish() or si somehow invalid.
+ sal_Bool mbNew : 1; // Set this to false in CreateAnsInsert
+ // if the style is already existing.
+ sal_Bool mbDefaultStyle : 1;
+
+protected:
+
+ virtual void SetAttribute( sal_uInt16 nPrefixKey,
+ const ::rtl::OUString& rLocalName,
+ const ::rtl::OUString& rValue );
+
+ void SetFamily( sal_uInt16 nSet ) { mnFamily = nSet; }
+ void SetAutoName( const ::rtl::OUString& rName ) { maAutoName = rName; }
+
+public:
+
+ TYPEINFO();
+
+ SvXMLStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
+ sal_uInt16 nFamily=0, sal_Bool bDefaultStyle = sal_False );
+
+ virtual ~SvXMLStyleContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void StartElement(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ const ::rtl::OUString& GetName() const { return maName; }
+ const ::rtl::OUString& GetDisplayName() const { return maDisplayName.getLength() ? maDisplayName : maName; }
+ const ::rtl::OUString& GetAutoName() const { return maAutoName; }
+ const ::rtl::OUString& GetParentName() const { return maParentName; }
+ const ::rtl::OUString& GetFollow() const { return maFollow; }
+
+ const ::rtl::OUString& GetHelpFile() const { return maHelpFile; }
+ sal_uInt32 GetHelpId() const { return mnHelpId; }
+
+ sal_uInt16 GetFamily() const { return mnFamily; }
+
+ BOOL IsValid() const { return mbValid; }
+ void SetValid( sal_Bool b ) { mbValid = b; }
+
+ BOOL IsNew() const { return mbNew; }
+ void SetNew( sal_Bool b ) { mbNew = b; }
+
+ // This method is called for every default style
+ virtual void SetDefaults();
+
+ // This method is called for every style. It must create it and insert
+ // it into the document.
+ virtual void CreateAndInsert( sal_Bool bOverwrite );
+
+ // This method is called for every style. It must create it and insert
+ // it into the document if this hasn't happened already in CreateAndInsert().
+ virtual void CreateAndInsertLate( sal_Bool bOverwrite );
+
+ // This method is called fpr every style after all styles have been
+ // inserted into the document.
+ virtual void Finish( sal_Bool bOverwrite );
+
+ sal_Bool IsDefaultStyle() const { return mbDefaultStyle; }
+
+ /** if this method returns true, its parent styles context
+ should not add it to its container.<br>
+ Transient styles can't be accessed from its
+ parent SvXMLStylesContext after theyre imported and
+ the methods CreateAndInsert(), CreateAndInsertLate()
+ and Finish() will not be called.
+ The default return value is false
+ */
+ virtual BOOL IsTransient() const;
+};
+
+class XMLOFF_DLLPUBLIC SvXMLStylesContext : public SvXMLImportContext
+{
+ const ::rtl::OUString msParaStyleServiceName;
+ const ::rtl::OUString msTextStyleServiceName;
+
+ SvXMLStylesContext_Impl *mpImpl;
+ SvXMLTokenMap *mpStyleStylesElemTokenMap;
+
+
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XNameContainer > mxParaStyles;
+
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XNameContainer > mxTextStyles;
+
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::style::XAutoStyleFamily > mxParaAutoStyles;
+
+ ::com::sun::star::uno::Reference <
+ ::com::sun::star::style::XAutoStyleFamily > mxTextAutoStyles;
+
+ UniReference < SvXMLImportPropertyMapper > mxParaImpPropMapper;
+ UniReference < SvXMLImportPropertyMapper > mxTextImpPropMapper;
+ UniReference < SvXMLImportPropertyMapper > mxShapeImpPropMapper;
+ mutable UniReference < SvXMLImportPropertyMapper > mxChartImpPropMapper;
+ mutable UniReference < SvXMLImportPropertyMapper > mxPageImpPropMapper;
+
+ SAL_DLLPRIVATE const SvXMLTokenMap& GetStyleStylesElemTokenMap();
+
+ SAL_DLLPRIVATE SvXMLStylesContext(SvXMLStylesContext &); // not defined
+ SAL_DLLPRIVATE void operator =(SvXMLStylesContext &); // not defined
+
+protected:
+
+ sal_uInt32 GetStyleCount() const;
+ SvXMLStyleContext *GetStyle( sal_uInt32 i );
+ const SvXMLStyleContext *GetStyle( sal_uInt32 i ) const;
+
+ virtual SvXMLStyleContext *CreateStyleChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual SvXMLStyleContext *CreateStyleStyleChildContext( sal_uInt16 nFamily,
+ sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual SvXMLStyleContext *CreateDefaultStyleStyleChildContext(
+ sal_uInt16 nFamily, sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual sal_Bool InsertStyleFamily( sal_uInt16 nFamily ) const;
+
+public:
+ TYPEINFO();
+
+ SvXMLStylesContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
+ sal_Bool bAutomatic = sal_False );
+
+ virtual ~SvXMLStylesContext();
+
+ // Create child element.
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ // This method must be overloaded to insert styles into the document.
+ virtual void EndElement();
+
+ // This allows to add an SvXMLStyleContext to this context from extern
+ void AddStyle(SvXMLStyleContext& rNew);
+
+ const SvXMLStyleContext *FindStyleChildContext(
+ sal_uInt16 nFamily,
+ const ::rtl::OUString& rName,
+ sal_Bool bCreateIndex=sal_False ) const;
+ virtual sal_uInt16 GetFamily( const ::rtl::OUString& rFamily ) const;
+ virtual UniReference < SvXMLImportPropertyMapper > GetImportPropertyMapper(
+ sal_uInt16 nFamily ) const;
+
+ virtual ::com::sun::star::uno::Reference <
+ ::com::sun::star::container::XNameContainer >
+ GetStylesContainer( sal_uInt16 nFamily ) const;
+ virtual ::rtl::OUString GetServiceName( sal_uInt16 nFamily ) const;
+
+ virtual ::com::sun::star::uno::Reference < ::com::sun::star::style::XAutoStyleFamily >
+ GetAutoStyles( sal_uInt16 nFamily ) const;
+ void CopyAutoStylesToDoc();
+ void CopyStylesToDoc( sal_Bool bOverwrite, sal_Bool bFinish=sal_True );
+ void FinishStyles( sal_Bool bOverwrite );
+
+ // This method must be called to release the references to all styles
+ // that are stored in the context.
+ void Clear();
+ sal_Bool IsAutomaticStyle() const;
+};
+
+#endif // _XMLOFF_XMLSTYLE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmltkmap.hxx b/xmloff/inc/xmloff/xmltkmap.hxx
new file mode 100644
index 000000000000..b869bb9d9615
--- /dev/null
+++ b/xmloff/inc/xmloff/xmltkmap.hxx
@@ -0,0 +1,69 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTKMAP_HXX
+#define _XMLOFF_XMLTKMAP_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+#include <xmloff/xmltoken.hxx>
+
+namespace rtl { class OUString; }
+
+class SvXMLTokenMap_Impl;
+class SvXMLTokenMapEntry_Impl;
+
+#define XML_TOK_UNKNOWN 0xffffU
+#define XML_TOKEN_MAP_END { 0xffffU, ::xmloff::token::XML_TOKEN_INVALID, 0U }
+
+struct SvXMLTokenMapEntry
+{
+ sal_uInt16 nPrefixKey;
+ enum ::xmloff::token::XMLTokenEnum eLocalName;
+ sal_uInt16 nToken;
+};
+
+class XMLOFF_DLLPUBLIC SvXMLTokenMap
+{
+ SvXMLTokenMap_Impl *pImpl;
+
+ SAL_DLLPRIVATE SvXMLTokenMapEntry_Impl *_Find(
+ sal_uInt16 nKind, const ::rtl::OUString& rName ) const;
+
+public:
+
+ SvXMLTokenMap( const SvXMLTokenMapEntry* pMap );
+ ~SvXMLTokenMap();
+
+ sal_uInt16 Get( sal_uInt16 nPrefix, const ::rtl::OUString& rLName ) const;
+};
+
+#endif // _XMLOFF_XMLTKMAP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
new file mode 100644
index 000000000000..d899dbad1155
--- /dev/null
+++ b/xmloff/inc/xmloff/xmltoken.hxx
@@ -0,0 +1,3159 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTOKEN_HXX
+#define _XMLOFF_XMLTOKEN_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include <sal/types.h>
+
+namespace rtl { class OUString; }
+
+
+/**
+ * Handling of tokens in XML:
+ *
+ * This header defines te enum ::xmloff::token::XMLTokenEnum containing one
+ * value for every fixed string used in our XML files.
+ *
+ * Usage:
+ * To obtain an OUString for a token, use the GetXMLToken() function.
+ * To test equality of an OUString and a token, use IsXMLToken().
+ * Additionally, XMLTokenEnum values may be passed to SvXMLExport::AddAttribute
+ * methods and the SvXMLElementExport constructor.
+ */
+
+namespace xmloff { namespace token {
+
+
+ /**
+ * The enumeration of all XML tokens.
+ */
+ enum XMLTokenEnum
+ {
+ XML_TOKEN_START = 0,
+ XML_TOKEN_INVALID = XML_TOKEN_START,
+
+ // common xml
+ XML_CDATA,
+ XML_WS,
+ XML_XML,
+ XML_XMLNS,
+ XML_XML_PI,
+ XML_XML_DOCTYPE_PREFIX,
+ XML_XML_DOCTYPE_SUFFIX,
+
+ // namespace prefixes and names
+ XML_N_XML,
+ XML_NP_OFFICE,
+ XML_N_OFFICE,
+ XML_N_OFFICE_OLD,
+ XML_NP_META,
+ XML_N_META,
+ XML_N_META_OLD,
+ XML_NP_STYLE,
+ XML_N_STYLE,
+ XML_N_STYLE_OLD,
+ XML_NP_NUMBER,
+ XML_N_NUMBER,
+ XML_N_NUMBER_OLD,
+ XML_NP_TEXT,
+ XML_N_TEXT,
+ XML_N_TEXT_OLD,
+ XML_NP_TABLE,
+ XML_N_TABLE,
+ XML_N_TABLE_OLD,
+ XML_NP_DRAW,
+ XML_N_DRAW,
+ XML_NP_DR3D,
+ XML_N_DR3D,
+ XML_N_DRAW_OLD,
+ XML_NP_PRESENTATION,
+ XML_N_PRESENTATION,
+ XML_N_PRESENTATION_OLD,
+ XML_NP_CHART,
+ XML_N_CHART,
+ XML_NP_CONFIG,
+ XML_N_CONFIG,
+ XML_N_CHART_OLD,
+ XML_NP_FO,
+ XML_N_FO_OLD,
+ XML_N_FO,
+ XML_NP_XLINK,
+ XML_N_XLINK,
+ XML_N_XLINK_OLD,
+ XML_NP_DC,
+ XML_N_DC,
+ XML_NP_SVG,
+ XML_N_SVG,
+ XML_NP_FORM,
+ XML_N_FORM,
+ XML_NP_SCRIPT,
+ XML_N_SCRIPT,
+ XML_NP_XFORMS_1_0,
+ XML_N_XFORMS_1_0,
+ XML_NP_XSD,
+ XML_N_XSD,
+ XML_NP_XSI,
+ XML_N_XSI,
+
+ XML_NP_BLOCK_LIST,
+ XML_N_BLOCK_LIST,
+
+ XML_NP_MATH,
+ XML_N_MATH,
+
+ XML_NP_VERSIONS_LIST,
+ XML_N_VERSIONS_LIST,
+
+ // erAck: 2008-04-09T20:02+0200 OpenFormula aka ODFF
+ XML_NP_OF,
+ XML_N_OF,
+
+ // ODF 1.2 metadata: RDFa and GRDDL
+ XML_NP_XHTML,
+ XML_N_XHTML,
+ XML_NP_GRDDL,
+ XML_N_GRDDL,
+
+ // ODF Enhanced namespaces
+ XML_NP_OFFICE_EXT,
+ XML_N_OFFICE_EXT,
+
+ // jonp: 2008-09-24 Excel Interop
+ XML_NP_FORMX,
+ XML_N_FORMX,
+
+ XML_NP_TABLE_EXT,
+ XML_N_TABLE_EXT,
+
+ XML_NP_DRAW_EXT,
+ XML_N_DRAW_EXT,
+
+ // css text level 3
+ XML_NP_CSS3TEXT,
+ XML_N_CSS3TEXT,
+
+ // units
+ XML_UNIT_MM,
+ XML_UNIT_M,
+ XML_UNIT_KM,
+ XML_UNIT_CM,
+ XML_UNIT_PT,
+ XML_UNIT_PC,
+ XML_UNIT_FOOT,
+ XML_UNIT_MILES,
+ XML_UNIT_INCH,
+
+ // any other
+ XML_1,
+ XML_10,
+ XML_2,
+ XML_3,
+ XML_4,
+ XML_5,
+ XML_6,
+ XML_7,
+ XML_8,
+ XML_9,
+ XML_A_UPCASE,
+ XML_I_UPCASE,
+ XML_IBM437,
+ XML_IBM850,
+ XML_IBM860,
+ XML_IBM861,
+ XML_IBM863,
+ XML_IBM865,
+ XML_ISO_8859_1,
+ XML_OLE2,
+ XML__COLON,
+ XML__EMPTY,
+ XML__UNKNOWN_,
+
+ XML_A,
+ XML_ABBREVIATED_NAME,
+ XML_ABOVE,
+ XML_ABS,
+ XML_ACCENT,
+ XML_ACCENTUNDER,
+ XML_ACCEPTANCE_STATE,
+ XML_ACCEPTED,
+ XML_ACTION,
+ XML_ACTIVE,
+ XML_ACTIVE_SPLIT_RANGE,
+ XML_ACTIVE_TABLE,
+ XML_ACTUATE,
+ XML_ADD_IN,
+ XML_ADD_IN_NAME,
+ XML_ADDRESS,
+ XML_ADJUSTMENT,
+ XML_ALGORITHM,
+ XML_ALIGN,
+ XML_ALL,
+ XML_ALLOW_EMPTY_CELL,
+ XML_ALPHABETICAL_INDEX,
+ XML_ALPHABETICAL_INDEX_AUTO_MARK_FILE,
+ XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE,
+ XML_ALPHABETICAL_INDEX_MARK,
+ XML_ALPHABETICAL_INDEX_MARK_END,
+ XML_ALPHABETICAL_INDEX_MARK_START,
+ XML_ALPHABETICAL_INDEX_SOURCE,
+ XML_ALPHABETICAL_SEPARATORS,
+ XML_ALTERNATE,
+ XML_AM_PM,
+ XML_AMBIENT_COLOR,
+ XML_ANCHOR_PAGE_NUMBER,
+ XML_ANCHOR_TYPE,
+ XML_AND,
+ XML_ANIMATION,
+ XML_ANIMATION_DELAY,
+ XML_ANIMATION_DIRECTION,
+ XML_ANIMATION_REPEAT,
+ XML_ANIMATION_START_INSIDE,
+ XML_ANIMATION_STEPS,
+ XML_ANIMATION_STOP_INSIDE,
+ XML_ANIMATIONS,
+ XML_ANNOTATION,
+ XML_ANNOTATIONS,
+ XML_ANNOTE,
+ XML_APPEAR,
+ XML_APPLET,
+ XML_APPLET_NAME,
+ XML_APPLICATION_DATA,
+ XML_APPLICATION_XML,
+ XML_APPLY,
+ XML_APPLY_STYLE_NAME,
+ XML_AQUA,
+ XML_ARC,
+ XML_ARCCOS,
+ XML_ARCHIVE,
+ XML_ARCSIN,
+ XML_ARCTAN,
+ XML_AREA,
+ XML_AREA_CIRCLE,
+ XML_AREA_POLYGON,
+ XML_AREA_RECTANGLE,
+ XML_ARTICLE,
+ XML_AS_CHAR,
+ XML_ASCENDING,
+ XML_ATTACHED_AXIS,
+ XML_ATTRACTIVE,
+ XML_AUTHOR,
+ XML_AUTHOR_INITIALS,
+ XML_AUTHOR_NAME,
+ XML_AUTO,
+ XML_AUTO_GROW_HEIGHT,
+ XML_AUTO_GROW_WIDTH,
+ XML_AUTO_RELOAD,
+ XML_AUTO_TEXT,
+ XML_AUTO_TEXT_EVENTS,
+ XML_AUTO_TEXT_GROUP,
+ XML_AUTO_TEXT_INDENT,
+ XML_AUTO_UPDATE,
+ XML_AUTOMATIC,
+ XML_AUTOMATIC_FIND_LABELS,
+ XML_AUTOMATIC_ORDER,
+ XML_AUTOMATIC_STYLES,
+ XML_AUTOMATIC_UPDATE,
+ XML_AUTOSIZE,
+ XML_AVERAGE,
+ XML_AXIS,
+ XML_BACK_SCALE,
+ XML_BACKFACE_CULLING,
+ XML_BACKGROUND,
+ XML_BACKGROUND_COLOR,
+ XML_BACKGROUND_IMAGE,
+ XML_BACKGROUND_NO_REPEAT,
+ XML_BACKGROUND_REPEAT,
+ XML_BACKGROUND_STRETCH,
+ XML_BAR,
+ XML_BASE64BINARY,
+ XML_BASE_CELL_ADDRESS,
+ XML_BASELINE,
+ XML_BEFORE_DATE_TIME,
+ XML_BELOW,
+ XML_BETWEEN_DATE_TIMES,
+ XML_BEVEL,
+ XML_BIBILIOGRAPHIC_TYPE,
+ XML_BIBLIOGRAPHY,
+ XML_BIBLIOGRAPHY_CONFIGURATION,
+ XML_BIBLIOGRAPHY_DATA_FIELD,
+ XML_BIBLIOGRAPHY_ENTRY_TEMPLATE,
+ XML_BIBLIOGRAPHY_MARK,
+ XML_BIBLIOGRAPHY_SOURCE,
+ XML_BIBLIOGRAPHY_TYPE,
+ XML_BIND_STYLES_TO_CONTENT,
+ XML_BITMAP,
+ XML_BLACK,
+ XML_BLEND,
+ XML_BLINKING,
+ XML_BLOCK,
+ XML_BLOCK_LIST,
+ XML_BLUE,
+ XML_BODY,
+ XML_BOLD,
+ XML_BOOK,
+ XML_BOOKLET,
+ XML_BOOKMARK,
+ XML_BOOKMARK_END,
+ XML_BOOKMARK_REF,
+ XML_BOOKMARK_START,
+ XML_BOOKTITLE,
+ XML_BOOLEAN,
+ XML_BOOLEAN_STYLE,
+ XML_BOOLEAN_VALUE,
+ XML_BORDER,
+ XML_BORDER_BOTTOM,
+ XML_BORDER_COLOR,
+ XML_BORDER_LEFT,
+ XML_BORDER_LINE_WIDTH,
+ XML_BORDER_LINE_WIDTH_BOTTOM,
+ XML_BORDER_LINE_WIDTH_LEFT,
+ XML_BORDER_LINE_WIDTH_RIGHT,
+ XML_BORDER_LINE_WIDTH_TOP,
+ XML_BORDER_RIGHT,
+ XML_BORDER_TOP,
+ XML_BOTH,
+ XML_BOTTOM,
+ XML_BOTTOM_LEFT,
+ XML_BOTTOM_PERCENT,
+ XML_BOTTOM_RIGHT,
+ XML_BOTTOM_VALUES,
+ XML_BOTTOMARC,
+ XML_BOTTOMCIRCLE,
+ XML_BREAK_AFTER,
+ XML_BREAK_BEFORE,
+ XML_BREAK_INSIDE,
+ XML_BUBBLE,
+ XML_BULLET_CHAR,
+ XML_BULLET_RELATIVE_SIZE,
+ XML_BUTTON1,
+ XML_BUTTON2,
+ XML_BUTTON3,
+ XML_BUTTON4,
+ XML_BUTTONS,
+ XML_BVAR,
+ XML_C,
+ XML_CALCULATION_SETTINGS,
+ XML_CALENDAR,
+ XML_CAPITALIZE_ENTRIES,
+ XML_CAPTION,
+ XML_CAPTION_POINT_X,
+ XML_CAPTION_POINT_Y,
+ XML_CAPTION_SEQUENCE_FORMAT,
+ XML_CAPTION_SEQUENCE_NAME,
+ XML_CASE_SENSITIVE,
+ XML_CASEMAP_CAPITALIZE,
+ XML_CASEMAP_LOWERCASE,
+ XML_CASEMAP_NORMAL,
+ XML_CASEMAP_SMALL_CAPS,
+ XML_CASEMAP_UPPERCASE,
+ XML_CATEGORIES,
+ XML_CATEGORY,
+ XML_CATEGORY_AND_VALUE,
+ XML_CELL_ADDRESS,
+ XML_CELL_CONTENT_CHANGE,
+ XML_CELL_CONTENT_DELETION,
+ XML_CELL_COUNT,
+ XML_CELL_PROTECT,
+ XML_CELL_RANGE_ADDRESS,
+ XML_CELL_RANGE_ADDRESS_LIST,
+ XML_CELL_RANGE_SOURCE,
+ XML_CENTER,
+ XML_CHAIN_NEXT_NAME,
+ XML_CHANGE,
+ XML_CHANGE_DELETION,
+ XML_CHANGE_END,
+ XML_CHANGE_ID,
+ XML_CHANGE_INFO,
+ XML_CHANGE_START,
+ XML_CHANGE_TRACK_TABLE_CELL,
+ XML_CHANGE_VIEW_CONDITIONS,
+ XML_CHANGE_VIEW_SETTINGS,
+ XML_CHANGED_REGION,
+ XML_CHAPTER,
+ XML_CHAR,
+ XML_CHARACTER_COUNT,
+ XML_CHART,
+ XML_CHARTS,
+ XML_CHECKERBOARD,
+ XML_CHG_AUTHOR,
+ XML_CHG_COMMENT,
+ XML_CHG_DATE_TIME,
+ XML_CI,
+ XML_CIRCLE,
+ XML_CITATION_BODY_STYLE_NAME,
+ XML_CITATION_STYLE_NAME,
+ XML_CLASS,
+ XML_CLASS_ID,
+ XML_CLIP,
+ XML_CLOCKWISE,
+ XML_CLOSE,
+ XML_CLOSE_HORIZONTAL,
+ XML_CLOSE_VERTICAL,
+ XML_CM,
+ XML_CN,
+ XML_CODE,
+ XML_CODEBASE,
+ XML_COLLAPSE,
+ XML_COLOR,
+ XML_COLOR_INVERSION,
+ XML_COLOR_MODE,
+ XML_COLUMN,
+ XML_COLUMN_COUNT,
+ XML_COLUMN_GAP,
+ XML_COLUMN_NAME,
+ XML_COLUMN_SEP,
+ XML_COLUMN_WIDTH,
+ XML_COLUMNS,
+ XML_COLUMNSPLIT_AUTO,
+ XML_COLUMNSPLIT_AVOID,
+ XML_COMBINE_ENTRIES,
+ XML_COMBINE_ENTRIES_WITH_DASH,
+ XML_COMBINE_ENTRIES_WITH_PP,
+ XML_COMMA_SEPARATED,
+ XML_COMMAND,
+ XML_COMMENT,
+ XML_COMPOSE,
+ XML_COND_STYLE_NAME,
+ XML_CONDITION,
+ XML_CONDITION_SOURCE,
+ XML_CONDITION_SOURCE_RANGE_ADDRESS,
+ XML_CONDITIONAL_TEXT,
+ XML_CONE,
+ XML_CONFERENCE,
+ XML_CONFIG_ITEM,
+ XML_CONFIG_ITEM_MAP_ENTRY,
+ XML_CONFIG_ITEM_MAP_INDEXED,
+ XML_CONFIG_ITEM_MAP_NAMED,
+ XML_CONFIG_ITEM_SET,
+ XML_CONFIGURATION_SETTINGS,
+ XML_CONJUGATE,
+ XML_CONNECT_BARS,
+ XML_CONNECTION_NAME,
+ XML_CONNECTOR,
+ XML_CONSECUTIVE_NUMBERING,
+ XML_CONSOLIDATION,
+ XML_CONSTANT,
+ XML_CONTAINS_ERROR,
+ XML_CONTAINS_HEADER,
+ XML_CONTENT,
+ XML_CONTENT_VALIDATION,
+ XML_CONTENT_VALIDATION_NAME,
+ XML_CONTENT_VALIDATIONS,
+ XML_CONTINUE,
+ XML_CONTINUE_NUMBERING,
+ XML_CONTOUR_PATH,
+ XML_CONTOUR_POLYGON,
+ XML_CONTRAST,
+ XML_CONTROL,
+ XML_CONVERSION_MODE,
+ XML_COPY_BACK,
+ XML_COPY_FORMULAS,
+ XML_COPY_OUTLINE_LEVELS,
+ XML_COPY_RESULTS_ONLY,
+ XML_COPY_STYLES,
+ XML_CORNER_RADIUS,
+ XML_CORRECT,
+ XML_COS,
+ XML_COSH,
+ XML_COT,
+ XML_COTH,
+ XML_COUNT,
+ XML_COUNT_EMPTY_LINES,
+ XML_COUNT_IN_FLOATING_FRAMES,
+ XML_COUNTER_CLOCKWISE,
+ XML_COUNTERCLOCKWISE,
+ XML_COUNTNUMS,
+ XML_COUNTRY,
+ XML_COUNTRY_ASIAN,
+ XML_COUNTRY_COMPLEX,
+ XML_COVERED_TABLE_CELL,
+ XML_CREATE_DATE,
+ XML_CREATE_DATE_STRING,
+ XML_CREATION_DATE,
+ XML_CREATION_TIME,
+ XML_CREATOR,
+ XML_CSC,
+ XML_CSCH,
+ XML_CUBE,
+ XML_CUBOID,
+ XML_CURRENCY,
+ XML_CURRENCY_STYLE,
+ XML_CURRENCY_SYMBOL,
+ XML_CURRENT,
+ XML_CURRENT_VALUE,
+ XML_CURSOR_POSITION,
+ XML_CURSOR_POSITION_X,
+ XML_CURSOR_POSITION_Y,
+ XML_CURVE,
+ XML_CUSTOM1,
+ XML_CUSTOM2,
+ XML_CUSTOM3,
+ XML_CUSTOM4,
+ XML_CUSTOM5,
+ XML_CUT,
+ XML_CUT_OFFS,
+ XML_CX,
+ XML_CY,
+ XML_CYLINDER,
+ XML_D,
+ XML_DASH,
+ XML_DASHED,
+ XML_DATA,
+ XML_DATA_CELL_RANGE_ADDRESS,
+ XML_DATA_LABEL_NUMBER,
+ XML_DATA_LABEL_SYMBOL,
+ XML_DATA_LABEL_TEXT,
+ XML_DATA_PILOT_FIELD,
+ XML_DATA_PILOT_GRAND_TOTAL,
+ XML_DATA_PILOT_LEVEL,
+ XML_DATA_PILOT_MEMBER,
+ XML_DATA_PILOT_MEMBERS,
+ XML_DATA_PILOT_SUBTOTAL,
+ XML_DATA_PILOT_SUBTOTALS,
+ XML_DATA_PILOT_TABLE,
+ XML_DATA_PILOT_TABLES,
+ XML_DATA_POINT,
+ XML_DATA_STYLE,
+ XML_DATA_STYLE_NAME,
+ XML_DATA_TYPE,
+ XML_DATABASE_DISPLAY,
+ XML_DATABASE_NAME,
+ XML_DATABASE_NEXT,
+ XML_DATABASE_RANGE,
+ XML_DATABASE_RANGES,
+ XML_DATABASE_ROW_NUMBER,
+ XML_DATABASE_SELECT,
+ XML_DATABASE_SOURCE_QUERY,
+ XML_DATABASE_SOURCE_SQL,
+ XML_DATABASE_SOURCE_TABLE,
+ XML_DATE,
+ XML_DATE_ADJUST,
+ XML_DATE_STYLE,
+ XML_DATE_TIME,
+ XML_DATE_VALUE,
+ XML_DATETIME,
+ XML_DAY,
+ XML_DAY_OF_WEEK,
+ XML_DDE_APPLICATION,
+ XML_DDE_CONNECTION,
+ XML_DDE_CONNECTION_DECL,
+ XML_DDE_CONNECTION_DECLS,
+ XML_DDE_ITEM,
+ XML_DDE_LINK,
+ XML_DDE_LINKS,
+ XML_DDE_SOURCE,
+ XML_DDE_TOPIC,
+ XML_DECIMAL_PLACES,
+ XML_DECIMAL_REPLACEMENT,
+ XML_DECLARE,
+ XML_DECORATE_WORDS_ONLY,
+ XML_DECORATIVE,
+ XML_DEEP,
+ XML_DEFAULT,
+ XML_DEFAULT_CELL_STYLE_NAME,
+ XML_DEFAULT_STYLE,
+ XML_DEFAULT_STYLE_NAME,
+ XML_DEGREE,
+ XML_DELAY,
+ XML_DELETION,
+ XML_DELETIONS,
+ XML_DEPENDENCE,
+ XML_DEPENDENCES,
+ XML_DEPENDENCIES,
+ XML_DEPTH,
+ XML_DESC,
+ XML_DESCENDING,
+ XML_DESCRIPTION,
+ XML_DETECTIVE,
+ XML_DETERMINANT,
+ XML_DIFF,
+ XML_DIFFUSE_COLOR,
+ XML_DIM,
+ XML_DIRECTION,
+ XML_DISABLED,
+ XML_DISC,
+ XML_DISPLAY,
+ XML_DISPLAY_BORDER,
+ XML_DISPLAY_DETAILS,
+ XML_DISPLAY_DUPLICATES,
+ XML_DISPLAY_EMPTY,
+ XML_DISPLAY_FILTER_BUTTONS,
+ XML_DISPLAY_FORMULA,
+ XML_DISPLAY_LABEL,
+ XML_DISPLAY_LEVELS,
+ XML_DISPLAY_NAME,
+ XML_DISPLAY_OUTLINE_LEVEL,
+ XML_DISSOLVE,
+ XML_DISTANCE,
+ XML_DISTANCE_AFTER_SEP,
+ XML_DISTANCE_BEFORE_SEP,
+ XML_DISTRIBUTE,
+ XML_DISTRIBUTE_LETTER,
+ XML_DISTRIBUTE_SPACE,
+ XML_DIVIDE,
+ XML_DOCUMENT,
+ XML_DOCUMENT_CONTENT,
+ XML_DOCUMENT_META,
+ XML_DOCUMENT_SETTINGS,
+ XML_DOCUMENT_STATISTIC,
+ XML_DOCUMENT_STYLES,
+ XML_DOMAIN,
+ XML_DOT,
+ XML_DOTS1,
+ XML_DOTS1_LENGTH,
+ XML_DOTS2,
+ XML_DOTS2_LENGTH,
+ XML_DOTTED,
+ XML_DOUBLE,
+ XML_DOUBLE_SIDED,
+ XML_DOWN,
+ XML_DRAFT,
+ XML_DRAW,
+ XML_DRAW_ASPECT,
+ XML_DRAWING,
+ XML_DRAWINGS,
+ XML_DRAWPOOL,
+ XML_DROP_CAP,
+ XML_DYNAMIC,
+ XML_EDGE_ROUNDING,
+ XML_EDITABLE,
+ XML_EDITING_CYCLES,
+ XML_EDITING_DURATION,
+ XML_EDITION,
+ XML_EDITOR,
+ XML_EFFECT,
+ XML_ELLIPSE,
+ XML_EMAIL,
+ XML_EMBED,
+ XML_EMBEDDED_VISIBLE_AREA,
+ XML_EMBOSSED,
+ XML_EMISSIVE_COLOR,
+ XML_EMPTY,
+ XML_ENABLE_NUMBERING,
+ XML_ENABLED,
+ XML_ENCODING,
+ XML_END,
+ XML_END_ANGLE,
+ XML_END_CELL_ADDRESS,
+ XML_END_COLOR,
+ XML_END_COLUMN,
+ XML_END_GLUE_POINT,
+ XML_END_GUIDE,
+ XML_END_INTENSITY,
+ XML_END_LINE_SPACING_HORIZONTAL,
+ XML_END_LINE_SPACING_VERTICAL,
+ XML_END_POSITION,
+ XML_END_ROW,
+ XML_END_SHAPE,
+ XML_END_TABLE,
+ XML_END_X,
+ XML_END_Y,
+ XML_ENDLESS,
+ XML_ENDNOTE,
+ XML_ENDNOTE_BODY,
+ XML_ENDNOTE_CITATION,
+ XML_ENDNOTE_REF,
+ XML_ENDNOTES_CONFIGURATION,
+ XML_ENGRAVED,
+ XML_EQ,
+ XML_EQUAL_AUTHOR,
+ XML_EQUAL_COMMENT,
+ XML_EQUAL_DATE,
+ XML_ERA,
+ XML_ERGO_SUM,
+ XML_ERROR_CATEGORY,
+ XML_ERROR_LOWER_INDICATOR,
+ XML_ERROR_LOWER_LIMIT,
+ XML_ERROR_MACRO,
+ XML_ERROR_MARGIN,
+ XML_ERROR_MESSAGE,
+ XML_ERROR_PERCENTAGE,
+ XML_ERROR_UPPER_INDICATOR,
+ XML_ERROR_UPPER_LIMIT,
+ XML_ESCAPEMENT_SUB,
+ XML_ESCAPEMENT_SUPER,
+ XML_EVEN_PAGE,
+ XML_EVENT,
+ XML_EVENT_NAME,
+ XML_EVENTS,
+ XML_EXECUTE,
+ XML_EXECUTE_MACRO,
+ XML_EXISTS,
+ XML_EXP,
+ XML_EXPONENTIAL,
+ XML_EXPRESSION,
+ XML_EXTRA,
+ XML_EXTRUDE,
+ XML_FACTORIAL,
+ XML_FADE,
+ XML_FADE_FROM_BOTTOM,
+ XML_FADE_FROM_CENTER,
+ XML_FADE_FROM_LEFT,
+ XML_FADE_FROM_LOWERLEFT,
+ XML_FADE_FROM_LOWERRIGHT,
+ XML_FADE_FROM_RIGHT,
+ XML_FADE_FROM_TOP,
+ XML_FADE_FROM_UPPERLEFT,
+ XML_FADE_FROM_UPPERRIGHT,
+ XML_FADE_OUT,
+ XML_FADE_TO_CENTER,
+ XML_FALSE,
+ XML_FAMILY,
+ XML_FAST,
+ XML_FIELD_NUMBER,
+ XML_FILE_NAME,
+ XML_FILL,
+ XML_FILL_COLOR,
+ XML_FILL_GRADIENT_NAME,
+ XML_FILL_HATCH_NAME,
+ XML_FILL_HATCH_SOLID,
+ XML_FILL_IMAGE,
+ XML_FILL_IMAGE_HEIGHT,
+ XML_FILL_IMAGE_NAME,
+ XML_FILL_IMAGE_REF_POINT,
+ XML_FILL_IMAGE_REF_POINT_X,
+ XML_FILL_IMAGE_REF_POINT_Y,
+ XML_FILL_IMAGE_WIDTH,
+ XML_FILTER,
+ XML_FILTER_AND,
+ XML_FILTER_CONDITION,
+ XML_FILTER_NAME,
+ XML_FILTER_OPTIONS,
+ XML_FILTER_OR,
+ XML_FIRST_DATE_TIME,
+ XML_FIRST_PAGE,
+ XML_FIRST_PAGE_NUMBER,
+ XML_FIT_TO_CONTOUR,
+ XML_FIT_TO_SIZE,
+ XML_FIX,
+ XML_FIXED,
+ XML_FLAT,
+ XML_FLOAT,
+ XML_FLOATING_FRAME,
+ XML_FLOOR,
+ XML_FN,
+ XML_FOCAL_LENGTH,
+ XML_FONT_CHAR_WIDTH,
+ XML_FONT_CHARSET,
+ XML_FONT_CHARSET_ASIAN,
+ XML_FONT_CHARSET_COMPLEX,
+ XML_FONT_COLOR,
+ XML_FONT_DECL,
+ XML_FONT_DECLS,
+ XML_FONT_FAMILY,
+ XML_FONT_FAMILY_ASIAN,
+ XML_FONT_FAMILY_COMPLEX,
+ XML_FONT_FAMILY_GENERIC,
+ XML_FONT_FAMILY_GENERIC_ASIAN,
+ XML_FONT_FAMILY_GENERIC_COMPLEX,
+ XML_FONT_KERNING,
+ XML_FONT_NAME,
+ XML_FONT_NAME_ASIAN,
+ XML_FONT_NAME_COMPLEX,
+ XML_FONT_PITCH,
+ XML_FONT_PITCH_ASIAN,
+ XML_FONT_PITCH_COMPLEX,
+ XML_FONT_RELIEF,
+ XML_FONT_SIZE,
+ XML_FONT_SIZE_ASIAN,
+ XML_FONT_SIZE_COMPLEX,
+ XML_FONT_SIZE_REL,
+ XML_FONT_SIZE_REL_ASIAN,
+ XML_FONT_SIZE_REL_COMPLEX,
+ XML_FONT_STYLE,
+ XML_FONT_STYLE_ASIAN,
+ XML_FONT_STYLE_COMPLEX,
+ XML_FONT_STYLE_NAME,
+ XML_FONT_STYLE_NAME_ASIAN,
+ XML_FONT_STYLE_NAME_COMPLEX,
+ XML_FONT_VARIANT,
+ XML_FONT_WEIGHT,
+ XML_FONT_WEIGHT_ASIAN,
+ XML_FONT_WEIGHT_COMPLEX,
+ XML_FONT_WIDTH,
+ XML_FONT_WORD_LINE_MODE,
+ XML_FONTFAMILY,
+ XML_FONTSIZE,
+ XML_FONTSTYLE,
+ XML_FONTWEIGHT,
+ XML_FONTWORK_ADJUST,
+ XML_FONTWORK_DISTANCE,
+ XML_FONTWORK_FORM,
+ XML_FONTWORK_HIDE_FORM,
+ XML_FONTWORK_MIRROR,
+ XML_FONTWORK_OUTLINE,
+ XML_FONTWORK_SHADOW,
+ XML_FONTWORK_SHADOW_COLOR,
+ XML_FONTWORK_SHADOW_OFFSET_X,
+ XML_FONTWORK_SHADOW_OFFSET_Y,
+ XML_FONTWORK_SHADOW_TRANSPARENCE,
+ XML_FONTWORK_START,
+ XML_FONTWORK_STYLE,
+ XML_FOOTER,
+ XML_FOOTER_LEFT,
+ XML_FOOTER_STYLE,
+ XML_FOOTNOTE,
+ XML_FOOTNOTE_BODY,
+ XML_FOOTNOTE_CITATION,
+ XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD,
+ XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD,
+ XML_FOOTNOTE_MAX_HEIGHT,
+ XML_FOOTNOTE_REF,
+ XML_FOOTNOTE_SEP,
+ XML_FOOTNOTES_CONFIGURATION,
+ XML_FOOTNOTES_POSITION,
+ XML_FORALL,
+ XML_FORCE_MANUAL,
+ XML_FOREGROUND,
+ XML_FOREIGN_OBJECT,
+ XML_FORMAT_CHANGE,
+ XML_FORMAT_SOURCE,
+ XML_FORMS,
+ XML_FORMULA,
+ XML_FORMULA_HIDDEN,
+ XML_FORMULAS,
+ XML_FRACTION,
+ XML_FRAME,
+ XML_FRAME_CONTENT,
+ XML_FRAME_DISPLAY_BORDER,
+ XML_FRAME_DISPLAY_SCROLLBAR,
+ XML_FRAME_END_MARGIN,
+ XML_FRAME_MARGIN_HORIZONTAL,
+ XML_FRAME_MARGIN_VERTICAL,
+ XML_FRAME_NAME,
+ XML_FRAME_START_MARGIN,
+ XML_FREEZE,
+ XML_FREEZE_POSITION,
+ XML_FROM_ANOTHER_TABLE,
+ XML_FROM_BOTTOM,
+ XML_FROM_CENTER,
+ XML_FROM_INSIDE,
+ XML_FROM_LEFT,
+ XML_FROM_LOWER_LEFT,
+ XML_FROM_LOWER_RIGHT,
+ XML_FROM_RIGHT,
+ XML_FROM_SAME_TABLE,
+ XML_FROM_TOP,
+ XML_FROM_UPPER_LEFT,
+ XML_FROM_UPPER_RIGHT,
+ XML_FUCHSIA,
+ XML_FULL,
+ XML_FULL_SCREEN,
+ XML_FUNCTION,
+ XML_G,
+ XML_GAMMA,
+ XML_GAP,
+ XML_GAP_WIDTH,
+ XML_GCD,
+ XML_GENERATOR,
+ XML_GEQ,
+ XML_GOURAUD,
+ XML_GRADIENT,
+ XML_GRADIENT_ANGLE,
+ XML_GRADIENT_BORDER,
+ XML_GRADIENT_STEP_COUNT,
+ XML_GRADIENT_STYLE,
+ XML_GRADIENTSTYLE_AXIAL,
+ XML_GRADIENTSTYLE_ELLIPSOID,
+ XML_GRADIENTSTYLE_LINEAR,
+ XML_GRADIENTSTYLE_RADIAL,
+ XML_GRADIENTSTYLE_RECTANGULAR,
+ XML_GRADIENTSTYLE_SQUARE,
+ XML_GRAND_TOTAL,
+ XML_GRAPHIC,
+ XML_GRAY,
+ XML_GREEN,
+ XML_GREYSCALE,
+ XML_GRID,
+ XML_GROOVE,
+ XML_GROUP_BY_FIELD_NUMBER,
+ XML_GROUP_NAME,
+ XML_GROUPING,
+ XML_GT,
+ XML_GUIDE_DISTANCE,
+ XML_GUIDE_OVERHANG,
+ XML_H,
+ XML_HANGING,
+ XML_HAS_PERSISTENT_DATA,
+ XML_HATCH,
+ XML_HATCH_DISTANCE,
+ XML_HATCH_STYLE,
+ XML_HATCHSTYLE_DOUBLE,
+ XML_HATCHSTYLE_SINGLE,
+ XML_HATCHSTYLE_TRIPLE,
+ XML_HEADER,
+ XML_HEADER_LEFT,
+ XML_HEADER_STYLE,
+ XML_HEADERS,
+ XML_HEIGHT,
+ XML_HELP,
+ XML_HELP_FILE_NAME,
+ XML_HELP_ID,
+ XML_HELP_MESSAGE,
+ XML_HIDDEN,
+ XML_HIDDEN_AND_PROTECTED,
+ XML_HIDDEN_PARAGRAPH,
+ XML_HIDDEN_TEXT,
+ XML_HIDE,
+ XML_HIDE_SHAPE,
+ XML_HIDE_TEXT,
+ XML_HIGHLIGHTED_RANGE,
+ XML_HINT,
+ XML_HORIZONTAL,
+ XML_HORIZONTAL_LINES,
+ // --> OD 2005-05-12 #i49139#
+ // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES
+ // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD.
+ // Usage is deprecated, but the old token are needed for the
+ // OpenOffice.org file format import/export filter for the renaming
+ XML_HORIZONTAL_ON_LEFT_PAGES,
+ XML_HORIZONTAL_ON_RIGHT_PAGES,
+ // <--
+ XML_HORIZONTAL_POS,
+ XML_HORIZONTAL_REL,
+ XML_HORIZONTAL_SCROLLBAR_WIDTH,
+ XML_HORIZONTAL_SEGMENTS,
+ XML_HORIZONTAL_SPLIT_MODE,
+ XML_HORIZONTAL_SPLIT_POSITION,
+ XML_HORIZONTAL_STRIPES,
+ XML_HOURS,
+ XML_HOWPUBLISHED,
+ XML_HREF,
+ XML_HTML,
+ XML_HYPERLINK_BEHAVIOUR,
+ XML_HYPHENATE,
+ XML_HYPHENATION_KEEP,
+ XML_HYPHENATION_LADDER_COUNT,
+ XML_HYPHENATION_PUSH_CHAR_COUNT,
+ XML_HYPHENATION_REMAIN_CHAR_COUNT,
+ XML_I,
+ XML_ICON,
+ XML_ID,
+ XML_IDENT,
+ XML_IDENTIFIER,
+ XML_IDENTIFY_CATEGORIES,
+ XML_IDEOGRAPH_ALPHA,
+ XML_IGNORE_CASE,
+ XML_IGNORE_EMPTY_ROWS,
+ XML_ILLUSTRATION_INDEX,
+ XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE,
+ XML_ILLUSTRATION_INDEX_SOURCE,
+ XML_IMAGE,
+ XML_IMAGE_COUNT,
+ XML_IMAGE_MAP,
+ XML_IMPLIES,
+ XML_IN,
+ XML_IN_RANGE,
+ XML_INBOOK,
+ XML_INCOLLECTION,
+ XML_INCREMENT,
+ XML_INDEX,
+ XML_INDEX_BODY,
+ XML_INDEX_ENTRY_BIBLIOGRAPHY,
+ XML_INDEX_ENTRY_CHAPTER,
+ XML_INDEX_ENTRY_CHAPTER_NUMBER,
+ XML_INDEX_ENTRY_LINK_END,
+ XML_INDEX_ENTRY_LINK_START,
+ XML_INDEX_ENTRY_PAGE_NUMBER,
+ XML_INDEX_ENTRY_SPAN,
+ XML_INDEX_ENTRY_TAB_STOP,
+ XML_INDEX_ENTRY_TEMPLATE,
+ XML_INDEX_ENTRY_TEXT,
+ XML_INDEX_NAME,
+ XML_INDEX_SCOPE,
+ XML_INDEX_SOURCE_STYLE,
+ XML_INDEX_SOURCE_STYLES,
+ XML_INDEX_TITLE,
+ XML_INDEX_TITLE_TEMPLATE,
+ XML_INFORMATION,
+ XML_INITIAL_CREATOR,
+ XML_INPROCEEDINGS,
+ XML_INSERTION,
+ XML_INSERTION_CUT_OFF,
+ XML_INSET,
+ XML_INSIDE,
+ XML_INSTITUTION,
+ XML_INT,
+ XML_INTENSITY,
+ XML_INTERSECT,
+ XML_INTERVAL,
+ XML_INTERVAL_MAJOR,
+ XML_INTERVAL_MINOR,
+ XML_INTO_ENGLISH_NUMBER,
+ XML_INVERSE,
+ XML_IS_ACTIVE,
+ XML_IS_DATA_LAYOUT_FIELD,
+ XML_IS_HIDDEN,
+ XML_IS_SELECTION,
+ XML_ISBN,
+ XML_ITALIC,
+ XML_ITERATION,
+ XML_JOURNAL,
+ XML_JUSTIFIED,
+ XML_JUSTIFY,
+ XML_JUSTIFY_SINGLE_WORD,
+ XML_KEEP_WITH_NEXT,
+ XML_KERNING_NORMAL,
+ XML_KEY,
+ XML_KEY1,
+ XML_KEY2,
+ XML_KEYWORD,
+ XML_KEYWORDS,
+ XML_KIND,
+ XML_KM,
+ XML_LABEL,
+ XML_LABEL_ARRANGEMENT,
+ XML_LABEL_CELL_ADDRESS,
+ XML_LABEL_CELL_RANGE_ADDRESS,
+ XML_LABEL_RANGE,
+ XML_LABEL_RANGES,
+ XML_LAMBDA,
+ XML_LANDSCAPE,
+ XML_LANGUAGE,
+ XML_LANGUAGE_ASIAN,
+ XML_LANGUAGE_COMPLEX,
+ XML_LASER,
+ XML_LAST_COLUMN_SPANNED,
+ XML_LAST_PAGE,
+ XML_LAST_ROW_SPANNED,
+ XML_LAYER,
+ XML_LAYER_SET,
+ XML_LEADER_CHAR,
+ XML_LEFT,
+ XML_LEFT_OUTSIDE,
+ XML_LEFT_TOP_POSITION,
+ XML_LEFTARC,
+ XML_LEFTCIRCLE,
+ XML_LEGEND,
+ XML_LEGEND_POSITION,
+ XML_LENGTH,
+ XML_LEQ,
+ XML_LET_TEXT,
+ XML_KEEP_TEXT,
+ XML_LETTER_KERNING,
+ XML_LETTER_SPACING,
+ XML_LETTERS,
+ XML_LEVEL,
+ XML_LIBRARY,
+ XML_LIBRARY_EMBEDDED,
+ XML_LIBRARY_LINKED,
+ XML_LIGHT,
+ XML_LIGHTING_MODE,
+ XML_LIME,
+ XML_LIMIT,
+ XML_LINE,
+ XML_LINE_BREAK,
+ XML_LINE_DISTANCE,
+ XML_LINE_HEIGHT,
+ XML_LINE_HEIGHT_AT_LEAST,
+ XML_LINE_NUMBER,
+ XML_LINE_SKEW,
+ XML_LINE_SPACING,
+ XML_LINEAR,
+ XML_LINENUMBERING_CONFIGURATION,
+ XML_LINENUMBERING_SEPARATOR,
+ XML_LINES,
+ XML_LINES_USED,
+ XML_LINK_TO_SOURCE_DATA,
+ XML_LIST,
+ XML_LIST_BLOCK,
+ XML_LIST_HEADER,
+ XML_LIST_INFO,
+ XML_LIST_ITEM,
+ XML_LIST_LEVEL,
+ XML_LIST_LEVEL_STYLE_BULLET,
+ XML_LIST_LEVEL_STYLE_IMAGE,
+ XML_LIST_LEVEL_STYLE_NUMBER,
+ XML_LIST_NAME,
+ XML_LIST_STYLE,
+ XML_LIST_STYLE_NAME,
+ XML_LN,
+ XML_LOCKED,
+ XML_LOG,
+ XML_LOGARITHMIC,
+ XML_LOGBASE,
+ XML_LONG,
+ XML_LOWLIMIT,
+ XML_LR_TB,
+ XML_LT,
+ XML_LTR,
+ XML_LUMINANCE,
+ XML_MACRO_NAME,
+ XML_MACTION,
+ XML_MAIN_ENTRY_STYLE_NAME,
+ XML_MAJOR,
+ XML_MALIGNGROUP,
+ XML_MALIGNMARK,
+ XML_MANUAL,
+ XML_MAP,
+ XML_MARGIN_BOTTOM,
+ XML_MARGIN_LEFT,
+ XML_MARGIN_RIGHT,
+ XML_MARGIN_TOP,
+ XML_MARGINS,
+ XML_MARKER,
+ XML_MARKER_END,
+ XML_MARKER_END_CENTER,
+ XML_MARKER_END_WIDTH,
+ XML_MARKER_START,
+ XML_MARKER_START_CENTER,
+ XML_MARKER_START_WIDTH,
+ XML_MAROON,
+ XML_MASTER_PAGE,
+ XML_MASTER_PAGE_NAME,
+ XML_MASTER_STYLES,
+ XML_MASTERSTHESIS,
+ XML_MATCH,
+ XML_MATH,
+ XML_MATRIX,
+ XML_MATRIX_COVERED,
+ XML_MATRIXROW,
+ XML_MAX,
+ XML_MAX_EDGE,
+ XML_MAX_HEIGHT,
+ XML_MAX_WIDTH,
+ XML_MAXIMUM,
+ XML_MAXIMUM_DIFFERENCE,
+ XML_MAY_BREAK_BETWEEN_ROWS,
+ XML_MAY_SCRIPT,
+ XML_MEAN,
+ XML_MEAN_VALUE,
+ XML_MEASURE,
+ XML_MEASURE_ALIGN,
+ XML_MEASURE_VERTICAL_ALIGN,
+ XML_MEDIAN,
+ XML_MEDIUM,
+ XML_MERROR,
+ XML_MESSAGE_TYPE,
+ XML_META,
+ XML_MFENCED,
+ XML_MFRAC,
+ XML_MI,
+ XML_MIDDLE,
+ XML_MIME_TYPE,
+ XML_MIN,
+ XML_MIN_DENOMINATOR_DIGITS,
+ XML_MIN_EDGE,
+ XML_MIN_EXPONENT_DIGITS,
+ XML_MIN_HEIGHT,
+ XML_MIN_INTEGER_DIGITS,
+ XML_MIN_LABEL_DISTANCE,
+ XML_MIN_LABEL_WIDTH,
+ XML_MIN_LINE_HEIGHT,
+ XML_MIN_NUMERATOR_DIGITS,
+ XML_MIN_ROW_HEIGHT,
+ XML_MIN_WIDTH,
+ XML_MINIMUM,
+ XML_MINOR,
+ XML_MINUS,
+ XML_MINUTES,
+ XML_MIRROR,
+ XML_MIRRORED,
+ XML_MISC,
+ XML_MITER,
+ XML_MM,
+ XML_MMULTISCRIPTS,
+ XML_MN,
+ XML_MO,
+ XML_MODE,
+ XML_MODERN,
+ XML_MODIFICATION_DATE,
+ XML_MODIFICATION_TIME,
+ XML_MODULATE,
+ XML_MODULE,
+ XML_MOMENT,
+ XML_MONO,
+ XML_MONTH,
+ XML_MOUSE_AS_PEN,
+ XML_MOUSE_VISIBLE,
+ XML_MOVE,
+ XML_MOVE_FROM_BOTTOM,
+ XML_MOVE_FROM_LEFT,
+ XML_MOVE_FROM_RIGHT,
+ XML_MOVE_FROM_TOP,
+ XML_MOVE_PROTECT,
+ XML_MOVE_SHORT,
+ XML_MOVEMENT,
+ XML_MOVEMENT_CUT_OFF,
+ XML_MOVER,
+ XML_MPADDED,
+ XML_MPHANTOM,
+ XML_MPRESCRIPTS,
+ XML_MROOT,
+ XML_MROW,
+ XML_MS,
+ XML_MSPACE,
+ XML_MSQRT,
+ XML_MSTYLE,
+ XML_MSUB,
+ XML_MSUBSUP,
+ XML_MSUP,
+ XML_MTABLE,
+ XML_MTD,
+ XML_MTEXT,
+ XML_MTR,
+ XML_MULTI_DELETION_SPANNED,
+ XML_MUNDER,
+ XML_MUNDEROVER,
+ XML_NAME,
+ XML_NAME_AND_EXTENSION,
+ XML_NAMED_EXPRESSION,
+ XML_NAMED_EXPRESSIONS,
+ XML_NAMED_RANGE,
+ XML_NAVY,
+ XML_NEQ,
+ XML_NEW,
+ XML_NEXT,
+ XML_NEXT_PAGE,
+ XML_NEXT_STYLE_NAME,
+ XML_NO_LIMIT,
+ XML_NO_WRAP,
+ XML_NOEMPTY,
+ XML_NOHREF,
+ XML_NOMATCH,
+ XML_NONE,
+ XML_NOPRTSUBSET,
+ XML_NORMAL,
+ XML_NORMALS_DIRECTION,
+ XML_NORMALS_KIND,
+ XML_NOT,
+ XML_NOT_EQUAL_DATE,
+ XML_NOTE,
+ XML_NOTES,
+ XML_NOTIN,
+ XML_NOTSUBSET,
+ XML_NULL_DATE,
+ XML_NULL_YEAR,
+ XML_NUM_FORMAT,
+ XML_NUM_LETTER_SYNC,
+ XML_NUM_PREFIX,
+ XML_NUM_SUFFIX,
+ XML_NUMBER,
+ XML_NUMBER_AND_NAME,
+ XML_NUMBER_COLUMNS_REPEATED,
+ XML_NUMBER_COLUMNS_SPANNED,
+ XML_NUMBER_LINES,
+ XML_NUMBER_MATRIX_COLUMNS_SPANNED,
+ XML_NUMBER_MATRIX_ROWS_SPANNED,
+ XML_NUMBER_POSITION,
+ XML_NUMBER_ROWS_REPEATED,
+ XML_NUMBER_ROWS_SPANNED,
+ XML_NUMBER_STYLE,
+ XML_NUMBER_WRAPPED_PARAGRAPHS,
+ XML_NUMBERED_ENTRIES,
+ XML_OBJECT,
+ XML_OBJECT_COUNT,
+ XML_OBJECT_INDEX,
+ XML_OBJECT_INDEX_ENTRY_TEMPLATE,
+ XML_OBJECT_INDEX_SOURCE,
+ XML_OBJECT_NAME,
+ XML_OBJECT_OLE,
+ XML_OBJECTS,
+ XML_ODD_PAGE,
+ XML_OFFSET,
+ XML_OLIVE,
+ XML_ONLOAD,
+ XML_ONREQUEST,
+ XML_ON_UPDATE_KEEP_SIZE,
+ XML_ON_UPDATE_KEEP_STYLES,
+ XML_ONLINE,
+ XML_ONLINE_TEXT,
+ XML_OPAQUE_BACKGROUND,
+ XML_OPAQUE_FOREGROUND,
+ XML_OPEN,
+ XML_OPEN_HORIZONTAL,
+ XML_OPEN_VERTICAL,
+ XML_OPERATION,
+ XML_OPERATOR,
+ XML_OPTIMAL,
+ XML_OR,
+ XML_ORDER,
+ XML_ORDERED_LIST,
+ XML_ORGANIZATIONS,
+ XML_ORIENTATION,
+ XML_ORIENTATION_LANDSCAPE,
+ XML_ORIENTATION_PORTRAIT,
+ XML_ORIGIN,
+ XML_ORPHANS,
+ XML_OUTLINE_LEVEL,
+ XML_OUTLINE_LEVEL_STYLE,
+ XML_OUTLINE_STYLE,
+ XML_OUTSET,
+ XML_OUTSIDE,
+ XML_OVERLAP,
+ XML_P,
+ XML_PACKAGE_NAME,
+ XML_PADDING,
+ XML_PADDING_BOTTOM,
+ XML_PADDING_LEFT,
+ XML_PADDING_RIGHT,
+ XML_PADDING_TOP,
+ XML_PAGE,
+ XML_PAGE_ADJUST,
+ XML_PAGE_BREAKS_ON_GROUP_CHANGE,
+ XML_PAGE_CONTENT,
+ XML_PAGE_CONTINUATION_STRING,
+ XML_PAGE_COUNT,
+ XML_PAGE_END_MARGIN,
+ XML_PAGE_HEIGHT,
+ XML_PAGE_MASTER,
+ XML_PAGE_MASTER_NAME,
+ XML_PAGE_NUMBER,
+ XML_PAGE_START_MARGIN,
+ XML_PAGE_STYLE_NAME,
+ XML_PAGE_THUMBNAIL,
+ XML_PAGE_USAGE,
+ XML_PAGE_VARIABLE_GET,
+ XML_PAGE_VARIABLE_SET,
+ XML_PAGE_VIEW_ZOOM_VALUE,
+ XML_PAGE_WIDTH,
+ XML_PAGES,
+ XML_PAPER_TRAY_NUMBER,
+ XML_PARAGRAPH,
+ XML_PARAGRAPH_CONTENT,
+ XML_PARAGRAPH_COUNT,
+ XML_PARAGRAPH_END_MARGIN,
+ XML_PARAGRAPH_START_MARGIN,
+ XML_PARALLEL,
+ XML_PARAM,
+ XML_PARENT_STYLE_NAME,
+ XML_PARSE_SQL_STATEMENT,
+ XML_PARSED,
+ XML_PARTIALDIFF,
+ XML_PASSWORD,
+ XML_PASSWORT,
+ XML_PATH,
+ XML_PATH_ID,
+ XML_PAUSE,
+ XML_PENDING,
+ XML_PERCENTAGE,
+ XML_PERCENTAGE_STYLE,
+ XML_PERSPECTIVE,
+ XML_PHDTHESIS,
+ XML_PHONG,
+ XML_PIE_OFFSET,
+ XML_PLACEHOLDER,
+ XML_PLACEHOLDER_TYPE,
+ XML_PLACING,
+ XML_PLAIN_NUMBER,
+ XML_PLAIN_NUMBER_AND_NAME,
+ XML_PLAY_FULL,
+ XML_PLOT_AREA,
+ XML_PLUGIN,
+ XML_PLUS,
+ XML_POINTS,
+ XML_POLYGON,
+ XML_POLYLINE,
+ XML_POLYNOMIAL,
+ XML_POOL_ID,
+ XML_PORTRAIT,
+ XML_POSITION,
+ XML_POSITION_BOTTOM,
+ XML_POSITION_LEFT,
+ XML_POSITION_RIGHT,
+ XML_POSITION_TOP,
+ XML_POSTURE_ITALIC,
+ XML_POSTURE_NORMAL,
+ XML_POSTURE_OBLIQUE,
+ XML_POWER,
+ XML_PRECISION_AS_SHOWN,
+ XML_PREFIX,
+ XML_PRESENTATION,
+ XML_PRESENTATION_CHART,
+ XML_PRESENTATION_GRAPHIC,
+ XML_PRESENTATION_NOTES,
+ XML_PRESENTATION_OBJECT,
+ XML_PRESENTATION_ORGCHART,
+ XML_PRESENTATION_OUTLINE,
+ XML_PRESENTATION_PAGE,
+ XML_PRESENTATION_PAGE_LAYOUT,
+ XML_PRESENTATION_PAGE_LAYOUT_NAME,
+ XML_PRESENTATION_SUBTITLE,
+ XML_PRESENTATION_TABLE,
+ XML_PRESENTATION_TITLE,
+ XML_PREVIOUS,
+ XML_PREVIOUS_PAGE,
+ XML_PRINT,
+ XML_PRINT_CONTENT,
+ XML_PRINT_DATE,
+ XML_PRINT_ORIENTATION,
+ XML_PRINT_PAGE_ORDER,
+ XML_PRINT_RANGE,
+ XML_PRINT_RANGES,
+ XML_PRINT_TIME,
+ XML_PRINTABLE,
+ XML_PRINTED_BY,
+ XML_PROCEEDINGS,
+ XML_PRODUCT,
+ XML_PROJECTION,
+ XML_PROPERTIES,
+ XML_PROTECT,
+ XML_PROTECT_CONTENT,
+ XML_PROTECT_POSITION,
+ XML_PROTECT_SIZE,
+ XML_PROTECTED,
+ XML_PROTECTION_KEY,
+ XML_PROTECTION_KEY_DIGEST_ALGORITHM,
+ XML_PROTECTION_KEY_DIGEST_ALGORITHM_2,
+ XML_PRSUBSET,
+ XML_PUBLISHER,
+ XML_PUNCTUATION_WRAP,
+ XML_PURPLE,
+ XML_PYRAMID,
+ XML_QUARTER,
+ XML_QUERY_NAME,
+ XML_QUO_VADIS,
+ XML_QUOTIENT,
+ XML_R,
+ XML_RADAR,
+ XML_RANDOM,
+ XML_RANGE_ADDRESS,
+ XML_RANGE_USABLE_AS,
+ XML_RECREATE_ON_EDIT,
+ XML_RECT,
+ XML_RED,
+ XML_REF_NAME,
+ XML_REFERENCE,
+ XML_REFERENCE_END,
+ XML_REFERENCE_FORMAT,
+ XML_REFERENCE_MARK,
+ XML_REFERENCE_MARK_END,
+ XML_REFERENCE_MARK_START,
+ XML_REFERENCE_REF,
+ XML_REFERENCE_START,
+ XML_REFERENCE_TYPE,
+ XML_REFRESH_DELAY,
+ XML_REGION_CENTER,
+ XML_REGION_LEFT,
+ XML_REGION_RIGHT,
+ XML_REGISTER_TRUE,
+ XML_REGISTER_TRUTH_REF_STYLE_NAME,
+ XML_REGRESSION_TYPE,
+ XML_REJECTED,
+ XML_REJECTING_CHANGE_ID,
+ XML_REJECTION,
+ XML_REL_COLUMN_WIDTH,
+ XML_REL_HEIGHT,
+ XML_REL_WIDTH,
+ XML_RELATIVE,
+ XML_RELATIVE_TAB_STOP_POSITION,
+ XML_RELN,
+ XML_REM,
+ XML_REMOVE_DEPENDENTS,
+ XML_REMOVE_PRECEDENTS,
+ XML_REPEAT,
+ XML_REPEAT_COLUMN,
+ XML_REPEAT_ROW,
+ XML_REPEATED,
+ XML_REPLACE,
+ XML_REPORT_TYPE,
+ XML_RESTART_ON_PAGE,
+ XML_REVISION,
+ XML_RIDGE,
+ XML_RIGHT,
+ XML_RIGHT_OUTSIDE,
+ XML_RIGHTARC,
+ XML_RIGHTCIRCLE,
+ XML_RING,
+ XML_ROLE,
+ XML_ROLL_FROM_BOTTOM,
+ XML_ROLL_FROM_LEFT,
+ XML_ROLL_FROM_RIGHT,
+ XML_ROMAN,
+ XML_ROOT,
+ XML_ROTATE,
+ XML_ROTATION,
+ XML_ROTATION_ALIGN,
+ XML_ROTATION_ANGLE,
+ XML_ROUND,
+ XML_ROW,
+ XML_ROW_HEIGHT,
+ XML_ROW_NUMBER,
+ XML_ROWS,
+ XML_RUBY,
+ XML_RUBY_ALIGN,
+ XML_RUBY_BASE,
+ XML_RUBY_POSITION,
+ XML_RUBY_TEXT,
+ XML_RUN_THROUGH,
+ XML_RX,
+ XML_RY,
+ XML_S,
+ XML_SCALE,
+ XML_SCALE_MIN,
+ XML_SCALE_TEXT,
+ XML_SCALE_TO,
+ XML_SCALE_TO_PAGES,
+ XML_SCATTER,
+ XML_SCENARIO,
+ XML_SCENARIO_RANGES,
+ XML_SCENE,
+ XML_SCHOOL,
+ XML_SCIENTIFIC_NUMBER,
+ XML_SCORE_SPACES,
+ XML_SCRIPT,
+ XML_SCROLL,
+ XML_SDEV,
+ XML_SEARCH_CRITERIA_MUST_APPLY_TO_WHOLE_CELL,
+ XML_SEC,
+ XML_SECH,
+ XML_SECOND_DATE_TIME,
+ XML_SECONDS,
+ XML_SECTION,
+ XML_SECTION_DESC,
+ XML_SECTION_NAME,
+ XML_SECTION_SOURCE,
+ XML_SELECT_PAGE,
+ XML_SELECT_PROTECTED_CELLS,
+ XML_SELECT_UNPROTECTED_CELLS,
+ XML_SELECTOR,
+ XML_SEMANTICS,
+ XML_SEMI_AUTOMATIC,
+ XML_SENDER_CITY,
+ XML_SENDER_COMPANY,
+ XML_SENDER_COUNTRY,
+ XML_SENDER_EMAIL,
+ XML_SENDER_FAX,
+ XML_SENDER_FIRSTNAME,
+ XML_SENDER_INITIALS,
+ XML_SENDER_LASTNAME,
+ XML_SENDER_PHONE_PRIVATE,
+ XML_SENDER_PHONE_WORK,
+ XML_SENDER_POSITION,
+ XML_SENDER_POSTAL_CODE,
+ XML_SENDER_STATE_OR_PROVINCE,
+ XML_SENDER_STREET,
+ XML_SENDER_TITLE,
+ XML_SEP,
+ XML_SEPARATION_CHARACTER,
+ XML_SEPARATOR,
+ XML_SEQUENCE,
+ XML_SEQUENCE_DECL,
+ XML_SEQUENCE_DECLS,
+ XML_SEQUENCE_REF,
+ XML_SERIES,
+ XML_SERIES_SOURCE,
+ XML_SERVER_MAP,
+ XML_SET,
+ XML_SETDIFF,
+ XML_SETTINGS,
+ XML_SHADE_MODE,
+ XML_SHADOW,
+ XML_SHADOW_COLOR,
+ XML_SHADOW_OFFSET_X,
+ XML_SHADOW_OFFSET_Y,
+ XML_SHADOW_SLANT,
+ XML_SHADOW_TRANSPARENCY,
+ XML_SHAPE,
+ XML_SHAPE_ID,
+ XML_SHAPES,
+ XML_SHEET_NAME,
+ XML_SHININESS,
+ XML_SHORT,
+ XML_SHOW,
+ XML_SHOW_ACCEPTED_CHANGES,
+ XML_SHOW_CHANGES,
+ XML_SHOW_CHANGES_BY_AUTHOR,
+ XML_SHOW_CHANGES_BY_AUTHOR_NAME,
+ XML_SHOW_CHANGES_BY_COMMENT,
+ XML_SHOW_CHANGES_BY_COMMENT_TEXT,
+ XML_SHOW_CHANGES_BY_DATETIME,
+ XML_SHOW_CHANGES_BY_DATETIME_FIRST_DATETIME,
+ XML_SHOW_CHANGES_BY_DATETIME_MODE,
+ XML_SHOW_CHANGES_BY_DATETIME_SECOND_DATETIME,
+ XML_SHOW_CHANGES_BY_RANGES,
+ XML_SHOW_CHANGES_BY_RANGES_LIST,
+ XML_SHOW_LOGO,
+ XML_SHOW_REJECTED_CHANGES,
+ XML_SHOW_SHAPE,
+ XML_SHOW_TEXT,
+ XML_SHOW_UNIT,
+ XML_SHOWS,
+ XML_SIDE_BY_SIDE,
+ XML_SILVER,
+ XML_SIMPLE,
+ XML_SIN,
+ XML_SINCE_DATE_TIME,
+ XML_SINCE_SAVE,
+ XML_SINH,
+ XML_SIZE,
+ XML_SIZE_PROTECT,
+ XML_SLANT,
+ XML_SLANT_X,
+ XML_SLANT_Y,
+ XML_SLIDE,
+ XML_SLOW,
+ XML_SOLID,
+ XML_SOLID_TYPE,
+ XML_SORT,
+ XML_SORT_ASCENDING,
+ XML_SORT_BY,
+ XML_SORT_BY_POSITION,
+ XML_SORT_GROUPS,
+ XML_SORT_KEY,
+ XML_SOUND,
+ XML_SOURCE_CELL_RANGE,
+ XML_SOURCE_CELL_RANGE_ADDRESSES,
+ XML_SOURCE_FIELD_NAME,
+ XML_SOURCE_NAME,
+ XML_SOURCE_RANGE_ADDRESS,
+ XML_SOURCE_SERVICE,
+ XML_SPACE_BEFORE,
+ XML_SPAN,
+ XML_SPECULAR,
+ XML_SPECULAR_COLOR,
+ XML_SPEED,
+ XML_SPHERE,
+ XML_SPIRAL,
+ XML_SPIRAL_IN,
+ XML_SPIRAL_INWARD_LEFT,
+ XML_SPIRAL_INWARD_RIGHT,
+ XML_SPIRAL_OUT,
+ XML_SPIRAL_OUTWARD_LEFT,
+ XML_SPIRAL_OUTWARD_RIGHT,
+ XML_SPIRALIN_LEFT,
+ XML_SPIRALIN_RIGHT,
+ XML_SPIRALOUT_LEFT,
+ XML_SPIRALOUT_RIGHT,
+ XML_SPLINES,
+ XML_SPLIT,
+ XML_SPLIT_COLUMN,
+ XML_SPLIT_POSITION,
+ XML_SPLIT_ROW,
+ XML_SPREADSHEET,
+ XML_SQL_STATEMENT,
+ XML_STACKED,
+ XML_STAGGER_EVEN,
+ XML_STAGGER_ODD,
+ XML_STANDARD,
+ XML_STANDARD_DEVIATION,
+ XML_STARBASIC,
+ XML_START,
+ XML_START_ANGLE,
+ XML_START_COLOR,
+ XML_START_COLUMN,
+ XML_START_GLUE_POINT,
+ XML_START_GUIDE,
+ XML_START_INTENSITY,
+ XML_START_LINE_SPACING_HORIZONTAL,
+ XML_START_LINE_SPACING_VERTICAL,
+ XML_START_NUMBERING_AT,
+ XML_START_PAGE,
+ XML_START_POSITION,
+ XML_START_ROW,
+ XML_START_SCALE,
+ XML_START_SHAPE,
+ XML_START_TABLE,
+ XML_START_VALUE,
+ XML_START_WITH_NAVIGATOR,
+ XML_STATISTICS,
+ XML_STATUS,
+ XML_STAY_ON_TOP,
+ XML_STDEV,
+ XML_STDEVP,
+ XML_STEPS,
+ XML_STOCK,
+ XML_STOCK_UPDOWN_BARS,
+ XML_STOCK_WITH_VOLUME,
+ XML_STOP,
+ XML_STRETCH,
+ XML_STRETCH_FROM_BOTTOM,
+ XML_STRETCH_FROM_LEFT,
+ XML_STRETCH_FROM_RIGHT,
+ XML_STRETCH_FROM_TOP,
+ XML_STRETCHY,
+ XML_STRICT,
+ XML_STRING,
+ XML_STRING_VALUE,
+ XML_STRING_VALUE_IF_FALSE,
+ XML_STRING_VALUE_IF_TRUE,
+ XML_STRIPES,
+ XML_STROKE,
+ XML_STROKE_COLOR,
+ XML_STROKE_DASH,
+ XML_STROKE_LINEJOIN,
+ XML_STROKE_OPACITY,
+ XML_STROKE_WIDTH,
+ XML_STRUCTURE_PROTECTED,
+ XML_STYLE,
+ XML_STYLE_NAME,
+ XML_STYLES,
+ XML_STYLESHEET,
+ XML_SUB_TABLE,
+ XML_SUBJECT,
+ XML_SUBSET,
+ XML_SUBTITLE,
+ XML_SUBTOTAL_FIELD,
+ XML_SUBTOTAL_RULE,
+ XML_SUBTOTAL_RULES,
+ XML_SUFFIX,
+ XML_SUM,
+ XML_SWISS,
+ XML_SYMBOL,
+ XML_SYMBOL_HEIGHT,
+ XML_SYMBOL_IMAGE_NAME,
+ XML_SYMBOL_WIDTH,
+ XML_SYSTEM,
+ XML_TAB_COLOR,
+ XML_TAB_STOP,
+ XML_TAB_STOP_DISTANCE,
+ XML_TAB_STOPS,
+ XML_TABLE,
+ XML_TABLE_BACKGROUND,
+ XML_TABLE_CELL,
+ XML_TABLE_CENTERING,
+ XML_TABLE_COLUMN,
+ XML_TABLE_COLUMN_GROUP,
+ XML_TABLE_COLUMNS,
+ XML_TABLE_COUNT,
+ XML_TABLE_HEADER,
+ XML_TABLE_HEADER_COLUMNS,
+ XML_TABLE_HEADER_ROWS,
+ XML_TABLE_INDEX,
+ XML_TABLE_INDEX_ENTRY_TEMPLATE,
+ XML_TABLE_INDEX_SOURCE,
+ XML_TABLE_NAME,
+ XML_TABLE_NUMBER_LIST,
+ XML_TABLE_OF_CONTENT,
+ XML_TABLE_OF_CONTENT_ENTRY_TEMPLATE,
+ XML_TABLE_OF_CONTENT_SOURCE,
+ XML_TABLE_PAGE,
+ XML_TABLE_PROTECTION,
+ XML_TABLE_ROW,
+ XML_TABLE_ROW_GROUP,
+ XML_TABLE_ROWS,
+ XML_TABLE_SOURCE,
+ XML_TABLE_VIEW,
+ XML_TABLES,
+ XML_TAN,
+ XML_TANH,
+ XML_TARGET_CELL_ADDRESS,
+ XML_TARGET_FRAME_NAME,
+ XML_TARGET_RANGE_ADDRESS,
+ XML_TB_RL,
+ XML_TEAL,
+ XML_TECHREPORT,
+ XML_TEMPLATE,
+ XML_TEMPLATE_NAME,
+ XML_TENDSTO,
+ XML_TEX_FILTER,
+ XML_TEX_GENERATION_MODE_X,
+ XML_TEX_GENERATION_MODE_Y,
+ XML_TEX_KIND,
+ XML_TEX_MODE,
+ XML_TEXT,
+ XML_TEXT_ALIGN,
+ XML_TEXT_ALIGN_LAST,
+ XML_TEXT_ALIGN_SOURCE,
+ XML_TEXT_AUTOSPACE,
+ XML_TEXT_BACKGROUND_COLOR,
+ XML_TEXT_BLINKING,
+ XML_TEXT_BOX,
+ XML_TEXT_COMBINE,
+ XML_TEXT_COMBINE_END_CHAR,
+ XML_TEXT_COMBINE_START_CHAR,
+ XML_TEXT_CONTENT,
+ XML_TEXT_CROSSING_OUT,
+ XML_TEXT_EMPHASIZE,
+ XML_TEXT_GLOBAL,
+ XML_TEXT_INDENT,
+ XML_TEXT_INPUT,
+ XML_TEXT_JUSTIFY,
+ XML_TEXT_OUTLINE,
+ XML_TEXT_POSITION,
+ XML_TEXT_ROTATION_ANGLE,
+ XML_TEXT_ROTATION_SCALE,
+ XML_TEXT_SCALE,
+ XML_TEXT_SHADOW,
+ XML_TEXT_STYLE,
+ XML_TEXT_TRANSFORM,
+ XML_TEXT_UNDERLINE,
+ XML_TEXT_UNDERLINE_COLOR,
+ XML_TEXTAREA_HORIZONTAL_ALIGN,
+ XML_TEXTAREA_VERTICAL_ALIGN,
+ XML_TEXTUAL,
+ XML_THICK,
+ XML_THIN,
+ XML_THREE_DIMENSIONAL,
+ XML_THUMBNAIL,
+ XML_TICK_MARKS_MAJOR_INNER,
+ XML_TICK_MARKS_MAJOR_OUTER,
+ XML_TICK_MARKS_MINOR_INNER,
+ XML_TICK_MARKS_MINOR_OUTER,
+ XML_TILE_REPEAT_OFFSET,
+ XML_TIME,
+ XML_TIME_ADJUST,
+ XML_TIME_STYLE,
+ XML_TIME_VALUE,
+ XML_TIMES,
+ XML_TITLE,
+ XML_TO_ANOTHER_TABLE,
+ XML_TO_BOTTOM,
+ XML_TO_CENTER,
+ XML_TO_LEFT,
+ XML_TO_LOWER_LEFT,
+ XML_TO_LOWER_RIGHT,
+ XML_TO_RIGHT,
+ XML_TO_TOP,
+ XML_TO_UPPER_LEFT,
+ XML_TO_UPPER_RIGHT,
+ XML_TOC_MARK,
+ XML_TOC_MARK_END,
+ XML_TOC_MARK_START,
+ XML_TOP,
+ XML_TOP_LEFT,
+ XML_TOP_PERCENT,
+ XML_TOP_RIGHT,
+ XML_TOP_VALUES,
+ XML_TOPARC,
+ XML_TOPCIRCLE,
+ XML_TRACE_DEPENDENTS,
+ XML_TRACE_ERRORS,
+ XML_TRACE_PRECEDENTS,
+ XML_TRACK_CHANGES,
+ XML_TRACKED_CHANGES,
+ XML_TRACKED_CHANGES_VIEW_SETTINGS,
+ XML_TRANSFORM,
+ XML_TRANSITION_ON_CLICK,
+ XML_TRANSPARENCY,
+ XML_TRANSPARENCY_NAME,
+ XML_TRANSPARENT,
+ XML_TRANSPOSE,
+ XML_TRUE,
+ XML_TRUNCATE_ON_OVERFLOW,
+ XML_TTB,
+ XML_TYPE,
+ XML_DOT_DASH,
+ XML_DOT_DOT_DASH,
+ XML_LONG_DASH,
+ XML_SINGLE,
+ XML_SMALL_WAVE,
+ XML_WAVE,
+ XML_UNFORMATTED_TEXT,
+ XML_UNION,
+ XML_UNIT,
+ XML_UNORDERED_LIST,
+ XML_UNPUBLISHED,
+ XML_UP,
+ XML_UPLIMIT,
+ XML_UPRIGHT,
+ XML_URL,
+ XML_USE_CAPTION,
+ XML_USE_CELL_PROTECTION,
+ XML_USE_CHART_OBJECTS,
+ XML_USE_CONDITION,
+ XML_USE_DRAW_OBJECTS,
+ XML_USE_FLOATING_FRAMES,
+ XML_USE_GRAPHICS,
+ XML_USE_IMAGE_OBJECTS,
+ XML_USE_INDEX_MARKS,
+ XML_USE_INDEX_SOURCE_STYLES,
+ XML_USE_KEYS_AS_ENTRIES,
+ XML_USE_LABEL,
+ XML_USE_MATH_OBJECTS,
+ XML_USE_OBJECTS,
+ XML_USE_OPTIMAL_COLUMN_WIDTH,
+ XML_USE_OPTIMAL_ROW_HEIGHT,
+ XML_USE_OTHER_OBJECTS,
+ XML_USE_SPREADSHEET_OBJECTS,
+ XML_USE_STYLES,
+ XML_USE_TABLES,
+ XML_USE_WINDOW_FONT_COLOR,
+ XML_USED_HIERARCHY,
+ XML_USER_DEFINED,
+ XML_USER_FIELD_DECL,
+ XML_USER_FIELD_DECLS,
+ XML_USER_FIELD_GET,
+ XML_USER_FIELD_INPUT,
+ XML_USER_INDEX,
+ XML_USER_INDEX_ENTRY_TEMPLATE,
+ XML_USER_INDEX_MARK,
+ XML_USER_INDEX_MARK_END,
+ XML_USER_INDEX_MARK_START,
+ XML_USER_INDEX_SOURCE,
+ XML_USER_TRANSFORMED,
+ XML_USERNAME,
+ XML_VALUE,
+ XML_VALUE_TYPE,
+ XML_VALUES_CELL_RANGE_ADDRESS,
+ XML_VAR,
+ XML_VARIABLE,
+ XML_VARIABLE_DECL,
+ XML_VARIABLE_DECLS,
+ XML_VARIABLE_GET,
+ XML_VARIABLE_INPUT,
+ XML_VARIABLE_SET,
+ XML_VARIANCE,
+ XML_VARP,
+ XML_VECTOR,
+ XML_VERB,
+ XML_VERSION,
+ XML_VERSION_ENTRY,
+ XML_VERSION_LIST,
+ XML_VERTICAL,
+ XML_VERTICAL_ALIGN,
+ XML_VERTICAL_JUSTIFY,
+ XML_VERTICAL_LINES,
+ XML_VERTICAL_POS,
+ XML_VERTICAL_REL,
+ XML_VERTICAL_SEGMENTS,
+ XML_VERTICAL_SPLIT_MODE,
+ XML_VERTICAL_SPLIT_POSITION,
+ XML_VERTICAL_STRIPES,
+ XML_VIEW,
+ XML_VIEWBOX,
+ XML_VIEW_ID,
+ XML_VIEW_SETTINGS,
+ XML_VISIBILITY,
+ XML_VISIBLE,
+ XML_VISIBLE_AREA,
+ XML_VISIBLE_AREA_HEIGHT,
+ XML_VISIBLE_AREA_LEFT,
+ XML_VISIBLE_AREA_TOP,
+ XML_VISIBLE_AREA_WIDTH,
+ XML_VISITED_STYLE_NAME,
+ XML_VOLATILE,
+ XML_VOLUME,
+ XML_VPN,
+ XML_VRP,
+ XML_VUP,
+ XML_WALL,
+ XML_WARNING,
+ XML_WATERMARK,
+ XML_WAVYLINE,
+ XML_WAVYLINE_FROM_BOTTOM,
+ XML_WAVYLINE_FROM_LEFT,
+ XML_WAVYLINE_FROM_RIGHT,
+ XML_WAVYLINE_FROM_TOP,
+ XML_WEEK_OF_YEAR,
+ XML_WEIGHT_BOLD,
+ XML_WEIGHT_NORMAL,
+ XML_WHITE,
+ XML_WHOLE_PAGE,
+ XML_WIDOWS,
+ XML_WIDTH,
+ XML_WORD,
+ XML_WORD_COUNT,
+ XML_WRAP,
+ XML_WRAP_CONTOUR,
+ XML_WRAP_CONTOUR_MODE,
+ XML_WRAP_OPTION,
+ XML_WRITING_MODE,
+ XML_WWW,
+ XML_X,
+ XML_X1,
+ XML_X2,
+ XML_X_MAC_ROMAN,
+ XML_X_SYMBOL,
+ XML_X_SYSTEM,
+ XML_XOR,
+ XML_Y,
+ XML_Y1,
+ XML_Y2,
+ XML_YEAR,
+ XML_YELLOW,
+ XML_ZERO_VALUES,
+ XML_ZINDEX,
+ XML_ZOOM_TYPE,
+ XML_ZOOM_VALUE,
+
+ XML_ENABLE,
+ XML_USE_REGULAR_EXPRESSIONS,
+ XML_DATA_SOURCE_HAS_LABELS,
+ XML_LINK_DATA_STYLE_TO_SOURCE,
+ XML_SORT_ALGORITHM,
+ XML_STRAIGHT_LINE,
+ XML_ANGLED_LINE,
+ XML_ANGLED_CONNECTOR_LINE,
+ XML_APPLICATION_X_WWW_FORM_URLENCODED,
+ XML_MULTIPART_FORMDATA,
+ XML_APPLICATION_TEXT,
+ XML_GET,
+ XML_POST,
+ XML_QUERY,
+ XML_PARENT,
+ XML_RECORDS,
+ XML_PUSH,
+ XML_SUBMIT,
+ XML_RESET,
+ XML_VALUE_LIST,
+ XML_SQL,
+ XML_SQL_PASS_THROUGH,
+ XML_TABLE_FIELDS,
+ XML_UNCHECKED,
+ XML_CHECKED,
+ XML_UNKNOWN,
+
+ XML_ROLL_FROM_TOP,
+
+ XML_BINARY_DATA,
+ XML_NOTIFY_ON_UPDATE_OF_TABLE,
+
+ XML_0,
+ XML_PLAY,
+ XML_HANDOUT_MASTER,
+ XML_TEXT_STYLE_NAME,
+ XML_ESCAPE_DIRECTION,
+ XML_GLUE_POINT,
+ XML_PRIMARY_X,
+ XML_SECONDARY_X,
+ XML_PRIMARY_Y,
+ XML_SECONDARY_Y,
+ XML_PRIMARY_Z,
+
+ XML_CAPTION_TYPE,
+ XML_CAPTION_ANGLE_TYPE,
+ XML_CAPTION_ANGLE,
+ XML_CAPTION_GAP,
+ XML_CAPTION_ESCAPE_DIRECTION,
+ XML_CAPTION_ESCAPE,
+ XML_CAPTION_LINE_LENGTH,
+ XML_CAPTION_FIT_LINE_LENGTH,
+ XML_FREE,
+
+ XML_TRANSITION_TYPE,
+ XML_TRANSITION_STYLE,
+ XML_TRANSITION_SPEED,
+ XML_DURATION,
+ XML_BACKGROUND_SIZE,
+ XML_BACKGROUND_OBJECTS_VISIBLE,
+ XML_BACKGROUND_VISIBLE,
+
+ XML_MOVE_FROM_UPPERLEFT,
+ XML_MOVE_FROM_UPPERRIGHT,
+ XML_MOVE_FROM_LOWERRIGHT,
+ XML_MOVE_FROM_LOWERLEFT,
+ XML_UNCOVER_TO_LEFT,
+ XML_UNCOVER_TO_UPPERLEFT,
+ XML_UNCOVER_TO_TOP,
+ XML_UNCOVER_TO_UPPERRIGHT,
+ XML_UNCOVER_TO_RIGHT,
+ XML_UNCOVER_TO_LOWERRIGHT,
+ XML_UNCOVER_TO_BOTTOM,
+ XML_UNCOVER_TO_LOWERLEFT,
+ XML_VERTICAL_CHECKERBOARD,
+ XML_HORIZONTAL_CHECKERBOARD,
+ XML_NOTIFY_ON_UPDATE_OF_RANGES,
+ XML_BYTE,
+ XML_MACRO,
+ XML_LOCATION,
+ XML_APPLICATION,
+ XML_SYMBOL_IMAGE,
+ XML_TEXT_OVERLAP,
+ XML_SPLINE_ORDER,
+ XML_SPLINE_RESOLUTION,
+
+ XML_PAPER_TRAY_NAME,
+
+ XML_COLUMN_MAPPING,
+ XML_ROW_MAPPING,
+
+ XML_TABLE_FORMULA,
+
+ XML_EMBEDDED_TEXT,
+
+ XML_MERGE_LAST_PARAGRAPH,
+
+ XML_STOCK_LOSS_MARKER,
+ XML_STOCK_GAIN_MARKER,
+ XML_STOCK_RANGE_LINE,
+
+ XML_RL_TB,
+ XML_TB_LR,
+ XML_LR,
+ XML_RL,
+ XML_TB,
+
+ XML_LAYOUT_GRID_COLOR,
+ XML_LAYOUT_GRID_LINES,
+ XML_LAYOUT_GRID_BASE_HEIGHT,
+ XML_LAYOUT_GRID_RUBY_HEIGHT,
+ XML_LAYOUT_GRID_MODE,
+ XML_LAYOUT_GRID_RUBY_BELOW,
+ XML_LAYOUT_GRID_PRINT,
+ XML_LAYOUT_GRID_DISPLAY,
+
+ //text grid enhancement for better CJK support
+ XML_DEFAULT_PAGE_LAYOUT,
+ XML_LAYOUT_GRID_STANDARD_MODE,
+ XML_LAYOUT_GRID_BASE_WIDTH,
+ XML_LAYOUT_GRID_SNAP_TO_CHARS,
+
+ XML_SNAP_TO_LAYOUT_GRID,
+ XML_DONT_BALANCE_TEXT_COLUMNS,
+
+ XML_GLYPH_ORIENTATION_VERTICAL,
+
+ XML_MARKED_INVALID,
+
+ XML_REGRESSION_CURVE,
+ XML_ERROR_INDICATOR,
+
+ XML_TABLE_TYPE,
+
+ XML_DISPLAY_FACTOR,
+
+ XML_TRANSLITERATION_FORMAT,
+ XML_TRANSLITERATION_LANGUAGE,
+ XML_TRANSLITERATION_COUNTRY,
+ XML_TRANSLITERATION_STYLE,
+
+ XML_KEY1_PHONETIC,
+ XML_KEY2_PHONETIC,
+ XML_STRING_VALUE_PHONETIC,
+
+ XML_BACKGROUND_TRANSPARENCY,
+ XML_BACKGROUND_IMAGE_TRANSPARENCY,
+
+ XML_DYNAMIC_SPACING,
+ XML_MAIN_ENTRY,
+
+ XML_USE_OUTLINE_LEVEL,
+
+ // #107245# New 3D properties which are possible for lathe and extrude 3d objects
+ XML_CLOSE_FRONT,
+ XML_CLOSE_BACK,
+
+ XML_DROPDOWN,
+ XML_CURRENT_SELECTED,
+
+ XML_JOIN_BORDER,
+
+ XML_DISPLAY_LIST,
+ XML_NO,
+ XML_UNSORTED,
+ XML_SORTED_ASCENDING,
+ XML_FONT_INDEPENDENT_LINE_SPACING,
+
+ XML_DATABASE,
+ XML_DATASOURCE,
+ XML_QUERIES,
+ XML_REPORTS,
+ XML_REPORT,
+ XML_AS_TEMPLATE,
+
+ XML_CONNECTION_RESOURCE,
+ XML_SUPPRESS_VERSION_COLUMNS,
+ XML_JAVA_DRIVER_CLASS,
+ XML_EXTENSION,
+ XML_IS_FIRST_ROW_HEADER_LINE,
+ XML_SHOW_DELETED,
+ XML_IS_TABLE_NAME_LENGTH_LIMITED,
+ XML_SYSTEM_DRIVER_SETTINGS,
+ XML_ENABLE_SQL92_CHECK,
+ XML_APPEND_TABLE_ALIAS_NAME,
+ XML_PARAMETER_NAME_SUBSTITUTION,
+ XML_IGNORE_DRIVER_PRIVILEGES,
+ XML_BOOLEAN_COMPARISON_MODE,
+ XML_USE_CATALOG,
+ XML_BASE_DN,
+ XML_MAX_ROW_COUNT,
+ XML_LOGIN,
+ XML_USER_NAME,
+ XML_IS_PASSWORD_REQUIRED,
+ XML_LOGIN_TIMEOUT,
+ XML_DELIMITER,
+ XML_FIELD,
+ XML_DECIMAL,
+ XML_THOUSAND,
+ XML_TABLE_FILTER,
+ XML_TABLE_FILTER_PATTERN,
+ XML_TABLE_TYPE_FILTER,
+ XML_AUTO_INCREMENT,
+ XML_ADDITIONAL_COLUMN_STATEMENT,
+ XML_ROW_RETRIEVING_STATEMENT,
+ XML_DATA_SOURCE_SETTINGS,
+ XML_DATA_SOURCE_SETTING,
+ XML_DATA_SOURCE_SETTING_VALUE,
+ XML_DATA_SOURCE_SETTING_IS_LIST,
+ XML_DATA_SOURCE_SETTING_TYPE,
+ XML_DATA_SOURCE_SETTING_NAME,
+ XML_COMPONENT,
+ XML_COMPONENT_COLLECTION,
+ XML_QUERY_COLLECTION,
+ XML_UPDATE_TABLE,
+ XML_FILTER_STATEMENT,
+ XML_ORDER_STATEMENT,
+ XML_ESCAPE_PROCESSING,
+ XML_KEYS,
+ XML_INDICES,
+ XML_TYPE_NAME,
+ XML_PRECISION,
+ XML_IS_NULLABLE,
+ XML_IS_AUTOINCREMENT,
+ XML_DEFAULT_VALUE,
+ XML_REFERENCED_TABLE_NAME,
+ XML_UPDATE_RULE,
+ XML_DELETE_RULE,
+ XML_KEY_COLUMNS,
+ XML_KEY_COLUMN,
+ XML_RELATED_COLUMN_NAME,
+ XML_CATALOG_NAME,
+ XML_IS_UNIQUE,
+ XML_IS_CLUSTERED,
+ XML_INDEX_COLUMNS,
+ XML_INDEX_COLUMN,
+ XML_IS_ASCENDING,
+ XML_SCHEMA_NAME,
+ XML_NP_DB,
+ XML_N_DB,
+ XML_APPLY_FILTER,
+ XML_APPLY_ORDER,
+ XML_AUTOMATIC_PRINT_RANGE,
+
+ XML_SELECTION,
+ XML_SELECTION_INDEXES,
+
+ XML_SCALE_TO_X,
+ XML_SCALE_TO_Y,
+
+ XML_KEEP_TOGETHER,
+
+ XML_USE_HEADER_NAME,
+ XML_USE_FOOTER_NAME,
+ XML_USE_DATE_TIME_NAME,
+ XML_DISPLAY_HEADER,
+ XML_DISPLAY_FOOTER,
+ XML_DISPLAY_PAGE_NUMBER,
+ XML_DISPLAY_DATE_TIME,
+ XML_SOURCE,
+ XML_CURRENT_DATE,
+
+ XML_HEADER_DECL,
+ XML_FOOTER_DECL,
+ XML_DATE_TIME_DECL,
+
+ XML_SELECTED_PAGE,
+
+ // DVO, OD 01.10.2003 #i18732
+ XML_FLOW_WITH_TEXT,
+
+ XML_WITH_TAB, // #i21237#
+
+ XML_CUSTOM_SHAPE,
+ XML_ENGINE,
+ XML_ENHANCED_GEOMETRY,
+ XML_TEXT_ROTATE_ANGLE,
+ XML_MIRROR_VERTICAL,
+ XML_MIRROR_HORIZONTAL,
+ XML_EXTRUSION_ALLOWED,
+ XML_TEXT_PATH_ALLOWED,
+ XML_CONCENTRIC_GRADIENT_FILL_ALLOWED,
+ XML_EXTRUSION,
+ XML_EXTRUSION_BRIGHTNESS,
+ XML_EXTRUSION_DEPTH,
+ XML_EXTRUSION_DIFFUSION,
+ XML_EXTRUSION_NUMBER_OF_LINE_SEGMENTS,
+ XML_EXTRUSION_LIGHT_FACE,
+ XML_EXTRUSION_FIRST_LIGHT_HARSH,
+ XML_EXTRUSION_SECOND_LIGHT_HARSH,
+ XML_EXTRUSION_FIRST_LIGHT_LEVEL,
+ XML_EXTRUSION_SECOND_LIGHT_LEVEL,
+ XML_EXTRUSION_FIRST_LIGHT_DIRECTION,
+ XML_EXTRUSION_SECOND_LIGHT_DIRECTION,
+ XML_EXTRUSION_METAL,
+ XML_EXTRUSION_ROTATION_ANGLE,
+ XML_EXTRUSION_ROTATION_CENTER,
+ XML_EXTRUSION_SHININESS,
+ XML_EXTRUSION_SKEW,
+ XML_EXTRUSION_SPECULARITY,
+ XML_EXTRUSION_PROJECTION_MODE,
+ XML_EXTRUSION_VIEWPOINT,
+ XML_EXTRUSION_ORIGIN,
+ XML_EXTRUSION_COLOR,
+ XML_SECONDARY_FILL_COLOR,
+ XML_ENHANCED_PATH,
+ XML_PATH_STRETCHPOINT_X,
+ XML_PATH_STRETCHPOINT_Y,
+ XML_TEXT_AREAS,
+ XML_GLUE_POINTS,
+ XML_GLUE_POINT_TYPE,
+ XML_GLUE_POINT_LEAVING_DIRECTIONS,
+ XML_TEXT_PATH,
+ XML_TEXT_PATH_MODE,
+ XML_TEXT_PATH_SCALE,
+ XML_TEXT_PATH_SAME_LETTER_HEIGHTS,
+ XML_MODIFIERS,
+ XML_EQUATION,
+ XML_XSTRETCH,
+ XML_YSTRETCH,
+ XML_HASSTROKE,
+ XML_HASFILL,
+ XML_LOGWIDTH,
+ XML_LOGHEIGHT,
+ XML_HANDLE,
+ XML_HANDLE_MIRROR_VERTICAL,
+ XML_HANDLE_MIRROR_HORIZONTAL,
+ XML_HANDLE_SWITCHED,
+ XML_HANDLE_POSITION,
+ XML_HANDLE_RANGE_X_MINIMUM,
+ XML_HANDLE_RANGE_X_MAXIMUM,
+ XML_HANDLE_RANGE_Y_MINIMUM,
+ XML_HANDLE_RANGE_Y_MAXIMUM,
+ XML_HANDLE_POLAR,
+ XML_HANDLE_RADIUS_RANGE_MINIMUM,
+ XML_HANDLE_RADIUS_RANGE_MAXIMUM,
+ XML_RECTANGLE,
+ XML_ROUNDRECTANGLE,
+ XML_OVAL,
+ XML_CLOUD,
+ XML_BOUNDINGCUBE,
+ XML_WIREFRAME,
+ XML_SEGMENTS,
+ XML_WORD_WRAP,
+
+ XML_COLLAPSING,
+ XML_SEPARATING,
+ XML_BORDER_MODEL,
+
+ XML_DATA_PILOT_FIELD_REFERENCE,
+ XML_MEMBER_DIFFERENCE,
+ XML_MEMBER_PERCENTAGE,
+ XML_MEMBER_PERCENTAGE_DIFFERENCE,
+ XML_RUNNING_TOTAL,
+ XML_ROW_PERCENTAGE,
+ XML_COLUMN_PERCENTAGE,
+ XML_TOTAL_PERCENTAGE,
+ XML_FIELD_NAME,
+ XML_MEMBER_TYPE,
+ XML_NAMED,
+ XML_MEMBER_NAME,
+ XML_DISPLAY_MEMBER_MODE,
+ XML_MEMBER_COUNT,
+ XML_DATA_FIELD,
+ XML_DATA_PILOT_DISPLAY_INFO,
+ XML_SORT_MODE,
+ XML_DATA_PILOT_SORT_INFO,
+ XML_ADD_EMPTY_LINES,
+ XML_TABULAR_LAYOUT,
+ XML_OUTLINE_SUBTOTALS_TOP,
+ XML_OUTLINE_SUBTOTALS_BOTTOM,
+ XML_LAYOUT_MODE,
+ XML_DATA_PILOT_LAYOUT_INFO,
+
+ XML_SYMBOL_COLOR,
+
+ XML_3D,
+ XML_IMAGE_POSITION,
+ XML_IMAGE_ALIGN,
+
+ XML_DIAGONAL_BL_TR,
+ XML_DIAGONAL_BL_TR_WIDTH,
+ XML_DIAGONAL_TL_BR,
+ XML_DIAGONAL_TL_BR_WIDTH,
+ XML_REPEAT_CONTENT,
+ XML_SHRINK_TO_FIT,
+
+ // OD 2004-05-05 #i28701#
+ XML_WRAP_INFLUENCE_ON_POSITION,
+ // --> OD 2004-10-18 #i35017# - tokens have been renamed and
+ // <XML_ITERATIVE> has been added
+ XML_ONCE_SUCCESSIVE,
+ XML_ONCE_CONCURRENT,
+ // <--
+
+ // Names for OOo format only
+ XML_N_OFFICE_OOO,
+ XML_N_META_OOO,
+ XML_N_STYLE_OOO,
+ XML_N_NUMBER_OOO,
+ XML_N_TEXT_OOO,
+ XML_N_TABLE_OOO,
+ XML_N_DRAW_OOO,
+ XML_N_DR3D_OOO,
+ XML_N_PRESENTATION_OOO,
+ XML_N_CHART_OOO,
+ XML_N_CONFIG_OOO,
+ XML_N_FORM_OOO,
+ XML_N_SCRIPT_OOO,
+
+ XML_GLOBAL,
+ XML_NOTE_CLASS,
+ XML_NOTE_CITATION,
+ XML_NOTE_BODY,
+ XML_NOTES_CONFIGURATION,
+ XML_NOTE_REF,
+ XML_IS_SUB_TABLE,
+ XML_PAGE_LAYOUT,
+ XML_PAGE_LAYOUT_NAME,
+ XML_GRAPHIC_PROPERTIES,
+ XML_DRAWING_PAGE_PROPERTIES,
+ XML_PAGE_LAYOUT_PROPERTIES,
+ XML_HEADER_FOOTER_PROPERTIES,
+ XML_TEXT_PROPERTIES,
+ XML_PARAGRAPH_PROPERTIES,
+ XML_RUBY_PROPERTIES,
+ XML_SECTION_PROPERTIES,
+ XML_TABLE_PROPERTIES,
+ XML_TABLE_COLUMN_PROPERTIES,
+ XML_TABLE_ROW_PROPERTIES,
+ XML_TABLE_CELL_PROPERTIES,
+ XML_LIST_LEVEL_PROPERTIES,
+ XML_CHART_PROPERTIES,
+ XML_DRAWING_PAGE,
+ XML_GRAPHICS,
+ XML_TAB,
+ XML_TEXT_UNDERLINE_MODE,
+ XML_TEXT_LINE_THROUGH_MODE,
+ XML_CONTINUOUS,
+ XML_SKIP_WHITE_SPACE,
+ XML_SCRIPTS,
+ XML_FONT_FACE_DECLS,
+ XML_FONT_FACE,
+ XML_FONT_ADORNMENTS,
+ XML_INCH,
+ XML_SPACE_AFTER,
+ XML_START_INDENT,
+ XML_END_INDENT,
+
+ // chart Oasis format additions
+ XML_INTERVAL_MINOR_DIVISOR,
+ XML_DATE_STRING,
+
+ XML_TEXT_UNDERLINE_STYLE,
+ XML_TEXT_UNDERLINE_TYPE,
+ XML_TEXT_UNDERLINE_WIDTH,
+
+ XML_TEXT_OVERLINE_TYPE,
+ XML_TEXT_OVERLINE_STYLE,
+ XML_TEXT_OVERLINE_WIDTH,
+ XML_TEXT_OVERLINE_COLOR,
+ XML_TEXT_OVERLINE_MODE,
+
+ XML_TEXT_LINE_THROUGH_STYLE,
+ XML_TEXT_LINE_THROUGH_TYPE,
+ XML_TEXT_LINE_THROUGH_WIDTH,
+ XML_TEXT_LINE_THROUGH_TEXT,
+
+ XML_LEADER_STYLE,
+ XML_LEADER_TEXT,
+
+ XML_BOLD_DOTTED,
+ XML_BOLD_DASH,
+ XML_BOLD_LONG_DASH,
+ XML_BOLD_DOT_DASH,
+ XML_BOLD_DOT_DOT_DASH,
+ XML_BOLD_WAVE,
+ XML_DOUBLE_WAVE,
+ XML_DOUBLE_LINE,
+ XML_THICK_LINE,
+ XML_SINGLE_LINE,
+ XML_SLASH,
+ XML_TEXT_LINE_THROUGH_COLOR,
+ XML_TEXT_LINE_THROUGH_TEXT_STYLE,
+ XML_LEADER_COLOR,
+ XML_LEADER_TYPE,
+ XML_LEADER_WIDTH,
+ XML_LEADER_TEXT_STYLE,
+
+ XML_OPACITY,
+ XML_OPACITY_NAME,
+ XML_SHADOW_OPACITY,
+ XML_ALWAYS,
+ XML_COUNT_IN_TEXT_BOXES,
+
+ XML_NP_OOO,
+ XML_N_OOO,
+ XML_NP_OOOW,
+ XML_N_OOOW,
+ XML_NP_OOOC,
+ XML_N_OOOC,
+ XML_NP_DOM,
+ XML_N_DOM,
+
+ XML_EVENT_LISTENERS,
+ XML_EVENT_LISTENER,
+
+ XML_FORM,
+ XML_VOID,
+ XML_PROPERTY,
+ XML_PROPERTY_NAME,
+ XML_LIST_PROPERTY,
+ XML_LIST_VALUE,
+ XML_COLUMN_STYLE_NAME,
+
+ XML_TEXTAREA,
+ XML_FIXED_TEXT,
+ XML_FILE,
+ XML_FORMATTED_TEXT,
+ XML_BUTTON,
+ XML_CHECKBOX,
+ XML_RADIO,
+ XML_LISTBOX,
+ XML_COMBOBOX,
+ XML_IMAGE_FRAME,
+ XML_VALUE_RANGE,
+ XML_GENERIC_CONTROL,
+ XML_SERVICE_NAME,
+ XML_PROPERTY_TYPE,
+ XML_INTEGER,
+ XML_PROPERTY_IS_VOID,
+ XML_PROPERTY_IS_LIST,
+ XML_PROPERTY_VALUE,
+ XML_MIMETYPE,
+ XML_DATABASE_ROW_SELECT,
+ XML_CONTROL_IMPLEMENTATION,
+ XML_INTERPOLATION,
+ XML_CUBIC_SPLINE,
+ XML_B_SPLINE,
+ XML_N_DB_OASIS,
+
+ XML_SHOW_FILTER_BUTTON,
+ XML_DRILL_DOWN_ON_DOUBLE_CLICK,
+ XML_HEADER_GRID_LAYOUT,
+ XML_GROUPED_BY,
+ XML_DAYS,
+ XML_MONTHS,
+ XML_QUARTERS,
+ XML_YEARS,
+ XML_DATE_START,
+ XML_DATE_END,
+ XML_STEP,
+ XML_IS_GROUP_FIELD,
+ XML_DATA_PILOT_GROUPS,
+ XML_DATA_PILOT_GROUP,
+
+ XML_JAPANESE_CANDLE_STICK,
+ XML_NAMED_SYMBOL,
+ XML_DIAMOND,
+ XML_ARROW_DOWN,
+ XML_ARROW_UP,
+ XML_ARROW_RIGHT,
+ XML_ARROW_LEFT,
+ XML_BOW_TIE,
+ XML_HOURGLASS,
+ XML_SYMBOL_NAME,
+ XML_SYMBOL_TYPE,
+ XML_IMAGE_OPACITY, // #i25616#
+
+ XML_DEFAULT_OUTLINE_LEVEL,
+ XML_SHOW_DETAILS,
+ XML_SHOW_EMPTY,
+ XML_ITERATIVE,
+ XML_uX,
+ XML_NP_DLG,
+ XML_N_DLG,
+ XML_SCRIPT_DATA,
+ XML_LIBRARIES,
+ XML_SOURCE_CODE,
+ XML_READONLY,
+
+ XML_Z,
+ XML_DIMENSION,
+ XML_VALIDATION_NAME,
+
+ XML_SCREEN,
+ XML_PRINTER,
+
+ // XForms tokens
+ // already defined: XML_ACTION, XML_VERSION, XML_ENCODING,
+ // XML_REPLACE, XML_SEPARATOR, XML_TYPE, XML_ID
+ XML_MODEL,
+ XML_SCHEMA,
+ XML_BIND,
+ XML_INSTANCE,
+ XML_SUBMISSION,
+ XML_REF,
+ XML_SRC,
+ XML_METHOD,
+ XML_NODESET,
+ XML_INDENT,
+ XML_OMIT_XML_DECLARATION,
+ XML_STANDALONE,
+ XML_CDATA_SECTION_ELEMENTS,
+ XML_REQUIRED,
+ XML_RELEVANT,
+ XML_CALCULATE,
+ XML_CONSTRAINT,
+ XML_MAXOCCURS, // maxOccurs
+ XML_MINOCCURS, // minOccurs
+ XML_P3PTYPE,
+ XML_MEDIATYPE,
+ XML_INCLUDENAMESPACEPREFIXES,
+
+ // XForms/XSD Schema; these tokens use innerWordCapitalization
+ // (already defined: XML_SCHEMA, XML_LENGTH, XML_ID)
+ XML_BASE,
+ XML_TARGETNAMESPACE, // targetNamespace
+ XML_SIMPLETYPE, // simpleType
+ XML_RESTRICTION,
+ XML_MAXLENGTH, // maxLength
+ XML_MINLENGTH, // minLength
+ XML_MININCLUSIVE, // minInclusive
+ XML_MINEXCLUSIVE, // minExclusive
+ XML_MAXINCLUSIVE, // maxInclusive
+ XML_MAXEXCLUSIVE, // maxExclusive
+ XML_PATTERN,
+ XML_ENUMERATION,
+ XML_WHITESPACE, // whiteSpace
+ XML_TOTALDIGITS, // totalDigits
+ XML_FRACTIONDIGITS, // fractionDigits
+ XML_PRESERVE,
+ XML_ANYURI, // anyURI
+ XML_DATETIME_XSD, // dateTime
+ XML_MAIN_ETRY, // #i28755#
+
+ // SMIL
+ XML_REMOVE,
+ XML_HOLD,
+ XML_TRANSITION,
+ XML_INHERIT,
+ XML_FILLDEFAULT,
+ XML_RESTART,
+ XML_RESTARTDEFAULT,
+ XML_WHENNOTACTIVE,
+ XML_NEVER,
+ XML_ACCELERATE,
+ XML_DECELERATE,
+ XML_AUTOREVERSE,
+ XML_INDEFINITE,
+ XML_REPEATCOUNT,
+ XML_REPEATDUR,
+ XML_ENDSYNC,
+ XML_FIRST,
+ XML_LAST,
+ XML_MEDIA,
+ XML_DUR,
+ XML_BEGIN,
+ XML_WHOLE,
+ XML_FROM,
+ XML_TO,
+ XML_BY,
+ XML_VALUES,
+ XML_KEYTIMES,
+ XML_KEYSPLINES,
+ XML_CALCMODE,
+ XML_DISCRETE,
+ XML_PACED,
+ XML_SPLINE,
+ XML_ACCUMULATE,
+ XML_ADDITIVE,
+ XML_MULTIPLY,
+ XML_ANIMATE,
+ XML_ANIMATEMOTION,
+ XML_ANIMATETRANSFORM,
+ XML_ANIMATECOLOR,
+ XML_TRANSITIONFILTER,
+ XML_ATTRIBUTENAME,
+
+ XML_NP_SMIL,
+ XML_N_SMIL,
+
+ XML_NP_ANIMATION,
+ XML_N_ANIMATION,
+
+ XML_PAR,
+ XML_SEQ,
+
+ XML_TRANSLATE,
+ XML_SKEWX,
+ XML_SKEWY,
+
+ XML_AUDIO,
+
+ XML_COLOR_INTERPOLATION,
+ XML_COLOR_INTERPOLATION_DIRECTION,
+ XML_HSL,
+ XML_RGB,
+
+ XML_BARWIPE,
+ XML_BOXWIPE,
+ XML_FOURBOXWIPE,
+ XML_BARNDOORWIPE,
+ XML_DIAGONALWIPE,
+ XML_BOWTIEWIPE,
+ XML_MISCDIAGONALWIPE,
+ XML_VEEWIPE,
+ XML_BARNVEEWIPE,
+ XML_ZIGZAGWIPE,
+ XML_BARNZIGZAGWIPE,
+ XML_IRISWIPE,
+ XML_TRIANGLEWIPE,
+ XML_ARROWHEADWIPE,
+ XML_PENTAGONWIPE,
+ XML_HEXAGONWIPE,
+ XML_ELLIPSEWIPE,
+ XML_EYEWIPE,
+ XML_ROUNDRECTWIPE,
+ XML_STARWIPE,
+ XML_MISCSHAPEWIPE,
+ XML_CLOCKWIPE,
+ XML_PINWHEELWIPE,
+ XML_SINGLESWEEPWIPE,
+ XML_FANWIPE,
+ XML_DOUBLEFANWIPE,
+ XML_DOUBLESWEEPWIPE,
+ XML_SALOONDOORWIPE,
+ XML_WINDSHIELDWIPE,
+ XML_SNAKEWIPE,
+ XML_SPIRALWIPE,
+ XML_PARALLELSNAKESWIPE,
+ XML_BOXSNAKESWIPE,
+ XML_WATERFALLWIPE,
+ XML_PUSHWIPE,
+ XML_SLIDEWIPE,
+ XML_BLINDSWIPE,
+ XML_RANDOMBARWIPE,
+ XML_CHECKERBOARDWIPE,
+ XML_ZOOM,
+
+ XML_LEFTTORIGHT,
+ XML_TOPTOBOTTOM,
+ XML_TOPLEFT,
+ XML_TOPRIGHT,
+ XML_BOTTOMRIGHT,
+ XML_BOTTOMLEFT,
+ XML_TOPCENTER,
+ XML_RIGHTCENTER,
+ XML_BOTTOMCENTER,
+ XML_LEFTCENTER,
+ XML_CORNERSIN,
+ XML_CORNERSOUT,
+ XML_DIAGONALBOTTOMLEFT,
+ XML_DIAGONALTOPLEFT,
+ XML_DOUBLEBARNDOOR,
+ XML_DOUBLEDIAMOND,
+ XML_FOURPOINT,
+ XML_FIVEPOINT,
+ XML_SIXPOINT,
+ XML_HEART,
+ XML_KEYHOLE,
+ XML_CLOCKWISETWELVE,
+ XML_CLOCKWISETHREE,
+ XML_CLOCKWISESIX,
+ XML_CLOCKWISENINE,
+ XML_TWOBLADEVERTICAL,
+ XML_TWOBLADEHORIZONTAL,
+ XML_FOURBLADE,
+ XML_CLOCKWISETOP,
+ XML_CLOCKWISERIGHT,
+ XML_CLOCKWISEBOTTOM,
+ XML_CLOCKWISELEFT,
+ XML_CLOCKWISETOPLEFT,
+ XML_COUNTERCLOCKWISEBOTTOMLEFT,
+ XML_CLOCKWISEBOTTOMRIGHT,
+ XML_COUNTERCLOCKWISETOPRIGHT,
+ XML_CENTERTOP,
+ XML_CENTERRIGHT,
+ XML_FANOUTVERTICAL,
+ XML_FANOUTHORIZONTAL,
+ XML_FANINVERTICAL,
+ XML_FANINHORIZONTAL,
+ XML_PARALLELVERTICAL,
+ XML_PARALLELDIAGONAL,
+ XML_OPPOSITEVERTICAL,
+ XML_OPPOSITEHORIZONTAL,
+ XML_PARALLELDIAGONALTOPLEFT,
+ XML_PARALLELDIAGONALBOTTOMLEFT,
+ XML_TOPLEFTHORIZONTAL,
+ XML_TOPLEFTDIAGONAL,
+ XML_TOPLEFTVERTICAL,
+ XML_TOPRIGHTDIAGONAL,
+ XML_BOTTOMRIGHTDIAGONAL,
+ XML_BOTTOMLEFTDIAGONAL,
+ XML_TOPLEFTCLOCKWISE,
+ XML_TOPRIGHTCLOCKWISE,
+ XML_BOTTOMRIGHTCLOCKWISE,
+ XML_BOTTOMLEFTCLOCKWISE,
+ XML_TOPLEFTCOUNTERCLOCKWISE,
+ XML_TOPRIGHTCOUNTERCLOCKWISE,
+ XML_BOTTOMRIGHTCOUNTERCLOCKWISE,
+ XML_BOTTOMLEFTCOUNTERCLOCKWISE,
+ XML_VERTICALTOPSAME,
+ XML_VERTICALBOTTOMSAME,
+ XML_VERTICALTOPLEFTOPPOSITE,
+ XML_VERTICALBOTTOMLEFTOPPOSITE,
+ XML_HORIZONTALLEFTSAME,
+ XML_HORIZONTALRIGHTSAME,
+ XML_HORIZONTALTOPLEFTOPPOSITE,
+ XML_HORIZONTALTOPRIGHTOPPOSITE,
+ XML_DIAGONALBOTTOMLEFTOPPOSITE,
+ XML_DIAGONALTOPLEFTOPPOSITE,
+ XML_TWOBOXTOP,
+ XML_TWOBOXBOTTOM,
+ XML_TWOBOXLEFT,
+ XML_TWOBOXRIGHT,
+ XML_FOURBOXVERTICAL,
+ XML_FOURBOXHORIZONTAL,
+ XML_VERTICALLEFT,
+ XML_VERTICALRIGHT,
+ XML_HORIZONTALLEFT,
+ XML_HORIZONTALRIGHT,
+ XML_FROMLEFT,
+ XML_FROMTOP,
+ XML_FROMRIGHT,
+ XML_FROMBOTTOM,
+ XML_CROSSFADE,
+ XML_FADETOCOLOR,
+ XML_FADEFROMCOLOR,
+ XML_FADEOVERCOLOR,
+ XML_THREEBLADE,
+ XML_EIGHTBLADE,
+ XML_ONEBLADE,
+ XML_ACROSS,
+ XML_COMBHORIZONTAL,
+ XML_COMBVERTICAL,
+ XML_ROTATEIN,
+ XML_ROTATEOUT,
+ XML_FROMTOPLEFT,
+ XML_FROMTOPRIGHT,
+ XML_FROMBOTTOMLEFT,
+ XML_FROMBOTTOMRIGHT,
+
+ XML_SUBTYPE,
+ XML_OUT,
+
+ XML_FORWARD,
+ XML_REVERSE,
+
+ XML_FADECOLOR,
+
+ XML_ONBEGIN,
+ XML_ONEND,
+ XML_CLICK,
+ XML_DOUBLECLICK,
+ XML_MOUSEOVER,
+ XML_MOUSEOUT,
+
+ XML_NODE_TYPE,
+ XML_PRESET_ID,
+ XML_PRESET_SUB_TYPE,
+ XML_PRESET_CLASS,
+ XML_CUSTOM,
+ XML_ENTRANCE,
+ XML_EXIT,
+ XML_EMPHASIS,
+ XML_MOTION_PATH,
+ XML_OLE_ACTION,
+ XML_MEDIA_CALL,
+ XML_ON_CLICK,
+ XML_WITH_PREVIOUS,
+ XML_AFTER_PREVIOUS,
+ XML_MAIN_SEQUENCE,
+ XML_TIMING_ROOT,
+ XML_INTERACTIVE_SEQUENCE,
+
+ XML_SUB_ITEM,
+ XML_ITERATE_TYPE,
+ XML_ITERATE_INTERVAL,
+ XML_ITERATE,
+ XML_BY_PARAGRAPH,
+ XML_BY_WORD,
+ XML_BY_LETTER,
+
+ XML_AFTER_EFFECT,
+ XML_MASTER,
+
+ XML_GROUP_ID,
+ XML_TARGETELEMENT,
+ XML_TOGGLE_PAUSE,
+ XML_MASTER_ELEMENT,
+ XML_STOP_AUDIO,
+
+ XML_AUDIO_LEVEL,
+
+ XML_URN_OASIS_NAMES_TC,
+ XML_OPENDOCUMENT,
+ XML_1_0,
+
+ XML_IS_LIST_HEADER,
+ XML_N_SVG_COMPAT,
+ XML_N_FO_COMPAT,
+ XML_N_SMIL_COMPAT,
+ XML_N_SMIL_OLD,
+ XML_XFORMS_SUBMISSION,
+ XML_XFORMS_LIST_SOURCE,
+
+ XML_URI_W3_PREFIX,
+ XML_URI_XFORMS_SUFFIX,
+
+ // --> OD 2005-05-12 #i49139#
+ // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES
+ // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD.
+ XML_HORIZONTAL_ON_EVEN,
+ // --> OJ 2005-09-01
+ XML_N_RPT_OASIS,
+ XML_N_RPT,
+ XML_GROUP,
+ XML_GROUPS ,
+ XML_REPORT_HEADER,
+ XML_PAGE_HEADER ,
+ XML_DETAIL ,
+ XML_PAGE_FOOTER ,
+ XML_REPORT_FOOTER,
+ XML_START_NEW_COLUMN ,
+ XML_RESET_PAGE_NUMBER ,
+ XML_PRINT_HEADER_ON_EACH_PAGE ,
+ XML_GROUP_EXPRESSION ,
+ XML_GROUP_HEADER ,
+ XML_GROUP_FOOTER ,
+ XML_HEADER_ON_NEW_PAGE,
+ XML_FOOTER_ON_NEW_PAGE,
+ XML_PAGE_PRINT_OPTION,
+ XML_PRE_EVALUATED,
+ XML_COMMAND_TYPE,
+ XML_MASTER_FIELDS,
+ XML_DETAIL_FIELDS,
+ XML_CONDITIONAL_PRINT_EXPRESSION,
+ XML_REPORT_COMPONENT,
+ XML_PRINT_REPEATED_VALUES,
+ XML_REPEAT_SECTION,
+ XML_FORCE_NEW_COLUMN,
+ XML_GROUP_ON,
+ XML_FORCE_NEW_PAGE,
+ XML_GROUP_INTERVAL,
+ XML_PRINT_ONLY_WHEN_GROUP_CHANGE,
+ XML_REPORT_ELEMENT,
+ XML_LIST_SOURCE,
+ XML_LIST_SOURCE_TYPE,
+ XML_IMAGE_DATA,
+ XML_SELECTED,
+ XML_CURRENT_STATE,
+ XML_IS_TRISTATE,
+ XML_ALL_PAGES,
+ XML_NOT_WITH_REPORT_HEADER,
+ XML_NOT_WITH_REPORT_FOOTER,
+ XML_NOT_WITH_REPORT_HEADER_NOR_FOOTER,
+ XML_BEFORE_SECTION,
+ XML_AFTER_SECTION,
+ XML_BEFORE_AFTER_SECTION,
+ XML_PREFIX_CHARACTERS,
+ XML_QUARTAL,
+ XML_WEEK,
+ XML_WHOLE_GROUP,
+ XML_WITH_FIRST_DETAIL,
+ XML_TOP_DOWN,
+ XML_BOTTOM_UP,
+ XML_HOUR,
+ XML_MINUTE,
+ XML_NP_RPT,
+ XML_FORMAT_CONDITION,
+ XML_EXPRESSION1,
+ XML_EXPRESSION2,
+ XML_EQUAL,
+ XML_NOT_EQUAL,
+ XML_LESS,
+ XML_GREATER,
+ XML_LESS_EQUAL,
+ XML_GREATER_EQUAL,
+ XML_BETWEEN,
+ XML_NOT_BETWEEN,
+ XML_TABLE_TEMPLATE,
+ XML_FIRST_ROW,
+ XML_LAST_ROW,
+ XML_FIRST_COLUMN,
+ XML_LAST_COLUMN,
+ XML_EVEN_ROWS,
+ XML_ODD_ROWS,
+ XML_EVEN_COLUMNS,
+ XML_ODD_COLUMNS,
+ // <--
+ XML_HORIZONTAL_ON_ODD,
+ // <--
+ // --> OD 2005-10-10 #i45874#
+ XML_RESTART_NUMBERING,
+ // <--
+ // --> FLR #i52127#
+ XML_NUMBERED_PARAGRAPH,
+ // <--
+ XML_MASTER_DETAIL_FIELDS,
+ XML_MASTER_DETAIL_FIELD,
+ XML_SUB_DOCUMENT,
+ XML_FIXED_CONTENT,
+ XML_INITIAL_FORMULA,
+ XML_DEEP_TRAVERSING,
+ XML_PRESERVE_IRI,
+ XML_SORT_BY_X_VALUES,
+ XML_PAGE_CONTINUATION,
+ XML_RIGHT_ANGLED_AXES,
+ XML_SOFT_PAGE_BREAK,
+ XML_USE_SOFT_PAGE_BREAKS,
+ XML_PERCENTAGE_DATA_STYLE_NAME,
+ XML_VALUE_AND_PERCENTAGE,
+ XML_GROUP_BARS_PER_AXIS,
+ XML_INCLUDE_HIDDEN_CELLS,
+ XML_AUTOMATIC_POSITION,
+ XML_AUTOMATIC_SIZE,
+ XML_REVERSE_DIRECTION,
+ XML_LABEL_SEPARATOR,
+ XML_LABEL_POSITION,
+ XML_AVOID_OVERLAP,
+ XML_NEAR_ORIGIN,
+ XML_DEPENDENCY,
+ XML_NAV_ORDER,
+
+ XML_USE_FIRST_ROW_STYLES,
+ XML_USE_LAST_ROW_STYLES,
+ XML_USE_FIRST_COLUMN_STYLES,
+ XML_USE_LAST_COLUMN_STYLES,
+ XML_USE_BANDING_ROWS_STYLES,
+ XML_USE_BANDING_COLUMNS_STYLES,
+
+ XML_AUTOMATIC_CONTENT,
+ XML_DISPLAY_R_SQUARE,
+ XML_DISPLAY_EQUATION,
+ // db odf 12
+ XML_TABLE_REPRESENTATIONS,
+ XML_TABLE_REPRESENTATION,
+ XML_SCHEMA_DEFINITION,
+ XML_CONNECTION_DATA,
+ XML_DATABASE_DESCRIPTION,
+ XML_COMPOUND_DATABASE,
+ XML_FILE_BASED_DATABASE,
+ XML_SERVER_DATABASE,
+ XML_MEDIA_TYPE,
+ XML_HOSTNAME,
+ XML_PORT,
+ XML_LOCAL_SOCKET,
+ XML_USE_SYSTEM_USER,
+ XML_DRIVER_SETTINGS,
+ XML_JAVA_CLASSPATH,
+ XML_CHARACTER_SET,
+ XML_APPLICATION_CONNECTION_SETTINGS,
+ XML_TABLE_INCLUDE_FILTER,
+ XML_DEFAULT_ROW_STYLE_NAME,
+ XML_ANGLE_OFFSET,
+ // --> OD 2007-09-14 #i81002#
+ XML_NUMBER_NO_SUPERIOR,
+ XML_NUMBER_ALL_SUPERIOR,
+ // <--
+ // --> OD 2008-01-15 #newlistlevelattrs#
+ XML_LIST_LEVEL_POSITION_AND_SPACE_MODE,
+ XML_LABEL_WIDTH_AND_POSITION,
+ XML_LABEL_ALIGNMENT,
+ XML_LIST_LEVEL_LABEL_ALIGNMENT,
+ XML_LABEL_FOLLOWED_BY,
+ XML_LISTTAB,
+ XML_SPACE,
+ XML_NOTHING,
+ XML_LIST_TAB_STOP_POSITION,
+ // <--
+ XML_STANDARD_ERROR,
+ XML_CELL_RANGE,
+ XML_ERROR_LOWER_RANGE,
+ XML_ERROR_UPPER_RANGE,
+
+ // --> OD 2008-04-22 #refactorlists#
+ XML_CONTINUE_LIST,
+ XML_STYLE_OVERRIDE,
+ // <--
+
+ // fs: #i90243#
+ XML_XFORM_MODEL_SETTINGS,
+
+ // ODF 1.2 metadata
+ XML_META_FIELD,
+ XML_ABOUT,
+ XML_DATATYPE,
+ XML_TRANSFORMATION,
+
+ // ODF 1.2 numbered-paragraph
+ XML_LIST_ID,
+
+ XML_TREAT_EMPTY_CELLS,
+ XML_LEAVE_GAP,
+ XML_USE_ZERO,
+ XML_IGNORE,
+
+ // enhanced fields
+ XML_FIELDMARK,
+ XML_FIELDMARK_START,
+ XML_FIELDMARK_END,
+ XML_N_FIELD,
+ XML_NP_FIELD,
+
+ XML_IMAGE_SCALE,
+ XML_ISOTROPIC,
+ XML_ANISOTROPIC,
+
+ XML_AXIS_POSITION,
+ XML_AXIS_LABEL_POSITION,
+ XML_NEAR_AXIS,
+ XML_NEAR_AXIS_OTHER_SIDE,
+ XML_OUTSIDE_START,
+ XML_OUTSIDE_END,
+ XML_TICK_MARK_POSITION,
+ XML_AT_LABELS,
+ XML_AT_AXIS,
+ XML_AT_LABELS_AND_AXIS,
+ XML_FILLED_RADAR,
+ XML_SURFACE,
+
+ // MathML only
+ XML_MATHVARIANT,
+ XML_MATHSIZE,
+ XML_MATHWEIGHT,
+ XML_MATHCOLOR,
+
+ XML_CONTAINS,
+ XML_DOES_NOT_CONTAIN,
+ XML_BEGINS_WITH,
+ XML_DOES_NOT_BEGIN_WITH,
+ XML_ENDS_WITH,
+ XML_DOES_NOT_END_WITH,
+
+ //chart
+ XML_NP_CHART_EXT,
+ XML_N_CHART_EXT,
+ XML_COORDINATE_REGION,
+
+ XML_DIAGONAL_BL_TR_WIDTHS,
+ XML_DIAGONAL_TL_BR_WIDTHS,
+
+ XML_OUTSIDE_MINIMUM,//#i114142#
+ XML_OUTSIDE_MAXIMUM,//#i114142#
+
+ XML_TOKEN_END
+ };
+
+
+ /// return the OUString representation for eToken
+ XMLOFF_DLLPUBLIC const ::rtl::OUString& GetXMLToken(
+ enum XMLTokenEnum eToken );
+
+ /// compare eToken to the string
+ XMLOFF_DLLPUBLIC sal_Bool IsXMLToken(
+ const ::rtl::OUString& rString,
+ enum XMLTokenEnum eToken );
+
+ // gives all allocated memory for OUString* back
+ XMLOFF_DLLPUBLIC void ResetTokens();
+
+ XMLOFF_DLLPUBLIC void IncRescheduleCount();
+
+ XMLOFF_DLLPUBLIC void DecRescheduleCount();
+
+
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmltypes.hxx b/xmloff/inc/xmloff/xmltypes.hxx
new file mode 100644
index 000000000000..c248e03421c7
--- /dev/null
+++ b/xmloff/inc/xmloff/xmltypes.hxx
@@ -0,0 +1,289 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTYPES_HXX
+#define _XMLOFF_XMLTYPES_HXX
+
+///////////////////////////////////////////////////////////////////////////////
+// Flags to specify how to im/export the property
+//
+// OLD:
+// 8421.8421.8421.8421.8421.8421.8421.8421
+// n n m mmmd m baaa tttt.tttt.tttt
+// spsp eep paef e ppp tttt.tttt.tttt
+// iiee iei ieie i ppp tttt.tttt.tttt
+// NOW:
+// n n mm mmdm pp ppba aatt.tttt.tttt
+// spsp eepp aefe p pptt.tttt.tttt
+// iiee ieii eiei p pptt.tttt.tttt
+
+#define MID_FLAG_MASK 0x00003fff
+
+// Import only: the xml attribute's value is evaluated by a call to
+// handleSpecialItem instead of calling the property handler's importXML method
+#define MID_FLAG_SPECIAL_ITEM_IMPORT 0x80000000
+
+// Export only: the property's value is exported by a call to handleSpecialItem
+// instead of calling the property handler's exportXML method
+#define MID_FLAG_SPECIAL_ITEM_EXPORT 0x20000000
+#define MID_FLAG_SPECIAL_ITEM 0xa0000000 // both import and export
+
+// the map entry denotes the name of an element item
+#define MID_FLAG_ELEMENT_ITEM_IMPORT 0x08000000
+#define MID_FLAG_ELEMENT_ITEM_EXPORT 0x04000000
+#define MID_FLAG_ELEMENT_ITEM 0x0c000000 // both import and export
+
+// the attribute is ignored (not yet implemented)
+#define MID_FLAG_NO_PROPERTY_IMPORT 0x40000000
+
+// the property is ignored
+#define MID_FLAG_NO_PROPERTY_EXPORT 0x10000000
+#define MID_FLAG_NO_PROPERTY 0x50000000 // both import and export
+
+// Import only: there are more entries for the same xml attribute existing
+#define MID_FLAG_MULTI_PROPERTY 0x02000000 //
+
+// Import only: If a property with the same name has been set already, supply
+// the current value to the importXML call.
+#define MID_FLAG_MERGE_PROPERTY 0x01000000
+
+// Export only: If an xml attribute with the same name has been exported
+// already, supply its value to teh exportXML call and delete the existing
+// atribute afterwards.
+#define MID_FLAG_MERGE_ATTRIBUTE 0x00800000
+
+// Import and Export: The property in question must exist. No call to
+// hasPropertyByName is required.
+#define MID_FLAG_MUST_EXIST 0x00400000
+
+// Export only: When exporting defaults, export this property even if it is
+// not set
+#define MID_FLAG_DEFAULT_ITEM_EXPORT 0x00200000
+
+// Import only: In general, properties may not throw exception, but
+// this one may. If it throws an IllegalArgumentException, it will be
+// silently ignored. This should be used for properties whose values
+// cannot be checked. (E.g., the printer paper tray: The tray names
+// are different for all printers, and we don't know ahead whether a
+// printer supports the trays in the current document.)
+#define MID_FLAG_PROPERTY_MAY_EXCEPT 0x00100000
+
+#define XML_TYPE_PROP_SHIFT 14
+#define XML_TYPE_PROP_MASK (0xf << XML_TYPE_PROP_SHIFT)
+
+#define XML_TYPE_PROP_START (0x1 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_GRAPHIC (0x1 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_DRAWING_PAGE (0x2 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_PAGE_LAYOUT (0x3 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_HEADER_FOOTER (0x4 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_TEXT (0x5 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_PARAGRAPH (0x6 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_RUBY (0x7 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_SECTION (0x8 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_TABLE (0x9 << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_TABLE_COLUMN (0xa << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_TABLE_ROW (0xb << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_TABLE_CELL (0xc << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_LIST_LEVEL (0xd << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_CHART (0xe << XML_TYPE_PROP_SHIFT)
+#define XML_TYPE_PROP_END (0xf << XML_TYPE_PROP_SHIFT)
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// XML-data-type-ID's
+//
+
+// simple types, no special compare necessary
+#define XML_TYPE_BUILDIN_CMP 0x00002000
+
+// basic types (all also XML_TYPE_BUILDIN_CMP)
+#define XML_TYPE_BOOL 0x00002001 // true/false
+#define XML_TYPE_MEASURE 0x00002002 // 1cm
+#define XML_TYPE_MEASURE8 0x00002003 // 1cm
+#define XML_TYPE_MEASURE16 0x00002004 // 1cm
+#define XML_TYPE_PERCENT 0x00002005 // 50%
+#define XML_TYPE_PERCENT8 0x00002006 // 50%
+#define XML_TYPE_PERCENT16 0x00002007 // 50%
+#define XML_TYPE_STRING 0x00002008 // "blablabla"
+#define XML_TYPE_COLOR 0x00002009 // Colors
+#define XML_TYPE_NUMBER 0x0000200a // 123
+#define XML_TYPE_NUMBER8 0x0000200b // 123
+#define XML_TYPE_NUMBER16 0x0000200c // 123
+#define XML_TYPE_NUMBER_NONE 0x0000200d // 123 and "no-limit" for 0
+#define XML_TYPE_DOUBLE 0x0000200e // for doubles
+#define XML_TYPE_NBOOL 0x0000200f // !true/false
+#define XML_TYPE_COLORTRANSPARENT 0x00002010 // Colors or "transparent"
+#define XML_TYPE_ISTRANSPARENT 0x00002011 // "transparent"
+#define XML_TYPE_BUILDIN_CMP_ONLY 0x00002012 // Only buildin comparison is required, so no handler exists
+#define XML_TYPE_NUMBER8_NONE 0x00002013 // 123 and "no-limit" for 0
+#define XML_TYPE_NUMBER16_NONE 0x00002014 // 123 and "no-limit" for 0
+#define XML_TYPE_COLOR_MODE 0x00002015
+#define XML_TYPE_DURATION16_MS 0x00002016 // PT00H00M01S to ms in sal_Int16
+#define XML_TYPE_MEASURE_PX 0x00002017 // 1px
+#define XML_TYPE_COLORAUTO 0x00002018 // color if not -1
+#define XML_TYPE_ISAUTOCOLOR 0x00002019 // true if -1
+#define XML_TYPE_STYLENAME 0x00002020 // "blablabla"
+#define XML_TYPE_NEG_PERCENT 0x00002021 // (100-x)%
+#define XML_TYPE_NEG_PERCENT8 0x00002022 // (100-x)%
+#define XML_TYPE_NEG_PERCENT16 0x00002023 // (100-x)
+#define XML_TYPE_DOUBLE_PERCENT 0x00002024 // 50% (source is a double from 0.0 to 1.0)
+
+// special basic types
+#define XML_TYPE_RECTANGLE_LEFT 0x00000100 // the Left member of a awt::Rectangle as a measure
+#define XML_TYPE_RECTANGLE_TOP 0x00000101 // the Top member of a awt::Rectangle as a measure
+#define XML_TYPE_RECTANGLE_WIDTH 0x00000102 // the Width member of a awt::Rectangle as a measure
+#define XML_TYPE_RECTANGLE_HEIGHT 0x00000103 // the Height member of a awt::Rectangle as a measure
+
+#define XML_TYPE_APP_SHIFT 10
+#define XML_SC_TYPES_START (0x1 << XML_TYPE_APP_SHIFT)
+#define XML_SD_TYPES_START (0x2 << XML_TYPE_APP_SHIFT)
+
+#define XML_TEXT_TYPES_START (0x3 << XML_TYPE_APP_SHIFT)
+#define XML_TYPE_TEXT_CROSSEDOUT_STYLE (XML_TEXT_TYPES_START + 0)
+#define XML_TYPE_TEXT_CASEMAP (XML_TEXT_TYPES_START + 1)
+#define XML_TYPE_TEXT_FONTFAMILYNAME (XML_TEXT_TYPES_START + 2)
+#define XML_TYPE_TEXT_FONTFAMILY (XML_TEXT_TYPES_START + 3)
+#define XML_TYPE_TEXT_FONTENCODING (XML_TEXT_TYPES_START + 4)
+#define XML_TYPE_TEXT_FONTPITCH (XML_TEXT_TYPES_START + 5)
+#define XML_TYPE_TEXT_KERNING (XML_TEXT_TYPES_START + 6)
+#define XML_TYPE_TEXT_POSTURE (XML_TEXT_TYPES_START + 7)
+#define XML_TYPE_TEXT_SHADOWED (XML_TEXT_TYPES_START + 8)
+#define XML_TYPE_TEXT_UNDERLINE_STYLE (XML_TEXT_TYPES_START + 9)
+#define XML_TYPE_TEXT_WEIGHT (XML_TEXT_TYPES_START + 10)
+#define XML_TYPE_TEXT_SPLIT (XML_TEXT_TYPES_START + 11)
+#define XML_TYPE_TEXT_BREAKBEFORE (XML_TEXT_TYPES_START + 12)
+#define XML_TYPE_TEXT_BREAKAFTER (XML_TEXT_TYPES_START + 13)
+#define XML_TYPE_TEXT_SHADOW (XML_TEXT_TYPES_START + 14)
+#define XML_TYPE_TEXT_ADJUST (XML_TEXT_TYPES_START + 15)
+#define XML_TYPE_TEXT_ADJUSTLAST (XML_TEXT_TYPES_START + 16)
+#define XML_TYPE_TEXT_CASEMAP_VAR (XML_TEXT_TYPES_START + 17)
+#define XML_TYPE_TEXT_ESCAPEMENT (XML_TEXT_TYPES_START + 18)
+#define XML_TYPE_TEXT_ESCAPEMENT_HEIGHT (XML_TEXT_TYPES_START + 19)
+#define XML_TYPE_CHAR_HEIGHT (XML_TEXT_TYPES_START + 20)
+#define XML_TYPE_CHAR_HEIGHT_PROP (XML_TEXT_TYPES_START + 21)
+#define XML_TYPE_CHAR_LANGUAGE (XML_TEXT_TYPES_START + 22)
+#define XML_TYPE_CHAR_COUNTRY (XML_TEXT_TYPES_START + 23)
+#define XML_TYPE_LINE_SPACE_FIXED (XML_TEXT_TYPES_START + 24)
+#define XML_TYPE_LINE_SPACE_MINIMUM (XML_TEXT_TYPES_START + 25)
+#define XML_TYPE_LINE_SPACE_DISTANCE (XML_TEXT_TYPES_START + 26)
+#define XML_TYPE_BORDER (XML_TEXT_TYPES_START + 27)
+#define XML_TYPE_BORDER_WIDTH (XML_TEXT_TYPES_START + 28)
+#define XML_TYPE_TEXT_DROPCAP (XML_TEXT_TYPES_START + 29)
+#define XML_TYPE_TEXT_TABSTOP (XML_TEXT_TYPES_START + 30)
+#define XML_TYPE_TEXT_BOOLCROSSEDOUT (XML_TEXT_TYPES_START + 31)
+#define XML_TYPE_TEXT_WRAP (XML_TEXT_TYPES_START + 32)
+#define XML_TYPE_TEXT_PARAGRAPH_ONLY (XML_TEXT_TYPES_START + 33)
+#define XML_TYPE_TEXT_WRAP_OUTSIDE (XML_TEXT_TYPES_START + 34)
+#define XML_TYPE_TEXT_OPAQUE (XML_TEXT_TYPES_START + 35)
+#define XML_TYPE_TEXT_PROTECT_CONTENT (XML_TEXT_TYPES_START + 36)
+#define XML_TYPE_TEXT_PROTECT_SIZE (XML_TEXT_TYPES_START + 37)
+#define XML_TYPE_TEXT_PROTECT_POSITION (XML_TEXT_TYPES_START + 38)
+#define XML_TYPE_TEXT_ANCHOR_TYPE (XML_TEXT_TYPES_START + 39)
+#define XML_TYPE_TEXT_COLUMNS (XML_TEXT_TYPES_START + 40)
+#define XML_TYPE_TEXT_HORIZONTAL_POS (XML_TEXT_TYPES_START + 41)
+#define XML_TYPE_TEXT_HORIZONTAL_POS_MIRRORED (XML_TEXT_TYPES_START + 42)
+#define XML_TYPE_TEXT_HORIZONTAL_REL (XML_TEXT_TYPES_START + 43)
+#define XML_TYPE_TEXT_HORIZONTAL_REL_FRAME (XML_TEXT_TYPES_START + 44)
+#define XML_TYPE_TEXT_HORIZONTAL_MIRROR (XML_TEXT_TYPES_START + 45)
+#define XML_TYPE_TEXT_VERTICAL_POS (XML_TEXT_TYPES_START + 46)
+#define XML_TYPE_TEXT_VERTICAL_REL (XML_TEXT_TYPES_START + 47)
+#define XML_TYPE_TEXT_VERTICAL_REL_PAGE (XML_TEXT_TYPES_START + 48)
+#define XML_TYPE_TEXT_VERTICAL_REL_FRAME (XML_TEXT_TYPES_START + 49)
+#define XML_TYPE_TEXT_VERTICAL_REL_AS_CHAR (XML_TEXT_TYPES_START + 50)
+#define XML_TYPE_TEXT_MIRROR_VERTICAL (XML_TEXT_TYPES_START + 51)
+#define XML_TYPE_TEXT_MIRROR_HORIZONTAL_LEFT (XML_TEXT_TYPES_START + 52)
+#define XML_TYPE_TEXT_MIRROR_HORIZONTAL_RIGHT (XML_TEXT_TYPES_START + 53)
+#define XML_TYPE_TEXT_CLIP11 (XML_TEXT_TYPES_START + 54)
+#define XML_TYPE_ATTRIBUTE_CONTAINER (XML_TEXT_TYPES_START + 55 )
+#define XML_TYPE_CHAR_HEIGHT_DIFF (XML_TEXT_TYPES_START + 56)
+#define XML_TYPE_TEXT_EMPHASIZE (XML_TEXT_TYPES_START + 57)
+#define XML_TYPE_TEXT_COMBINE (XML_TEXT_TYPES_START + 58)
+#define XML_TYPE_TEXT_COMBINECHAR (XML_TEXT_TYPES_START + 59)
+#define XML_TYPE_TEXT_UNDERLINE_COLOR (XML_TEXT_TYPES_START + 60)
+#define XML_TYPE_TEXT_UNDERLINE_HASCOLOR (XML_TEXT_TYPES_START + 61)
+#define XML_TYPE_TEXT_AUTOSPACE (XML_TEXT_TYPES_START + 62)
+#define XML_TYPE_TEXT_PUNCTUATION_WRAP (XML_TEXT_TYPES_START + 63)
+#define XML_TYPE_TEXT_LINE_BREAK (XML_TEXT_TYPES_START + 64)
+
+#define XML_TYPE_TEXT_ALIGN (XML_TEXT_TYPES_START + 65)
+#define XML_TYPE_FONT_WIDTH (XML_TEXT_TYPES_START + 66)
+#define XML_TYPE_ROTATION_ANGLE (XML_TEXT_TYPES_START + 67)
+#define XML_TYPE_CONTROL_BORDER (XML_TEXT_TYPES_START + 68)
+#define XML_TYPE_TEXT_REL_WIDTH_HEIGHT (XML_TEXT_TYPES_START + 69)
+#define XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT (XML_TEXT_TYPES_START + 70)
+#define XML_TYPE_TEXT_SYNC_WIDTH_HEIGHT_MIN (XML_TEXT_TYPES_START + 71)
+#define XML_TYPE_TEXT_COMBINE_CHARACTERS (XML_TEXT_TYPES_START + 72)
+#define XML_TYPE_TEXT_ANIMATION (XML_TEXT_TYPES_START + 73)
+#define XML_TYPE_TEXT_ANIMATION_DIRECTION (XML_TEXT_TYPES_START + 74)
+#define XML_TYPE_TEXT_HORIZONTAL_ADJUST (XML_TEXT_TYPES_START + 75)
+#define XML_TYPE_TEXT_RUBY_ADJUST (XML_TEXT_TYPES_START + 76)
+#define XML_TYPE_TEXT_FONT_RELIEF (XML_TEXT_TYPES_START + 77)
+#define XML_TYPE_TEXT_ROTATION_ANGLE (XML_TEXT_TYPES_START + 78)
+#define XML_TYPE_TEXT_ROTATION_SCALE (XML_TEXT_TYPES_START + 79)
+#define XML_TYPE_TEXT_VERTICAL_ALIGN (XML_TEXT_TYPES_START + 80)
+#define XML_TYPE_TEXT_DRAW_ASPECT (XML_TEXT_TYPES_START + 81)
+#define XML_TYPE_CONTROL_TEXT_EMPHASIZE (XML_TEXT_TYPES_START + 82)
+#define XML_TYPE_TEXT_RUBY_POSITION (XML_TEXT_TYPES_START + 83)
+#define XML_TYPE_TEXT_VERTICAL_POS_AT_CHAR (XML_TEXT_TYPES_START + 84)
+#define XML_TYPE_TEXT_WRITING_MODE (XML_TEXT_TYPES_START + 85)
+#define XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT (XML_TEXT_TYPES_START + 86)
+#define XML_TYPE_LAYOUT_GRID_MODE (XML_TEXT_TYPES_START + 87)
+#define XML_TYPE_TEXT_HIDDEN_AS_DISPLAY (XML_TEXT_TYPES_START + 88)
+#define XML_TYPE_CONTROL_BORDER_COLOR (XML_TEXT_TYPES_START + 89)
+#define XML_TYPE_BORDER_MODEL (XML_TEXT_TYPES_START + 90)
+#define XML_TYPE_TEXT_LINE_MODE (XML_TEXT_TYPES_START + 91)
+#define XML_TYPE_TEXT_UNDERLINE_TYPE (XML_TEXT_TYPES_START + 92)
+#define XML_TYPE_TEXT_UNDERLINE_WIDTH (XML_TEXT_TYPES_START + 93)
+#define XML_TYPE_TEXT_CROSSEDOUT_TYPE (XML_TEXT_TYPES_START + 94)
+#define XML_TYPE_TEXT_CROSSEDOUT_WIDTH (XML_TEXT_TYPES_START + 95)
+#define XML_TYPE_TEXT_CROSSEDOUT_TEXT (XML_TEXT_TYPES_START + 96)
+#define XML_TYPE_TEXT_KEEP (XML_TEXT_TYPES_START + 97)
+#define XML_TYPE_TEXT_NKEEP (XML_TEXT_TYPES_START + 98)
+#define XML_TYPE_WRAP_INFLUENCE_ON_POSITION (XML_TEXT_TYPES_START + 99)
+#define XML_TYPE_WRAP_OPTION (XML_TEXT_TYPES_START + 100)
+#define XML_TYPE_TEXT_NUMBER8_ONE_BASED (XML_TEXT_TYPES_START + 101)
+#define XML_TYPE_NUMBER_NO_ZERO (XML_TEXT_TYPES_START + 102)
+#define XML_TYPE_NUMBER8_NO_ZERO (XML_TEXT_TYPES_START + 103)
+#define XML_TYPE_NUMBER16_NO_ZERO (XML_TEXT_TYPES_START + 104)
+#define XML_TYPE_NUMBER16_AUTO (XML_TEXT_TYPES_START + 105)
+#define XML_TYPE_TEXT_SOFT_PAGE_BREAK (XML_TEXT_TYPES_START + 106)
+#define XML_TYPE_TEXT_USE_SOFT_PAGE_BREAKS (XML_TEXT_TYPES_START + 107)
+#define XML_TYPE_TEXT_CLIP (XML_TEXT_TYPES_START + 108)
+#define XML_TYPE_TEXT_OVERLINE_TYPE (XML_TEXT_TYPES_START + 109)
+#define XML_TYPE_TEXT_OVERLINE_STYLE (XML_TEXT_TYPES_START + 110)
+#define XML_TYPE_TEXT_OVERLINE_WIDTH (XML_TEXT_TYPES_START + 111)
+#define XML_TYPE_TEXT_OVERLINE_COLOR (XML_TEXT_TYPES_START + 112)
+#define XML_TYPE_TEXT_OVERLINE_HASCOLOR (XML_TEXT_TYPES_START + 113)
+
+#define XML_SCH_TYPES_START (0x4 << XML_TYPE_APP_SHIFT)
+#define XML_PM_TYPES_START (0x5 << XML_TYPE_APP_SHIFT) // page master
+#define XML_DB_TYPES_START (0x6 << XML_TYPE_APP_SHIFT)
+
+#endif // _XMLOFF_XMLTYPES_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmloff/xmluconv.hxx b/xmloff/inc/xmloff/xmluconv.hxx
new file mode 100644
index 000000000000..d1960e0b8cc8
--- /dev/null
+++ b/xmloff/inc/xmloff/xmluconv.hxx
@@ -0,0 +1,448 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLUCONV_HXX
+#define _XMLOFF_XMLUCONV_HXX
+
+#include "sal/config.h"
+#include "xmloff/dllapi.h"
+#include "sal/types.h"
+
+#include <limits.h>
+#include <tools/solar.h>
+#include <tools/color.hxx>
+#include <tools/mapunit.hxx>
+#include <xmloff/xmlement.hxx>
+#include <xmloff/xmltoken.hxx>
+#include <com/sun/star/util/Date.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/Position3D.hpp>
+
+// #110680#
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// predeclarations
+
+class Time;
+namespace rtl
+{
+class OUString;
+class OUStringBuffer;
+}
+
+namespace com { namespace sun { namespace star {
+ namespace util { struct DateTime; }
+ namespace text { class XNumberingTypeInfo; }
+ namespace i18n { class XCharacterClassification; }
+}}}
+
+namespace basegfx
+{
+ class B3DVector;
+} // end of namespace basegfx
+
+class XMLOFF_DLLPUBLIC SvXMLTokenEnumerator
+{
+private:
+ const ::rtl::OUString& maTokenString;
+ sal_Int32 mnNextTokenPos;
+ sal_Unicode mcSeperator;
+
+public:
+ SvXMLTokenEnumerator( const ::rtl::OUString& rString, sal_Unicode cSeperator = sal_Unicode(' ') );
+
+ sal_Bool getNextToken( ::rtl::OUString& rToken );
+};
+
+/** the SvXMLTypeConverter converts values of various types from
+ their internal represantation to the textual form used in xml
+ and back.
+ Most of the methods are static but the SvXMLTypeConverter can
+ also store default units for both numerical and textual measures.
+*/
+
+class XMLOFF_DLLPUBLIC SvXMLUnitConverter
+{
+private:
+ MapUnit meCoreMeasureUnit;
+ MapUnit meXMLMeasureUnit;
+ com::sun::star::util::Date aNullDate;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XNumberingTypeInfo > xNumTypeInfo;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::i18n::XCharacterClassification > xCharClass;
+ // #110680#
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxServiceFactory;
+
+ SAL_DLLPRIVATE static ::rtl::OUString msXML_false;
+ SAL_DLLPRIVATE static ::rtl::OUString msXML_true;
+
+ SAL_DLLPRIVATE static void initXMLStrings();
+
+ SAL_DLLPRIVATE void createNumTypeInfo() const;
+
+public:
+ /** constructs a SvXMLUnitConverter. The core measure unit is the
+ default unit for numerical measures, the XML measure unit is
+ the default unit for textual measures */
+ // #110680#
+ // SvXMLUnitConverter( MapUnit eCoreMeasureUnit, MapUnit eXMLMeasureUnit );
+ SvXMLUnitConverter(
+ MapUnit eCoreMeasureUnit,
+ MapUnit eXMLMeasureUnit,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory );
+
+ virtual ~SvXMLUnitConverter();
+
+ static MapUnit GetMapUnit(sal_Int16 nFieldUnit);
+
+ /** sets the default unit for numerical measures */
+ inline void setCoreMeasureUnit( MapUnit eCoreMeasureUnit );
+
+ /** gets the default unit for numerical measures */
+ inline MapUnit getCoreMeasureUnit() const;
+
+ /** sets the default unit for textual measures */
+ void setXMLMeasureUnit( MapUnit eXMLMeasureUnit );
+
+ /** gets the default unit for textual measures */
+ MapUnit getXMLMeasureUnit() const;
+
+ /** gets XNumberingTypeInfo */
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XNumberingTypeInfo >& getNumTypeInfo() const
+ {
+ if( !xNumTypeInfo.is() )
+ createNumTypeInfo();
+ return xNumTypeInfo;
+ }
+
+ /** convert string to measure using optional min and max values*/
+ sal_Bool convertMeasure( sal_Int32& rValue,
+ const ::rtl::OUString& rString,
+ sal_Int32 nMin = SAL_MIN_INT32,
+ sal_Int32 nMax = SAL_MAX_INT32) const;
+
+ /** convert measure to string */
+ void convertMeasure( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int32 nMeasure ) const;
+
+ /** convert measure with given unit to string */
+ void convertMeasure( ::rtl::OUStringBuffer&,
+ sal_Int32 nMeasure,
+ MapUnit eSrcUnit ) const;
+
+ /** convert string to measure in given unit
+ using optional min and max values */
+ static sal_Bool convertMeasure( sal_Int32& rVal,
+ const ::rtl::OUString& rString,
+ MapUnit eDstUnit,
+ sal_Int32 nMin = SAL_MIN_INT32,
+ sal_Int32 nMax = SAL_MAX_INT32);
+
+ /** convert measure in given unit to string with given unit */
+ static void convertMeasure( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int32 nMeasure,
+ MapUnit eSrcUnit,
+ MapUnit eDstUnit );
+
+ /** convert string to boolean */
+ static sal_Bool convertBool( bool& rBool,
+ const ::rtl::OUString& rString );
+
+ /** convert boolean to string */
+ static void convertBool( ::rtl::OUStringBuffer& rBuffer,
+ sal_Bool bValue );
+
+ /** convert string to percent */
+ static sal_Bool convertPercent( sal_Int32& rValue,
+ const ::rtl::OUString& rString );
+
+ /** convert percent to string */
+ static void convertPercent( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int32 nValue );
+
+ /** convert string to pixel measure unite */
+ static sal_Bool convertMeasurePx( sal_Int32& rValue,
+ const ::rtl::OUString& rString );
+
+ /** convert pixel measure unit to string */
+ static void convertMeasurePx( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int32 nValue );
+
+ /** convert string to enum using given enum map, if the enum is
+ not found in the map, this method will return false */
+ static sal_Bool convertEnum( sal_uInt16& rEnum,
+ const ::rtl::OUString& rValue,
+ const SvXMLEnumMapEntry *pMap );
+
+ /** convert string to enum using given token map, if the enum is
+ not found in the map, this method will return false */
+ static sal_Bool convertEnum( sal_uInt16& rEnum,
+ const ::rtl::OUString& rValue,
+ const SvXMLEnumStringMapEntry *pMap );
+
+ /** convert enum to string using given enum map with an optional
+ default token. If the enum is not found in the map,
+ this method will either use the given default or return
+ false if not default is set */
+ static sal_Bool convertEnum( ::rtl::OUStringBuffer& rBuffer,
+ unsigned int nValue,
+ const SvXMLEnumMapEntry *pMap,
+ enum ::xmloff::token::XMLTokenEnum eDefault =
+ ::xmloff::token::XML_TOKEN_INVALID );
+
+ /** convert enum to string using given token map with an optional
+ default token. If the enum is not found in the map,
+ this method will either use the given default or return
+ false if not default is set */
+ static sal_Bool convertEnum( ::rtl::OUStringBuffer& rBuffer,
+ USHORT nValue,
+ const SvXMLEnumStringMapEntry *pMap,
+ sal_Char* pDefault = NULL );
+
+ /** convert string to color */
+ static sal_Bool convertColor( Color& rColor,
+ const ::rtl::OUString&rValue );
+
+ /** convert color to string */
+ static void convertColor( ::rtl::OUStringBuffer &rBuffer,
+ const Color& rCol );
+
+ /** convert number to string */
+ static void convertNumber( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int32 nNumber );
+
+ /** convert string to number with optional min and max values */
+ static sal_Bool convertNumber( sal_Int32& rValue,
+ const ::rtl::OUString& rString,
+ sal_Int32 nMin = SAL_MIN_INT32,
+ sal_Int32 nMax = SAL_MAX_INT32);
+
+ /** convert number to string */
+ static void convertNumber64( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int64 nNumber );
+
+ /** convert string to number with optional min and max values */
+ static sal_Bool convertNumber64( sal_Int64& rValue,
+ const ::rtl::OUString& rString,
+ sal_Int64 nMin = SAL_MIN_INT64,
+ sal_Int64 nMax = SAL_MAX_INT64);
+
+ /** convert double number to string (using ::rtl::math) and DO
+ convert to export MapUnit */
+ void convertDouble(::rtl::OUStringBuffer& rBuffer,
+ double fNumber, BOOL bWriteUnits) const;
+
+ /** convert double number to string (using ::rtl::math) and
+ DO convert from eSrcUnit to export MapUnit */
+ static void convertDouble( ::rtl::OUStringBuffer& rBuffer,
+ double fNumber, BOOL bWriteUnits, MapUnit eCoreUnit, MapUnit eDstUnit);
+
+ /** convert double number to string (using ::rtl::math) without unit conversion */
+ static void convertDouble( ::rtl::OUStringBuffer& rBuffer, double fNumber);
+
+ /** convert string to double number (using ::rtl::math) and DO convert. */
+ sal_Bool convertDouble(double& rValue, const ::rtl::OUString& rString, BOOL bLookForUnits) const;
+
+ /** convert string to double number (using ::rtl::math) and DO convert from
+ SrcUnit to DstUnit. */
+ static sal_Bool convertDouble(double& rValue,
+ const ::rtl::OUString& rString, MapUnit eSrcUnit, MapUnit eCoreUnit);
+
+ /** convert string to double number (using ::rtl::math) without unit conversion */
+ static sal_Bool convertDouble(double& rValue, const ::rtl::OUString& rString);
+
+ /** get the Null Date of the XModel and set it to the UnitConverter */
+ sal_Bool setNullDate (
+ const com::sun::star::uno::Reference <com::sun::star::frame::XModel>& xModel);
+
+ /** Set the Null Date of the UnitConverter */
+ void setNullDate ( const com::sun::star::util::Date& aTempNullDate ) { aNullDate = aTempNullDate; }
+
+ /** convert double to ISO Time String */
+ static void convertTime( ::rtl::OUStringBuffer& rBuffer,
+ const double& fTime);
+
+ /** convert util::DateTime to ISO Time String */
+ static void convertTime( ::rtl::OUStringBuffer& rBuffer,
+ const ::com::sun::star::util::DateTime& rDateTime );
+
+ /** convert ISO Time String to double */
+ static sal_Bool convertTime( double& fTime,
+ const ::rtl::OUString& rString);
+
+ /** convert ISO Time String to util::DateTime */
+ static sal_Bool convertTime( ::com::sun::star::util::DateTime& rDateTime,
+ const ::rtl::OUString& rString );
+
+ /** convert double to ISO Date Time String */
+ void convertDateTime( ::rtl::OUStringBuffer& rBuffer,
+ const double& fDateTime,
+ sal_Bool bAddTimeIf0AM=sal_False) { convertDateTime(rBuffer, fDateTime, aNullDate, bAddTimeIf0AM); }
+
+ /** convert ISO Date Time String to double */
+ sal_Bool convertDateTime( double& fDateTime,
+ const ::rtl::OUString& rString) { return convertDateTime(fDateTime, rString, aNullDate); }
+
+ /** convert double to ISO Date Time String */
+ static void convertDateTime( ::rtl::OUStringBuffer& rBuffer,
+ const double& fDateTime,
+ const com::sun::star::util::Date& aNullDate,
+ sal_Bool bAddTimeIf0AM=sal_False);
+ /** convert ISO Date Time String to double */
+ static sal_Bool convertDateTime( double& fDateTime,
+ const ::rtl::OUString& rString,
+ const com::sun::star::util::Date& aNullDate);
+
+ /** converts the given time value into an ISO-conform duration string
+
+ @param rTime
+ the time value to convert. This parameter is evaluated only down to the seconds - in particular,
+ "100th seconds" are ignored.
+ @param nSecondsFraction
+ Additional milleseconds to add to the time. Must be smaller than 1000.
+ This parameter is necessary since neither <type>Time</type> nor <type scope="com::sun::star::util">Time</type>
+ have a sufficient resolution to transport milliseconds.
+ @see http://www.w3.org/TR/xmlschema-2/#duration
+ */
+ static ::rtl::OUString convertTimeDuration( const ::Time& rTime, sal_Int32 nSecondsFraction = 0 );
+
+ /** converts the given ISO-conform duration string into a time value
+
+ @param rTime
+ the converted time value. Fractions of seconds of this object are not filled, even if present in
+ the string. See <arg>nSecondsFraction</arg>
+
+ @param pSecondsFraction
+ recieves fractions of whole seconds, in milliseconds. May be <NULL/>
+ This parameter is necessary since neither <type>Time</type> nor <type scope="com::sun::star::util">Time</type>
+ have a sufficient resolution to transport milliseconds.
+ @see http://www.w3.org/TR/xmlschema-2/#duration
+ */
+ static bool convertTimeDuration( const rtl::OUString& rString, ::Time& rTime, sal_Int32* pSecondsFraction = NULL );
+
+ /** convert string to ::basegfx::B3DVector */
+ static sal_Bool convertB3DVector( ::basegfx::B3DVector& rVector,
+ const ::rtl::OUString& rValue );
+
+ /** convert B3DVector to string */
+ static void convertB3DVector( ::rtl::OUStringBuffer &rBuffer,
+ const ::basegfx::B3DVector& rVector );
+
+ /** convert string to Position3D */
+ sal_Bool convertPosition3D( com::sun::star::drawing::Position3D& rPosition,
+ const ::rtl::OUString& rValue );
+
+ /** convert Position3D to string */
+ void convertPosition3D( ::rtl::OUStringBuffer &rBuffer,
+ const com::sun::star::drawing::Position3D& rVector );
+
+ /** convert util::DateTime to ISO Date String */
+ static void convertDateTime( ::rtl::OUStringBuffer& rBuffer,
+ const com::sun::star::util::DateTime& rDateTime,
+ sal_Bool bAddTimeIf0AM=sal_False );
+
+ /** convert ISO Date String to util::DateTime */
+ static sal_Bool convertDateTime( com::sun::star::util::DateTime& rDateTime,
+ const ::rtl::OUString& rString );
+
+ /** gets the position of the first comma after npos in the string
+ rStr. Commas inside '"' pairs are not matched */
+ static sal_Int32 indexOfComma( const ::rtl::OUString& rStr,
+ sal_Int32 nPos );
+
+ static void encodeBase64(rtl::OUStringBuffer& aStrBuffer, const com::sun::star::uno::Sequence<sal_Int8>& aPass);
+
+ // Decode a base 64 encoded string into a sequence of bytes. The first
+ // version can be used for attribute values only, bacause it does not
+ // return any chars left from conversion.
+ // For text submitted throgh the SAX characters call, the later method
+ // must be used!
+ static void decodeBase64(com::sun::star::uno::Sequence<sal_Int8>& aPass, const rtl::OUString& sBuffer);
+
+ static sal_Int32 decodeBase64SomeChars(com::sun::star::uno::Sequence<sal_Int8>& aPass, const rtl::OUString& sBuffer);
+
+ /** convert num-forat and num-letter-sync values to NumberingType */
+ sal_Bool convertNumFormat( sal_Int16& rType,
+ const ::rtl::OUString& rNumFormat,
+ const ::rtl::OUString& rNumLetterSync,
+ sal_Bool bNumberNone = sal_False ) const;
+
+ /** convert NumberingType to num-forat and num-letter-sync values */
+ void convertNumFormat( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int16 nType ) const;
+ void convertNumLetterSync( ::rtl::OUStringBuffer& rBuffer,
+ sal_Int16 nType ) const;
+
+ static void convertPropertySet(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rProps,
+ const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& aProperties);
+ static void convertPropertySet(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& rProperties,
+ const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aProps);
+
+ static void clearUndefinedChars(rtl::OUString& rTarget, const rtl::OUString& rSource);
+
+ ::rtl::OUString encodeStyleName( const ::rtl::OUString& rName,
+ sal_Bool *pEncoded=0 ) const;
+
+ /** convert an Any to string (typesafe) */
+ static sal_Bool convertAny( ::rtl::OUStringBuffer& sValue,
+ ::rtl::OUStringBuffer& sType ,
+ const com::sun::star::uno::Any& aValue);
+
+ /** convert a string to Any (typesafe) */
+ static sal_Bool convertAny( com::sun::star::uno::Any& aValue,
+ const ::rtl::OUString& sType ,
+ const ::rtl::OUString& sValue);
+};
+
+inline void SvXMLUnitConverter::setCoreMeasureUnit( MapUnit eCoreMeasureUnit )
+{
+ meCoreMeasureUnit = eCoreMeasureUnit;
+}
+
+inline MapUnit SvXMLUnitConverter::getCoreMeasureUnit() const
+{
+ return meCoreMeasureUnit;
+}
+
+inline void SvXMLUnitConverter::setXMLMeasureUnit( MapUnit eXMLMeasureUnit )
+{
+ meXMLMeasureUnit = eXMLMeasureUnit;
+}
+
+inline MapUnit SvXMLUnitConverter::getXMLMeasureUnit() const
+{
+ return meXMLMeasureUnit;
+}
+
+#endif // _XMLOFF_XMLUCONV_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmlreg.hxx b/xmloff/inc/xmlreg.hxx
new file mode 100644
index 000000000000..df5e6f366677
--- /dev/null
+++ b/xmloff/inc/xmlreg.hxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLREG_HXX
+#define _XMLOFF_XMLREG_HXX
+
+#include <rtl/ref.hxx>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+/**
+ * Register subset of UNO services from XML Office library. This is necessary when
+ * linking against the static "xol.lib".
+ *
+ * @return returns sal_False if at least one component could not be registered.
+ */
+sal_Bool XMLRegisterServices( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > ); /// [all] ServiceProvider to register in.
+
+#endif // _XMLOFF_XMLREG_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmltabe.hxx b/xmloff/inc/xmltabe.hxx
new file mode 100644
index 000000000000..c3bfa0d82ce8
--- /dev/null
+++ b/xmloff/inc/xmltabe.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTABE_HXX
+#define _XMLOFF_XMLTABE_HXX
+
+// prevent funny things like "#define sun 1" from the compiler
+#include <sal/config.h>
+
+class SvXMLExport;
+namespace com { namespace sun { namespace star {
+ namespace style { struct TabStop; }
+ namespace uno { class Any; }
+} } }
+
+
+class SvxXMLTabStopExport
+{
+ SvXMLExport& rExport; // for access to document handler
+
+protected:
+
+ void exportTabStop( const ::com::sun::star::style::TabStop* pTabStop );
+
+public:
+
+ SvxXMLTabStopExport( SvXMLExport& rExport );
+ virtual ~SvxXMLTabStopExport();
+
+ // core API
+ void Export( const ::com::sun::star::uno::Any& rAny );
+};
+
+
+#endif // _XMLOFF_XMLTABE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx
new file mode 100644
index 000000000000..3859c8e00279
--- /dev/null
+++ b/xmloff/inc/xmltabi.hxx
@@ -0,0 +1,67 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLTABI_HXX
+#define _XMLOFF_XMLTABI_HXX
+
+#include "XMLElementPropertyContext.hxx"
+
+class SvxXMLTabStopArray_Impl;
+class SvXMLImport;
+
+namespace rtl
+{
+ class OUString;
+}
+
+class SvxXMLTabStopImportContext : public XMLElementPropertyContext
+{
+private:
+ SvxXMLTabStopArray_Impl* mpTabStops;
+
+public:
+ TYPEINFO();
+
+ SvxXMLTabStopImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
+ const ::rtl::OUString& rLName,
+ const XMLPropertyState& rProp,
+ ::std::vector< XMLPropertyState > &rProps );
+
+ virtual ~SvxXMLTabStopImportContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ virtual void EndElement();
+};
+
+
+#endif // _XMLOFF_XMLTABI_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx
new file mode 100644
index 000000000000..96690c3859e7
--- /dev/null
+++ b/xmloff/inc/xmlversion.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * 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_XMLVERSION_HXX
+#define _XMLOFF_XMLVERSION_HXX
+
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/document/XDocumentRevisionListPersistence.hpp>
+#include <com/sun/star/util/RevisionTag.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
+
+#include <cppuhelper/implbase1.hxx>
+#include <xmloff/xmlictxt.hxx>
+#include <xmloff/xmlexp.hxx>
+#include <xmloff/xmlimp.hxx>
+#include <xmloff/nmspmap.hxx>
+#include <xmlnmspe.hxx>
+#include <xmloff/xmltoken.hxx>
+
+// ------------------------------------------------------------------------
+class XMLVersionListExport : public SvXMLExport
+{
+private:
+ const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& maVersions;
+public:
+ XMLVersionListExport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions,
+ const rtl::OUString &rFileName,
+ com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > &rHandler );
+ virtual ~XMLVersionListExport() {}
+
+ sal_uInt32 exportDoc( enum ::xmloff::token::XMLTokenEnum eClass );
+ void _ExportAutoStyles() {}
+ void _ExportMasterStyles () {}
+ void _ExportContent() {}
+};
+
+// ------------------------------------------------------------------------
+class XMLVersionListImport : public SvXMLImport
+{
+private:
+ com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& maVersions;
+
+protected:
+
+ // This method is called after the namespace map has been updated, but
+ // before a context for the current element has been pushed.
+ virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ const ::rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+public:
+
+ // #110897#
+ XMLVersionListImport(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
+ com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions );
+ ~XMLVersionListImport() throw();
+
+ com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >&
+ GetList() { return maVersions; }
+};
+
+// ------------------------------------------------------------------------
+class XMLVersionListContext : public SvXMLImportContext
+{
+private:
+ XMLVersionListImport & rLocalRef;
+
+public:
+
+ XMLVersionListContext( XMLVersionListImport& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ ~XMLVersionListContext();
+
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+};
+
+// ------------------------------------------------------------------------
+class XMLVersionContext: public SvXMLImportContext
+{
+private:
+ XMLVersionListImport& rLocalRef;
+
+ static sal_Bool ParseISODateTimeString(
+ const rtl::OUString& rString,
+ com::sun::star::util::DateTime& rDateTime );
+
+public:
+
+ XMLVersionContext( XMLVersionListImport& rImport,
+ sal_uInt16 nPrefix,
+ const rtl::OUString& rLocalName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
+
+ ~XMLVersionContext();
+};
+
+
+// ------------------------------------------------------------------------
+class XMLVersionListPersistence : public ::cppu::WeakImplHelper1< ::com::sun::star::document::XDocumentRevisionListPersistence >
+{
+public:
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag > SAL_CALL load( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL store( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage, const ::com::sun::star::uno::Sequence< ::com::sun::star::util::RevisionTag >& List ) throw (::com::sun::star::io::IOException, ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+};
+
+::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ XMLVersionListPersistence_getSupportedServiceNames()
+ throw();
+
+::rtl::OUString SAL_CALL XMLVersionPersistence_getImplementationName()
+ throw();
+
+::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
+ XMLVersionListPersistence_createInstance(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & )
+ throw( ::com::sun::star::uno::Exception );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */