update emoji autocorrect entries from po-files
[LibreOffice.git] / sc / inc / documentimport.hxx
blobaa694584216eb8fd756e73873d11a8d067ae6f90
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 struct ScAttrEntry;
25 class ScTokenArray;
26 class ScFormulaCell;
27 class ScStyleSheet;
28 struct ScSetStringParam;
29 struct ScTabOpParam;
30 struct ScDocumentImportImpl;
31 enum class SvtScriptType;
33 /**
34 * Accessor class to ScDocument. Its purpose is to allow import filter to
35 * fill the document model and nothing but that. Filling the document via
36 * this class does not trigger any kind of broadcasting, drawing object
37 * position calculation, or anything else that requires expensive
38 * computation which are unnecessary and undesirable during import.
40 class SC_DLLPUBLIC ScDocumentImport : boost::noncopyable
42 ScDocumentImportImpl* mpImpl;
44 ScDocumentImport(); // disabled
46 public:
48 struct SC_DLLPUBLIC Attrs
50 ScAttrEntry* mpData;
51 size_t mnSize;
53 bool mbLatinNumFmtOnly;
55 Attrs();
58 ScDocumentImport(ScDocument& rDoc);
59 ~ScDocumentImport();
61 ScDocument& getDoc();
62 const ScDocument& getDoc() const;
64 void setDefaultNumericScript(SvtScriptType nScript);
66 /**
67 * Apply specified cell style to an entire sheet.
69 void setCellStyleToSheet(SCTAB nTab, const ScStyleSheet& rStyle);
71 /**
72 * @param rName sheet name.
74 * @return 0-based sheet index, or -1 in case no sheet is found by
75 * specified name.
77 SCTAB getSheetIndex(const OUString& rName) const;
78 SCTAB getSheetCount() const;
79 bool appendSheet(const OUString& rName);
81 void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay);
83 void setAutoInput(const ScAddress& rPos, const OUString& rStr,
84 ScSetStringParam* pStringParam = NULL);
85 void setNumericCell(const ScAddress& rPos, double fVal);
86 void setStringCell(const ScAddress& rPos, const OUString& rStr);
87 void setEditCell(const ScAddress& rPos, EditTextObject* pEditText);
88 void setFormulaCell(const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar);
89 void setFormulaCell(const ScAddress& rPos, ScTokenArray* pArray);
90 void setFormulaCell(const ScAddress& rPos, ScFormulaCell* pCell);
92 void setMatrixCells(
93 const ScRange& rRange, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGrammar);
95 void setTableOpCells(const ScRange& rRange, const ScTabOpParam& rParam);
97 /**
98 * Set an array of cell attributes to specified column. This call
99 * transfers the ownership of the ScAttrEntry array from the caller to the
100 * column.
102 void setAttrEntries( SCTAB nTab, SCCOL nCol, Attrs& rAttrs );
104 void finalize();
106 private:
107 void initColumn(ScColumn& rCol);
110 #endif
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */