diff options
Diffstat (limited to 'xmloff/inc/xmloff')
102 files changed, 18738 insertions, 0 deletions
diff --git a/xmloff/inc/xmloff/DashStyle.hxx b/xmloff/inc/xmloff/DashStyle.hxx new file mode 100644 index 000000000000..5d3d5b0615b4 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/DocumentSettingsContext.hxx b/xmloff/inc/xmloff/DocumentSettingsContext.hxx new file mode 100644 index 000000000000..e02a60fa689f --- /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, sal_uInt16 nPrfx, const rtl::OUString& rLName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XAttributeList>& xAttrList); + virtual ~XMLDocumentSettingsContext(); + + 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(); + +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..3e9d14d91f30 --- /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/GradientStyle.hxx b/xmloff/inc/xmloff/GradientStyle.hxx new file mode 100644 index 000000000000..89b3739312a7 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/HatchStyle.hxx b/xmloff/inc/xmloff/HatchStyle.hxx new file mode 100644 index 000000000000..c6ff364ee4f6 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/ImageStyle.hxx b/xmloff/inc/xmloff/ImageStyle.hxx new file mode 100644 index 000000000000..f35e1da77097 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/MarkerStyle.hxx b/xmloff/inc/xmloff/MarkerStyle.hxx new file mode 100644 index 000000000000..11c214c7343e --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/NamedBoolPropertyHdl.hxx b/xmloff/inc/xmloff/NamedBoolPropertyHdl.hxx new file mode 100644 index 000000000000..712b269cd57e --- /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..84685a780fdb --- /dev/null +++ b/xmloff/inc/xmloff/PageMasterStyleMap.hxx @@ -0,0 +1,159 @@ +/* -*- 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) +#define CTF_PM_FTN_LINE_STYLE (XML_PM_CTF_START + 0x0067) + +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..749ab46f8b82 --- /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..802f2445c770 --- /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..744b0bbac826 --- /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..45206492a50e --- /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..ea4c459148ad --- /dev/null +++ b/xmloff/inc/xmloff/SchXMLImportHelper.hxx @@ -0,0 +1,166 @@ +/* -*- 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* mpChartAttrTokenMap; + SvXMLTokenMap* mpPlotAreaAttrTokenMap; + 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& GetChartAttrTokenMap(); + const SvXMLTokenMap& GetPlotAreaAttrTokenMap(); + 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 </sal_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 </sal_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..6d42f5df0f8a --- /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..4458417a125b --- /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 <boost/unordered_map.hpp> +#include <xmloff/PropertySetInfoHash.hxx> + +typedef boost::unordered_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/VisAreaContext.hxx b/xmloff/inc/xmloff/VisAreaContext.hxx new file mode 100644 index 000000000000..cdb04a90c802 --- /dev/null +++ b/xmloff/inc/xmloff/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, sal_uInt16 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, sal_uInt16 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( sal_uInt16 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/xmloff/VisAreaExport.hxx b/xmloff/inc/xmloff/VisAreaExport.hxx new file mode 100644 index 000000000000..9a98db5a04f8 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/WordWrapPropertyHdl.hxx b/xmloff/inc/xmloff/WordWrapPropertyHdl.hxx new file mode 100644 index 000000000000..a39b5b55878f --- /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..e94e7ae18371 --- /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, 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::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..6ced863e9391 --- /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..5e3024909b26 --- /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/XMLEmbeddedObjectExportFilter.hxx b/xmloff/inc/xmloff/XMLEmbeddedObjectExportFilter.hxx new file mode 100644 index 000000000000..2c9af8b4c400 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/XMLEventExport.hxx b/xmloff/inc/xmloff/XMLEventExport.hxx new file mode 100644 index 000000000000..991ec360c55b --- /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..7d0f47d6e4a0 --- /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/XMLFilterServiceNames.h b/xmloff/inc/xmloff/XMLFilterServiceNames.h new file mode 100755 index 000000000000..627f3bbcda9b --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/XMLFontAutoStylePool.hxx b/xmloff/inc/xmloff/XMLFontAutoStylePool.hxx new file mode 100644 index 000000000000..6016f15b0c07 --- /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..9813ab708302 --- /dev/null +++ b/xmloff/inc/xmloff/XMLFontStylesContext.hxx @@ -0,0 +1,98 @@ +/* -*- 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" + +#include <vector> + +#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..6a1731f84529 --- /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..9b9bd2781e75 --- /dev/null +++ b/xmloff/inc/xmloff/XMLPageExport.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_XMLPAGEEXPORT_HXX +#define _XMLOFF_XMLPAGEEXPORT_HXX + +#include "sal/config.h" +#include "xmloff/dllapi.h" +#include "sal/types.h" +#include <rtl/ustring.hxx> +#include <vector> +#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..aea52317e90a --- /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..de35727e7a5c --- /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..3f63fc96c7d8 --- /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/XMLTextListAutoStylePool.hxx b/xmloff/inc/xmloff/XMLTextListAutoStylePool.hxx new file mode 100644 index 000000000000..b1dbb673c1a5 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/XMLTextMasterPageContext.hxx b/xmloff/inc/xmloff/XMLTextMasterPageContext.hxx new file mode 100644 index 000000000000..67c3e99698e7 --- /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..38052c59fc4a --- /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..064beff7aede --- /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/XMLTextShapeImportHelper.hxx b/xmloff/inc/xmloff/XMLTextShapeImportHelper.hxx new file mode 100644 index 000000000000..7dd3526ec93c --- /dev/null +++ b/xmloff/inc/xmloff/XMLTextShapeImportHelper.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 _XMLTEXTSHAPEIMPORTHELPER_HXX +#define _XMLTEXTSHAPEIMPORTHELPER_HXX + +#include "sal/config.h" +#include "xmloff/dllapi.h" +#include <xmloff/shapeimport.hxx> + +class XMLOFF_DLLPUBLIC XMLTextShapeImportHelper : public XMLShapeImportHelper +{ + SvXMLImport& rImport; + + const ::rtl::OUString sAnchorType; + const ::rtl::OUString sAnchorPageNo; + const ::rtl::OUString sVertOrientPosition; + +public: + + XMLTextShapeImportHelper( SvXMLImport& rImp ); + ~XMLTextShapeImportHelper(); + + 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 ); +}; + +#endif + +/* 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..246491d2484d --- /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..81112f926035 --- /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..7726d5a411b5 --- /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..33a2fcb8184b --- /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..e4fffcd4cced --- /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..ffb636cd7163 --- /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 100755 index 000000000000..d89653cccb71 --- /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..2751efa81770 --- /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..f628dcffd869 --- /dev/null +++ b/xmloff/inc/xmloff/formlayerexport.hxx @@ -0,0 +1,211 @@ +/* -*- 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> + <Forms> + .... // all the forms stuff here + </Forms> + </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; + + /** 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..5f814f6638fc --- /dev/null +++ b/xmloff/inc/xmloff/formlayerimport.hxx @@ -0,0 +1,168 @@ +/* -*- 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 <form:form> element + */ + class XMLOFF_DLLPUBLIC OFormLayerXMLImport + :public ::salhelper::SimpleReferenceObject + { + OFormLayerXMLImport_Impl* m_pImpl; + + public: + OFormLayerXMLImport(SvXMLImport& _rImporter); + ~OFormLayerXMLImport(); + + /** 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 <form:form> + 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..3fadb7195e51 --- /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( sal_uInt16 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/functional.hxx b/xmloff/inc/xmloff/functional.hxx new file mode 100644 index 000000000000..c7b4938d2925 --- /dev/null +++ b/xmloff/inc/xmloff/functional.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_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/xmloff/i18nmap.hxx b/xmloff/inc/xmloff/i18nmap.hxx new file mode 100644 index 000000000000..2f56e26bf5f8 --- /dev/null +++ b/xmloff/inc/xmloff/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( sal_uInt16 nKind, + const ::rtl::OUString& rName ) const; + +public: + + SvI18NMap(); + ~SvI18NMap(); + + // Add a name mapping + void Add( sal_uInt16 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( sal_uInt16 nKind, + const ::rtl::OUString& rName ) const; +}; + + +#endif // _XMLOFF_I18NMAP_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..a4afdd020887 --- /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..e56983a58df8 --- /dev/null +++ b/xmloff/inc/xmloff/nmspmap.hxx @@ -0,0 +1,186 @@ +/* -*- 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 <boost/unordered_map.hpp> +#include <map> +#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 ::boost::unordered_map < QNamePair, ::rtl::OUString, QNamePairHash, QNamePairEq > QNameCache; +typedef ::boost::unordered_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/numehelp.hxx b/xmloff/inc/xmloff/numehelp.hxx new file mode 100644 index 000000000000..f6eeeed55877 --- /dev/null +++ b/xmloff/inc/xmloff/numehelp.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_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> + +#include <set> + +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/xmloff/odffields.hxx b/xmloff/inc/xmloff/odffields.hxx new file mode 100644 index 000000000000..ae2c78ddc59f --- /dev/null +++ b/xmloff/inc/xmloff/odffields.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 2008 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. + * + ************************************************************************/ + +/* + * 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..c13d43654dea --- /dev/null +++ b/xmloff/inc/xmloff/prhdlfac.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_PROPERTYHANDLERFACTORY_HXX +#define _XMLOFF_PROPERTYHANDLERFACTORY_HXX + +#include "sal/config.h" +#include "xmloff/dllapi.h" +#include "sal/types.h" + +#include <map> +#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..d777206da2a2 --- /dev/null +++ b/xmloff/inc/xmloff/prstylei.hxx @@ -0,0 +1,108 @@ +/* -*- 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> +#include <vector> +#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..fd97c522f257 --- /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..80e4f861cfbe --- /dev/null +++ b/xmloff/inc/xmloff/shapeimport.hxx @@ -0,0 +1,443 @@ +/* -*- 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> +#include <vector> + +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; } + sal_Bool GetEnabled() { return mbEnabled; } + sal_Bool GetSpecular() { return mbSpecular; } +}; + +////////////////////////////////////////////////////////////////////////////// + +typedef ::std::vector< SdXML3DLightContext* > Imp3DLightList; + +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; + sal_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; + sal_Bool mbVRPUsed; + sal_Bool mbVPNUsed; + sal_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, sal_uInt16 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, sal_uInt16 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..3931c76146ef --- /dev/null +++ b/xmloff/inc/xmloff/styleexp.hxx @@ -0,0 +1,136 @@ +/* -*- 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 + { + class XNameAccess; + } + +} } } + +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; + + SvXMLExport& GetExport() { return rExport; } + const SvXMLExport& GetExport() const { return rExport; } + +private: + + const ::rtl::OUString sPoolStyleName; + + SvXMLAutoStylePoolP *pAutoStylePool; + +protected: + + virtual sal_Bool exportStyle( + 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 ); + + 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..8b51d1e30c70 --- /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..3479129e66cb --- /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( sal_uInt16 nPrfx, const ::rtl::OUString& rLName, + ::com::sun::star::uno::Reference< ::com::sun::star::table::XColumnRowRange >& xColumnRowRange ); + + SvXMLStyleContext* CreateTableTemplateContext( sal_uInt16 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..e625cb66b0d4 --- /dev/null +++ b/xmloff/inc/xmloff/txtimp.hxx @@ -0,0 +1,743 @@ +/* -*- 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 <xmloff/xmltkmap.hxx> + +// xmloff/functional.hxx is obsolete and should be replaced by its comphelper +// counterpart +#include <comphelper/stl_types.hxx> +#include <xmloff/uniref.hxx> + +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, + 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 + +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; + + ::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); + + // Add parameter <bOutlineLevelAttrFound> (#i73509#) + // Add parameter <bSetListAttrs> in order to suppress the handling of the list attributes (#i80724#) + ::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. + */ + // Adjust 2nd parameter (#i69629#) + void FindOutlineStyleName( ::rtl::OUString& rStyleName, + sal_Int8 nOutlineLevel ); + + // Change method name to reflect change of data structure (#i69629#) + 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(); + + 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/txtimppr.hxx b/xmloff/inc/xmloff/txtimppr.hxx new file mode 100644 index 000000000000..1a1394b87386 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx new file mode 100644 index 000000000000..c354fc5fbcaa --- /dev/null +++ b/xmloff/inc/xmloff/txtparae.hxx @@ -0,0 +1,735 @@ +/* -*- 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> +#include <vector> + +class XMLTextListsHelper; +class SvXMLExport; +class SvXMLAutoStylePoolP; +class XMLTextFieldExport; +class OUStrings_Impl; +class OUStringsSort_Impl; +class XMLTextNumRuleInfo; +class XMLTextListAutoStylePool; +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; + 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; + + XMLTextListsHelper* mpTextListsHelper; + ::std::vector< XMLTextListsHelper* > maTextListsHelperStack; + + enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE }; + +protected: + + const ::rtl::OUString sActualSize; + // Implement Title/Description Elements UI (#i73249#) + 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& rProperty, + 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 ); + + // Implement Title/Description Elements UI (#i73249#) + 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 ); + + 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..88c7d0aa63df --- /dev/null +++ b/xmloff/inc/xmloff/txtprmap.hxx @@ -0,0 +1,206 @@ +/* -*- 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) +/* 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. (#i28749#) +*/ +#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..67a0762cb001 --- /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..79eb6cfb3cd5 --- /dev/null +++ b/xmloff/inc/xmloff/txtstyli.hxx @@ -0,0 +1,121 @@ +/* -*- 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; + +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; + + // Introduce import of empty list style (#i69523#) + 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; } + // XML import: reconstrution of assignment of paragraph style to outline levels (#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..0a9d8e9dd6d4 --- /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/unoatrcn.hxx b/xmloff/inc/xmloff/unoatrcn.hxx new file mode 100644 index 000000000000..a393b033ee10 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/xformsexport.hxx b/xmloff/inc/xmloff/xformsexport.hxx new file mode 100644 index 000000000000..1c6b1c7122af --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/xformsimport.hxx b/xmloff/inc/xmloff/xformsimport.hxx new file mode 100644 index 000000000000..09136241706c --- /dev/null +++ b/xmloff/inc/xmloff/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 sal_uInt16 +#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, + sal_uInt16 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/xmloff/xmlaustp.hxx b/xmloff/inc/xmloff/xmlaustp.hxx new file mode 100644 index 000000000000..1eb26a766e90 --- /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..013dfb874733 --- /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; + + 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_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; + + sal_Bool SetAt( sal_uInt16 i, + const ::rtl::OUString& rLName, const rtl::OUString& rValue ); + sal_Bool SetAt( sal_uInt16 i, + const ::rtl::OUString& rPrefix, const rtl::OUString& rNamespace, + const ::rtl::OUString& rLName, const rtl::OUString& rValue ); + sal_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/xmlcnitm.hxx b/xmloff/inc/xmloff/xmlcnitm.hxx new file mode 100644 index 000000000000..9f65282816c0 --- /dev/null +++ b/xmloff/inc/xmloff/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, sal_uInt8 nMemberId = 0 ) const; + virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 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/xmloff/xmlement.hxx b/xmloff/inc/xmloff/xmlement.hxx new file mode 100644 index 000000000000..58845603963e --- /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/xmlerror.hxx b/xmloff/inc/xmloff/xmlerror.hxx new file mode 100644 index 000000000000..46595f6737a8 --- /dev/null +++ b/xmloff/inc/xmloff/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_OCCURRED 0x0002 +#define ERROR_WARNING_OCCURRED 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/xmloff/xmlevent.hxx b/xmloff/inc/xmloff/xmlevent.hxx new file mode 100644 index 000000000000..2b240d350c35 --- /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..153065f9b970 --- /dev/null +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -0,0 +1,725 @@ +/* -*- 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; + +// Shapes in Writer cannot be named via context menu (#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: + + // Shapes in Writer cannot be named via context menu (#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(RTL_CONSTASCII_USTRINGPARAM("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 occurred 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; + + // Shapes in Writer cannot be named via context menu (#i51726#) + SvtModuleOptions::EFactory GetModelType() const + { + return meModelType; + } + + // Written OpenDocument file format doesn't fit to the created text document (#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); + + 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..2cbafe089910 --- /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..52a358431029 --- /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; + + sal_uInt16 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(); + + sal_uInt16 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, sal_uInt16 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( sal_uInt16 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..02b90a5103f5 --- /dev/null +++ b/xmloff/inc/xmloff/xmlimp.hxx @@ -0,0 +1,536 @@ +/* -*- 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 occurred 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; + + // Convert drawing object positions from OOo file format to OASIS file format and vice versa (#i28749#) + sal_Bool IsShapePositionInHoriL2R() const; + + 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..eb1e245a044a --- /dev/null +++ b/xmloff/inc/xmloff/xmlimppr.hxx @@ -0,0 +1,210 @@ +/* -*- 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> + +#include <vector> +#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/xmlkywd.hxx b/xmloff/inc/xmloff/xmlkywd.hxx new file mode 100644 index 000000000000..bce52d875b52 --- /dev/null +++ b/xmloff/inc/xmloff/xmlkywd.hxx @@ -0,0 +1,1998 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _XMLOFF_XMLKYWD_HXX +#define _XMLOFF_XMLKYWD_HXX + +#include <tools/string.hxx> + +/* + * THIS FILE IS DEPRECATED. IT IS SUPERSEDED BY XMLTOKEN.HXX. + * + * Please use xmltoken.hxx / xmltoken.cxx from now on. + */ + + +/* if XML_DEFINE_KEYWORDS is defined the variables are + defined rather than declared. So this file MUST be included + WITHOUT this define. + + (Except the xmlkywd.cxx file that actually defines the + variables which sets this define.) + */ + +#ifndef XML_DEFINE_KEYWORDS +#define XML_CONSTASCII_ACTION( n, s ) extern sal_Char __FAR_DATA n[sizeof(s)] +#else +#define XML_CONSTASCII_ACTION( n, s ) sal_Char __FAR_DATA n[sizeof(s)] = s +#endif + +// common XML +XML_CONSTASCII_ACTION( sXML_CDATA, "CDATA" ); +XML_CONSTASCII_ACTION( sXML_WS, " " ); +XML_CONSTASCII_ACTION( sXML_xml, "xml" ); +XML_CONSTASCII_ACTION( sXML_xmlns, "xmlns" ); +XML_CONSTASCII_ACTION( sXML_xml_pi, "version=\"1.0\" encoding=\"UTF-8\"" ); +XML_CONSTASCII_ACTION( sXML_xml_doctype_prefix, "<!DOCTYPE " ); +XML_CONSTASCII_ACTION( sXML_xml_doctype_suffix, " PUBLIC \"-//OpenOffice.org//DTD OfficeDocument 1.0//EN\" \"office.dtd\">" ); + +// namespace prefixes and names +XML_CONSTASCII_ACTION( sXML_np_office, "office" ); +XML_CONSTASCII_ACTION( sXML_n_office, "http://openoffice.org/2000/office" ); +XML_CONSTASCII_ACTION( sXML_n_office_old, "http://sun.com/xmlns/staroffice/office" ); +XML_CONSTASCII_ACTION( sXML_np_meta, "meta" ); +XML_CONSTASCII_ACTION( sXML_n_meta, "http://openoffice.org/2000/meta" ); +XML_CONSTASCII_ACTION( sXML_n_meta_old, "http://sun.com/xmlns/staroffice/meta" ); +XML_CONSTASCII_ACTION( sXML_np_style, "style" ); +XML_CONSTASCII_ACTION( sXML_n_style, "http://openoffice.org/2000/style" ); +XML_CONSTASCII_ACTION( sXML_n_style_old, "http://sun.com/xmlns/staroffice/style" ); +XML_CONSTASCII_ACTION( sXML_np_number, "number" ); +XML_CONSTASCII_ACTION( sXML_n_number, "http://openoffice.org/2000/datastyle" ); +XML_CONSTASCII_ACTION( sXML_n_number_old, "http://sun.com/xmlns/staroffice/number" ); +XML_CONSTASCII_ACTION( sXML_np_text, "text" ); +XML_CONSTASCII_ACTION( sXML_n_text, "http://openoffice.org/2000/text" ); +XML_CONSTASCII_ACTION( sXML_n_text_old, "http://sun.com/xmlns/staroffice/text" ); +XML_CONSTASCII_ACTION( sXML_np_table, "table" ); +XML_CONSTASCII_ACTION( sXML_n_table, "http://openoffice.org/2000/table" ); +XML_CONSTASCII_ACTION( sXML_n_table_old, "http://sun.com/xmlns/staroffice/table" ); +XML_CONSTASCII_ACTION( sXML_np_draw, "draw" ); +XML_CONSTASCII_ACTION( sXML_n_draw, "http://openoffice.org/2000/drawing" ); +XML_CONSTASCII_ACTION( sXML_np_dr3d, "dr3d" ); +XML_CONSTASCII_ACTION( sXML_n_dr3d, "http://openoffice.org/2000/dr3d" ); +XML_CONSTASCII_ACTION( sXML_n_draw_old, "http://sun.com/xmlns/staroffice/draw" ); +XML_CONSTASCII_ACTION( sXML_np_presentation, "presentation" ); +XML_CONSTASCII_ACTION( sXML_n_presentation, "http://openoffice.org/2000/presentation" ); +XML_CONSTASCII_ACTION( sXML_n_presentation_old, "http://sun.com/xmlns/staroffice/presentation" ); +XML_CONSTASCII_ACTION( sXML_np_chart, "chart" ); +XML_CONSTASCII_ACTION( sXML_n_chart, "http://openoffice.org/2000/chart" ); +XML_CONSTASCII_ACTION( sXML_np_config, "config" ); +XML_CONSTASCII_ACTION( sXML_n_config, "http://openoffice.org/2001/config" ); +XML_CONSTASCII_ACTION( sXML_n_chart_old, "http://sun.com/xmlns/staroffice/chart" ); +XML_CONSTASCII_ACTION( sXML_np_fo, "fo" ); +XML_CONSTASCII_ACTION( sXML_n_fo_old, "http://www.w3.org/1999/XSL/Format/" ); +XML_CONSTASCII_ACTION( sXML_n_fo, "http://www.w3.org/1999/XSL/Format" ); +XML_CONSTASCII_ACTION( sXML_np_xlink, "xlink" ); +XML_CONSTASCII_ACTION( sXML_n_xlink, "http://www.w3.org/1999/xlink" ); +XML_CONSTASCII_ACTION( sXML_n_xlink_old, "http://www.w3.org/1999/xlink/namespace" ); +XML_CONSTASCII_ACTION( sXML_np_dc, "dc" ); +XML_CONSTASCII_ACTION( sXML_n_dc, "http://purl.org/dc/elements/1.1/" ); +XML_CONSTASCII_ACTION( sXML_np_svg, "svg" ); +XML_CONSTASCII_ACTION( sXML_n_svg, "http://www.w3.org/2000/svg" ); +XML_CONSTASCII_ACTION( sXML_namespace_form, "form" ); +XML_CONSTASCII_ACTION( sXML_url_form, "http://openoffice.org/2000/form" ); +XML_CONSTASCII_ACTION( sXML_namespace_script, "script" ); +XML_CONSTASCII_ACTION( sXML_url_script, "http://openoffice.org/2000/script" ); + +XML_CONSTASCII_ACTION( sXML_np_block_list, "block-list"); +XML_CONSTASCII_ACTION( sXML_n_block_list, "http://openoffice.org/2001/block-list" ); + +XML_CONSTASCII_ACTION( sXML_np_math, "math"); +XML_CONSTASCII_ACTION( sXML_n_math, "http://www.w3.org/1998/Math/MathML" ); + +XML_CONSTASCII_ACTION( sXML_np_versions_list, "VL"); +XML_CONSTASCII_ACTION( sXML_n_versions_list, "http://openoffice.org/2001/versions-list" ); + +// units +XML_CONSTASCII_ACTION( sXML_unit_mm, "mm" ); +XML_CONSTASCII_ACTION( sXML_unit_m, "m" ); +XML_CONSTASCII_ACTION( sXML_unit_km, "km" ); +XML_CONSTASCII_ACTION( sXML_unit_cm, "cm" ); +XML_CONSTASCII_ACTION( sXML_unit_pt, "pt" ); +XML_CONSTASCII_ACTION( sXML_unit_pc, "pc" ); +XML_CONSTASCII_ACTION( sXML_unit_foot, "ft" ); +XML_CONSTASCII_ACTION( sXML_unit_miles, "mi" ); +XML_CONSTASCII_ACTION( sXML_unit_inch, "inch" ); + +// any other +XML_CONSTASCII_ACTION( sXML_1, "1" ); +XML_CONSTASCII_ACTION( sXML_10, "10" ); +XML_CONSTASCII_ACTION( sXML_2, "2" ); +XML_CONSTASCII_ACTION( sXML_3, "3" ); +XML_CONSTASCII_ACTION( sXML_4, "4" ); +XML_CONSTASCII_ACTION( sXML_5, "5" ); +XML_CONSTASCII_ACTION( sXML_6, "6" ); +XML_CONSTASCII_ACTION( sXML_7, "7" ); +XML_CONSTASCII_ACTION( sXML_8, "8" ); +XML_CONSTASCII_ACTION( sXML_9, "9" ); +XML_CONSTASCII_ACTION( sXML_A, "A" ); +XML_CONSTASCII_ACTION( sXML_I, "I" ); +XML_CONSTASCII_ACTION( sXML_IBM437, "IBM437" ); +XML_CONSTASCII_ACTION( sXML_IBM850, "IBM850" ); +XML_CONSTASCII_ACTION( sXML_IBM860, "IBM860" ); +XML_CONSTASCII_ACTION( sXML_IBM861, "IBM861" ); +XML_CONSTASCII_ACTION( sXML_IBM863, "IBM863" ); +XML_CONSTASCII_ACTION( sXML_IBM865, "IBM865" ); +XML_CONSTASCII_ACTION( sXML_ISO_8859_1, "ISO-8859-1" ); +XML_CONSTASCII_ACTION( sXML_OLE2, "ole2" ); +XML_CONSTASCII_ACTION( sXML__colon, ":" ); +XML_CONSTASCII_ACTION( sXML__empty, "" ); +XML_CONSTASCII_ACTION( sXML__unknown_, "_unknown_" ); +XML_CONSTASCII_ACTION( sXML_a, "a" ); +XML_CONSTASCII_ACTION( sXML_abbreviated_name, "abbreviated-name" ); +XML_CONSTASCII_ACTION( sXML_above, "above" ); +XML_CONSTASCII_ACTION( sXML_abs, "abs" ); +XML_CONSTASCII_ACTION( sXML_accent, "accent" ); +XML_CONSTASCII_ACTION( sXML_accentunder, "accentunder" ); +XML_CONSTASCII_ACTION( sXML_acceptance_state, "acceptance-state" ); +XML_CONSTASCII_ACTION( sXML_accepted, "accepted" ); +XML_CONSTASCII_ACTION( sXML_action, "action" ); +XML_CONSTASCII_ACTION( sXML_active, "active" ); +XML_CONSTASCII_ACTION( sXML_active_split_range, "active-split-range" ); +XML_CONSTASCII_ACTION( sXML_active_table, "active-table" ); +XML_CONSTASCII_ACTION( sXML_actuate, "actuate" ); +XML_CONSTASCII_ACTION( sXML_add_in, "add-in" ); +XML_CONSTASCII_ACTION( sXML_add_in_name, "add-in-name" ); +XML_CONSTASCII_ACTION( sXML_address, "address" ); +XML_CONSTASCII_ACTION( sXML_adjustment, "adjustment" ); +XML_CONSTASCII_ACTION( sXML_algorithm, "algorithm" ); +XML_CONSTASCII_ACTION( sXML_align, "align" ); +XML_CONSTASCII_ACTION( sXML_all, "all" ); +XML_CONSTASCII_ACTION( sXML_allow_empty_cell, "allow-empty-cell" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index, "alphabetical-index" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index_auto_mark_file, "alphabetical-index-auto-mark-file" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index_entry_template, "alphabetical-index-entry-template" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark, "alphabetical-index-mark" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark_end, "alphabetical-index-mark-end" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index_mark_start, "alphabetical-index-mark-start" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_index_source, "alphabetical-index-source" ); +XML_CONSTASCII_ACTION( sXML_alphabetical_separators, "alphabetical-separators" ); +XML_CONSTASCII_ACTION( sXML_alternate, "alternate" ); +XML_CONSTASCII_ACTION( sXML_am_pm, "am-pm" ); +XML_CONSTASCII_ACTION( sXML_ambient_color, "ambient-color"); +XML_CONSTASCII_ACTION( sXML_anchor_page_number, "anchor-page-number" ); +XML_CONSTASCII_ACTION( sXML_anchor_type, "anchor-type" ); +XML_CONSTASCII_ACTION( sXML_and, "and" ); +XML_CONSTASCII_ACTION( sXML_animation, "animation" ); +XML_CONSTASCII_ACTION( sXML_animation_direction, "animation-direction" ); +XML_CONSTASCII_ACTION( sXML_animation_start_inside, "animation-start-inside" ); +XML_CONSTASCII_ACTION( sXML_animation_stop_inside, "animation-stop-inside" ); +XML_CONSTASCII_ACTION( sXML_animation_repeat, "animation-repeat" ); +XML_CONSTASCII_ACTION( sXML_animation_delay, "animation-delay" ); +XML_CONSTASCII_ACTION( sXML_animation_steps, "animation-steps" ); +XML_CONSTASCII_ACTION( sXML_annotation, "annotation" ); +XML_CONSTASCII_ACTION( sXML_annotations, "annotations" ); +XML_CONSTASCII_ACTION( sXML_annote, "annote" ); +XML_CONSTASCII_ACTION( sXML_applet, "applet"); +XML_CONSTASCII_ACTION( sXML_applet_name, "applet-name"); +XML_CONSTASCII_ACTION( sXML_application_data, "application-data"); +XML_CONSTASCII_ACTION( sXML_application_xml, "application-xml"); +XML_CONSTASCII_ACTION( sXML_apply, "apply" ); +XML_CONSTASCII_ACTION( sXML_apply_style_name, "apply-style-name" ); +XML_CONSTASCII_ACTION( sXML_aqua, "aqua" ); +XML_CONSTASCII_ACTION( sXML_arccos, "arccos" ); +XML_CONSTASCII_ACTION( sXML_archive, "archive" ); +XML_CONSTASCII_ACTION( sXML_arcsin, "arcsin" ); +XML_CONSTASCII_ACTION( sXML_arctan, "arctan" ); +XML_CONSTASCII_ACTION( sXML_area, "area" ); +XML_CONSTASCII_ACTION( sXML_area_circle, "area-circle" ); +XML_CONSTASCII_ACTION( sXML_area_polygon, "area-polygon" ); +XML_CONSTASCII_ACTION( sXML_area_rectangle, "area-rectangle" ); +XML_CONSTASCII_ACTION( sXML_article, "article" ); +XML_CONSTASCII_ACTION( sXML_as_char, "as-char" ); +XML_CONSTASCII_ACTION( sXML_ascending, "ascending"); +XML_CONSTASCII_ACTION( sXML_attached_axis, "attached-axis" ); +XML_CONSTASCII_ACTION( sXML_attractive, "attractive"); +XML_CONSTASCII_ACTION( sXML_author, "author" ); +XML_CONSTASCII_ACTION( sXML_author_initials, "author-initials" ); +XML_CONSTASCII_ACTION( sXML_author_name, "author-name" ); +XML_CONSTASCII_ACTION( sXML_auto, "auto" ); +XML_CONSTASCII_ACTION( sXML_auto_grow_height, "auto-grow-height" ); +XML_CONSTASCII_ACTION( sXML_auto_grow_width, "auto-grow-width" ); +XML_CONSTASCII_ACTION( sXML_auto_reload, "auto-reload" ); +XML_CONSTASCII_ACTION( sXML_auto_text, "auto-text" ); +XML_CONSTASCII_ACTION( sXML_auto_text_events, "auto-text-events" ); +XML_CONSTASCII_ACTION( sXML_auto_text_group, "auto-text-group" ); +XML_CONSTASCII_ACTION( sXML_auto_text_indent, "auto-text-indent" ); +XML_CONSTASCII_ACTION( sXML_up, "up" ); +XML_CONSTASCII_ACTION( sXML_auto_update, "auto-update" ); +XML_CONSTASCII_ACTION( sXML_automatic, "automatic"); +XML_CONSTASCII_ACTION( sXML_automatic_find_labels, "automatic-find-labels" ); +XML_CONSTASCII_ACTION( sXML_automatic_order, "automatic-order" ); +XML_CONSTASCII_ACTION( sXML_automatic_styles, "automatic-styles" ); +XML_CONSTASCII_ACTION( sXML_automatic_update, "automatic-update" ); +XML_CONSTASCII_ACTION( sXML_average, "average" ); +XML_CONSTASCII_ACTION( sXML_axis, "axis" ); +XML_CONSTASCII_ACTION( sXML_back_scale, "back-scale" ); +XML_CONSTASCII_ACTION( sXML_backface_culling, "backface-culling" ); +XML_CONSTASCII_ACTION( sXML_background, "background" ); +XML_CONSTASCII_ACTION( sXML_background_color, "background-color" ); +XML_CONSTASCII_ACTION( sXML_background_image, "background-image" ); +XML_CONSTASCII_ACTION( sXML_background_no_repeat, "no-repeat" ); +XML_CONSTASCII_ACTION( sXML_background_objects_visible, "background-objects-visible" ); +XML_CONSTASCII_ACTION( sXML_background_repeat, "repeat" ); +XML_CONSTASCII_ACTION( sXML_background_stretch, "stretch" ); +XML_CONSTASCII_ACTION( sXML_background_visible, "background-visible" ); +XML_CONSTASCII_ACTION( sXML_bar, "bar" ); +XML_CONSTASCII_ACTION( sXML_base64Binary, "base64Binary"); +XML_CONSTASCII_ACTION( sXML_base_cell_address, "base-cell-address"); +XML_CONSTASCII_ACTION( sXML_baseline, "baseline" ); +XML_CONSTASCII_ACTION( sXML_before_date_time, "before-date-time" ); +XML_CONSTASCII_ACTION( sXML_below , "below" ); +XML_CONSTASCII_ACTION( sXML_between_date_times, "between-date-times" ); +XML_CONSTASCII_ACTION( sXML_bevel , "bevel" ); +XML_CONSTASCII_ACTION( sXML_bibiliographic_type, "bibiliographic-type" ); +XML_CONSTASCII_ACTION( sXML_bibliography, "bibliography" ); +XML_CONSTASCII_ACTION( sXML_bibliography_configuration, "bibliography-configuration" ); +XML_CONSTASCII_ACTION( sXML_bibliography_data_field, "bibliography-data-field" ); +XML_CONSTASCII_ACTION( sXML_bibliography_entry_template, "bibliography-entry-template" ); +XML_CONSTASCII_ACTION( sXML_bibliography_mark, "bibliography-mark" ); +XML_CONSTASCII_ACTION( sXML_bibliography_source, "bibliography-source" ); +XML_CONSTASCII_ACTION( sXML_bibliography_type, "bibliography-type" ); +XML_CONSTASCII_ACTION( sXML_bind_styles_to_content, "bind-styles-to-content"); +XML_CONSTASCII_ACTION( sXML_bitmap , "bitmap" ); +XML_CONSTASCII_ACTION( sXML_black, "black" ); +XML_CONSTASCII_ACTION( sXML_blend, "blend" ); +XML_CONSTASCII_ACTION( sXML_blinking, "blinking" ); +XML_CONSTASCII_ACTION( sXML_block, "block" ); +XML_CONSTASCII_ACTION( sXML_block_list, "block-list" ); +XML_CONSTASCII_ACTION( sXML_blue , "blue" ); +XML_CONSTASCII_ACTION( sXML_body, "body" ); +XML_CONSTASCII_ACTION( sXML_bold, "bold" ); +XML_CONSTASCII_ACTION( sXML_book, "book" ); +XML_CONSTASCII_ACTION( sXML_booklet, "booklet" ); +XML_CONSTASCII_ACTION( sXML_bookmark, "bookmark" ); +XML_CONSTASCII_ACTION( sXML_bookmark_end, "bookmark-end" ); +XML_CONSTASCII_ACTION( sXML_bookmark_ref, "bookmark-ref" ); +XML_CONSTASCII_ACTION( sXML_bookmark_start, "bookmark-start" ); +XML_CONSTASCII_ACTION( sXML_booktitle, "booktitle" ); +XML_CONSTASCII_ACTION( sXML_boolean, "boolean"); +XML_CONSTASCII_ACTION( sXML_boolean_style, "boolean-style" ); +XML_CONSTASCII_ACTION( sXML_boolean_value, "boolean-value"); +XML_CONSTASCII_ACTION( sXML_border, "border" ); +XML_CONSTASCII_ACTION( sXML_border_bottom, "border-bottom" ); +XML_CONSTASCII_ACTION( sXML_border_color, "border-color" ); +XML_CONSTASCII_ACTION( sXML_border_left, "border-left" ); +XML_CONSTASCII_ACTION( sXML_border_line_width, "border-line-width" ); +XML_CONSTASCII_ACTION( sXML_border_line_width_bottom, "border-line-width-bottom" ); +XML_CONSTASCII_ACTION( sXML_border_line_width_left, "border-line-width-left" ); +XML_CONSTASCII_ACTION( sXML_border_line_width_right, "border-line-width-right" ); +XML_CONSTASCII_ACTION( sXML_border_line_width_top, "border-line-width-top" ); +XML_CONSTASCII_ACTION( sXML_border_right, "border-right" ); +XML_CONSTASCII_ACTION( sXML_border_top, "border-top" ); +XML_CONSTASCII_ACTION( sXML_both, "both"); +XML_CONSTASCII_ACTION( sXML_bottom, "bottom" ); +XML_CONSTASCII_ACTION( sXML_bottom_percent, "bottom percent"); +XML_CONSTASCII_ACTION( sXML_bottom_values, "bottom values"); +XML_CONSTASCII_ACTION( sXML_break_after, "break-after" ); +XML_CONSTASCII_ACTION( sXML_break_before, "break-before" ); +XML_CONSTASCII_ACTION( sXML_break_inside, "break-inside" ); +XML_CONSTASCII_ACTION( sXML_bubble, "bubble" ); +XML_CONSTASCII_ACTION( sXML_bullet_char, "bullet-char" ); +XML_CONSTASCII_ACTION( sXML_bullet_relative_size, "bullet-relative-size" ); +XML_CONSTASCII_ACTION( sXML_buttons, "buttons"); +XML_CONSTASCII_ACTION( sXML_bvar, "bvar"); +XML_CONSTASCII_ACTION( sXML_c, "c" ); +XML_CONSTASCII_ACTION( sXML_cm, "cm" ); +XML_CONSTASCII_ACTION( sXML_calculation_settings, "calculation-settings" ); +XML_CONSTASCII_ACTION( sXML_calendar, "calendar" ); +XML_CONSTASCII_ACTION( sXML_capitalize_entries, "capitalize-entries" ); +XML_CONSTASCII_ACTION( sXML_caption, "caption" ); +XML_CONSTASCII_ACTION( sXML_caption_point_x, "caption-point-x" ); +XML_CONSTASCII_ACTION( sXML_caption_point_y, "caption-point-y" ); +XML_CONSTASCII_ACTION( sXML_caption_sequence_format, "caption-sequence-format" ); +XML_CONSTASCII_ACTION( sXML_caption_sequence_name, "caption-sequence-name" ); +XML_CONSTASCII_ACTION( sXML_case_sensitive, "case-sensitive"); +XML_CONSTASCII_ACTION( sXML_casemap_capitalize, "capitalize" ); +XML_CONSTASCII_ACTION( sXML_casemap_lowercase, "lowercase" ); +XML_CONSTASCII_ACTION( sXML_casemap_normal, "normal" ); +XML_CONSTASCII_ACTION( sXML_casemap_small_caps, "small-caps" ); +XML_CONSTASCII_ACTION( sXML_casemap_uppercase, "uppercase" ); +XML_CONSTASCII_ACTION( sXML_categories, "categories" ); +XML_CONSTASCII_ACTION( sXML_category, "category" ); +XML_CONSTASCII_ACTION( sXML_category_and_value, "category-and-value" ); +XML_CONSTASCII_ACTION( sXML_cell_address, "cell-address"); +XML_CONSTASCII_ACTION( sXML_cell_content_change, "cell-content-change"); +XML_CONSTASCII_ACTION( sXML_cell_content_deletion, "cell-content-deletion"); +XML_CONSTASCII_ACTION( sXML_cell_count, "cell-count"); +XML_CONSTASCII_ACTION( sXML_cell_protect, "cell-protect"); +XML_CONSTASCII_ACTION( sXML_cell_range_address, "cell-range-address"); +XML_CONSTASCII_ACTION( sXML_cell_range_address_list, "cell-range-address-list"); +XML_CONSTASCII_ACTION( sXML_cell_range_source, "cell-range-source"); +XML_CONSTASCII_ACTION( sXML_center, "center" ); +XML_CONSTASCII_ACTION( sXML_chain_next_name, "chain-next-name" ); +XML_CONSTASCII_ACTION( sXML_change, "change" ); +XML_CONSTASCII_ACTION( sXML_change_deletion, "change-deletion" ); +XML_CONSTASCII_ACTION( sXML_change_end, "change-end" ); +XML_CONSTASCII_ACTION( sXML_change_id, "change-id" ); +XML_CONSTASCII_ACTION( sXML_change_info, "change-info" ); +XML_CONSTASCII_ACTION( sXML_change_start, "change-start" ); +XML_CONSTASCII_ACTION( sXML_change_track_table_cell, "change-track-table-cell" ); +XML_CONSTASCII_ACTION( sXML_change_view_conditions, "change-view-conditions" ); +XML_CONSTASCII_ACTION( sXML_change_view_settings, "change-view-settings" ); +XML_CONSTASCII_ACTION( sXML_changed_region, "changed-region" ); +XML_CONSTASCII_ACTION( sXML_chapter, "chapter"); +XML_CONSTASCII_ACTION( sXML_char, "char" ); +XML_CONSTASCII_ACTION( sXML_character_count, "character-count" ); +XML_CONSTASCII_ACTION( sXML_chart, "chart" ); +XML_CONSTASCII_ACTION( sXML_charts, "charts" ); +XML_CONSTASCII_ACTION( sXML_chg_author, "chg-author" ); +XML_CONSTASCII_ACTION( sXML_chg_comment, "chg-comment" ); +XML_CONSTASCII_ACTION( sXML_chg_date_time, "chg-date-time" ); +XML_CONSTASCII_ACTION( sXML_ci, "ci" ); +XML_CONSTASCII_ACTION( sXML_circle, "circle" ); +XML_CONSTASCII_ACTION( sXML_citation_body_style_name, "citation-body-style-name" ); +XML_CONSTASCII_ACTION( sXML_citation_style_name, "citation-style-name" ); +XML_CONSTASCII_ACTION( sXML_class, "class" ); +XML_CONSTASCII_ACTION( sXML_class_id, "class-id" ); +XML_CONSTASCII_ACTION( sXML_clip, "clip" ); +XML_CONSTASCII_ACTION( sXML_clockwise, "clockwise" ); +XML_CONSTASCII_ACTION( sXML_close, "close" ); +XML_CONSTASCII_ACTION( sXML_close_horizontal, "close-horizontal" ); +XML_CONSTASCII_ACTION( sXML_close_vertical, "close-vertical" ); +XML_CONSTASCII_ACTION( sXML_cn, "cn" ); +XML_CONSTASCII_ACTION( sXML_code, "code" ); +XML_CONSTASCII_ACTION( sXML_codebase, "codebase" ); +XML_CONSTASCII_ACTION( sXML_collapse, "collapse" ); +XML_CONSTASCII_ACTION( sXML_color, "color" ); +XML_CONSTASCII_ACTION( sXML_color_inversion , "color-inversion" ); +XML_CONSTASCII_ACTION( sXML_color_mode , "color-mode" ); +XML_CONSTASCII_ACTION( sXML_column, "column" ); +XML_CONSTASCII_ACTION( sXML_column_count, "column-count" ); +XML_CONSTASCII_ACTION( sXML_column_gap, "column-gap" ); +XML_CONSTASCII_ACTION( sXML_column_name, "column-name" ); +XML_CONSTASCII_ACTION( sXML_column_sep, "column-sep" ); +XML_CONSTASCII_ACTION( sXML_column_width, "column-width" ); +XML_CONSTASCII_ACTION( sXML_columns, "columns" ); +XML_CONSTASCII_ACTION( sXML_columnsplit_auto, "auto" ); +XML_CONSTASCII_ACTION( sXML_columnsplit_avoid, "avoid" ); +XML_CONSTASCII_ACTION( sXML_combine_entries, "combine-entries" ); +XML_CONSTASCII_ACTION( sXML_combine_entries_with_dash, "combine-entries-with-dash" ); +XML_CONSTASCII_ACTION( sXML_combine_entries_with_pp, "combine-entries-with-pp" ); +XML_CONSTASCII_ACTION( sXML_comma_separated, "comma-separated" ); +XML_CONSTASCII_ACTION( sXML_command, "command" ); +XML_CONSTASCII_ACTION( sXML_comment, "comment" ); +XML_CONSTASCII_ACTION( sXML_compose, "compose" ); +XML_CONSTASCII_ACTION( sXML_cond_style_name, "cond-style-name" ); +XML_CONSTASCII_ACTION( sXML_condition, "condition" ); +XML_CONSTASCII_ACTION( sXML_condition_source, "condition-source"); +XML_CONSTASCII_ACTION( sXML_condition_source_range_address, "condition-source-range-address"); +XML_CONSTASCII_ACTION( sXML_conditional_text, "conditional-text" ); +XML_CONSTASCII_ACTION( sXML_cone, "cone" ); +XML_CONSTASCII_ACTION( sXML_conference, "conference" ); +XML_CONSTASCII_ACTION( sXML_config_item, "config-item" ); +XML_CONSTASCII_ACTION( sXML_config_item_map_indexed, "config-item-map-indexed" ); +XML_CONSTASCII_ACTION( sXML_config_item_map_named, "config-item-map-named" ); +XML_CONSTASCII_ACTION( sXML_config_item_map_entry, "config-item-map-entry" ); +XML_CONSTASCII_ACTION( sXML_config_item_set, "config-item-set" ); +XML_CONSTASCII_ACTION( sXML_configuration_settings, "configuration-settings" ); +XML_CONSTASCII_ACTION( sXML_conjugate, "conjugate" ); +XML_CONSTASCII_ACTION( sXML_connect_bars, "connect-bars" ); +XML_CONSTASCII_ACTION( sXML_connection_name, "connection-name" ); +XML_CONSTASCII_ACTION( sXML_connector, "connector" ); +XML_CONSTASCII_ACTION( sXML_consecutive_numbering, "consecutive-numbering" ); +XML_CONSTASCII_ACTION( sXML_consolidation, "consolidation" ); +XML_CONSTASCII_ACTION( sXML_constant, "constant" ); +XML_CONSTASCII_ACTION( sXML_contains_error, "contains-error"); +XML_CONSTASCII_ACTION( sXML_contains_header, "contains-header"); +XML_CONSTASCII_ACTION( sXML_content, "content" ); +XML_CONSTASCII_ACTION( sXML_content_validation, "content-validation"); +XML_CONSTASCII_ACTION( sXML_content_validation_name, "validation-name"); +XML_CONSTASCII_ACTION( sXML_content_validations, "content-validations"); +XML_CONSTASCII_ACTION( sXML_continue, "continue" ); +XML_CONSTASCII_ACTION( sXML_continue_numbering, "continue-numbering" ); +XML_CONSTASCII_ACTION( sXML_contour_path, "contour-path" ); +XML_CONSTASCII_ACTION( sXML_contour_polygon, "contour-polygon" ); +XML_CONSTASCII_ACTION( sXML_contrast , "contrast" ); +XML_CONSTASCII_ACTION( sXML_control, "control" ); +XML_CONSTASCII_ACTION( sXML_conversion_mode, "conversion-mode" ); +XML_CONSTASCII_ACTION( sXML_copy_back, "copy-back" ); +XML_CONSTASCII_ACTION( sXML_copy_formulas, "copy-formulas" ); +XML_CONSTASCII_ACTION( sXML_copy_outline_levels, "copy-outline-levels" ); +XML_CONSTASCII_ACTION( sXML_copy_results_only, "copy-results-only" ); +XML_CONSTASCII_ACTION( sXML_copy_styles, "copy-styles" ); +XML_CONSTASCII_ACTION( sXML_corner_radius , "corner-radius" ); +XML_CONSTASCII_ACTION( sXML_correct, "correct"); +XML_CONSTASCII_ACTION( sXML_cos, "cos" ); +XML_CONSTASCII_ACTION( sXML_cosh, "cosh" ); +XML_CONSTASCII_ACTION( sXML_cot, "cot" ); +XML_CONSTASCII_ACTION( sXML_coth, "coth" ); +XML_CONSTASCII_ACTION( sXML_count, "count" ); +XML_CONSTASCII_ACTION( sXML_count_empty_lines, "count-empty-lines" ); +XML_CONSTASCII_ACTION( sXML_count_in_floating_frames, "count-in-floating-frames" ); +XML_CONSTASCII_ACTION( sXML_counterclockwise, "counterclockwise" ); +XML_CONSTASCII_ACTION( sXML_countnums, "countnums" ); +XML_CONSTASCII_ACTION( sXML_country, "country" ); +XML_CONSTASCII_ACTION( sXML_country_asian, "country-asian" ); +XML_CONSTASCII_ACTION( sXML_country_complex, "country-complex" ); +XML_CONSTASCII_ACTION( sXML_covered_table_cell, "covered-table-cell" ); +XML_CONSTASCII_ACTION( sXML_create_date, "create-date" ); +XML_CONSTASCII_ACTION( sXML_create_date_string, "create-date-string" ); +XML_CONSTASCII_ACTION( sXML_creation_date, "creation-date" ); +XML_CONSTASCII_ACTION( sXML_creation_time, "creation-time" ); +XML_CONSTASCII_ACTION( sXML_creator, "creator" ); +XML_CONSTASCII_ACTION( sXML_crossedout_cross, "X" ); +XML_CONSTASCII_ACTION( sXML_crossedout_double, "double-line" ); +XML_CONSTASCII_ACTION( sXML_crossedout_none, "none" ); +XML_CONSTASCII_ACTION( sXML_crossedout_single, "single-line" ); +XML_CONSTASCII_ACTION( sXML_crossedout_slash, "slash" ); +XML_CONSTASCII_ACTION( sXML_crossedout_thick, "thick-line" ); +XML_CONSTASCII_ACTION( sXML_csc, "csc" ); +XML_CONSTASCII_ACTION( sXML_csch, "csch" ); +XML_CONSTASCII_ACTION( sXML_cube, "cube" ); +XML_CONSTASCII_ACTION( sXML_cuboid, "cuboid" ); +XML_CONSTASCII_ACTION( sXML_currency, "currency"); +XML_CONSTASCII_ACTION( sXML_currency_style, "currency-style" ); +XML_CONSTASCII_ACTION( sXML_currency_symbol, "currency-symbol" ); +XML_CONSTASCII_ACTION( sXML_current, "current" ); +XML_CONSTASCII_ACTION( sXML_current_value, "current-value" ); +XML_CONSTASCII_ACTION( sXML_cursor_position, "cursor-position" ); +XML_CONSTASCII_ACTION( sXML_cursor_position_x, "cursor-position-x" ); +XML_CONSTASCII_ACTION( sXML_cursor_position_y, "cursor-position-y" ); +XML_CONSTASCII_ACTION( sXML_custom1, "custom1" ); +XML_CONSTASCII_ACTION( sXML_custom2, "custom2" ); +XML_CONSTASCII_ACTION( sXML_custom3, "custom3" ); +XML_CONSTASCII_ACTION( sXML_custom4, "custom4" ); +XML_CONSTASCII_ACTION( sXML_custom5, "custom5" ); +XML_CONSTASCII_ACTION( sXML_cut_offs, "cut_offs" ); +XML_CONSTASCII_ACTION( sXML_cx, "cx" ); +XML_CONSTASCII_ACTION( sXML_cy, "cy" ); +XML_CONSTASCII_ACTION( sXML_cylinder, "cylinder" ); +XML_CONSTASCII_ACTION( sXML_d, "d" ); +XML_CONSTASCII_ACTION( sXML_dash, "dash" ); +XML_CONSTASCII_ACTION( sXML_dashed, "dashed" ); +XML_CONSTASCII_ACTION( sXML_data, "data"); +XML_CONSTASCII_ACTION( sXML_data_cell_range_address, "data-cell-range-address" ); +XML_CONSTASCII_ACTION( sXML_data_label_number, "data-label-number" ); +XML_CONSTASCII_ACTION( sXML_data_label_symbol, "data-label-symbol" ); +XML_CONSTASCII_ACTION( sXML_data_label_text, "data-label-text" ); +XML_CONSTASCII_ACTION( sXML_data_pilot_field, "data-pilot-field"); +XML_CONSTASCII_ACTION( sXML_data_pilot_level, "data-pilot-level"); +XML_CONSTASCII_ACTION( sXML_data_pilot_member, "data-pilot-member"); +XML_CONSTASCII_ACTION( sXML_data_pilot_members, "data-pilot-members"); +XML_CONSTASCII_ACTION( sXML_data_pilot_subtotal, "data-pilot-subtotal"); +XML_CONSTASCII_ACTION( sXML_data_pilot_subtotals, "data-pilot-subtotals"); +XML_CONSTASCII_ACTION( sXML_data_pilot_table, "data-pilot-table"); +XML_CONSTASCII_ACTION( sXML_data_pilot_tables, "data-pilot-tables"); +XML_CONSTASCII_ACTION( sXML_data_point, "data-point" ); +XML_CONSTASCII_ACTION( sXML_data_style, "data-style" ); +XML_CONSTASCII_ACTION( sXML_data_style_name, "data-style-name" ); +XML_CONSTASCII_ACTION( sXML_data_type, "data-type"); +XML_CONSTASCII_ACTION( sXML_database_display, "database-display" ); +XML_CONSTASCII_ACTION( sXML_database_name, "database-name"); +XML_CONSTASCII_ACTION( sXML_database_next, "database-next" ); +XML_CONSTASCII_ACTION( sXML_database_range, "database-range"); +XML_CONSTASCII_ACTION( sXML_database_ranges, "database-ranges"); +XML_CONSTASCII_ACTION( sXML_database_row_number, "database-row-number" ); +XML_CONSTASCII_ACTION( sXML_database_select, "database-select" ); +XML_CONSTASCII_ACTION( sXML_database_source_query, "database-source-query"); +XML_CONSTASCII_ACTION( sXML_database_source_sql, "database-source-sql"); +XML_CONSTASCII_ACTION( sXML_database_source_table, "database-source-table"); +XML_CONSTASCII_ACTION( sXML_date, "date" ); +XML_CONSTASCII_ACTION( sXML_datetime, "datetime" ); +XML_CONSTASCII_ACTION( sXML_date_adjust, "date-adjust" ); +XML_CONSTASCII_ACTION( sXML_date_style, "date-style" ); +XML_CONSTASCII_ACTION( sXML_date_time, "date-time" ); +XML_CONSTASCII_ACTION( sXML_date_value, "date-value"); +XML_CONSTASCII_ACTION( sXML_day, "day" ); +XML_CONSTASCII_ACTION( sXML_day_of_week, "day-of-week" ); +XML_CONSTASCII_ACTION( sXML_dde_application, "dde-application" ); +XML_CONSTASCII_ACTION( sXML_dde_connection, "dde-connection" ); +XML_CONSTASCII_ACTION( sXML_dde_connection_decl, "dde-connection-decl" ); +XML_CONSTASCII_ACTION( sXML_dde_connection_decls, "dde-connection-decls" ); +XML_CONSTASCII_ACTION( sXML_dde_item, "dde-item" ); +XML_CONSTASCII_ACTION( sXML_dde_link, "dde-link" ); +XML_CONSTASCII_ACTION( sXML_dde_links, "dde-links" ); +XML_CONSTASCII_ACTION( sXML_dde_source, "dde-source" ); +XML_CONSTASCII_ACTION( sXML_dde_topic, "dde-topic" ); +XML_CONSTASCII_ACTION( sXML_decimal_places, "decimal-places" ); +XML_CONSTASCII_ACTION( sXML_decimal_replacement, "decimal-replacement" ); +XML_CONSTASCII_ACTION( sXML_declare, "declare" ); +XML_CONSTASCII_ACTION( sXML_decorate_words_only, "decorate-words-only" ); +XML_CONSTASCII_ACTION( sXML_decorative, "decorative" ); +XML_CONSTASCII_ACTION( sXML_deep, "deep" ); +XML_CONSTASCII_ACTION( sXML_default, "default" ); +XML_CONSTASCII_ACTION( sXML_default_cell_style_name, "default-cell-style-name" ); +XML_CONSTASCII_ACTION( sXML_default_style, "default-style" ); +XML_CONSTASCII_ACTION( sXML_default_style_name, "default-style-name" ); +XML_CONSTASCII_ACTION( sXML_degree, "degree" ); +XML_CONSTASCII_ACTION( sXML_delay, "delay" ); +XML_CONSTASCII_ACTION( sXML_deletion, "deletion" ); +XML_CONSTASCII_ACTION( sXML_deletions, "deletions" ); +XML_CONSTASCII_ACTION( sXML_depth, "depth" ); +XML_CONSTASCII_ACTION( sXML_desc, "desc" ); +XML_CONSTASCII_ACTION( sXML_descending, "descending"); +XML_CONSTASCII_ACTION( sXML_description, "description" ); +XML_CONSTASCII_ACTION( sXML_detective, "detective" ); +XML_CONSTASCII_ACTION( sXML_determinant, "determinant" ); +XML_CONSTASCII_ACTION( sXML_diff, "diff"); +XML_CONSTASCII_ACTION( sXML_diffuse_color, "diffuse-color" ); +XML_CONSTASCII_ACTION( sXML_dependences, "dependences"); +XML_CONSTASCII_ACTION( sXML_dependence, "dependence"); +XML_CONSTASCII_ACTION( sXML_direction, "direction"); +XML_CONSTASCII_ACTION( sXML_disabled, "disabled" ); +XML_CONSTASCII_ACTION( sXML_disc, "disc" ); +XML_CONSTASCII_ACTION( sXML_display, "display" ); +XML_CONSTASCII_ACTION( sXML_display_border, "display-border"); +XML_CONSTASCII_ACTION( sXML_display_details, "display-details"); +XML_CONSTASCII_ACTION( sXML_display_duplicates, "display-duplicates"); +XML_CONSTASCII_ACTION( sXML_display_empty, "display-empty"); +XML_CONSTASCII_ACTION( sXML_display_filter_buttons, "display-filter-buttons"); +XML_CONSTASCII_ACTION( sXML_display_formula, "display-formula" ); +XML_CONSTASCII_ACTION( sXML_display_label, "display-label" ); +XML_CONSTASCII_ACTION( sXML_display_levels, "display-levels" ); +XML_CONSTASCII_ACTION( sXML_display_name, "display-name" ); +XML_CONSTASCII_ACTION( sXML_display_outline_level, "display-outline-level" ); +XML_CONSTASCII_ACTION( sXML_dissolve, "dissolve" ); +XML_CONSTASCII_ACTION( sXML_distance, "distance" ); +XML_CONSTASCII_ACTION( sXML_distribute_letter, "distribute-letter" ); +XML_CONSTASCII_ACTION( sXML_distribute_space, "distribute-space" ); +XML_CONSTASCII_ACTION( sXML_divide, "divide" ); +XML_CONSTASCII_ACTION( sXML_document, "document" ); +XML_CONSTASCII_ACTION( sXML_document_content, "document-content" ); +XML_CONSTASCII_ACTION( sXML_document_meta, "document-meta" ); +XML_CONSTASCII_ACTION( sXML_document_settings, "document-settings" ); +XML_CONSTASCII_ACTION( sXML_document_styles, "document-styles" ); +XML_CONSTASCII_ACTION( sXML_document_statistic, "document-statistic" ); +XML_CONSTASCII_ACTION( sXML_domain, "domain" ); +XML_CONSTASCII_ACTION( sXML_dot, "dot" ); +XML_CONSTASCII_ACTION( sXML_dotted, "dotted" ); +XML_CONSTASCII_ACTION( sXML_double, "double" ); +XML_CONSTASCII_ACTION( sXML_double_sided, "double-sided" ); +XML_CONSTASCII_ACTION( sXML_down, "down" ); +XML_CONSTASCII_ACTION( sXML_draft, "draft"); +XML_CONSTASCII_ACTION( sXML_draw, "draw" ); +XML_CONSTASCII_ACTION( sXML_draw_aspect, "ole-draw-aspect" ); +XML_CONSTASCII_ACTION( sXML_drawing, "drawing" ); +XML_CONSTASCII_ACTION( sXML_drawings, "drawings" ); +XML_CONSTASCII_ACTION( sXML_drawpool , "drawpool" ); +XML_CONSTASCII_ACTION( sXML_drop_cap, "drop-cap" ); +XML_CONSTASCII_ACTION( sXML_dynamic, "dynamic" ); +XML_CONSTASCII_ACTION( sXML_edge_rounding, "edge-rounding" ); +XML_CONSTASCII_ACTION( sXML_editable, "editable" ); +XML_CONSTASCII_ACTION( sXML_editing_cycles, "editing-cycles" ); +XML_CONSTASCII_ACTION( sXML_editing_duration, "editing-duration" ); +XML_CONSTASCII_ACTION( sXML_edition, "edition" ); +XML_CONSTASCII_ACTION( sXML_editor, "editor" ); +XML_CONSTASCII_ACTION( sXML_ellipse , "ellipse" ); +XML_CONSTASCII_ACTION( sXML_email, "email" ); +XML_CONSTASCII_ACTION( sXML_embed, "embed" ); +XML_CONSTASCII_ACTION( sXML_embedded_visible_area, "embedded-visible-area" ); +XML_CONSTASCII_ACTION( sXML_embossed, "embossed" ); +XML_CONSTASCII_ACTION( sXML_emissive_color, "emissive-color" ); +XML_CONSTASCII_ACTION( sXML_empty, "empty"); +XML_CONSTASCII_ACTION( sXML_enabled, "enabled" ); +XML_CONSTASCII_ACTION( sXML_encoding, "encoding" ); +XML_CONSTASCII_ACTION( sXML_end, "end" ); +XML_CONSTASCII_ACTION( sXML_end_angle, "end-angle" ); +XML_CONSTASCII_ACTION( sXML_end_cell_address, "end-cell-address" ); +XML_CONSTASCII_ACTION( sXML_end_color, "end-color" ); +XML_CONSTASCII_ACTION( sXML_end_column, "end-column" ); +XML_CONSTASCII_ACTION( sXML_end_intensity, "end-intensity" ); +XML_CONSTASCII_ACTION( sXML_end_position, "end-position" ); +XML_CONSTASCII_ACTION( sXML_end_row, "end-row" ); +XML_CONSTASCII_ACTION( sXML_end_table, "end-table" ); +XML_CONSTASCII_ACTION( sXML_end_x, "end-x" ); +XML_CONSTASCII_ACTION( sXML_end_y, "end-y" ); +XML_CONSTASCII_ACTION( sXML_endless, "endless" ); +XML_CONSTASCII_ACTION( sXML_endnote, "endnote" ); +XML_CONSTASCII_ACTION( sXML_endnote_body, "endnote-body" ); +XML_CONSTASCII_ACTION( sXML_endnote_citation, "endnote-citation" ); +XML_CONSTASCII_ACTION( sXML_endnote_ref, "endnote-ref" ); +XML_CONSTASCII_ACTION( sXML_endnotes_configuration, "endnotes-configuration"); +XML_CONSTASCII_ACTION( sXML_engraved, "engraved" ); +XML_CONSTASCII_ACTION( sXML_eq, "eq"); +XML_CONSTASCII_ACTION( sXML_equal_author, "equal-author"); +XML_CONSTASCII_ACTION( sXML_equal_comment, "equal-comment"); +XML_CONSTASCII_ACTION( sXML_equal_date, "equal-date"); +XML_CONSTASCII_ACTION( sXML_era, "era" ); +XML_CONSTASCII_ACTION( sXML_ergo_sum, "ergo-sum" ); +XML_CONSTASCII_ACTION( sXML_error_category, "error-category" ); +XML_CONSTASCII_ACTION( sXML_error_lower_indicator, "error-lower-indicator" ); +XML_CONSTASCII_ACTION( sXML_error_lower_limit, "error-lower-limit" ); +XML_CONSTASCII_ACTION( sXML_error_macro, "error-macro" ); +XML_CONSTASCII_ACTION( sXML_error_margin, "error-margin" ); +XML_CONSTASCII_ACTION( sXML_error_message, "error-message" ); +XML_CONSTASCII_ACTION( sXML_error_percentage, "error-percentage" ); +XML_CONSTASCII_ACTION( sXML_error_upper_indicator, "error-upper-indicator" ); +XML_CONSTASCII_ACTION( sXML_error_upper_limit, "error-upper-limit" ); +XML_CONSTASCII_ACTION( sXML_escapement_sub, "sub" ); +XML_CONSTASCII_ACTION( sXML_escapement_super, "super" ); +XML_CONSTASCII_ACTION( sXML_even_page, "even-page" ); +XML_CONSTASCII_ACTION( sXML_event, "event" ); +XML_CONSTASCII_ACTION( sXML_event_name, "event-name" ); +XML_CONSTASCII_ACTION( sXML_events, "events" ); +XML_CONSTASCII_ACTION( sXML_execute, "execute" ); +XML_CONSTASCII_ACTION( sXML_execute_macro, "execute-macro" ); +XML_CONSTASCII_ACTION( sXML_exists, "exists" ); +XML_CONSTASCII_ACTION( sXML_exp, "exp" ); +XML_CONSTASCII_ACTION( sXML_exponential, "exponential" ); +XML_CONSTASCII_ACTION( sXML_expression, "expression"); +XML_CONSTASCII_ACTION( sXML_extra, "extra"); +XML_CONSTASCII_ACTION( sXML_extrude, "extrude" ); +XML_CONSTASCII_ACTION( sXML_factorial, "factorial" ); +XML_CONSTASCII_ACTION( sXML_fade_from_bottom, "fade-from-bottom" ); +XML_CONSTASCII_ACTION( sXML_fade_from_center, "fade-from-center" ); +XML_CONSTASCII_ACTION( sXML_fade_from_left, "fade-from-left" ); +XML_CONSTASCII_ACTION( sXML_fade_from_lowerleft, "fade-from-lowerleft" ); +XML_CONSTASCII_ACTION( sXML_fade_from_lowerright, "fade-from-lowerright" ); +XML_CONSTASCII_ACTION( sXML_fade_from_right, "fade-from-right" ); +XML_CONSTASCII_ACTION( sXML_fade_from_top, "fade-from-top" ); +XML_CONSTASCII_ACTION( sXML_fade_from_upperleft, "fade-from-upperleft" ); +XML_CONSTASCII_ACTION( sXML_fade_from_upperright, "fade-from-upperright" ); +XML_CONSTASCII_ACTION( sXML_fade_to_center, "fade-to-center" ); +XML_CONSTASCII_ACTION( sXML_fade_out, "fade-out" ); +XML_CONSTASCII_ACTION( sXML_false, "false" ); +XML_CONSTASCII_ACTION( sXML_family, "family" ); +XML_CONSTASCII_ACTION( sXML_fast, "fast" ); +XML_CONSTASCII_ACTION( sXML_field_number, "field-number"); +XML_CONSTASCII_ACTION( sXML_file_name, "file-name" ); +XML_CONSTASCII_ACTION( sXML_fill, "fill" ); +XML_CONSTASCII_ACTION( sXML_fill_color , "fill-color" ); +XML_CONSTASCII_ACTION( sXML_fill_gradient_name, "fill-gradient-name" ); +XML_CONSTASCII_ACTION( sXML_fill_hatch_name, "fill-hatch-name" ); +XML_CONSTASCII_ACTION( sXML_fill_hatch_solid, "fill-hatch-solid" ); +XML_CONSTASCII_ACTION( sXML_fill_image, "fill-image" ); +XML_CONSTASCII_ACTION( sXML_fill_image_height, "fill-image-height" ); +XML_CONSTASCII_ACTION( sXML_fill_image_name, "fill-image-name" ); +XML_CONSTASCII_ACTION( sXML_fill_image_width, "fill-image-width" ); +XML_CONSTASCII_ACTION( sXML_filter, "filter"); +XML_CONSTASCII_ACTION( sXML_filter_and, "filter-and"); +XML_CONSTASCII_ACTION( sXML_filter_condition, "filter-condition"); +XML_CONSTASCII_ACTION( sXML_filter_name, "filter-name" ); +XML_CONSTASCII_ACTION( sXML_filter_options, "filter-options" ); +XML_CONSTASCII_ACTION( sXML_filter_or, "filter-or"); +XML_CONSTASCII_ACTION( sXML_first_date_time, "first-date-time"); +XML_CONSTASCII_ACTION( sXML_first_page, "first-page"); +XML_CONSTASCII_ACTION( sXML_first_page_number, "first-page-number"); +XML_CONSTASCII_ACTION( sXML_fit_to_contour, "fit-to-contour"); +XML_CONSTASCII_ACTION( sXML_fit_to_size, "fit-to-size" ); +XML_CONSTASCII_ACTION( sXML_fix, "fix" ); +XML_CONSTASCII_ACTION( sXML_fixed, "fixed" ); +XML_CONSTASCII_ACTION( sXML_flat, "flat" ); +XML_CONSTASCII_ACTION( sXML_float, "float"); +XML_CONSTASCII_ACTION( sXML_floating_frame, "floating-frame"); +XML_CONSTASCII_ACTION( sXML_floor, "floor" ); +XML_CONSTASCII_ACTION( sXML_fn, "fn" ); +XML_CONSTASCII_ACTION( sXML_focal_length, "focal-length"); +XML_CONSTASCII_ACTION( sXML_font_char_width, "font-char-width" ); +XML_CONSTASCII_ACTION( sXML_font_charset, "font-charset" ); +XML_CONSTASCII_ACTION( sXML_font_charset_asian, "font-charset-asian" ); +XML_CONSTASCII_ACTION( sXML_font_charset_complex, "font-charset-complex" ); +XML_CONSTASCII_ACTION( sXML_font_color, "font-color" ); +XML_CONSTASCII_ACTION( sXML_font_decl, "font-decl" ); +XML_CONSTASCII_ACTION( sXML_font_decls, "font-decls" ); +XML_CONSTASCII_ACTION( sXML_font_family, "font-family" ); +XML_CONSTASCII_ACTION( sXML_font_family_asian, "font-family-asian" ); +XML_CONSTASCII_ACTION( sXML_font_family_complex, "font-family-complex" ); +XML_CONSTASCII_ACTION( sXML_font_family_generic, "font-family-generic" ); +XML_CONSTASCII_ACTION( sXML_font_family_generic_asian, "font-family-generic-asian" ); +XML_CONSTASCII_ACTION( sXML_font_family_generic_complex, "font-family-generic-complex" ); +XML_CONSTASCII_ACTION( sXML_font_kerning, "font-kerning" ); +XML_CONSTASCII_ACTION( sXML_font_name, "font-name" ); +XML_CONSTASCII_ACTION( sXML_font_name_asian, "font-name-asian" ); +XML_CONSTASCII_ACTION( sXML_font_name_complex, "font-name-complex" ); +XML_CONSTASCII_ACTION( sXML_font_pitch, "font-pitch" ); +XML_CONSTASCII_ACTION( sXML_font_pitch_asian, "font-pitch-asian" ); +XML_CONSTASCII_ACTION( sXML_font_pitch_complex, "font-pitch-complex" ); +XML_CONSTASCII_ACTION( sXML_font_relief, "font-relief" ); +XML_CONSTASCII_ACTION( sXML_font_size, "font-size" ); +XML_CONSTASCII_ACTION( sXML_font_size_asian, "font-size-asian" ); +XML_CONSTASCII_ACTION( sXML_font_size_complex, "font-size-complex" ); +XML_CONSTASCII_ACTION( sXML_font_size_rel, "font-size-rel" ); +XML_CONSTASCII_ACTION( sXML_font_size_rel_asian, "font-size-rel-asian" ); +XML_CONSTASCII_ACTION( sXML_font_size_rel_complex, "font-size-rel-complex" ); +XML_CONSTASCII_ACTION( sXML_font_style, "font-style" ); +XML_CONSTASCII_ACTION( sXML_font_style_asian, "font-style-asian" ); +XML_CONSTASCII_ACTION( sXML_font_style_complex, "font-style-complex" ); +XML_CONSTASCII_ACTION( sXML_font_style_name, "font-style-name" ); +XML_CONSTASCII_ACTION( sXML_font_style_name_asian, "font-style-name-asian" ); +XML_CONSTASCII_ACTION( sXML_font_style_name_complex, "font-style-name-complex" ); +XML_CONSTASCII_ACTION( sXML_font_variant, "font-variant" ); +XML_CONSTASCII_ACTION( sXML_font_weight, "font-weight" ); +XML_CONSTASCII_ACTION( sXML_font_weight_asian, "font-weight-asian" ); +XML_CONSTASCII_ACTION( sXML_font_weight_complex, "font-weight-complex" ); +XML_CONSTASCII_ACTION( sXML_font_width, "font-width" ); +XML_CONSTASCII_ACTION( sXML_font_word_line_mode, "font-word-line-mode" ); +XML_CONSTASCII_ACTION( sXML_fontfamily, "fontfamily" ); +XML_CONSTASCII_ACTION( sXML_fontsize, "fontsize" ); +XML_CONSTASCII_ACTION( sXML_fontstyle, "fontstyle" ); +XML_CONSTASCII_ACTION( sXML_fontweight, "fontweight" ); +XML_CONSTASCII_ACTION( sXML_fontwork_adjust, "fontwork-adjust" ); +XML_CONSTASCII_ACTION( sXML_fontwork_distance, "fontwork-distance" ); +XML_CONSTASCII_ACTION( sXML_fontwork_form, "fontwork-form" ); +XML_CONSTASCII_ACTION( sXML_fontwork_hide_form, "fontwork-hide-form" ); +XML_CONSTASCII_ACTION( sXML_fontwork_mirror, "fontwork-mirror" ); +XML_CONSTASCII_ACTION( sXML_fontwork_outline, "fontwork-outline" ); +XML_CONSTASCII_ACTION( sXML_fontwork_shadow, "fontwork-shadow" ); +XML_CONSTASCII_ACTION( sXML_fontwork_shadow_color, "fontwork-shadow-color" ); +XML_CONSTASCII_ACTION( sXML_fontwork_shadow_offset_x, "fontwork-shadow-offset-x" ); +XML_CONSTASCII_ACTION( sXML_fontwork_shadow_offset_y, "fontwork-shadow-offset-y" ); +XML_CONSTASCII_ACTION( sXML_fontwork_shadow_transparence, "fontwork-shadow-transparence" ); +XML_CONSTASCII_ACTION( sXML_fontwork_start, "fontwork-start" ); +XML_CONSTASCII_ACTION( sXML_fontwork_style, "fontwork-style" ); +XML_CONSTASCII_ACTION( sXML_footer, "footer" ); +XML_CONSTASCII_ACTION( sXML_footer_left, "footer-left" ); +XML_CONSTASCII_ACTION( sXML_footer_style, "footer-style" ); +XML_CONSTASCII_ACTION( sXML_footnote, "footnote" ); +XML_CONSTASCII_ACTION( sXML_footnote_body, "footnote-body" ); +XML_CONSTASCII_ACTION( sXML_footnote_citation, "footnote-citation" ); +XML_CONSTASCII_ACTION( sXML_footnote_continuation_notice_backward, "footnote-continuation-notice-backward" ); +XML_CONSTASCII_ACTION( sXML_footnote_continuation_notice_forward, "footnote-continuation-notice-forward" ); +XML_CONSTASCII_ACTION( sXML_footnote_max_height, "footnote-max-height" ); +XML_CONSTASCII_ACTION( sXML_distance_after_sep, "distance-after-sep" ); +XML_CONSTASCII_ACTION( sXML_distance_before_sep, "distance-before-sep" ); +XML_CONSTASCII_ACTION( sXML_footnote_ref, "footnote-ref" ); +XML_CONSTASCII_ACTION( sXML_footnote_sep, "footnote-sep" ); +XML_CONSTASCII_ACTION( sXML_footnotes_configuration, "footnotes-configuration"); +XML_CONSTASCII_ACTION( sXML_footnotes_position, "footnotes-position" ); +XML_CONSTASCII_ACTION( sXML_forall, "forall" ); +XML_CONSTASCII_ACTION( sXML_force_manual, "force-manual" ); +XML_CONSTASCII_ACTION( sXML_foreground, "foreground" ); +XML_CONSTASCII_ACTION( sXML_foreign_object, "foreign-object" ); +XML_CONSTASCII_ACTION( sXML_format_change, "format-change" ); +XML_CONSTASCII_ACTION( sXML_format_source, "format-source" ); +XML_CONSTASCII_ACTION( sXML_forms, "forms" ); +XML_CONSTASCII_ACTION( sXML_formula, "formula"); +XML_CONSTASCII_ACTION( sXML_formula_hidden, "formula-hidden"); +XML_CONSTASCII_ACTION( sXML_formulas, "formulas"); +XML_CONSTASCII_ACTION( sXML_fraction, "fraction" ); +XML_CONSTASCII_ACTION( sXML_frame, "frame" ); +XML_CONSTASCII_ACTION( sXML_frame_content, "frame-content" ); +XML_CONSTASCII_ACTION( sXML_frame_display_scrollbar, "frame-display-scrollbar" ); +XML_CONSTASCII_ACTION( sXML_frame_display_border, "frame-display-border" ); +XML_CONSTASCII_ACTION( sXML_frame_margin_horizontal, "frame-margin-horizontal" ); +XML_CONSTASCII_ACTION( sXML_frame_margin_vertical, "frame-margin-vertical" ); +XML_CONSTASCII_ACTION( sXML_frame_end_margin, "frame-end-margin" ); +XML_CONSTASCII_ACTION( sXML_frame_name, "frame-name" ); +XML_CONSTASCII_ACTION( sXML_frame_start_margin, "frame-start-margin" ); +XML_CONSTASCII_ACTION( sXML_freeze, "freeze" ); +XML_CONSTASCII_ACTION( sXML_freeze_position, "freeze-position" ); +XML_CONSTASCII_ACTION( sXML_from_another_table, "from-another-table" ); +XML_CONSTASCII_ACTION( sXML_from_inside, "from-inside" ); +XML_CONSTASCII_ACTION( sXML_from_left, "from-left" ); +XML_CONSTASCII_ACTION( sXML_from_same_table, "from-same-table" ); +XML_CONSTASCII_ACTION( sXML_from_top, "from-top" ); +XML_CONSTASCII_ACTION( sXML_fuchsia, "fuchsia"); +XML_CONSTASCII_ACTION( sXML_full, "full" ); +XML_CONSTASCII_ACTION( sXML_full_screen, "full-screen" ); +XML_CONSTASCII_ACTION( sXML_function, "function"); +XML_CONSTASCII_ACTION( sXML_g , "g" ); +XML_CONSTASCII_ACTION( sXML_gamma , "gamma" ); +XML_CONSTASCII_ACTION( sXML_gap, "gap" ); +XML_CONSTASCII_ACTION( sXML_gap_width, "gap-width" ); +XML_CONSTASCII_ACTION( sXML_gcd, "gcd" ); +XML_CONSTASCII_ACTION( sXML_generator, "generator" ); +XML_CONSTASCII_ACTION( sXML_geq, "geq" ); +XML_CONSTASCII_ACTION( sXML_gouraud, "gouraud"); +XML_CONSTASCII_ACTION( sXML_gradient , "gradient" ); +XML_CONSTASCII_ACTION( sXML_gradient_angle, "angle" ); +XML_CONSTASCII_ACTION( sXML_gradient_border, "border" ); +XML_CONSTASCII_ACTION( sXML_gradient_step_count , "gradient-step-count" ); +XML_CONSTASCII_ACTION( sXML_gradient_style, "gradient-style" ); +XML_CONSTASCII_ACTION( sXML_gradientstyle_axial, "axial" ); +XML_CONSTASCII_ACTION( sXML_gradientstyle_ellipsoid, "ellipsoid" ); +XML_CONSTASCII_ACTION( sXML_gradientstyle_linear, "linear" ); +XML_CONSTASCII_ACTION( sXML_gradientstyle_radial, "radial" ); +XML_CONSTASCII_ACTION( sXML_gradientstyle_rectangular, "rectangular" ); +XML_CONSTASCII_ACTION( sXML_gradientstyle_square, "square" ); +XML_CONSTASCII_ACTION( sXML_grand_total, "grand-total"); +XML_CONSTASCII_ACTION( sXML_graphic , "graphic" ); +XML_CONSTASCII_ACTION( sXML_gray, "gray" ); +XML_CONSTASCII_ACTION( sXML_green , "green" ); +XML_CONSTASCII_ACTION( sXML_greyscale, "greyscale" ); +XML_CONSTASCII_ACTION( sXML_grid, "grid" ); +XML_CONSTASCII_ACTION( sXML_groove, "groove" ); +XML_CONSTASCII_ACTION( sXML_group_by_field_number, "group-by-field-number"); +XML_CONSTASCII_ACTION( sXML_group_name, "group-name" ); +XML_CONSTASCII_ACTION( sXML_grouping, "grouping" ); +XML_CONSTASCII_ACTION( sXML_gt, "gt" ); +XML_CONSTASCII_ACTION( sXML_h, "h" ); +XML_CONSTASCII_ACTION( sXML_hanging, "hanging" ); +XML_CONSTASCII_ACTION( sXML_has_persistent_data, "has-persistent-data"); +XML_CONSTASCII_ACTION( sXML_hatch , "hatch" ); +XML_CONSTASCII_ACTION( sXML_hatch_distance, "distance" ); +XML_CONSTASCII_ACTION( sXML_hatch_style, "style" ); +XML_CONSTASCII_ACTION( sXML_hatchstyle_double, "double" ); +XML_CONSTASCII_ACTION( sXML_hatchstyle_single, "single" ); +XML_CONSTASCII_ACTION( sXML_hatchstyle_triple, "triple" ); +XML_CONSTASCII_ACTION( sXML_header, "header" ); +XML_CONSTASCII_ACTION( sXML_header_left, "header-left" ); +XML_CONSTASCII_ACTION( sXML_header_style, "header-style" ); +XML_CONSTASCII_ACTION( sXML_headers, "headers" ); +XML_CONSTASCII_ACTION( sXML_height, "height" ); +XML_CONSTASCII_ACTION( sXML_help_file_name, "help-file-name" ); +XML_CONSTASCII_ACTION( sXML_help_id, "help-id" ); +XML_CONSTASCII_ACTION( sXML_help_message, "help-message" ); +XML_CONSTASCII_ACTION( sXML_hidden, "hidden" ); +XML_CONSTASCII_ACTION( sXML_hidden_and_protected, "hidden-and-protected"); +XML_CONSTASCII_ACTION( sXML_hidden_paragraph, "hidden-paragraph" ); +XML_CONSTASCII_ACTION( sXML_hidden_text, "hidden-text" ); +XML_CONSTASCII_ACTION( sXML_highlighted_range, "highlighted-range" ); +XML_CONSTASCII_ACTION( sXML_horizontal, "horizontal" ); +XML_CONSTASCII_ACTION( sXML_horizontal_lines, "horizontal-lines" ); +XML_CONSTASCII_ACTION( sXML_horizontal_on_left_pages, "horizontal-on-left-pages" ); +XML_CONSTASCII_ACTION( sXML_horizontal_on_right_pages, "horizontal-on-right-pages" ); +XML_CONSTASCII_ACTION( sXML_horizontal_pos, "horizontal-pos" ); +XML_CONSTASCII_ACTION( sXML_horizontal_rel, "horizontal-rel" ); +XML_CONSTASCII_ACTION( sXML_horizontal_scrollbar_width, "horizontal-scrollbar-width" ); +XML_CONSTASCII_ACTION( sXML_horizontal_segments, "horizontal-segments" ); +XML_CONSTASCII_ACTION( sXML_horizontal_split_mode, "horizontal-split-mode" ); +XML_CONSTASCII_ACTION( sXML_horizontal_split_position, "horizontal-split-position" ); +XML_CONSTASCII_ACTION( sXML_horizontal_stripes, "horizontal-stripes" ); +XML_CONSTASCII_ACTION( sXML_hours, "hours" ); +XML_CONSTASCII_ACTION( sXML_howpublished, "howpublished" ); +XML_CONSTASCII_ACTION( sXML_href, "href" ); +XML_CONSTASCII_ACTION( sXML_html, "html"); +XML_CONSTASCII_ACTION( sXML_hyperlink_behaviour, "hyperlink-behaviour" ); +XML_CONSTASCII_ACTION( sXML_hyphenate, "hyphenate" ); +XML_CONSTASCII_ACTION( sXML_hyphenation_keep, "hyphenation-keep" ); +XML_CONSTASCII_ACTION( sXML_hyphenation_ladder_count, "hyphenation-ladder-count" ); +XML_CONSTASCII_ACTION( sXML_hyphenation_push_char_count, "hyphenation-push-char-count" ); +XML_CONSTASCII_ACTION( sXML_hyphenation_remain_char_count, "hyphenation-remain-char-count" ); +XML_CONSTASCII_ACTION( sXML_i, "i" ); +XML_CONSTASCII_ACTION( sXML_icon, "icon" ); +XML_CONSTASCII_ACTION( sXML_id, "id" ); +XML_CONSTASCII_ACTION( sXML_ident, "ident"); +XML_CONSTASCII_ACTION( sXML_identifier, "identifier" ); +XML_CONSTASCII_ACTION( sXML_identify_categories, "identify-categories"); +XML_CONSTASCII_ACTION( sXML_ideograph_alpha, "ideograph-alpha"); +XML_CONSTASCII_ACTION( sXML_ignore_case, "ignore-case" ); +XML_CONSTASCII_ACTION( sXML_ignore_empty_rows, "ignore-empty-rows"); +XML_CONSTASCII_ACTION( sXML_illustration_index, "illustration-index" ); +XML_CONSTASCII_ACTION( sXML_illustration_index_entry_template, "illustration-index-entry-template" ); +XML_CONSTASCII_ACTION( sXML_illustration_index_source, "illustration-index-source" ); +XML_CONSTASCII_ACTION( sXML_image, "image" ); +XML_CONSTASCII_ACTION( sXML_image_count, "image-count" ); +XML_CONSTASCII_ACTION( sXML_image_map, "image-map" ); +XML_CONSTASCII_ACTION( sXML_implies, "implies" ); +XML_CONSTASCII_ACTION( sXML_in, "in"); +XML_CONSTASCII_ACTION( sXML_in_range, "in-range"); +XML_CONSTASCII_ACTION( sXML_inbook, "inbook" ); +XML_CONSTASCII_ACTION( sXML_incollection, "incollection" ); +XML_CONSTASCII_ACTION( sXML_increment, "increment" ); +XML_CONSTASCII_ACTION( sXML_index, "index"); +XML_CONSTASCII_ACTION( sXML_index_body, "index-body"); +XML_CONSTASCII_ACTION( sXML_index_entry_bibliography, "index-entry-bibliography" ); +XML_CONSTASCII_ACTION( sXML_index_entry_chapter, "index-entry-chapter" ); +XML_CONSTASCII_ACTION( sXML_index_entry_chapter_number, "index-entry-chapter-number" ); +XML_CONSTASCII_ACTION( sXML_index_entry_link_end, "index-entry-link-end" ); +XML_CONSTASCII_ACTION( sXML_index_entry_link_start, "index-entry-link-start" ); +XML_CONSTASCII_ACTION( sXML_index_entry_page_number, "index-entry-page-number" ); +XML_CONSTASCII_ACTION( sXML_index_entry_span, "index-entry-span" ); +XML_CONSTASCII_ACTION( sXML_index_entry_tab_stop, "index-entry-tab-stop" ); +XML_CONSTASCII_ACTION( sXML_index_entry_template, "index-entry-template" ); +XML_CONSTASCII_ACTION( sXML_index_entry_text, "index-entry-text" ); +XML_CONSTASCII_ACTION( sXML_index_name, "index-name" ); +XML_CONSTASCII_ACTION( sXML_index_scope, "index-scope" ); +XML_CONSTASCII_ACTION( sXML_index_source_style, "index-source-style" ); +XML_CONSTASCII_ACTION( sXML_index_source_styles, "index-source-styles" ); +XML_CONSTASCII_ACTION( sXML_index_title, "index-title" ); +XML_CONSTASCII_ACTION( sXML_index_title_template, "index-title-template" ); +XML_CONSTASCII_ACTION( sXML_information, "information" ); +XML_CONSTASCII_ACTION( sXML_initial_creator, "initial-creator" ); +XML_CONSTASCII_ACTION( sXML_inproceedings, "inproceedings" ); +XML_CONSTASCII_ACTION( sXML_insertion, "insertion" ); +XML_CONSTASCII_ACTION( sXML_insertion_cut_off, "insertion-cut-off" ); +XML_CONSTASCII_ACTION( sXML_inset, "inset" ); +XML_CONSTASCII_ACTION( sXML_inside, "inside" ); +XML_CONSTASCII_ACTION( sXML_institution, "institution" ); +XML_CONSTASCII_ACTION( sXML_int, "int" ); +XML_CONSTASCII_ACTION( sXML_intensity, "intensity" ); +XML_CONSTASCII_ACTION( sXML_intersect, "intersect" ); +XML_CONSTASCII_ACTION( sXML_interval, "interval" ); +XML_CONSTASCII_ACTION( sXML_interval_major, "interval-major" ); +XML_CONSTASCII_ACTION( sXML_interval_minor, "interval-minor" ); +XML_CONSTASCII_ACTION( sXML_into_english_number, "into-english-number" ); +XML_CONSTASCII_ACTION( sXML_inverse, "inverse" ); +XML_CONSTASCII_ACTION( sXML_is_active, "is-active"); +XML_CONSTASCII_ACTION( sXML_is_data_layout_field, "is-data-layout-field"); +XML_CONSTASCII_ACTION( sXML_is_hidden, "is-hidden" ); +XML_CONSTASCII_ACTION( sXML_is_selection, "is-selection"); +XML_CONSTASCII_ACTION( sXML_isbn, "isbn" ); +XML_CONSTASCII_ACTION( sXML_italic, "italic" ); +XML_CONSTASCII_ACTION( sXML_iteration, "iteration" ); +XML_CONSTASCII_ACTION( sXML_journal, "journal" ); +XML_CONSTASCII_ACTION( sXML_justified, "justified" ); +XML_CONSTASCII_ACTION( sXML_justify, "justify" ); +XML_CONSTASCII_ACTION( sXML_justify_single_word, "justify-single-word" ); +XML_CONSTASCII_ACTION( sXML_keep_with_next, "keep-with-next" ); +XML_CONSTASCII_ACTION( sXML_kerning_normal, "normal" ); +XML_CONSTASCII_ACTION( sXML_key, "key" ); +XML_CONSTASCII_ACTION( sXML_key1, "key1" ); +XML_CONSTASCII_ACTION( sXML_key2, "key2" ); +XML_CONSTASCII_ACTION( sXML_keyword, "keyword" ); +XML_CONSTASCII_ACTION( sXML_keywords, "keywords" ); +XML_CONSTASCII_ACTION( sXML_km, "km" ); +XML_CONSTASCII_ACTION( sXML_label, "label" ); +XML_CONSTASCII_ACTION( sXML_label_arrangement, "label-arrangement" ); +XML_CONSTASCII_ACTION( sXML_label_cell_address, "label-cell-address" ); +XML_CONSTASCII_ACTION( sXML_label_cell_range_address, "label-cell-range-address" ); +XML_CONSTASCII_ACTION( sXML_label_range, "label-range" ); +XML_CONSTASCII_ACTION( sXML_label_ranges, "label-ranges" ); +XML_CONSTASCII_ACTION( sXML_layer, "layer" ); +XML_CONSTASCII_ACTION( sXML_layer_set, "layer-set" ); +XML_CONSTASCII_ACTION( sXML_lambda, "lambda" ); +XML_CONSTASCII_ACTION( sXML_landscape, "landscape" ); +XML_CONSTASCII_ACTION( sXML_language, "language" ); +XML_CONSTASCII_ACTION( sXML_language_asian, "language-asian" ); +XML_CONSTASCII_ACTION( sXML_language_complex, "language-complex" ); +XML_CONSTASCII_ACTION( sXML_last_column_spanned, "last-column-spanned" ); +XML_CONSTASCII_ACTION( sXML_last_page, "last-page" ); +XML_CONSTASCII_ACTION( sXML_last_row_spanned, "last-row-spanned" ); +XML_CONSTASCII_ACTION( sXML_leader_char, "leader-char" ); +XML_CONSTASCII_ACTION( sXML_left, "left" ); +XML_CONSTASCII_ACTION( sXML_left_outside, "left-outside" ); +XML_CONSTASCII_ACTION( sXML_left_top_position, "left-top-position" ); +XML_CONSTASCII_ACTION( sXML_legend, "legend" ); +XML_CONSTASCII_ACTION( sXML_legend_position, "legend-position" ); +XML_CONSTASCII_ACTION( sXML_length, "length" ); +XML_CONSTASCII_ACTION( sXML_leq, "leq" ); +XML_CONSTASCII_ACTION( sXML_let_text, "let-text" ); +XML_CONSTASCII_ACTION( sXML_letter_kerning, "letter-kerning" ); +XML_CONSTASCII_ACTION( sXML_letter_spacing, "letter-spacing" ); +XML_CONSTASCII_ACTION( sXML_letters, "letters" ); +XML_CONSTASCII_ACTION( sXML_level, "level" ); +XML_CONSTASCII_ACTION( sXML_library, "library" ); +XML_CONSTASCII_ACTION( sXML_library_embedded, "library-embedded" ); +XML_CONSTASCII_ACTION( sXML_library_linked, "library-linked" ); +XML_CONSTASCII_ACTION( sXML_light, "light"); +XML_CONSTASCII_ACTION( sXML_lighting_mode, "lighting-mode"); +XML_CONSTASCII_ACTION( sXML_lime, "lime" ); +XML_CONSTASCII_ACTION( sXML_limit, "limit" ); +XML_CONSTASCII_ACTION( sXML_line, "line" ); +XML_CONSTASCII_ACTION( sXML_line_break, "line-break" ); +XML_CONSTASCII_ACTION( sXML_line_height, "line-height" ); +XML_CONSTASCII_ACTION( sXML_line_height_at_least, "line-height-at-least" ); +XML_CONSTASCII_ACTION( sXML_line_spacing, "line-spacing" ); +XML_CONSTASCII_ACTION( sXML_linear, "linear" ); +XML_CONSTASCII_ACTION( sXML_linenumbering_configuration, "linenumbering-configuration" ); +XML_CONSTASCII_ACTION( sXML_linenumbering_separator, "linenumbering-separator" ); +XML_CONSTASCII_ACTION( sXML_lines, "lines" ); +XML_CONSTASCII_ACTION( sXML_lines_used, "lines-used" ); +XML_CONSTASCII_ACTION( sXML_link_data_style_to_source, "link-data-style-to-source" ); +XML_CONSTASCII_ACTION( sXML_link_to_source_data, "link-to-source-data" ); +XML_CONSTASCII_ACTION( sXML_list, "list"); +XML_CONSTASCII_ACTION( sXML_list_block, "list-block" ); +XML_CONSTASCII_ACTION( sXML_list_header, "list-header" ); +XML_CONSTASCII_ACTION( sXML_list_info, "list-info" ); +XML_CONSTASCII_ACTION( sXML_list_item, "list-item" ); +XML_CONSTASCII_ACTION( sXML_list_level, "list-level" ); +XML_CONSTASCII_ACTION( sXML_list_level_style_bullet, "list-level-style-bullet" ); +XML_CONSTASCII_ACTION( sXML_list_level_style_image, "list-level-style-image" ); +XML_CONSTASCII_ACTION( sXML_list_level_style_number, "list-level-style-number" ); +XML_CONSTASCII_ACTION( sXML_list_name, "list-name" ); +XML_CONSTASCII_ACTION( sXML_list_style, "list-style" ); +XML_CONSTASCII_ACTION( sXML_list_style_name, "list-style-name" ); +XML_CONSTASCII_ACTION( sXML_ln, "ln" ); +XML_CONSTASCII_ACTION( sXML_locked, "locked" ); +XML_CONSTASCII_ACTION( sXML_log, "log" ); +XML_CONSTASCII_ACTION( sXML_logarithmic, "logarithmic" ); +XML_CONSTASCII_ACTION( sXML_logbase, "logbase" ); +XML_CONSTASCII_ACTION( sXML_long, "long" ); +XML_CONSTASCII_ACTION( sXML_lowlimit, "lowlimit" ); +XML_CONSTASCII_ACTION( sXML_lr_tb, "lr-tb" ); +XML_CONSTASCII_ACTION( sXML_lt, "lt"); +XML_CONSTASCII_ACTION( sXML_ltr, "ltr"); +XML_CONSTASCII_ACTION( sXML_luminance , "luminance" ); +XML_CONSTASCII_ACTION( sXML_macro_name, "macro-name"); +XML_CONSTASCII_ACTION( sXML_maction, "maction"); +XML_CONSTASCII_ACTION( sXML_main_entry_style_name, "main-entry-style-name" ); +XML_CONSTASCII_ACTION( sXML_major, "major" ); +XML_CONSTASCII_ACTION( sXML_maligngroup, "maligngroup"); +XML_CONSTASCII_ACTION( sXML_malignmark, "malignmark"); +XML_CONSTASCII_ACTION( sXML_manual, "manual" ); +XML_CONSTASCII_ACTION( sXML_map, "map" ); +XML_CONSTASCII_ACTION( sXML_margin_bottom, "margin-bottom" ); +XML_CONSTASCII_ACTION( sXML_margin_left, "margin-left" ); +XML_CONSTASCII_ACTION( sXML_margin_right, "margin-right" ); +XML_CONSTASCII_ACTION( sXML_margin_top, "margin-top" ); +XML_CONSTASCII_ACTION( sXML_margins, "margins" ); +XML_CONSTASCII_ACTION( sXML_marker, "marker" ); +XML_CONSTASCII_ACTION( sXML_marker_end , "marker-end" ); +XML_CONSTASCII_ACTION( sXML_marker_end_center , "marker-end-center" ); +XML_CONSTASCII_ACTION( sXML_marker_end_width , "marker-end-width" ); +XML_CONSTASCII_ACTION( sXML_marker_start , "marker-start" ); +XML_CONSTASCII_ACTION( sXML_marker_start_center , "marker-start-center" ); +XML_CONSTASCII_ACTION( sXML_marker_start_width , "marker-start-width" ); +XML_CONSTASCII_ACTION( sXML_maroon, "maroon" ); +XML_CONSTASCII_ACTION( sXML_master_page, "master-page" ); +XML_CONSTASCII_ACTION( sXML_master_page_name , "master-page-name" ); +XML_CONSTASCII_ACTION( sXML_master_styles, "master-styles" ); +XML_CONSTASCII_ACTION( sXML_mastersthesis, "mastersthesis" ); +XML_CONSTASCII_ACTION( sXML_match, "match"); +XML_CONSTASCII_ACTION( sXML_math, "math"); +XML_CONSTASCII_ACTION( sXML_matrix, "matrix"); +XML_CONSTASCII_ACTION( sXML_matrix_covered, "matrix-covered"); +XML_CONSTASCII_ACTION( sXML_matrixrow, "matrixrow"); +XML_CONSTASCII_ACTION( sXML_max, "max" ); +XML_CONSTASCII_ACTION( sXML_max_edge, "max-edge"); +XML_CONSTASCII_ACTION( sXML_max_height, "max-height"); +XML_CONSTASCII_ACTION( sXML_max_width, "max-width"); +XML_CONSTASCII_ACTION( sXML_maximum, "maximum" ); +XML_CONSTASCII_ACTION( sXML_maximum_difference, "maximum-difference" ); +XML_CONSTASCII_ACTION( sXML_may_break_between_rows, "may-break-between-rows" ); +XML_CONSTASCII_ACTION( sXML_may_script, "may-script" ); +XML_CONSTASCII_ACTION( sXML_mean, "mean" ); +XML_CONSTASCII_ACTION( sXML_mean_value, "mean-value" ); +XML_CONSTASCII_ACTION( sXML_measure, "measure" ); +XML_CONSTASCII_ACTION( sXML_measure_align, "measure-align" ); +XML_CONSTASCII_ACTION( sXML_measure_vertical_align, "measure-vertical-align" ); +XML_CONSTASCII_ACTION( sXML_median, "median" ); +XML_CONSTASCII_ACTION( sXML_medium, "medium" ); +XML_CONSTASCII_ACTION( sXML_merror, "merror" ); +XML_CONSTASCII_ACTION( sXML_message_type, "message-type" ); +XML_CONSTASCII_ACTION( sXML_meta, "meta" ); +XML_CONSTASCII_ACTION( sXML_mfenced, "mfenced" ); +XML_CONSTASCII_ACTION( sXML_mfrac, "mfrac" ); +XML_CONSTASCII_ACTION( sXML_mi, "mi" ); //MathML Math Identifier +XML_CONSTASCII_ACTION( sXML_middle, "middle" ); +XML_CONSTASCII_ACTION( sXML_mime_type, "mime-type" ); +XML_CONSTASCII_ACTION( sXML_min, "min" ); +XML_CONSTASCII_ACTION( sXML_min_denominator_digits, "min-denominator-digits" ); +XML_CONSTASCII_ACTION( sXML_min_edge, "min-edge"); +XML_CONSTASCII_ACTION( sXML_min_exponent_digits, "min-exponent-digits" ); +XML_CONSTASCII_ACTION( sXML_min_height, "min-height" ); +XML_CONSTASCII_ACTION( sXML_min_width, "min-width" ); +XML_CONSTASCII_ACTION( sXML_min_integer_digits, "min-integer-digits" ); +XML_CONSTASCII_ACTION( sXML_min_label_distance, "min-label-distance" ); +XML_CONSTASCII_ACTION( sXML_min_label_width, "min-label-width" ); +XML_CONSTASCII_ACTION( sXML_min_line_height, "min-line-height" ); +XML_CONSTASCII_ACTION( sXML_min_numerator_digits, "min-numerator-digits" ); +XML_CONSTASCII_ACTION( sXML_min_row_height, "min-row-height" ); +XML_CONSTASCII_ACTION( sXML_minimum, "minimum" ); +XML_CONSTASCII_ACTION( sXML_minor, "minor" ); +XML_CONSTASCII_ACTION( sXML_minus, "minus" ); +XML_CONSTASCII_ACTION( sXML_minutes, "minutes" ); +XML_CONSTASCII_ACTION( sXML_mirror, "mirror" ); +XML_CONSTASCII_ACTION( sXML_mirrored, "mirrored" ); +XML_CONSTASCII_ACTION( sXML_misc, "misc" ); +XML_CONSTASCII_ACTION( sXML_miter , "miter" ); +XML_CONSTASCII_ACTION( sXML_mmultiscripts, "mmultiscripts" ); +XML_CONSTASCII_ACTION( sXML_mm, "mm" ); +XML_CONSTASCII_ACTION( sXML_mn, "mn" ); +XML_CONSTASCII_ACTION( sXML_mo, "mo" ); +XML_CONSTASCII_ACTION( sXML_mode, "mode" ); +XML_CONSTASCII_ACTION( sXML_modern, "modern" ); +XML_CONSTASCII_ACTION( sXML_modification_date, "modification-date" ); +XML_CONSTASCII_ACTION( sXML_modification_time, "modification-time" ); +XML_CONSTASCII_ACTION( sXML_modulate, "modulate" ); +XML_CONSTASCII_ACTION( sXML_module, "module" ); +XML_CONSTASCII_ACTION( sXML_moment, "moment" ); +XML_CONSTASCII_ACTION( sXML_mono, "mono" ); +XML_CONSTASCII_ACTION( sXML_month, "month" ); +XML_CONSTASCII_ACTION( sXML_move_from_bottom, "move-from-bottom" ); +XML_CONSTASCII_ACTION( sXML_move_from_left, "move-from-left" ); +XML_CONSTASCII_ACTION( sXML_move_from_right, "move-from-right" ); +XML_CONSTASCII_ACTION( sXML_move_from_top, "move-from-top" ); +XML_CONSTASCII_ACTION( sXML_move_protect, "move-protect" ); +XML_CONSTASCII_ACTION( sXML_mover, "mover" ); +XML_CONSTASCII_ACTION( sXML_movement, "movement" ); +XML_CONSTASCII_ACTION( sXML_movement_cut_off, "movement-cut-off" ); +XML_CONSTASCII_ACTION( sXML_mouse_as_pen, "mouse-as-pen" ); +XML_CONSTASCII_ACTION( sXML_mouse_visible, "mouse-visible" ); +XML_CONSTASCII_ACTION( sXML_mpadded, "mpadded"); +XML_CONSTASCII_ACTION( sXML_mphantom, "mphantom"); +XML_CONSTASCII_ACTION( sXML_mprescripts, "mprescripts"); +XML_CONSTASCII_ACTION( sXML_mroot, "mroot"); +XML_CONSTASCII_ACTION( sXML_mrow, "mrow"); +XML_CONSTASCII_ACTION( sXML_ms, "ms"); +XML_CONSTASCII_ACTION( sXML_mspace, "mspace"); +XML_CONSTASCII_ACTION( sXML_msqrt, "msqrt"); +XML_CONSTASCII_ACTION( sXML_mstyle, "mstyle"); +XML_CONSTASCII_ACTION( sXML_msub, "msub"); +XML_CONSTASCII_ACTION( sXML_msubsup, "msubsup"); +XML_CONSTASCII_ACTION( sXML_msup, "msup"); +XML_CONSTASCII_ACTION( sXML_mtable, "mtable"); +XML_CONSTASCII_ACTION( sXML_mtd, "mtd"); +XML_CONSTASCII_ACTION( sXML_mtext, "mtext"); +XML_CONSTASCII_ACTION( sXML_mtr, "mtr"); +XML_CONSTASCII_ACTION( sXML_multi_deletion_spanned, "multi-deletion-spanned"); +XML_CONSTASCII_ACTION( sXML_munder, "munder"); +XML_CONSTASCII_ACTION( sXML_munderover, "munderover"); +XML_CONSTASCII_ACTION( sXML_name, "name" ); +XML_CONSTASCII_ACTION( sXML_name_and_extension, "name-and-extension" ); +XML_CONSTASCII_ACTION( sXML_named_expression, "named-expression"); +XML_CONSTASCII_ACTION( sXML_named_expressions, "named-expressions"); +XML_CONSTASCII_ACTION( sXML_named_range, "named-range"); +XML_CONSTASCII_ACTION( sXML_navy, "navy"); +XML_CONSTASCII_ACTION( sXML_neq, "neq" ); +XML_CONSTASCII_ACTION( sXML_new, "new" ); +XML_CONSTASCII_ACTION( sXML_next, "next" ); +XML_CONSTASCII_ACTION( sXML_next_page, "next-page" ); +XML_CONSTASCII_ACTION( sXML_next_style_name, "next-style-name" ); +XML_CONSTASCII_ACTION( sXML_nohref, "nohref" ); +XML_CONSTASCII_ACTION( sXML_no_limit, "no-limit" ); +XML_CONSTASCII_ACTION( sXML_no_wrap, "no-wrap" ); +XML_CONSTASCII_ACTION( sXML_noempty, "!empty"); +XML_CONSTASCII_ACTION( sXML_nomatch, "!match"); +XML_CONSTASCII_ACTION( sXML_none, "none" ); +XML_CONSTASCII_ACTION( sXML_noprtsubset, "notprsubset" ); +XML_CONSTASCII_ACTION( sXML_normal, "normal" ); +XML_CONSTASCII_ACTION( sXML_normals_direction, "normals-direction" ); +XML_CONSTASCII_ACTION( sXML_normals_kind, "normals-kind" ); +XML_CONSTASCII_ACTION( sXML_not, "not" ); +XML_CONSTASCII_ACTION( sXML_not_equal_date, "not-equal-date" ); +XML_CONSTASCII_ACTION( sXML_note, "note" ); +XML_CONSTASCII_ACTION( sXML_notes, "notes" ); +XML_CONSTASCII_ACTION( sXML_notin, "notin" ); +XML_CONSTASCII_ACTION( sXML_notsubset, "notsubset" ); +XML_CONSTASCII_ACTION( sXML_null_date, "null-date" ); +XML_CONSTASCII_ACTION( sXML_null_year, "null-year" ); +XML_CONSTASCII_ACTION( sXML_num_format, "num-format" ); +XML_CONSTASCII_ACTION( sXML_num_letter_sync, "num-letter-sync" ); +XML_CONSTASCII_ACTION( sXML_num_prefix, "num-prefix" ); +XML_CONSTASCII_ACTION( sXML_num_suffix, "num-suffix" ); +XML_CONSTASCII_ACTION( sXML_number, "number" ); +XML_CONSTASCII_ACTION( sXML_number_and_name, "number-and-name" ); +XML_CONSTASCII_ACTION( sXML_number_columns_repeated, "number-columns-repeated" ); +XML_CONSTASCII_ACTION( sXML_number_columns_spanned, "number-columns-spanned" ); +XML_CONSTASCII_ACTION( sXML_number_lines, "number-lines" ); +XML_CONSTASCII_ACTION( sXML_number_matrix_columns_spanned, "number-matrix-columns-spanned" ); +XML_CONSTASCII_ACTION( sXML_number_matrix_rows_spanned, "number-matrix-rows-spanned" ); +XML_CONSTASCII_ACTION( sXML_number_position, "number-position" ); +XML_CONSTASCII_ACTION( sXML_number_rows_repeated, "number-rows-repeated" ); +XML_CONSTASCII_ACTION( sXML_number_rows_spanned, "number-rows-spanned" ); +XML_CONSTASCII_ACTION( sXML_number_style, "number-style" ); +XML_CONSTASCII_ACTION( sXML_number_wrapped_paragraphs, "number-wrapped-paragraphs" ); +XML_CONSTASCII_ACTION( sXML_numbered_entries, "numbered-entries" ); +XML_CONSTASCII_ACTION( sXML_object, "object" ); +XML_CONSTASCII_ACTION( sXML_object_count, "object-count" ); +XML_CONSTASCII_ACTION( sXML_object_index, "object-index" ); +XML_CONSTASCII_ACTION( sXML_object_index_entry_template, "object-index-entry-template" ); +XML_CONSTASCII_ACTION( sXML_object_index_source, "object-index-source" ); +XML_CONSTASCII_ACTION( sXML_object_name, "object-name"); +XML_CONSTASCII_ACTION( sXML_object_ole, "object-ole" ); +XML_CONSTASCII_ACTION( sXML_objects, "objects" ); +XML_CONSTASCII_ACTION( sXML_odd_page, "odd-page" ); +XML_CONSTASCII_ACTION( sXML_offset, "offset" ); +XML_CONSTASCII_ACTION( sXML_olive, "olive" ); +XML_CONSTASCII_ACTION( sXML_online, "online" ); +XML_CONSTASCII_ACTION( sXML_online_text, "online-text" ); +XML_CONSTASCII_ACTION( sXML_onLoad, "onLoad" ); +XML_CONSTASCII_ACTION( sXML_onRequest, "onRequest" ); +XML_CONSTASCII_ACTION( sXML_on_update_keep_size, "on-update-keep-size"); +XML_CONSTASCII_ACTION( sXML_on_update_keep_styles, "on-update-keep-styles"); +XML_CONSTASCII_ACTION( sXML_opaque_background, "background" ); +XML_CONSTASCII_ACTION( sXML_opaque_foreground, "foreground" ); +XML_CONSTASCII_ACTION( sXML_open, "open" ); +XML_CONSTASCII_ACTION( sXML_open_horizontal, "open-horizontal" ); +XML_CONSTASCII_ACTION( sXML_open_vertical, "open-vertical" ); +XML_CONSTASCII_ACTION( sXML_operation, "operation"); +XML_CONSTASCII_ACTION( sXML_operator, "operator"); +XML_CONSTASCII_ACTION( sXML_optimal, "optimal"); +XML_CONSTASCII_ACTION( sXML_or, "or"); +XML_CONSTASCII_ACTION( sXML_order, "order"); +XML_CONSTASCII_ACTION( sXML_ordered_list, "ordered-list" ); +XML_CONSTASCII_ACTION( sXML_organizations, "organizations" ); +XML_CONSTASCII_ACTION( sXML_orientation, "orientation"); +XML_CONSTASCII_ACTION( sXML_orientation_landscape, "orientation-landscape" ); +XML_CONSTASCII_ACTION( sXML_orientation_portrait, "orientation-portrait" ); +XML_CONSTASCII_ACTION( sXML_origin, "origin" ); +XML_CONSTASCII_ACTION( sXML_orphans, "orphans" ); +XML_CONSTASCII_ACTION( sXML_outline_level, "outline-level" ); +XML_CONSTASCII_ACTION( sXML_outline_level_style, "outline-level-style" ); +XML_CONSTASCII_ACTION( sXML_outline_style, "outline-style" ); +XML_CONSTASCII_ACTION( sXML_outset, "outset" ); +XML_CONSTASCII_ACTION( sXML_outside, "outside" ); +XML_CONSTASCII_ACTION( sXML_overlap, "overlap" ); +XML_CONSTASCII_ACTION( sXML_p, "p" ); +XML_CONSTASCII_ACTION( sXML_package_name, "package-name" ); +XML_CONSTASCII_ACTION( sXML_padding, "padding" ); +XML_CONSTASCII_ACTION( sXML_padding_bottom, "padding-bottom" ); +XML_CONSTASCII_ACTION( sXML_padding_left, "padding-left" ); +XML_CONSTASCII_ACTION( sXML_padding_right, "padding-right" ); +XML_CONSTASCII_ACTION( sXML_padding_top, "padding-top" ); +XML_CONSTASCII_ACTION( sXML_page, "page" ); +XML_CONSTASCII_ACTION( sXML_page_adjust, "page-adjust" ); +XML_CONSTASCII_ACTION( sXML_page_breaks_on_group_change, "page-breaks-on-group-change"); +XML_CONSTASCII_ACTION( sXML_page_content, "page-content" ); +XML_CONSTASCII_ACTION( sXML_page_continuation_string, "page-continuation-string" ); +XML_CONSTASCII_ACTION( sXML_page_count, "page-count" ); +XML_CONSTASCII_ACTION( sXML_page_end_margin, "page-end-margin" ); +XML_CONSTASCII_ACTION( sXML_page_height, "page-height" ); +XML_CONSTASCII_ACTION( sXML_page_master, "page-master" ); +XML_CONSTASCII_ACTION( sXML_page_master_name, "page-master-name" ); +XML_CONSTASCII_ACTION( sXML_page_number, "page-number" ); +XML_CONSTASCII_ACTION( sXML_page_start_margin, "page-start-margin" ); +XML_CONSTASCII_ACTION( sXML_page_style_name, "page-style-name" ); +XML_CONSTASCII_ACTION( sXML_page_thumbnail, "page-thumbnail" ); +XML_CONSTASCII_ACTION( sXML_page_usage, "page-usage" ); +XML_CONSTASCII_ACTION( sXML_page_variable_get, "page-variable-get" ); +XML_CONSTASCII_ACTION( sXML_page_variable_set, "page-variable-set" ); +XML_CONSTASCII_ACTION( sXML_page_view_zoom_value, "page-view-zoom-value" ); +XML_CONSTASCII_ACTION( sXML_page_width, "page-width" ); +XML_CONSTASCII_ACTION( sXML_pages, "pages" ); +XML_CONSTASCII_ACTION( sXML_paper_tray_number, "paper-tray-number" ); +XML_CONSTASCII_ACTION( sXML_paragraph, "paragraph" ); +XML_CONSTASCII_ACTION( sXML_paragraph_content, "paragraph-content" ); +XML_CONSTASCII_ACTION( sXML_paragraph_count, "paragraph-count" ); +XML_CONSTASCII_ACTION( sXML_paragraph_end_margin, "paragraph-end-margin" ); +XML_CONSTASCII_ACTION( sXML_paragraph_start_margin, "paragraph-start-margin" ); +XML_CONSTASCII_ACTION( sXML_param, "param" ); +XML_CONSTASCII_ACTION( sXML_parallel, "parallel" ); +XML_CONSTASCII_ACTION( sXML_parent_style_name, "parent-style-name" ); +XML_CONSTASCII_ACTION( sXML_parse_sql_statement, "parse-sql-statement"); +XML_CONSTASCII_ACTION( sXML_parsed, "parsed" ); +XML_CONSTASCII_ACTION( sXML_pause, "pause" ); +XML_CONSTASCII_ACTION( sXML_partialdiff, "partialdiff"); +XML_CONSTASCII_ACTION( sXML_password, "password"); +XML_CONSTASCII_ACTION( sXML_passwort, "passwort"); +XML_CONSTASCII_ACTION( sXML_path , "path" ); +XML_CONSTASCII_ACTION( sXML_pending , "pending" ); +XML_CONSTASCII_ACTION( sXML_percentage, "percentage"); +XML_CONSTASCII_ACTION( sXML_percentage_style, "percentage-style" ); +XML_CONSTASCII_ACTION( sXML_perspective, "perspective"); +XML_CONSTASCII_ACTION( sXML_phdthesis, "phdthesis" ); +XML_CONSTASCII_ACTION( sXML_phong, "phong"); +XML_CONSTASCII_ACTION( sXML_pie_offset, "pie-offset" ); +XML_CONSTASCII_ACTION( sXML_placeholder, "placeholder" ); +XML_CONSTASCII_ACTION( sXML_placeholder_type, "placeholder-type" ); +XML_CONSTASCII_ACTION( sXML_placing, "placing" ); +XML_CONSTASCII_ACTION( sXML_plain_number, "plain-number" ); +XML_CONSTASCII_ACTION( sXML_plain_number_and_name, "plain-number-and-name" ); +XML_CONSTASCII_ACTION( sXML_plot_area, "plot-area" ); +XML_CONSTASCII_ACTION( sXML_plugin, "plugin" ); +XML_CONSTASCII_ACTION( sXML_plus, "plus" ); +XML_CONSTASCII_ACTION( sXML_points, "points" ); +XML_CONSTASCII_ACTION( sXML_polygon , "polygon" ); +XML_CONSTASCII_ACTION( sXML_polyline , "polyline" ); +XML_CONSTASCII_ACTION( sXML_polynomial, "polynomial" ); +XML_CONSTASCII_ACTION( sXML_pool_id, "pool-id" ); +XML_CONSTASCII_ACTION( sXML_portrait, "portrait" ); +XML_CONSTASCII_ACTION( sXML_position, "position" ); +XML_CONSTASCII_ACTION( sXML_position_bottom, "position-bottom" ); +XML_CONSTASCII_ACTION( sXML_position_left, "position-left" ); +XML_CONSTASCII_ACTION( sXML_position_right, "position-right" ); +XML_CONSTASCII_ACTION( sXML_position_top, "position-top" ); +XML_CONSTASCII_ACTION( sXML_posture_italic, "italic" ); +XML_CONSTASCII_ACTION( sXML_posture_normal, "normal" ); +XML_CONSTASCII_ACTION( sXML_posture_oblique, "oblique" ); +XML_CONSTASCII_ACTION( sXML_power, "power" ); +XML_CONSTASCII_ACTION( sXML_precision_as_shown, "precision-as-shown" ); +XML_CONSTASCII_ACTION( sXML_prefix, "prefix" ); +XML_CONSTASCII_ACTION( sXML_presentation, "presentation" ); +XML_CONSTASCII_ACTION( sXML_presentation_chart , "chart" ); +XML_CONSTASCII_ACTION( sXML_presentation_graphic , "graphic" ); +XML_CONSTASCII_ACTION( sXML_presentation_notes , "notes" ); +XML_CONSTASCII_ACTION( sXML_presentation_object , "object" ); +XML_CONSTASCII_ACTION( sXML_presentation_orgchart , "orgchart" ); +XML_CONSTASCII_ACTION( sXML_presentation_outline , "outline" ); +XML_CONSTASCII_ACTION( sXML_presentation_page , "page" ); +XML_CONSTASCII_ACTION( sXML_presentation_page_layout, "presentation-page-layout" ); +XML_CONSTASCII_ACTION( sXML_presentation_page_layout_name, "presentation-page-layout-name" ); +XML_CONSTASCII_ACTION( sXML_presentation_subtitle , "subtitle" ); +XML_CONSTASCII_ACTION( sXML_presentation_table , "table" ); +XML_CONSTASCII_ACTION( sXML_presentation_title , "title" ); +XML_CONSTASCII_ACTION( sXML_previous, "previous" ); +XML_CONSTASCII_ACTION( sXML_previous_page, "previous-page" ); +XML_CONSTASCII_ACTION( sXML_print, "print" ); +XML_CONSTASCII_ACTION( sXML_printable, "printable" ); +XML_CONSTASCII_ACTION( sXML_print_content, "print-content"); +XML_CONSTASCII_ACTION( sXML_print_date, "print-date" ); +XML_CONSTASCII_ACTION( sXML_print_orientation, "print-orientation"); +XML_CONSTASCII_ACTION( sXML_print_page_order, "print-page-order"); +XML_CONSTASCII_ACTION( sXML_print_range, "print-range"); +XML_CONSTASCII_ACTION( sXML_print_ranges, "print-ranges"); +XML_CONSTASCII_ACTION( sXML_print_time, "print-time" ); +XML_CONSTASCII_ACTION( sXML_printed_by, "printed-by" ); +XML_CONSTASCII_ACTION( sXML_proceedings, "proceedings" ); +XML_CONSTASCII_ACTION( sXML_product, "product" ); +XML_CONSTASCII_ACTION( sXML_projection, "projection"); +XML_CONSTASCII_ACTION( sXML_properties, "properties" ); +XML_CONSTASCII_ACTION( sXML_protect, "protect" ); +XML_CONSTASCII_ACTION( sXML_protect_content, "content" ); +XML_CONSTASCII_ACTION( sXML_protect_position, "position" ); +XML_CONSTASCII_ACTION( sXML_protect_size, "size" ); +XML_CONSTASCII_ACTION( sXML_protected, "protected" ); +XML_CONSTASCII_ACTION( sXML_protection_key, "protection-key" ); +XML_CONSTASCII_ACTION( sXML_prsubset, "prsubset" ); +XML_CONSTASCII_ACTION( sXML_publisher, "publisher" ); +XML_CONSTASCII_ACTION( sXML_punctuation_wrap, "punctuation-wrap" ); +XML_CONSTASCII_ACTION( sXML_purple, "purple" ); +XML_CONSTASCII_ACTION( sXML_pyramid, "pyramid" ); +XML_CONSTASCII_ACTION( sXML_quarter, "quarter" ); +XML_CONSTASCII_ACTION( sXML_query_name, "query-name"); +XML_CONSTASCII_ACTION( sXML_quo_vadis, "quo-vadis" ); +XML_CONSTASCII_ACTION( sXML_quotient, "quotient" ); +XML_CONSTASCII_ACTION( sXML_r, "r" ); +XML_CONSTASCII_ACTION( sXML_radar, "radar" ); +XML_CONSTASCII_ACTION( sXML_random, "random" ); +XML_CONSTASCII_ACTION( sXML_range_address, "range-address"); +XML_CONSTASCII_ACTION( sXML_range_usable_as, "range-usable-as"); +XML_CONSTASCII_ACTION( sXML_recreate_on_edit , "recreate-on-edit" ); +XML_CONSTASCII_ACTION( sXML_rect , "rect" ); +XML_CONSTASCII_ACTION( sXML_red , "red" ); +XML_CONSTASCII_ACTION( sXML_ref_name, "ref-name" ); +XML_CONSTASCII_ACTION( sXML_reference, "reference" ); +XML_CONSTASCII_ACTION( sXML_reference_end, "reference-end" ); +XML_CONSTASCII_ACTION( sXML_reference_format, "reference-format" ); +XML_CONSTASCII_ACTION( sXML_reference_mark, "reference-mark" ); +XML_CONSTASCII_ACTION( sXML_reference_mark_end, "reference-mark-end" ); +XML_CONSTASCII_ACTION( sXML_reference_mark_start, "reference-mark-start" ); +XML_CONSTASCII_ACTION( sXML_reference_ref, "reference-ref" ); +XML_CONSTASCII_ACTION( sXML_reference_start, "reference-start" ); +XML_CONSTASCII_ACTION( sXML_reference_type, "reference-type" ); +XML_CONSTASCII_ACTION( sXML_refresh_delay, "refresh-delay" ); +XML_CONSTASCII_ACTION( sXML_region_center, "region-center" ); +XML_CONSTASCII_ACTION( sXML_region_left, "region-left" ); +XML_CONSTASCII_ACTION( sXML_region_right, "region-right" ); +XML_CONSTASCII_ACTION( sXML_register_true, "register-true" ); +XML_CONSTASCII_ACTION( sXML_register_truth_ref_style_name, "register-truth-ref-style-name" ); +XML_CONSTASCII_ACTION( sXML_regression_type, "regression-type" ); +XML_CONSTASCII_ACTION( sXML_rejected, "rejected" ); +XML_CONSTASCII_ACTION( sXML_rejecting_change_id, "rejecting-change-id" ); +XML_CONSTASCII_ACTION( sXML_rejection, "rejection" ); +XML_CONSTASCII_ACTION( sXML_rel_column_width, "rel-column-width" ); +XML_CONSTASCII_ACTION( sXML_rel_height, "rel-height" ); +XML_CONSTASCII_ACTION( sXML_rel_width, "rel-width" ); +XML_CONSTASCII_ACTION( sXML_relative, "relative" ) ; +XML_CONSTASCII_ACTION( sXML_relative_tab_stop_position, "relative-tab-stop-position" ); +XML_CONSTASCII_ACTION( sXML_reln, "reln" ) ; +XML_CONSTASCII_ACTION( sXML_rem, "rem" ) ; +XML_CONSTASCII_ACTION( sXML_remove_dependents, "remove-dependents" ); +XML_CONSTASCII_ACTION( sXML_remove_precedents, "remove-precedents" ); +XML_CONSTASCII_ACTION( sXML_repeat, "repeat" ); +XML_CONSTASCII_ACTION( sXML_repeat_column, "repeat-column"); +XML_CONSTASCII_ACTION( sXML_repeat_row, "repeat-row"); +XML_CONSTASCII_ACTION( sXML_repeated, "repeated" ); +XML_CONSTASCII_ACTION( sXML_replace, "replace" ); +XML_CONSTASCII_ACTION( sXML_report_type, "report-type" ); +XML_CONSTASCII_ACTION( sXML_restart_on_page, "restart-on-page" ); +XML_CONSTASCII_ACTION( sXML_revision, "revision" ); +XML_CONSTASCII_ACTION( sXML_ridge, "ridge" ); +XML_CONSTASCII_ACTION( sXML_right, "right" ); +XML_CONSTASCII_ACTION( sXML_right_outside, "right-outside" ); +XML_CONSTASCII_ACTION( sXML_ring, "ring" ); +XML_CONSTASCII_ACTION( sXML_role, "role" ); +XML_CONSTASCII_ACTION( sXML_roll_from_bottom, "roll-from-bottom" ); +XML_CONSTASCII_ACTION( sXML_roll_from_left, "roll-from-left" ); +XML_CONSTASCII_ACTION( sXML_roll_from_right, "roll-from-right" ); +XML_CONSTASCII_ACTION( sXML_roman, "roman" ); +XML_CONSTASCII_ACTION( sXML_root, "root" ); +XML_CONSTASCII_ACTION( sXML_rotate, "rotate" ); +XML_CONSTASCII_ACTION( sXML_rotation, "rotation" ); +XML_CONSTASCII_ACTION( sXML_rotation_align, "rotation-align" ); +XML_CONSTASCII_ACTION( sXML_rotation_angle, "rotation-angle" ); +XML_CONSTASCII_ACTION( sXML_round , "round" ); +XML_CONSTASCII_ACTION( sXML_row, "row"); +XML_CONSTASCII_ACTION( sXML_rows, "rows"); +XML_CONSTASCII_ACTION( sXML_row_height, "row-height" ); +XML_CONSTASCII_ACTION( sXML_row_number, "row-number" ); +XML_CONSTASCII_ACTION( sXML_ruby, "ruby" ); +XML_CONSTASCII_ACTION( sXML_ruby_align, "ruby-align" ); +XML_CONSTASCII_ACTION( sXML_ruby_base, "ruby-base" ); +XML_CONSTASCII_ACTION( sXML_ruby_position, "ruby-position" ); +XML_CONSTASCII_ACTION( sXML_ruby_text, "ruby-text" ); +XML_CONSTASCII_ACTION( sXML_run_through, "run-through" ); +XML_CONSTASCII_ACTION( sXML_rx, "rx" ); +XML_CONSTASCII_ACTION( sXML_ry, "ry" ); +XML_CONSTASCII_ACTION( sXML_s, "s" ); +XML_CONSTASCII_ACTION( sXML_scale, "scale" ); +XML_CONSTASCII_ACTION( sXML_scale_min, "scale-min" ); +XML_CONSTASCII_ACTION( sXML_scale_text, "scale-text" ); +XML_CONSTASCII_ACTION( sXML_scale_to, "scale-to" ); +XML_CONSTASCII_ACTION( sXML_scale_to_pages, "scale-to-pages" ); +XML_CONSTASCII_ACTION( sXML_scatter, "scatter" ); +XML_CONSTASCII_ACTION( sXML_scenario, "scenario" ); +XML_CONSTASCII_ACTION( sXML_scenario_ranges, "scenario-ranges" ); +XML_CONSTASCII_ACTION( sXML_scene, "scene"); +XML_CONSTASCII_ACTION( sXML_school, "school" ); +XML_CONSTASCII_ACTION( sXML_scientific_number, "scientific-number" ); +XML_CONSTASCII_ACTION( sXML_score_spaces, "score-spaces" ); +XML_CONSTASCII_ACTION( sXML_script, "script" ); +XML_CONSTASCII_ACTION( sXML_scroll, "scroll" ); +XML_CONSTASCII_ACTION( sXML_sdev, "sdev" ); +XML_CONSTASCII_ACTION( sXML_search_criteria_must_apply_to_whole_cell, "search-criteria-must-apply-to-whole-cell" ); +XML_CONSTASCII_ACTION( sXML_sec, "sec" ); +XML_CONSTASCII_ACTION( sXML_sech, "sech" ); +XML_CONSTASCII_ACTION( sXML_second_date_time, "second-date-time" ); +XML_CONSTASCII_ACTION( sXML_seconds, "seconds" ); +XML_CONSTASCII_ACTION( sXML_section, "section" ); +XML_CONSTASCII_ACTION( sXML_section_desc, "section-desc" ); +XML_CONSTASCII_ACTION( sXML_section_name, "section-name" ); +XML_CONSTASCII_ACTION( sXML_section_source, "section-source" ); +XML_CONSTASCII_ACTION( sXML_select_page, "select-page" ); +XML_CONSTASCII_ACTION( sXML_selector, "selector" ); +XML_CONSTASCII_ACTION( sXML_semantics, "semantics" ); +XML_CONSTASCII_ACTION( sXML_semi_automatic, "semi-automatic" ); +XML_CONSTASCII_ACTION( sXML_sender_city, "sender-city" ); +XML_CONSTASCII_ACTION( sXML_sender_company, "sender-company" ); +XML_CONSTASCII_ACTION( sXML_sender_country, "sender-country" ); +XML_CONSTASCII_ACTION( sXML_sender_email, "sender-email" ); +XML_CONSTASCII_ACTION( sXML_sender_fax, "sender-fax" ); +XML_CONSTASCII_ACTION( sXML_sender_firstname, "sender-firstname" ); +XML_CONSTASCII_ACTION( sXML_sender_initials, "sender-initials" ); +XML_CONSTASCII_ACTION( sXML_sender_lastname, "sender-lastname" ); +XML_CONSTASCII_ACTION( sXML_sender_phone_private, "sender-phone-private" ); +XML_CONSTASCII_ACTION( sXML_sender_phone_work, "sender-phone-work" ); +XML_CONSTASCII_ACTION( sXML_sender_position, "sender-position" ); +XML_CONSTASCII_ACTION( sXML_sender_postal_code, "sender-postal-code" ); +XML_CONSTASCII_ACTION( sXML_sender_state_or_province, "sender-state-or-province" ); +XML_CONSTASCII_ACTION( sXML_sender_street, "sender-street" ); +XML_CONSTASCII_ACTION( sXML_sender_title, "sender-title" ); +XML_CONSTASCII_ACTION( sXML_sep, "sep" ); +XML_CONSTASCII_ACTION( sXML_separation_character, "separation-character" ); +XML_CONSTASCII_ACTION( sXML_separator, "separator" ); +XML_CONSTASCII_ACTION( sXML_sequence, "sequence" ); +XML_CONSTASCII_ACTION( sXML_sequence_decl, "sequence-decl" ); +XML_CONSTASCII_ACTION( sXML_sequence_decls, "sequence-decls" ); +XML_CONSTASCII_ACTION( sXML_sequence_ref, "sequence-ref" ); +XML_CONSTASCII_ACTION( sXML_series, "series" ); +XML_CONSTASCII_ACTION( sXML_series_source, "series-source" ); +XML_CONSTASCII_ACTION( sXML_server_map, "server-map" ); +XML_CONSTASCII_ACTION( sXML_set, "set" ); +XML_CONSTASCII_ACTION( sXML_setdiff, "setdiff" ); +XML_CONSTASCII_ACTION( sXML_settings, "settings" ); +XML_CONSTASCII_ACTION( sXML_shade_mode, "shade-mode"); +XML_CONSTASCII_ACTION( sXML_shadow, "shadow" ); +XML_CONSTASCII_ACTION( sXML_shadow_color , "shadow-color" ); +XML_CONSTASCII_ACTION( sXML_shadow_offset_x , "shadow-offset-x" ); +XML_CONSTASCII_ACTION( sXML_shadow_offset_y , "shadow-offset-y" ); +XML_CONSTASCII_ACTION( sXML_shadow_slant, "shadow-slant"); +XML_CONSTASCII_ACTION( sXML_shadow_transparency , "shadow-transparency" ); +XML_CONSTASCII_ACTION( sXML_shape, "shape" ); +XML_CONSTASCII_ACTION( sXML_shapes, "shapes" ); +XML_CONSTASCII_ACTION( sXML_sheet_name, "sheet-name" ); +XML_CONSTASCII_ACTION( sXML_shininess, "shininess" ); +XML_CONSTASCII_ACTION( sXML_short, "short" ); +XML_CONSTASCII_ACTION( sXML_show, "show" ); +XML_CONSTASCII_ACTION( sXML_show_accepted_changes, "show-accepted-changes" ); +XML_CONSTASCII_ACTION( sXML_show_rejected_changes, "show-rejected-changes" ); +XML_CONSTASCII_ACTION( sXML_show_changes, "show-changes" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_author, "show-changes-by-author" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_author_name, "show-changes-by-author-name" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_comment, "show-changes-by-comment" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_comment_text, "show-changes-by-comment-text" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime, "show-changes-by-datetime" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_mode, "show-changes-by-datetime-mode" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_first_datetime, "show-changes-by-datetime-first-datetime" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_datetime_second_datetime, "show-changes-by-datetime-second-datetime" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_ranges, "show-changes-by-ranges" ); +XML_CONSTASCII_ACTION( sXML_show_changes_by_ranges_list, "show-changes-by-ranges-list" ); +XML_CONSTASCII_ACTION( sXML_show_logo, "show-logo" ); +XML_CONSTASCII_ACTION( sXML_show_unit, "show-unit" ); +XML_CONSTASCII_ACTION( sXML_shows, "shows" ); +XML_CONSTASCII_ACTION( sXML_side_by_side, "side-by-side" ); +XML_CONSTASCII_ACTION( sXML_silver, "silver" ); +XML_CONSTASCII_ACTION( sXML_simple, "simple" ); +XML_CONSTASCII_ACTION( sXML_sin, "sin" ); +XML_CONSTASCII_ACTION( sXML_since_date_time, "since-date-time" ); +XML_CONSTASCII_ACTION( sXML_since_save, "since-save" ); +XML_CONSTASCII_ACTION( sXML_sinh, "sinh" ); +XML_CONSTASCII_ACTION( sXML_size, "size" ); +XML_CONSTASCII_ACTION( sXML_size_protect, "size-protect" ); +XML_CONSTASCII_ACTION( sXML_slide, "slide" ); +XML_CONSTASCII_ACTION( sXML_slow, "slow" ); +XML_CONSTASCII_ACTION( sXML_soft_page_break, "soft-page-break" ); +XML_CONSTASCII_ACTION( sXML_solid, "solid" ); +XML_CONSTASCII_ACTION( sXML_solid_type, "solid-type" ); +XML_CONSTASCII_ACTION( sXML_sort, "sort"); +XML_CONSTASCII_ACTION( sXML_sort_ascending, "sort-ascending" ); +XML_CONSTASCII_ACTION( sXML_sort_by, "sort-by"); +XML_CONSTASCII_ACTION( sXML_sort_by_position, "sort-by-position" ); +XML_CONSTASCII_ACTION( sXML_sort_groups, "sort-groups"); +XML_CONSTASCII_ACTION( sXML_sort_key, "sort-key"); +XML_CONSTASCII_ACTION( sXML_sort_by_x_values, "sort-by-x-values" ); +XML_CONSTASCII_ACTION( sXML_source_cell_range, "source-cell-range"); +XML_CONSTASCII_ACTION( sXML_source_cell_range_addresses, "source-cell-range-addresses"); +XML_CONSTASCII_ACTION( sXML_source_field_name, "source-field-name"); +XML_CONSTASCII_ACTION( sXML_source_name, "source-name"); +XML_CONSTASCII_ACTION( sXML_source_range_address, "source-range-address"); +XML_CONSTASCII_ACTION( sXML_source_service, "source-service"); +XML_CONSTASCII_ACTION( sXML_space_before, "space-before" ); +XML_CONSTASCII_ACTION( sXML_span, "span" ); +XML_CONSTASCII_ACTION( sXML_specular, "specular"); +XML_CONSTASCII_ACTION( sXML_specular_color, "specular-color" ); +XML_CONSTASCII_ACTION( sXML_sphere, "sphere" ); +XML_CONSTASCII_ACTION( sXML_spiralin_left, "spiralin-left" ); +XML_CONSTASCII_ACTION( sXML_spiralin_right, "spiralin-right" ); +XML_CONSTASCII_ACTION( sXML_spiralout_left, "spiralout-left" ); +XML_CONSTASCII_ACTION( sXML_spiralout_right, "spiralout-right" ); +XML_CONSTASCII_ACTION( sXML_splines, "splines" ); +XML_CONSTASCII_ACTION( sXML_split, "split" ); +XML_CONSTASCII_ACTION( sXML_split_column, "split-column" ); +XML_CONSTASCII_ACTION( sXML_split_position, "split-position" ); +XML_CONSTASCII_ACTION( sXML_split_row, "split-row" ); +XML_CONSTASCII_ACTION( sXML_spreadsheet , "spreadsheet" ); +XML_CONSTASCII_ACTION( sXML_sql_statement, "sql-statement"); +XML_CONSTASCII_ACTION( sXML_stacked, "stacked" ); +XML_CONSTASCII_ACTION( sXML_stagger_even, "stagger-even" ); +XML_CONSTASCII_ACTION( sXML_stagger_odd, "stagger-odd" ); +XML_CONSTASCII_ACTION( sXML_standard, "standard" ); +XML_CONSTASCII_ACTION( sXML_standard_deviation, "standard-deviation" ); +XML_CONSTASCII_ACTION( sXML_starbasic, "starbasic" ); +XML_CONSTASCII_ACTION( sXML_start, "start" ); +XML_CONSTASCII_ACTION( sXML_start_color, "start-color" ); +XML_CONSTASCII_ACTION( sXML_start_column, "start-column" ); +XML_CONSTASCII_ACTION( sXML_start_intensity, "start-intensity" ); +XML_CONSTASCII_ACTION( sXML_start_numbering_at, "start-numbering-at" ); +XML_CONSTASCII_ACTION( sXML_start_page, "start-page" ); +XML_CONSTASCII_ACTION( sXML_start_position, "start-position" ); +XML_CONSTASCII_ACTION( sXML_start_row, "start-row" ); +XML_CONSTASCII_ACTION( sXML_start_table, "start-table" ); +XML_CONSTASCII_ACTION( sXML_start_value, "start-value" ); +XML_CONSTASCII_ACTION( sXML_start_with_navigator, "start-with-navigator" ); +XML_CONSTASCII_ACTION( sXML_statistics, "statistics" ); +XML_CONSTASCII_ACTION( sXML_status, "status" ); +XML_CONSTASCII_ACTION( sXML_stay_on_top, "stay-on-top" ); +XML_CONSTASCII_ACTION( sXML_stdev, "stdev" ); +XML_CONSTASCII_ACTION( sXML_stdevp, "stdevp" ); +XML_CONSTASCII_ACTION( sXML_steps, "steps" ); +XML_CONSTASCII_ACTION( sXML_stock, "stock" ); +XML_CONSTASCII_ACTION( sXML_stock_updown_bars, "stock-updown-bars" ); +XML_CONSTASCII_ACTION( sXML_stock_with_volume, "stock-with-volume" ); +XML_CONSTASCII_ACTION( sXML_stop, "stop" ); +XML_CONSTASCII_ACTION( sXML_stretch_from_bottom, "stretch-from-bottom" ); +XML_CONSTASCII_ACTION( sXML_stretch_from_left, "stretch-from-left" ); +XML_CONSTASCII_ACTION( sXML_stretch_from_right, "stretch-from-right" ); +XML_CONSTASCII_ACTION( sXML_stretch_from_top, "stretch-from-top" ); +XML_CONSTASCII_ACTION( sXML_stretchy, "stretchy" ); +XML_CONSTASCII_ACTION( sXML_strict , "strict" ); +XML_CONSTASCII_ACTION( sXML_string, "string"); +XML_CONSTASCII_ACTION( sXML_string_value, "string-value"); +XML_CONSTASCII_ACTION( sXML_string_value_if_false, "string-value-if-false" ); +XML_CONSTASCII_ACTION( sXML_string_value_if_true, "string-value-if-true" ); +XML_CONSTASCII_ACTION( sXML_stroke , "stroke" ); +XML_CONSTASCII_ACTION( sXML_stroke_color , "stroke-color" ); +XML_CONSTASCII_ACTION( sXML_stroke_dash , "stroke-dash" ); +XML_CONSTASCII_ACTION( sXML_stroke_linejoin , "stroke-linejoin" ); +XML_CONSTASCII_ACTION( sXML_stroke_opacity, "stroke-opacity" ); +XML_CONSTASCII_ACTION( sXML_stroke_width, "stroke-width" ); +XML_CONSTASCII_ACTION( sXML_structure_protected, "structure-protected" ); +XML_CONSTASCII_ACTION( sXML_style, "style" ); +XML_CONSTASCII_ACTION( sXML_style_name, "style-name" ); +XML_CONSTASCII_ACTION( sXML_styles, "styles" ); +XML_CONSTASCII_ACTION( sXML_stylesheet, "stylesheet" ); +XML_CONSTASCII_ACTION( sXML_sub_table, "sub-table" ); +XML_CONSTASCII_ACTION( sXML_subject, "subject" ); +XML_CONSTASCII_ACTION( sXML_subset, "subset" ); +XML_CONSTASCII_ACTION( sXML_subtitle, "subtitle" ); +XML_CONSTASCII_ACTION( sXML_subtotal_field, "subtotal-field"); +XML_CONSTASCII_ACTION( sXML_subtotal_rule, "subtotal-rule"); +XML_CONSTASCII_ACTION( sXML_subtotal_rules, "subtotal-rules"); +XML_CONSTASCII_ACTION( sXML_suffix, "suffix" ); +XML_CONSTASCII_ACTION( sXML_sum, "sum" ); +XML_CONSTASCII_ACTION( sXML_swiss, "swiss" ); +XML_CONSTASCII_ACTION( sXML_symbol, "symbol" ); +XML_CONSTASCII_ACTION( sXML_symbol_height, "symbol-height" ); +XML_CONSTASCII_ACTION( sXML_symbol_image_name, "symbol-image-name" ); +XML_CONSTASCII_ACTION( sXML_symbol_width, "symbol-width" ); +XML_CONSTASCII_ACTION( sXML_system, "system" ); +XML_CONSTASCII_ACTION( sXML_tab_stop, "tab-stop" ); +XML_CONSTASCII_ACTION( sXML_tab_stops, "tab-stops" ); +XML_CONSTASCII_ACTION( sXML_table, "table" ); +XML_CONSTASCII_ACTION( sXML_tables, "tables" ); +XML_CONSTASCII_ACTION( sXML_table_background, "table-background" ); +XML_CONSTASCII_ACTION( sXML_table_cell, "table-cell" ); +XML_CONSTASCII_ACTION( sXML_table_centering, "table-centering" ); +XML_CONSTASCII_ACTION( sXML_table_column, "table-column" ); +XML_CONSTASCII_ACTION( sXML_table_column_group, "table-column-group" ); +XML_CONSTASCII_ACTION( sXML_table_columns, "table-columns" ); +XML_CONSTASCII_ACTION( sXML_table_count, "table-count" ); +XML_CONSTASCII_ACTION( sXML_table_header, "table-header" ); +XML_CONSTASCII_ACTION( sXML_table_header_columns, "table-header-columns" ); +XML_CONSTASCII_ACTION( sXML_table_header_rows, "table-header-rows" ); +XML_CONSTASCII_ACTION( sXML_table_index, "table-index" ); +XML_CONSTASCII_ACTION( sXML_table_index_entry_template, "table-index-entry-template" ); +XML_CONSTASCII_ACTION( sXML_table_index_source, "table-index-source" ); +XML_CONSTASCII_ACTION( sXML_table_name, "table-name"); +XML_CONSTASCII_ACTION( sXML_table_number_list, "table-number-list"); +XML_CONSTASCII_ACTION( sXML_table_of_content, "table-of-content" ); +XML_CONSTASCII_ACTION( sXML_table_of_content_entry_template, "table-of-content-entry-template" ); +XML_CONSTASCII_ACTION( sXML_table_of_content_source, "table-of-content-source" ); +XML_CONSTASCII_ACTION( sXML_table_page, "table-page" ); +XML_CONSTASCII_ACTION( sXML_table_row, "table-row" ); +XML_CONSTASCII_ACTION( sXML_table_row_group, "table-row-group" ); +XML_CONSTASCII_ACTION( sXML_table_rows, "table-rows" ); +XML_CONSTASCII_ACTION( sXML_table_source, "table-source" ); +XML_CONSTASCII_ACTION( sXML_table_view, "table-view" ); +XML_CONSTASCII_ACTION( sXML_tab_stop_distance, "tab-stop-distance" ); +XML_CONSTASCII_ACTION( sXML_tan, "tan" ); +XML_CONSTASCII_ACTION( sXML_tanh, "tanh" ); +XML_CONSTASCII_ACTION( sXML_target_cell_address, "target-cell-address"); +XML_CONSTASCII_ACTION( sXML_target_frame_name, "target-frame-name" ); +XML_CONSTASCII_ACTION( sXML_target_range_address, "target-range-address"); +XML_CONSTASCII_ACTION( sXML_tb_rl, "tb-rl" ); +XML_CONSTASCII_ACTION( sXML_teal, "teal" ); +XML_CONSTASCII_ACTION( sXML_techreport, "techreport" ); +XML_CONSTASCII_ACTION( sXML_template, "template" ); +XML_CONSTASCII_ACTION( sXML_template_name, "template-name" ); +XML_CONSTASCII_ACTION( sXML_tendsto, "tendsto" ); +XML_CONSTASCII_ACTION( sXML_tex_filter, "texture-filter" ); +XML_CONSTASCII_ACTION( sXML_tex_generation_mode_x, "texture-generation-mode-x" ); +XML_CONSTASCII_ACTION( sXML_tex_generation_mode_y, "texture-generation-mode-y" ); +XML_CONSTASCII_ACTION( sXML_tex_kind, "texture-kind" ); +XML_CONSTASCII_ACTION( sXML_tex_mode, "texture-mode" ); +XML_CONSTASCII_ACTION( sXML_text, "text" ); +XML_CONSTASCII_ACTION( sXML_text_align, "text-align" ); +XML_CONSTASCII_ACTION( sXML_text_align_last, "text-align-last" ); +XML_CONSTASCII_ACTION( sXML_text_align_source, "text-align-source" ); +XML_CONSTASCII_ACTION( sXML_text_autospace, "text-autospace" ); +XML_CONSTASCII_ACTION( sXML_text_background_color, "text-background-color" ); +XML_CONSTASCII_ACTION( sXML_text_blinking, "text-blinking" ); +XML_CONSTASCII_ACTION( sXML_text_box, "text-box" ); +XML_CONSTASCII_ACTION( sXML_text_combine, "text-combine" ); +XML_CONSTASCII_ACTION( sXML_text_combine_end_char, "text-combine-end-char" ); +XML_CONSTASCII_ACTION( sXML_text_combine_start_char, "text-combine-start-char" ); +XML_CONSTASCII_ACTION( sXML_text_content, "text-content" ); +XML_CONSTASCII_ACTION( sXML_text_crossing_out, "text-crossing-out" ); +XML_CONSTASCII_ACTION( sXML_text_emphasize, "text-emphasize" ); +XML_CONSTASCII_ACTION( sXML_text_global, "text-global" ); +XML_CONSTASCII_ACTION( sXML_text_indent, "text-indent" ); +XML_CONSTASCII_ACTION( sXML_text_input, "text-input" ); +XML_CONSTASCII_ACTION( sXML_text_outline, "text-outline" ); +XML_CONSTASCII_ACTION( sXML_text_position, "text-position" ); +XML_CONSTASCII_ACTION( sXML_text_rotation_angle, "text-rotation-angle" ); +XML_CONSTASCII_ACTION( sXML_text_rotation_scale, "text-rotation-scale" ); +XML_CONSTASCII_ACTION( sXML_text_scale, "text-scale" ); +XML_CONSTASCII_ACTION( sXML_text_shadow, "text-shadow" ); +XML_CONSTASCII_ACTION( sXML_text_style, "text-style" ); +XML_CONSTASCII_ACTION( sXML_text_transform, "text-transform" ); +XML_CONSTASCII_ACTION( sXML_text_underline, "text-underline" ); +XML_CONSTASCII_ACTION( sXML_text_underline_color, "text-underline-color" ); +XML_CONSTASCII_ACTION( sXML_textarea_horizontal_align, "textarea-horizontal-align" ); +XML_CONSTASCII_ACTION( sXML_textarea_vertical_align, "textarea-vertical-align" ); +XML_CONSTASCII_ACTION( sXML_textual, "textual" ); +XML_CONSTASCII_ACTION( sXML_thick, "thick" ); +XML_CONSTASCII_ACTION( sXML_thin, "thin" ); +XML_CONSTASCII_ACTION( sXML_three_dimensional, "three-dimensional" ); +XML_CONSTASCII_ACTION( sXML_thumbnail, "thumbnail" ); +XML_CONSTASCII_ACTION( sXML_tick_marks_major_inner, "tick-marks-major-inner" ); +XML_CONSTASCII_ACTION( sXML_tick_marks_major_outer, "tick-marks-major-outer" ); +XML_CONSTASCII_ACTION( sXML_tick_marks_minor_inner, "tick-marks-minor-inner" ); +XML_CONSTASCII_ACTION( sXML_tick_marks_minor_outer, "tick-marks-minor-outer" ); +XML_CONSTASCII_ACTION( sXML_tile_repeat_offset, "tile-repeat-offset" ); +XML_CONSTASCII_ACTION( sXML_time, "time"); +XML_CONSTASCII_ACTION( sXML_time_adjust, "time-adjust" ); +XML_CONSTASCII_ACTION( sXML_time_style, "time-style" ); +XML_CONSTASCII_ACTION( sXML_time_value, "time-value"); +XML_CONSTASCII_ACTION( sXML_times, "times"); +XML_CONSTASCII_ACTION( sXML_title, "title" ); +XML_CONSTASCII_ACTION( sXML_to_another_table, "to-another-table" ); +XML_CONSTASCII_ACTION( sXML_toc_mark, "toc-mark" ); +XML_CONSTASCII_ACTION( sXML_toc_mark_end, "toc-mark-end" ); +XML_CONSTASCII_ACTION( sXML_toc_mark_start, "toc-mark-start" ); +XML_CONSTASCII_ACTION( sXML_top, "top" ); +XML_CONSTASCII_ACTION( sXML_top_percent, "top percent"); +XML_CONSTASCII_ACTION( sXML_top_values, "top values"); +XML_CONSTASCII_ACTION( sXML_trace_dependents, "trace-dependents" ); +XML_CONSTASCII_ACTION( sXML_trace_errors, "trace-errors" ); +XML_CONSTASCII_ACTION( sXML_trace_precedents, "trace-precedents" ); +XML_CONSTASCII_ACTION( sXML_track_changes, "track-changes" ); +XML_CONSTASCII_ACTION( sXML_tracked_changes, "tracked-changes" ); +XML_CONSTASCII_ACTION( sXML_tracked_changes_view_settings, "tracked-changes-view-settings" ); +XML_CONSTASCII_ACTION( sXML_transform , "transform" ); +XML_CONSTASCII_ACTION( sXML_transition_on_click, "transition-on-click" ); +XML_CONSTASCII_ACTION( sXML_transparency, "transparency" ); +XML_CONSTASCII_ACTION( sXML_transparency_name, "transparency-name" ); +XML_CONSTASCII_ACTION( sXML_transparent, "transparent" ); +XML_CONSTASCII_ACTION( sXML_transpose, "transpose" ); +XML_CONSTASCII_ACTION( sXML_true, "true" ); +XML_CONSTASCII_ACTION( sXML_truncate_on_overflow, "truncate-on-overflow" ); +XML_CONSTASCII_ACTION( sXML_ttb, "ttb"); +XML_CONSTASCII_ACTION( sXML_type, "type" ); +XML_CONSTASCII_ACTION( sXML_underline_bold, "bold" ); +XML_CONSTASCII_ACTION( sXML_underline_bold_dash, "bold-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dash, "bold-dot-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_bold_dot_dot_dash, "bold-dot-dot-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_bold_dotted, "bold-dotted" ); +XML_CONSTASCII_ACTION( sXML_underline_bold_long_dash, "bold-long-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_bold_wave, "bold-wave" ); +XML_CONSTASCII_ACTION( sXML_underline_dash, "dash" ); +XML_CONSTASCII_ACTION( sXML_underline_dot_dash, "dot-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_dot_dot_dash, "dot-dot-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_dotted, "dotted" ); +XML_CONSTASCII_ACTION( sXML_underline_double, "double" ); +XML_CONSTASCII_ACTION( sXML_underline_double_wave, "double-wave" ); +XML_CONSTASCII_ACTION( sXML_underline_long_dash, "long-dash" ); +XML_CONSTASCII_ACTION( sXML_underline_none, "none" ); +XML_CONSTASCII_ACTION( sXML_underline_single, "single" ); +XML_CONSTASCII_ACTION( sXML_underline_small_wave, "small-wave" ); +XML_CONSTASCII_ACTION( sXML_underline_wave, "wave" ); +XML_CONSTASCII_ACTION( sXML_unformatted_text, "unformatted-text" ); +XML_CONSTASCII_ACTION( sXML_union, "union" ); +XML_CONSTASCII_ACTION( sXML_unit, "unit" ); +XML_CONSTASCII_ACTION( sXML_unordered_list, "unordered-list" ); +XML_CONSTASCII_ACTION( sXML_unpublished, "unpublished" ); +XML_CONSTASCII_ACTION( sXML_uplimit, "uplimit" ); +XML_CONSTASCII_ACTION( sXML_url, "url" ); +XML_CONSTASCII_ACTION( sXML_use_caption, "use-caption" ); +XML_CONSTASCII_ACTION( sXML_use_cell_protection, "use-cell-protection" ); +XML_CONSTASCII_ACTION( sXML_use_chart_objects, "use-chart-objects" ); +XML_CONSTASCII_ACTION( sXML_use_condition, "use-condition" ); +XML_CONSTASCII_ACTION( sXML_use_draw_objects, "use-draw-objects" ); +XML_CONSTASCII_ACTION( sXML_use_floating_frames, "use-floating-frames" ); +XML_CONSTASCII_ACTION( sXML_use_graphics, "use-graphics" ); +XML_CONSTASCII_ACTION( sXML_use_image_objects, "use-image-objects" ); +XML_CONSTASCII_ACTION( sXML_use_index_marks, "use-index-marks" ); +XML_CONSTASCII_ACTION( sXML_use_index_source_styles, "use-index-source-styles" ); +XML_CONSTASCII_ACTION( sXML_use_keys_as_entries, "use-keys-as-entries" ); +XML_CONSTASCII_ACTION( sXML_use_label, "use-label" ); +XML_CONSTASCII_ACTION( sXML_use_math_objects, "use-math-objects" ); +XML_CONSTASCII_ACTION( sXML_use_objects, "use-objects" ); +XML_CONSTASCII_ACTION( sXML_use_optimal_column_width, "use-optimal-column-width"); +XML_CONSTASCII_ACTION( sXML_use_optimal_row_height, "use-optimal-row-height"); +XML_CONSTASCII_ACTION( sXML_use_other_objects, "use-other-objects" ); +XML_CONSTASCII_ACTION( sXML_use_soft_page_breaks, "use-soft-page-breaks" ); +XML_CONSTASCII_ACTION( sXML_use_spreadsheet_objects, "use-spreadsheet-objects" ); +XML_CONSTASCII_ACTION( sXML_use_styles, "use-styles" ); +XML_CONSTASCII_ACTION( sXML_use_tables, "use-tables" ); +XML_CONSTASCII_ACTION( sXML_use_window_font_color, "use-window-font-color" ); +XML_CONSTASCII_ACTION( sXML_used_hierarchy, "used-hierarchy"); +XML_CONSTASCII_ACTION( sXML_user_defined, "user-defined" ); +XML_CONSTASCII_ACTION( sXML_user_field_decl, "user-field-decl" ); +XML_CONSTASCII_ACTION( sXML_user_field_decls, "user-field-decls" ); +XML_CONSTASCII_ACTION( sXML_user_field_get, "user-field-get" ); +XML_CONSTASCII_ACTION( sXML_user_field_input, "user-field-input" ); +XML_CONSTASCII_ACTION( sXML_user_index, "user-index" ); +XML_CONSTASCII_ACTION( sXML_user_index_entry_template, "user-index-entry-template" ); +XML_CONSTASCII_ACTION( sXML_user_index_mark, "user-index-mark" ); +XML_CONSTASCII_ACTION( sXML_user_index_mark_end, "user-index-mark-end" ); +XML_CONSTASCII_ACTION( sXML_user_index_mark_start, "user-index-mark-start" ); +XML_CONSTASCII_ACTION( sXML_user_index_source, "user-index-source" ); +XML_CONSTASCII_ACTION( sXML_user_transformed, "user-transformed" ); +XML_CONSTASCII_ACTION( sXML_username, "username"); +XML_CONSTASCII_ACTION( sXML_value, "value"); +XML_CONSTASCII_ACTION( sXML_value_type, "value-type"); +XML_CONSTASCII_ACTION( sXML_values_cell_range_address, "values-cell-range-address" ); +XML_CONSTASCII_ACTION( sXML_var, "var" ); +XML_CONSTASCII_ACTION( sXML_variable, "variable" ); +XML_CONSTASCII_ACTION( sXML_variable_decl, "variable-decl" ); +XML_CONSTASCII_ACTION( sXML_variable_decls, "variable-decls" ); +XML_CONSTASCII_ACTION( sXML_variable_get, "variable-get" ); +XML_CONSTASCII_ACTION( sXML_variable_input, "variable-input" ); +XML_CONSTASCII_ACTION( sXML_variable_set, "variable-set" ); +XML_CONSTASCII_ACTION( sXML_variance, "variance" ); +XML_CONSTASCII_ACTION( sXML_varp, "varp" ); +XML_CONSTASCII_ACTION( sXML_vector, "vector" ); +XML_CONSTASCII_ACTION( sXML_verb, "verb" ); +XML_CONSTASCII_ACTION( sXML_version, "version" ); +XML_CONSTASCII_ACTION( sXML_version_entry, "version-entry" ); +XML_CONSTASCII_ACTION( sXML_version_list, "version-list" ); +XML_CONSTASCII_ACTION( sXML_vertical, "vertical" ); +XML_CONSTASCII_ACTION( sXML_vertical_align, "vertical-align" ); +XML_CONSTASCII_ACTION( sXML_vertical_lines, "vertical-lines" ); +XML_CONSTASCII_ACTION( sXML_vertical_pos, "vertical-pos" ); +XML_CONSTASCII_ACTION( sXML_vertical_rel, "vertical-rel" ); +XML_CONSTASCII_ACTION( sXML_vertical_segments, "vertical-segments" ); +XML_CONSTASCII_ACTION( sXML_vertical_split_mode, "vertical-split-mode" ); +XML_CONSTASCII_ACTION( sXML_vertical_split_position, "vertical-split-position" ); +XML_CONSTASCII_ACTION( sXML_vertical_stripes, "vertical-stripes" ); +XML_CONSTASCII_ACTION( sXML_view, "view" ); +XML_CONSTASCII_ACTION( sXML_viewBox, "viewBox" ); +XML_CONSTASCII_ACTION( sXML_view_id, "view-id" ); +XML_CONSTASCII_ACTION( sXML_view_settings, "view-settings" ); +XML_CONSTASCII_ACTION( sXML_visibility, "visibility" ); +XML_CONSTASCII_ACTION( sXML_visible, "visible" ); +XML_CONSTASCII_ACTION( sXML_visible_area, "visible-area" ); +XML_CONSTASCII_ACTION( sXML_visible_area_height, "visible-area-height" ); +XML_CONSTASCII_ACTION( sXML_visible_area_left, "visible-area-left" ); +XML_CONSTASCII_ACTION( sXML_visible_area_top, "visible-area-top" ); +XML_CONSTASCII_ACTION( sXML_visible_area_width, "visible-area-width" ); +XML_CONSTASCII_ACTION( sXML_visited_style_name, "visited-style-name" ); +XML_CONSTASCII_ACTION( sXML_volatile, "volatile" ); +XML_CONSTASCII_ACTION( sXML_volume, "volume" ); +XML_CONSTASCII_ACTION( sXML_vpn, "vpn"); +XML_CONSTASCII_ACTION( sXML_vrp, "vrp"); +XML_CONSTASCII_ACTION( sXML_vup, "vup"); +XML_CONSTASCII_ACTION( sXML_wall, "wall" ); +XML_CONSTASCII_ACTION( sXML_warning, "warning" ); +XML_CONSTASCII_ACTION( sXML_watermark, "watermark" ); +XML_CONSTASCII_ACTION( sXML_wavyline_from_bottom, "wavyline-from-bottom" ); +XML_CONSTASCII_ACTION( sXML_wavyline_from_left, "wavyline-from-left" ); +XML_CONSTASCII_ACTION( sXML_wavyline_from_right, "wavyline-from-right" ); +XML_CONSTASCII_ACTION( sXML_wavyline_from_top, "wavyline-from-top" ); +XML_CONSTASCII_ACTION( sXML_week_of_year, "week-of-year" ); +XML_CONSTASCII_ACTION( sXML_weight_bold, "bold" ); +XML_CONSTASCII_ACTION( sXML_weight_normal, "normal" ); +XML_CONSTASCII_ACTION( sXML_white, "white" ); +XML_CONSTASCII_ACTION( sXML_whole_page, "whole-page" ); +XML_CONSTASCII_ACTION( sXML_widows, "widows" ); +XML_CONSTASCII_ACTION( sXML_width, "width" ); +XML_CONSTASCII_ACTION( sXML_word, "word" ); +XML_CONSTASCII_ACTION( sXML_word_count, "word-count" ); +XML_CONSTASCII_ACTION( sXML_wrap, "wrap" ); +XML_CONSTASCII_ACTION( sXML_wrap_contour, "wrap-contour" ); +XML_CONSTASCII_ACTION( sXML_wrap_contour_mode, "wrap-contour-mode" ); +XML_CONSTASCII_ACTION( sXML_wrap_option, "wrap-option" ); +XML_CONSTASCII_ACTION( sXML_writing_mode, "writing-mode" ); +XML_CONSTASCII_ACTION( sXML_www, "www" ); +XML_CONSTASCII_ACTION( sXML_x, "x" ); +XML_CONSTASCII_ACTION( sXML_x1, "x1" ); +XML_CONSTASCII_ACTION( sXML_x2, "x2" ); +XML_CONSTASCII_ACTION( sXML_x_mac_roman, "x-mac-roman" ); +XML_CONSTASCII_ACTION( sXML_x_symbol, "x-symbol" ); +XML_CONSTASCII_ACTION( sXML_x_system, "x-system" ); +XML_CONSTASCII_ACTION( sXML_xor, "xor" ); +XML_CONSTASCII_ACTION( sXML_y, "y" ); +XML_CONSTASCII_ACTION( sXML_y1, "y1" ); +XML_CONSTASCII_ACTION( sXML_y2, "y2" ); +XML_CONSTASCII_ACTION( sXML_year, "year" ); +XML_CONSTASCII_ACTION( sXML_yellow, "yellow" ); +XML_CONSTASCII_ACTION( sXML_zero_values, "zero-values" ); +XML_CONSTASCII_ACTION( sXML_zindex, "z-index" ); +XML_CONSTASCII_ACTION( sXML_zoom_type, "zoom-type" ); +XML_CONSTASCII_ACTION( sXML_zoom_value, "zoom-value" ); + +XML_CONSTASCII_ACTION( sXML_start_shape, "start-shape"); +XML_CONSTASCII_ACTION( sXML_start_glue_point, "start-glue-point"); +XML_CONSTASCII_ACTION( sXML_end_shape, "end-shape"); +XML_CONSTASCII_ACTION( sXML_end_glue_point, "end-glue-point"); +XML_CONSTASCII_ACTION( sXML_line_number, "line-number"); +XML_CONSTASCII_ACTION( sXML_line_skew, "line-skew"); +XML_CONSTASCII_ACTION( sXML_curve, "curve" ); +XML_CONSTASCII_ACTION( sXML_start_line_spacing_horizontal, "start-line-spacing-horizontal" ); +XML_CONSTASCII_ACTION( sXML_start_line_spacing_vertical, "start-line-spacing-vertical" ); +XML_CONSTASCII_ACTION( sXML_end_line_spacing_horizontal, "end-line-spacing-horizontal" ); +XML_CONSTASCII_ACTION( sXML_end_line_spacing_vertical, "end-line-spacing-vertical" ); +XML_CONSTASCII_ACTION( sXML_line_distance, "line-distance" ); +XML_CONSTASCII_ACTION( sXML_guide_overhang, "guide-overhang" ); +XML_CONSTASCII_ACTION( sXML_guide_distance, "guide-distance" ); +XML_CONSTASCII_ACTION( sXML_start_guide, "start-guide" ); +XML_CONSTASCII_ACTION( sXML_end_guide, "end-guide" ); + +XML_CONSTASCII_ACTION( sXML_dots1, "dots1" ); +XML_CONSTASCII_ACTION( sXML_dots1_length, "dots1-length" ); +XML_CONSTASCII_ACTION( sXML_dots2, "dots2" ); +XML_CONSTASCII_ACTION( sXML_dots2_length, "dots2-length" ); +XML_CONSTASCII_ACTION( sXML_enable_numbering, "enable-numbering" ); + +XML_CONSTASCII_ACTION( sXML_top_left, "top-left" ); +XML_CONSTASCII_ACTION( sXML_top_right, "top-right" ); +XML_CONSTASCII_ACTION( sXML_bottom_left, "bottom-left" ); +XML_CONSTASCII_ACTION( sXML_bottom_right, "bottom-right" ); + +XML_CONSTASCII_ACTION( sXML_fill_image_ref_point, "fill-image-ref-point" ); +XML_CONSTASCII_ACTION( sXML_fill_image_ref_point_x, "fill-image-ref-point-x" ); +XML_CONSTASCII_ACTION( sXML_fill_image_ref_point_y, "fill-image-ref-point-y" ); + +XML_CONSTASCII_ACTION( sXML_from_right, "from-right" ); +XML_CONSTASCII_ACTION( sXML_from_bottom, "from-bottom" ); +XML_CONSTASCII_ACTION( sXML_from_center, "from-center" ); +XML_CONSTASCII_ACTION( sXML_from_upper_left, "from-upper-left" ); +XML_CONSTASCII_ACTION( sXML_from_upper_right, "from-upper-right" ); +XML_CONSTASCII_ACTION( sXML_from_lower_left, "from-lower-left" ); +XML_CONSTASCII_ACTION( sXML_from_lower_right, "from-lower-right" ); +XML_CONSTASCII_ACTION( sXML_to_left, "to-left" ); +XML_CONSTASCII_ACTION( sXML_to_top, "to-top" ); +XML_CONSTASCII_ACTION( sXML_to_right, "to-right" ); +XML_CONSTASCII_ACTION( sXML_to_bottom, "to-bottom" ); +XML_CONSTASCII_ACTION( sXML_to_upper_left, "to-upper-left" ); +XML_CONSTASCII_ACTION( sXML_to_upper_right, "to-upper-right" ); +XML_CONSTASCII_ACTION( sXML_to_lower_right, "to-lower-right" ); +XML_CONSTASCII_ACTION( sXML_to_lower_left, "to-lower-left" ); +XML_CONSTASCII_ACTION( sXML_to_center, "to-center" ); +XML_CONSTASCII_ACTION( sXML_counter_clockwise, "counter-clockwise" ); + +XML_CONSTASCII_ACTION( sXML_fade, "fade" ); +XML_CONSTASCII_ACTION( sXML_move, "move" ); +XML_CONSTASCII_ACTION( sXML_stripes, "stripes" ); +XML_CONSTASCII_ACTION( sXML_spiral_inward_left, "spiral-inward-left" ); +XML_CONSTASCII_ACTION( sXML_spiral_inward_right, "spiral-inward-right" ); +XML_CONSTASCII_ACTION( sXML_spiral_outward_left, "spiral-outward-left" ); +XML_CONSTASCII_ACTION( sXML_spiral_outward_right, "spiral-outward-right" ); +XML_CONSTASCII_ACTION( sXML_spiral, "spiral" ); +XML_CONSTASCII_ACTION( sXML_spiral_in, "spiral-in" ); +XML_CONSTASCII_ACTION( sXML_spiral_out, "spiral-out" ); +XML_CONSTASCII_ACTION( sXML_wavyline, "wavyline" ); +XML_CONSTASCII_ACTION( sXML_laser, "laser" ); +XML_CONSTASCII_ACTION( sXML_appear, "appear" ); +XML_CONSTASCII_ACTION( sXML_hide, "hide" ); +XML_CONSTASCII_ACTION( sXML_move_short, "move-short" ); +XML_CONSTASCII_ACTION( sXML_checkerboard, "checkerboard" ); +XML_CONSTASCII_ACTION( sXML_stretch, "stretch" ); + +XML_CONSTASCII_ACTION( sXML_shape_id, "shape-id" ); +XML_CONSTASCII_ACTION( sXML_effect, "effect" ); +XML_CONSTASCII_ACTION( sXML_speed, "speed" ); +XML_CONSTASCII_ACTION( sXML_start_scale, "start-scale" ); +XML_CONSTASCII_ACTION( sXML_show_shape, "show-shape" ); +XML_CONSTASCII_ACTION( sXML_show_text, "show-text" ); +XML_CONSTASCII_ACTION( sXML_hide_shape, "hide-shape" ); +XML_CONSTASCII_ACTION( sXML_hide_text, "hide-text" ); +XML_CONSTASCII_ACTION( sXML_dim, "dim" ); +XML_CONSTASCII_ACTION( sXML_sound, "sound" ); +XML_CONSTASCII_ACTION( sXML_play_full, "play-full" ); +XML_CONSTASCII_ACTION( sXML_path_id, "path-id" ); + +XML_CONSTASCII_ACTION( sXML_animations, "animations" ); + +XML_CONSTASCII_ACTION( sXML_kind, "kind" ); +XML_CONSTASCII_ACTION( sXML_start_angle, "start-angle" ); +XML_CONSTASCII_ACTION( sXML_cut, "cut" ); +XML_CONSTASCII_ACTION( sXML_arc, "arc" ); + +XML_CONSTASCII_ACTION( sXML_upright, "upright" ); +XML_CONSTASCII_ACTION( sXML_slant_x, "slant-x" ); +XML_CONSTASCII_ACTION( sXML_slant_y, "slant-y" ); +XML_CONSTASCII_ACTION( sXML_autosize, "autosize" ); +XML_CONSTASCII_ACTION( sXML_slant, "slant" ); +XML_CONSTASCII_ACTION( sXML_topcircle, "top-circle" ); +XML_CONSTASCII_ACTION( sXML_bottomcircle, "bottom-circle" ); +XML_CONSTASCII_ACTION( sXML_leftcircle, "left-circle" ); +XML_CONSTASCII_ACTION( sXML_rightcircle, "right-circle" ); +XML_CONSTASCII_ACTION( sXML_toparc, "top-arc" ); +XML_CONSTASCII_ACTION( sXML_bottomarc, "bottom-arc" ); +XML_CONSTASCII_ACTION( sXML_leftarc, "left-arc" ); +XML_CONSTASCII_ACTION( sXML_rightarc, "right-arc" ); +XML_CONSTASCII_ACTION( sXML_button1, "button1" ); +XML_CONSTASCII_ACTION( sXML_button2, "button2" ); +XML_CONSTASCII_ACTION( sXML_button3, "button3" ); +XML_CONSTASCII_ACTION( sXML_button4, "button4" ); + +XML_CONSTASCII_ACTION( sXML_caption_type, "caption-type" ); +XML_CONSTASCII_ACTION( sXML_caption_angle_type, "caption-angle-type" ); +XML_CONSTASCII_ACTION( sXML_caption_angle, "caption-angle" ); +XML_CONSTASCII_ACTION( sXML_caption_gap, "caption-gap" ); +XML_CONSTASCII_ACTION( sXML_caption_escape_direction, "caption-escape-direction" ); +XML_CONSTASCII_ACTION( sXML_caption_escape, "caption-escape" ); +XML_CONSTASCII_ACTION( sXML_caption_line_length, "caption-line-length" ); +XML_CONSTASCII_ACTION( sXML_caption_fit_line_length, "caption-fit-line-length" ); +XML_CONSTASCII_ACTION( sXML_free, "free" ); + +XML_CONSTASCII_ACTION( sXML_straight_line, "straight-line" ); +XML_CONSTASCII_ACTION( sXML_angled_line, "angled-line" ); +XML_CONSTASCII_ACTION( sXML_angled_connector_line, "angled-connector-line" ); + +XML_CONSTASCII_ACTION( sXML_data_source_has_labels, "data-source-has-labels" ); + +XML_CONSTASCII_ACTION( sXML_play, "play" ); +XML_CONSTASCII_ACTION( sXML_handout_master, "handout-master" ); + +XML_CONSTASCII_ACTION( sXML_escape_direction, "escape-direction" ); +XML_CONSTASCII_ACTION( sXML_glue_point, "glue-point" ); + +XML_CONSTASCII_ACTION( sXML_text_style_name, "text-style-name" ); + +XML_CONSTASCII_ACTION( sXML_sort_algorithm, "sort-algorithm" ); +XML_CONSTASCII_ACTION( sXML_roll_from_top, "roll-from-top" ); + +XML_CONSTASCII_ACTION( sXML_script_data, "script-data" ); +XML_CONSTASCII_ACTION( sXML_libraries, "libraries" ); +XML_CONSTASCII_ACTION( sXML_source_code, "source-code" ); +XML_CONSTASCII_ACTION( sXML_readonly, "readonly" ); + +XML_CONSTASCII_ACTION( sXML_page_continuation, "page-continuation" ); + +XML_CONSTASCII_ACTION( sXML_contains, "contains" ); +XML_CONSTASCII_ACTION( sXML_does_not_contain, "does-not-contain" ); +XML_CONSTASCII_ACTION( sXML_begins_with, "begins-with" ); +XML_CONSTASCII_ACTION( sXML_does_not_begin_with, "does-not-begin-with" ); +XML_CONSTASCII_ACTION( sXML_ends_with, "ends-with" ); +XML_CONSTASCII_ACTION( sXML_does_not_end_with, "does-not-end-with" ); + +#endif diff --git a/xmloff/inc/xmloff/xmlmetae.hxx b/xmloff/inc/xmloff/xmlmetae.hxx new file mode 100644 index 000000000000..abbcd03124b0 --- /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..5d5e470f3be3 --- /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, sal_uInt16 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( 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 ); + + 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/xmlnmspe.hxx b/xmloff/inc/xmloff/xmlnmspe.hxx new file mode 100644 index 000000000000..2f4615da2a2c --- /dev/null +++ b/xmloff/inc/xmloff/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/xmlnume.hxx b/xmloff/inc/xmloff/xmlnume.hxx new file mode 100644 index 000000000000..473bec6d5dec --- /dev/null +++ b/xmloff/inc/xmloff/xmlnume.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_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; + // Boolean indicating, if properties for position-and-space-mode LABEL_ALIGNEMNT + // are exported or not. (#i89178#) + // 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 ); + + 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..b1f00e72ca95 --- /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..d5ccc45354ff --- /dev/null +++ b/xmloff/inc/xmloff/xmlnumfi.hxx @@ -0,0 +1,226 @@ +/* -*- 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> +#include <vector> +#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, + sal_uInt16 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: + // 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, sal_uInt16 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, sal_uInt16 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( sal_uInt16 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..c1c342165730 --- /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..123f23ed76a7 --- /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, sal_uInt16 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( sal_uInt16 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( sal_uInt16 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..e6dfdb2cc36e --- /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..41b997af86c0 --- /dev/null +++ b/xmloff/inc/xmloff/xmlprmap.hxx @@ -0,0 +1,190 @@ +/* -*- 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> + +#include <vector> +#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/xmlreg.hxx b/xmloff/inc/xmloff/xmlreg.hxx new file mode 100644 index 000000000000..3e9974d7a01c --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/xmlscripti.hxx b/xmloff/inc/xmloff/xmlscripti.hxx new file mode 100644 index 000000000000..74ae34073544 --- /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..2c42b7cddb57 --- /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; } + + sal_Bool IsValid() const { return mbValid; } + void SetValid( sal_Bool b ) { mbValid = b; } + + sal_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 sal_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/xmltabe.hxx b/xmloff/inc/xmloff/xmltabe.hxx new file mode 100644 index 000000000000..a53166554fb1 --- /dev/null +++ b/xmloff/inc/xmloff/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/xmloff/xmltkmap.hxx b/xmloff/inc/xmloff/xmltkmap.hxx new file mode 100644 index 000000000000..711d9eb310d5 --- /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..e47aa498ebe3 --- /dev/null +++ b/xmloff/inc/xmloff/xmltoken.hxx @@ -0,0 +1,3165 @@ +/* -*- 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, + // 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 (#i49139#) + 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_LINE_STYLE, + 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_LAYOUT_GRID_SNAP_TO, + + 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, + + /* Core impl. of the positioning of floating screen objects without + considering its wrapping style (#i28701#) + */ + XML_WRAP_INFLUENCE_ON_POSITION, + // Tokens have been renamed and <XML_ITERATIVE> has been added (#i35017#) + 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, + + // XML_HORIZONTAL_ON_LEFT_PAGES and XML_HORIZONTAL_ON_RIGHT_PAGES + // are replaced by XML_HORIZONTAL_ON_EVEN and XML_HORIZONTAL_ON_ODD. (#i49139#) + XML_HORIZONTAL_ON_EVEN, + 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, + // Password error from 1.4 to 2.0 Beta (#i45874#) + XML_RESTART_NUMBERING, + // OpenDocument <text:numbered-paragraph> element not supported on OpenDocument import (#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, + // Core implementation for direct cross-references (#i81002#) + XML_NUMBER_NO_SUPERIOR, + XML_NUMBER_ALL_SUPERIOR, + 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, + + 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_LEGEND_EXPANSION, //#i28760# + XML_LEGEND_EXPANSION_ASPECT_RATIO, //#i28760# + XML_BALANCED, //#i28760# + XML_HIGH, //#i28760# + XML_WIDE, //#i28760# + + XML_AXIS_TYPE, //#i25706# + XML_DATE_SCALE, + XML_BASE_TIME_UNIT, + XML_MAJOR_INTERVAL_VALUE, + XML_MINOR_INTERVAL_VALUE, + XML_MAJOR_INTERVAL_UNIT, + XML_MINOR_INTERVAL_UNIT, + + XML_MIN_VALUE, + XML_MAX_VALUE, + + 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..922ad3f340d0 --- /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..c593e99ebbbb --- /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, + sal_uInt16 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, sal_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, sal_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, sal_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: */ |