1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: contexts.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SCH_XML_CONTEXTS_HXX_
31 #define _SCH_XML_CONTEXTS_HXX_
33 #include "SchXMLImport.hxx"
34 #include "SchXMLTableContext.hxx"
35 #include <xmloff/xmlictxt.hxx>
36 #include <xmloff/xmltkmap.hxx>
38 #include <xmloff/xmlmetai.hxx>
40 namespace com
{ namespace sun
{ namespace star
{ namespace xml
{ namespace sax
{
44 /* ========================================
46 These contexts are only nedded by
47 SchXMLImport not by the SchXMLImportHelper
48 that is also used by other applications
50 ======================================== */
52 class SchXMLDocContext
: public virtual SvXMLImportContext
55 SchXMLImportHelper
& mrImportHelper
;
59 SchXMLImportHelper
& rImpHelper
,
62 const rtl::OUString
& rLName
);
63 virtual ~SchXMLDocContext();
67 virtual SvXMLImportContext
* CreateChildContext(
69 const ::rtl::OUString
& rLocalName
,
70 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
73 // ========================================
75 // context for flat file xml format
76 class SchXMLFlatDocContext_Impl
77 : public SchXMLDocContext
, public SvXMLMetaDocumentContext
80 SchXMLFlatDocContext_Impl(
81 SchXMLImportHelper
& i_rImpHelper
,
82 SchXMLImport
& i_rImport
,
83 USHORT i_nPrefix
, const ::rtl::OUString
& i_rLName
,
84 const com::sun::star::uno::Reference
<com::sun::star::document::XDocumentProperties
>& i_xDocProps
,
85 const com::sun::star::uno::Reference
<com::sun::star::xml::sax::XDocumentHandler
>& i_xDocBuilder
);
87 virtual ~SchXMLFlatDocContext_Impl();
89 virtual SvXMLImportContext
*CreateChildContext(
90 USHORT i_nPrefix
, const ::rtl::OUString
& i_rLocalName
,
91 const com::sun::star::uno::Reference
<com::sun::star::xml::sax::XAttributeList
>& i_xAttrList
);
94 // ========================================
96 class SchXMLBodyContext
: public SvXMLImportContext
99 SchXMLImportHelper
& mrImportHelper
;
103 SchXMLImportHelper
& rImpHelper
,
104 SvXMLImport
& rImport
,
106 const rtl::OUString
& rLName
);
107 virtual ~SchXMLBodyContext();
109 virtual void EndElement();
110 virtual SvXMLImportContext
* CreateChildContext(
112 const ::rtl::OUString
& rLocalName
,
113 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
116 // ========================================
118 #endif // _SCH_XML_CONTEXTS_HXX_