LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / orcusfilters.hxx
blob6d17f3741ebb6c39fb95c4ffdcdf7daed3b47a5e
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 #pragma once
12 #include <rtl/ustring.hxx>
13 #include <memory>
15 class ScDocument;
16 struct ScOrcusXMLTreeParam;
17 struct ScOrcusImportXMLParam;
18 class ScOrcusXMLContext;
19 class SfxMedium;
20 namespace weld { class TreeView; }
22 /**
23 * Collection of orcus filter wrappers.
25 class ScOrcusFilters
27 public:
28 virtual ~ScOrcusFilters() {}
30 virtual bool importCSV(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
32 virtual bool importGnumeric(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
34 virtual bool importExcel2003XML(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
36 virtual bool importXLSX(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
38 virtual bool importODS(ScDocument& rDoc, SfxMedium& rMedium) const = 0;
40 /**
41 * Used to import just the styles from an xml file.
44 virtual bool importODS_Styles(ScDocument& rDoc, OUString& aFileName) const = 0;
46 /**
47 * Create a context for XML file. The context object stores session
48 * information for each unique XML file. You must create a new context
49 * for each XML file, and never to re-use the same context for multiple
50 * XML files.
52 * The caller is responsible for deleting the instance returned from this
53 * method when it's done.
55 virtual std::unique_ptr<ScOrcusXMLContext> createXMLContext(ScDocument& rDoc, const OUString& rPath) const = 0;
58 class ScOrcusXMLContext
60 public:
61 virtual ~ScOrcusXMLContext() {}
63 virtual void loadXMLStructure(weld::TreeView& rTreeCtrl, ScOrcusXMLTreeParam& rParam) = 0;
65 virtual void importXML(const ScOrcusImportXMLParam& rParam) = 0;
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */