1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _SCH_XML_CONTEXTS_HXX_
29 #define _SCH_XML_CONTEXTS_HXX_
31 #include "SchXMLImport.hxx"
32 #include "SchXMLTableContext.hxx"
33 #include <xmloff/xmlictxt.hxx>
34 #include <xmloff/xmltkmap.hxx>
36 #include <xmloff/xmlmetai.hxx>
38 namespace com
{ namespace sun
{ namespace star
{ namespace xml
{ namespace sax
{
42 /* ========================================
44 These contexts are only nedded by
45 SchXMLImport not by the SchXMLImportHelper
46 that is also used by other applications
48 ======================================== */
50 class SchXMLDocContext
: public virtual SvXMLImportContext
53 SchXMLImportHelper
& mrImportHelper
;
57 SchXMLImportHelper
& rImpHelper
,
60 const rtl::OUString
& rLName
);
61 virtual ~SchXMLDocContext();
65 virtual SvXMLImportContext
* CreateChildContext(
67 const ::rtl::OUString
& rLocalName
,
68 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
71 // ========================================
73 // context for flat file xml format
74 class SchXMLFlatDocContext_Impl
75 : public SchXMLDocContext
, public SvXMLMetaDocumentContext
78 SchXMLFlatDocContext_Impl(
79 SchXMLImportHelper
& i_rImpHelper
,
80 SchXMLImport
& i_rImport
,
81 sal_uInt16 i_nPrefix
, const ::rtl::OUString
& i_rLName
,
82 const com::sun::star::uno::Reference
<com::sun::star::document::XDocumentProperties
>& i_xDocProps
,
83 const com::sun::star::uno::Reference
<com::sun::star::xml::sax::XDocumentHandler
>& i_xDocBuilder
);
85 virtual ~SchXMLFlatDocContext_Impl();
87 virtual SvXMLImportContext
*CreateChildContext(
88 sal_uInt16 i_nPrefix
, const ::rtl::OUString
& i_rLocalName
,
89 const com::sun::star::uno::Reference
<com::sun::star::xml::sax::XAttributeList
>& i_xAttrList
);
92 // ========================================
94 class SchXMLBodyContext
: public SvXMLImportContext
97 SchXMLImportHelper
& mrImportHelper
;
101 SchXMLImportHelper
& rImpHelper
,
102 SvXMLImport
& rImport
,
104 const rtl::OUString
& rLName
);
105 virtual ~SchXMLBodyContext();
107 virtual void EndElement();
108 virtual SvXMLImportContext
* CreateChildContext(
110 const ::rtl::OUString
& rLocalName
,
111 const com::sun::star::uno::Reference
< com::sun::star::xml::sax::XAttributeList
>& xAttrList
);
114 // ========================================
116 #endif // _SCH_XML_CONTEXTS_HXX_
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */