Line data Source code
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 :
10 : #ifndef INCLUDED_SC_INC_ORCUSFILTERS_HXX
11 : #define INCLUDED_SC_INC_ORCUSFILTERS_HXX
12 :
13 : #include <rtl/ustring.hxx>
14 :
15 : class ScDocument;
16 : class SvTreeListBox;
17 : struct ScOrcusXMLTreeParam;
18 : struct ScOrcusImportXMLParam;
19 : class ScOrcusXMLContext;
20 : class SfxMedium;
21 :
22 : /**
23 : * Collection of orcus filter wrappers.
24 : */
25 : class ScOrcusFilters
26 : {
27 : public:
28 0 : virtual ~ScOrcusFilters() {}
29 :
30 : virtual bool importCSV(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
31 :
32 : virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
33 :
34 : virtual bool importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
35 :
36 : virtual bool importODS(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
37 :
38 : /**
39 : * Create a context for XML file. The context object stores session
40 : * information for each unique XML file. You must create a new context
41 : * for each XML file, and never to re-use the same context for multiple
42 : * XML files.
43 : *
44 : * The caller is responsible for deleting the instance returned from this
45 : * method when it's done.
46 : */
47 : virtual ScOrcusXMLContext* createXMLContext(ScDocument& rDoc, const OUString& rPath) const = 0;
48 : };
49 :
50 0 : class ScOrcusXMLContext
51 : {
52 : public:
53 0 : virtual ~ScOrcusXMLContext() {}
54 :
55 : virtual bool loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) = 0;
56 :
57 : virtual bool importXML(const ScOrcusImportXMLParam& rParam) = 0;
58 : };
59 :
60 : #endif
61 :
62 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|