LibreOffice Module xmloff (master)  1
contexts.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #pragma once
20 
21 #include <SchXMLImport.hxx>
22 #include <xmloff/xmlictxt.hxx>
23 
24 #include <xmloff/xmlmetai.hxx>
25 
26 namespace com::sun::star::xml::sax {
27  class XAttributeList;
28 }
29 
30 /*
31  These contexts are only needed by
32  SchXMLImport not by the SchXMLImportHelper
33  that is also used by other applications
34 */
35 
36 class SchXMLDocContext : public virtual SvXMLImportContext
37 {
38 protected:
40 
41 public:
43  SchXMLImportHelper& rImpHelper,
44  SvXMLImport& rImport,
45  sal_Int32 nElement );
46 
47  virtual ~SchXMLDocContext() override;
48 
49  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
50  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
51 };
52 
53 // context for flat file xml format
56 {
57 public:
59  SchXMLImportHelper& i_rImpHelper,
60  SchXMLImport& i_rImport,
61  sal_Int32 i_nElement,
62  const css::uno::Reference<css::document::XDocumentProperties>& i_xDocProps);
63 
64  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
65  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
66 };
67 
69 {
70 private:
72 
73 public:
75  SchXMLImportHelper& rImpHelper,
76  SvXMLImport& rImport,
77  sal_Int32 nElement );
78  virtual ~SchXMLBodyContext() override;
79 
80  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
81  sal_Int32 nElement,
82  const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
83 };
84 
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SchXMLFlatDocContext_Impl(SchXMLImportHelper &i_rImpHelper, SchXMLImport &i_rImport, sal_Int32 i_nElement, const css::uno::Reference< css::document::XDocumentProperties > &i_xDocProps)
Definition: contexts.cxx:111
SchXMLDocContext(SchXMLImportHelper &rImpHelper, SvXMLImport &rImport, sal_Int32 nElement)
Definition: contexts.cxx:65
virtual ~SchXMLDocContext() override
Definition: contexts.cxx:77
SchXMLImportHelper & mrImportHelper
Definition: contexts.hxx:71
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
Definition: contexts.cxx:147
SchXMLImportHelper & mrImportHelper
Definition: contexts.hxx:39
With this class you can import a element containing its data as element o...
This class deliberately does not support XWeak, to improve performance when loading large documents...
Definition: xmlictxt.hxx:44
SchXMLBodyContext(SchXMLImportHelper &rImpHelper, SvXMLImport &rImport, sal_Int32 nElement)
Definition: contexts.cxx:135
handles the top-level office:document-meta element of meta.xml documents
Definition: xmlmetai.hxx:35
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: contexts.cxx:122
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: contexts.cxx:81
virtual ~SchXMLBodyContext() override
Definition: contexts.cxx:144