[Libreoffice-commits] core.git: sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Sat Dec 3 12:22:17 UTC 2016
sc/source/filter/inc/worksheethelper.hxx | 6 ------
sc/source/filter/oox/sheetdatabuffer.cxx | 6 ++++--
sc/source/filter/oox/worksheethelper.cxx | 11 -----------
3 files changed, 4 insertions(+), 19 deletions(-)
New commits:
commit 072003142ee8bce41aff1b4db228819ca64926f9
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Fri Dec 2 22:29:50 2016 -0500
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 at kohei.us>
Tested-by: Kohei Yoshida <libreoffice at kohei.us>
diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx
index 6111a60..855fa27 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 44a0e02..8f0cb32 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 525b036..3583837 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();
More information about the Libreoffice-commits
mailing list