Bump version to 4.3-4
[LibreOffice.git] / sc / inc / documentimport.hxx
blob4b84f0d8fe4a80fda10a7806361fa3c7871bb12a
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_DOCUMENTIMPORT_HXX
11 #define INCLUDED_SC_INC_DOCUMENTIMPORT_HXX
13 #include "scdllapi.h"
14 #include "address.hxx"
16 #include <rtl/ustring.hxx>
18 #include <boost/noncopyable.hpp>
20 class EditTextObject;
21 class ScDocument;
22 class ScColumn;
23 class ScAddress;
24 class ScTokenArray;
25 class ScFormulaCell;
26 class ScStyleSheet;
27 struct ScSetStringParam;
28 struct ScTabOpParam;
29 struct ScDocumentImportImpl;
31 /**
32 * Accessor class to ScDocument. Its purpose is to allow import filter to
33 * fill the document model and nothing but that. Filling the document via
34 * this class does not trigger any kind of broadcasting, drawing object
35 * position calculation, or anything else that requires expensive
36 * computation which are unnecessary and undesirable during import.
38 class SC_DLLPUBLIC ScDocumentImport : boost::noncopyable
40 ScDocumentImportImpl* mpImpl;
42 ScDocumentImport(); // disabled
44 public:
45 ScDocumentImport(ScDocument& rDoc);
46 ~ScDocumentImport();
48 ScDocument& getDoc();
49 const ScDocument& getDoc() const;
51 void setDefaultNumericScript(sal_uInt16 nScript);
53 /**
54 * Apply specified cell style to an entire sheet.
56 void setCellStyleToSheet(SCTAB nTab, const ScStyleSheet& rStyle);
58 /**
59 * @param rName sheet name.
61 * @return 0-based sheet index, or -1 in case no sheet is found by
62 * specified name.
64 SCTAB getSheetIndex(const OUString& rName) const;
65 SCTAB getSheetCount() const;
66 bool appendSheet(const OUString& rName);
68 void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay);
70 void setAutoInput(const ScAddress& rPos, const OUString& rStr,
71 ScSetStringParam* pStringParam = NULL);
72 void setNumericCell(const ScAddress& rPos, double fVal);
73 void setStringCell(const ScAddress& rPos, const OUString& rStr);
74 void setEditCell(const ScAddress& rPos, EditTextObject* pEditText);
75 void setFormulaCell(const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar);
76 void setFormulaCell(const ScAddress& rPos, ScTokenArray* pArray);
77 void setFormulaCell(const ScAddress& rPos, ScFormulaCell* pCell);
79 void setMatrixCells(
80 const ScRange& rRange, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGrammar);
82 void setTableOpCells(const ScRange& rRange, const ScTabOpParam& rParam);
84 void finalize();
86 private:
87 void initColumn(ScColumn& rCol);
90 #endif
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */