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 INCLUDED_SC_INC_DOCUMENTIMPORT_HXX
11 #define INCLUDED_SC_INC_DOCUMENTIMPORT_HXX
14 #include "address.hxx"
16 #include <rtl/ustring.hxx>
18 #include <boost/noncopyable.hpp>
27 struct ScSetStringParam
;
29 struct ScDocumentImportImpl
;
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
45 ScDocumentImport(ScDocument
& rDoc
);
49 const ScDocument
& getDoc() const;
51 void setDefaultNumericScript(sal_uInt16 nScript
);
54 * Apply specified cell style to an entire sheet.
56 void setCellStyleToSheet(SCTAB nTab
, const ScStyleSheet
& rStyle
);
59 * @param rName sheet name.
61 * @return 0-based sheet index, or -1 in case no sheet is found by
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
);
80 const ScRange
& rRange
, const ScTokenArray
& rArray
, formula::FormulaGrammar::Grammar eGrammar
);
82 void setTableOpCells(const ScRange
& rRange
, const ScTabOpParam
& rParam
);
87 void initColumn(ScColumn
& rCol
);
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */