summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-12 15:29:36 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-12 18:51:39 -0500
commit30a20743ae17e6e02183a65603d38968253b3ffb (patch)
treecbe75b3242982e41e1d61177973ebf790dd32086 /sc/source
parent177c0adede9ba4b34aa3f4a80cf7021e327c9d20 (diff)
Avoid using UNO API formula tokens.
Change-Id: Ide89b06a64405d006ac4b88cd3ae88b696f981f2
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 2b340c572962..c4dcc2d7e2b0 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -53,6 +53,7 @@
#include "docpool.hxx"
#include "paramisc.hxx"
#include "documentimport.hxx"
+#include "formulabuffer.hxx"
namespace oox {
namespace xls {
@@ -199,7 +200,9 @@ void SheetDataBuffer::setDateTimeCell( const CellModel& rModel, const ::com::sun
void SheetDataBuffer::setBooleanCell( const CellModel& rModel, bool bValue )
{
- setCellFormula( rModel.maCellAddr, getFormulaParser().convertBoolToFormula( bValue ) );
+ getFormulaBuffer().setCellFormula(
+ rModel.maCellAddr, bValue ? OUString("TRUE()") : OUString("FALSE()"));
+
// #108770# set 'Standard' number format for all Boolean cells
setCellFormat( rModel, 0 );
}
@@ -211,7 +214,12 @@ void SheetDataBuffer::setErrorCell( const CellModel& rModel, const OUString& rEr
void SheetDataBuffer::setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCode )
{
- setCellFormula( rModel.maCellAddr, getFormulaParser().convertErrorToFormula( nErrorCode ) );
+ OUStringBuffer aBuf;
+ aBuf.append(sal_Unicode('{'));
+ aBuf.append(BiffHelper::calcDoubleFromError(nErrorCode));
+ aBuf.append(sal_Unicode('}'));
+
+ getFormulaBuffer().setCellFormula(rModel.maCellAddr, aBuf.makeStringAndClear());
setCellFormat( rModel );
}