Kaydet (Commit) 07200314 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Kohei Yoshida

Remove unnecessary indirections.

Especially in the oox code there are many...

Change-Id: I16915cc207c274e5bcdb5d1f4f8708db5a0479a1
Reviewed-on: https://gerrit.libreoffice.org/31578Reviewed-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
Tested-by: 's avatarKohei Yoshida <libreoffice@kohei.us>
üst 0d2e083f
...@@ -274,12 +274,6 @@ public: ...@@ -274,12 +274,6 @@ public:
are cached and converted in the finalizeWorksheetImport() call. */ are cached and converted in the finalizeWorksheetImport() call. */
void setRowModel( const RowModel& rModel ); 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. */ /** Inserts a rich-string cell directly into the Calc sheet. */
void putRichString( void putRichString(
const ScAddress& rAddress, const ScAddress& rAddress,
......
...@@ -135,13 +135,15 @@ void SheetDataBuffer::setBlankCell( const CellModel& rModel ) ...@@ -135,13 +135,15 @@ void SheetDataBuffer::setBlankCell( const CellModel& rModel )
void SheetDataBuffer::setValueCell( const CellModel& rModel, double fValue ) void SheetDataBuffer::setValueCell( const CellModel& rModel, double fValue )
{ {
putValue( rModel.maCellAddr, fValue ); getDocImport().setNumericCell(rModel.maCellAddr, fValue);
setCellFormat( rModel ); setCellFormat( rModel );
} }
void SheetDataBuffer::setStringCell( const CellModel& rModel, const OUString& rText ) void SheetDataBuffer::setStringCell( const CellModel& rModel, const OUString& rText )
{ {
putString( rModel.maCellAddr, rText ); if (!rText.isEmpty())
getDocImport().setStringCell(rModel.maCellAddr, rText);
setCellFormat( rModel ); setCellFormat( rModel );
} }
......
...@@ -1562,23 +1562,12 @@ void WorksheetHelper::setRowModel( const RowModel& rModel ) ...@@ -1562,23 +1562,12 @@ void WorksheetHelper::setRowModel( const RowModel& rModel )
mrSheetGlob.setRowModel( rModel ); mrSheetGlob.setRowModel( rModel );
} }
void WorksheetHelper::putValue( const ScAddress& rAddress, double fValue )
{
getDocImport().setNumericCell(rAddress, fValue);
}
void WorksheetHelper::setCellFormulaValue( void WorksheetHelper::setCellFormulaValue(
const ScAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType ) const ScAddress& rAddress, const OUString& rValueStr, sal_Int32 nCellType )
{ {
getFormulaBuffer().setCellFormulaValue(rAddress, rValueStr, 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 ) void WorksheetHelper::putRichString( const ScAddress& rAddress, const RichString& rString, const oox::xls::Font* pFirstPortionFont )
{ {
ScEditEngineDefaulter& rEE = getEditEngine(); ScEditEngineDefaulter& rEE = getEditEngine();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment