1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef SC_DOCUMENTIMPORT_HXX
11 #define SC_DOCUMENTIMPORT_HXX
14 #include "address.hxx"
16 #include "rtl/ustring.hxx"
18 #include <boost/noncopyable.hpp>
27 struct ScDocumentImportImpl
;
30 * Accessor class to ScDocument. Its purpose is to allow import filter to
31 * fill the document model and nothing but that. Filling the document via
32 * this class does not trigger any kind of broadcasting, drawing object
33 * position calculation, or anything else that requires expensive
34 * computation which are unnecessary and undesirable during import.
36 class SC_DLLPUBLIC ScDocumentImport
: boost::noncopyable
38 ScDocumentImportImpl
* mpImpl
;
40 ScDocumentImport(); // disabled
43 ScDocumentImport(ScDocument
& rDoc
);
47 const ScDocument
& getDoc() const;
49 void setDefaultNumericScript(sal_uInt16 nScript
);
52 * @param rName sheet name.
54 * @return 0-based sheet index, or -1 in case no sheet is found by
57 SCTAB
getSheetIndex(const OUString
& rName
) const;
58 SCTAB
getSheetCount() const;
59 bool appendSheet(const OUString
& rName
);
61 void setOriginDate(sal_uInt16 nYear
, sal_uInt16 nMonth
, sal_uInt16 nDay
);
63 void setAutoInput(const ScAddress
& rPos
, const OUString
& rStr
);
64 void setNumericCell(const ScAddress
& rPos
, double fVal
);
65 void setStringCell(const ScAddress
& rPos
, const OUString
& rStr
);
66 void setEditCell(const ScAddress
& rPos
, EditTextObject
* pEditText
);
67 void setFormulaCell(const ScAddress
& rPos
, const OUString
& rFormula
, formula::FormulaGrammar::Grammar eGrammar
);
68 void setFormulaCell(const ScAddress
& rPos
, const ScTokenArray
& rArray
);
69 void setFormulaCell(const ScAddress
& rPos
, ScFormulaCell
* pCell
);
72 const ScRange
& rRange
, const ScTokenArray
& rArray
, formula::FormulaGrammar::Grammar eGrammar
);
77 void setCell(ScColumn
& rCol
, SCROW nRow
, ScBaseCell
* pCell
);
78 void initColumn(ScColumn
& rCol
);
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */