office-gobmx/sc/inc/documentimport.hxx
Thomas Arnhold 2bac61013e fix-includes.pl: sc
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-05-11 01:55:39 +02:00

92 lines
2.8 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_SC_INC_DOCUMENTIMPORT_HXX
#define INCLUDED_SC_INC_DOCUMENTIMPORT_HXX
#include "scdllapi.h"
#include "address.hxx"
#include <rtl/ustring.hxx>
#include <boost/noncopyable.hpp>
class EditTextObject;
class ScDocument;
class ScColumn;
class ScAddress;
class ScTokenArray;
class ScFormulaCell;
class ScStyleSheet;
struct ScSetStringParam;
struct ScTabOpParam;
struct ScDocumentImportImpl;
/**
* Accessor class to ScDocument. Its purpose is to allow import filter to
* fill the document model and nothing but that. Filling the document via
* this class does not trigger any kind of broadcasting, drawing object
* position calculation, or anything else that requires expensive
* computation which are unnecessary and undesirable during import.
*/
class SC_DLLPUBLIC ScDocumentImport : boost::noncopyable
{
ScDocumentImportImpl* mpImpl;
ScDocumentImport(); // disabled
public:
ScDocumentImport(ScDocument& rDoc);
~ScDocumentImport();
ScDocument& getDoc();
const ScDocument& getDoc() const;
void setDefaultNumericScript(sal_uInt16 nScript);
/**
* Apply specified cell style to an entire sheet.
*/
void setCellStyleToSheet(SCTAB nTab, const ScStyleSheet& rStyle);
/**
* @param rName sheet name.
*
* @return 0-based sheet index, or -1 in case no sheet is found by
* specified name.
*/
SCTAB getSheetIndex(const OUString& rName) const;
SCTAB getSheetCount() const;
bool appendSheet(const OUString& rName);
void setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uInt16 nDay);
void setAutoInput(const ScAddress& rPos, const OUString& rStr,
ScSetStringParam* pStringParam = NULL);
void setNumericCell(const ScAddress& rPos, double fVal);
void setStringCell(const ScAddress& rPos, const OUString& rStr);
void setEditCell(const ScAddress& rPos, EditTextObject* pEditText);
void setFormulaCell(const ScAddress& rPos, const OUString& rFormula, formula::FormulaGrammar::Grammar eGrammar);
void setFormulaCell(const ScAddress& rPos, ScTokenArray* pArray);
void setFormulaCell(const ScAddress& rPos, ScFormulaCell* pCell);
void setMatrixCells(
const ScRange& rRange, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGrammar);
void setTableOpCells(const ScRange& rRange, const ScTabOpParam& rParam);
void finalize();
private:
void initColumn(ScColumn& rCol);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */