nss: upgrade to release 3.73
[LibreOffice.git] / sc / inc / orcusfilters.hxx
blobee0ced0bd2cd6f297936cb1272f3eb767d1d7582
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #ifndef INCLUDED_SC_INC_ORCUSFILTERS_HXX
11 #define INCLUDED_SC_INC_ORCUSFILTERS_HXX
13 #include <rtl/ustring.hxx>
14 #include <memory>
16 class ScDocument;
17 struct ScOrcusXMLTreeParam;
18 struct ScOrcusImportXMLParam;
19 class ScOrcusXMLContext;
20 class SfxMedium;
21 namespace weld { class TreeView; }
23 /**
24 * Collection of orcus filter wrappers.
26 class ScOrcusFilters
28 public:
29 virtual ~ScOrcusFilters() {}
31 virtual bool importCSV(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
33 virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
35 virtual bool importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
37 virtual bool importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
39 virtual bool importODS(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
41 /**
42 * Used to import just the styles from an xml file.
45 virtual bool importODS_Styles(ScDocument& rDoc, OUString& aFileName) const = 0;
47 /**
48 * Create a context for XML file. The context object stores session
49 * information for each unique XML file. You must create a new context
50 * for each XML file, and never to re-use the same context for multiple
51 * XML files.
53 * The caller is responsible for deleting the instance returned from this
54 * method when it's done.
56 virtual std::unique_ptr<ScOrcusXMLContext> createXMLContext(ScDocument& rDoc, const OUString& rPath) const = 0;
59 class ScOrcusXMLContext
61 public:
62 virtual ~ScOrcusXMLContext() {}
64 virtual void loadXMLStructure(weld::TreeView& rTreeCtrl, ScOrcusXMLTreeParam& rParam) = 0;
66 virtual void importXML(const ScOrcusImportXMLParam& rParam) = 0;
69 #endif
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */