summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2016-12-02 22:29:50 -0500
committerKohei Yoshida <libreoffice@kohei.us>2016-12-03 12:21:48 +0000
commit072003142ee8bce41aff1b4db228819ca64926f9 (patch)
treed149bace4d14c26573ca0096a9c69951205be79d
parent0d2e083fed20e4f0c263e2373aeee83bc7cee9cd (diff)
Remove unnecessary indirections.
Especially in the oox code there are many... Change-Id: I16915cc207c274e5bcdb5d1f4f8708db5a0479a1 Reviewed-on: https://gerrit.libreoffice.org/31578 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
-rw-r--r--sc/source/filter/inc/worksheethelper.hxx6
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx6
-rw-r--r--sc/source/filter/oox/worksheethelper.cxx11
3 files changed, 4 insertions, 19 deletions
diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx
index 6111a609b9ff..855fa272f8a7 100644
--- a/sc/source/filter/inc/worksheethelper.hxx
+++ b/sc/source/filter/inc/worksheethelper.hxx
@@ -274,12 +274,6 @@ public:
are cached and converted in the finalizeWorksheetImport() call. */
void setRowModel( const RowModel& rModel );
- /** Inserts a value cell directly into the Calc sheet. */
- void putValue( const ScAddress& rAddress, double fValue );
-
- /** Inserts a string cell directly into the Calc sheet. */
- void putString( const ScAddress& rAddress, const OUString& rText );
-
/** Inserts a rich-string cell directly into the Calc sheet. */
void putRichString(
const ScAddress& rAddress,
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 44a0e02fdeb3..8f0cb3221503 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -135,13 +135,15 @@ void SheetDataBuffer::setBlankCell( const CellModel& rModel )
void SheetDataBuffer::setValueCell( const CellModel& rModel, double fValue )
{
- putValue( rModel.maCellAddr, fValue );
+ getDocImport().setNumericCell(rModel.maCellAddr, fValue);
setCellFormat( rModel );
}
void SheetDataBuffer::setStringCell( const CellModel& rModel, const OUString& rText )
{
- putString( rModel.maCellAddr, rText );
+ if (!rText.isEmpty())
+ getDocImport().setStringCell(rModel.maCellAddr, rText);
+
setCellFormat( rModel );
}
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 525b03673d3b..3583837c63ba 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1562,23 +1562,12 @@ void WorksheetHelper::setRowModel( const RowModel& rModel )
mrSheetGlob.setRowModel( rModel );
}
-void WorksheetHelper::putValue( const ScAddress& rAddress, double fValue )
-{
- getDocImport().setNumericCell(rAddress, fValue);
-}
-
void WorksheetHelper::setCellFormulaValue(
const ScAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType )
{
getFormulaBuffer().setCellFormulaValue(rAddress, rValueStr, nCellType);
}
-void WorksheetHelper::putString( const ScAddress& rAddress, const OUString& rText )
-{
- if ( !rText.isEmpty() )
- getDocImport().setStringCell(rAddress, rText);
-}
-
void WorksheetHelper::putRichString( const ScAddress& rAddress, const RichString& rString, const oox::xls::Font* pFirstPortionFont )
{
ScEditEngineDefaulter& rEE = getEditEngine();