diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx index 1a14dafeaa50..df6c2f015543 100644 --- a/sc/source/filter/xml/XMLExportIterator.cxx +++ b/sc/source/filter/xml/XMLExportIterator.cxx @@ -701,8 +701,7 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, table::CellAddre ScAddress aScAddress; ScUnoConversion::FillScAddress( aScAddress, rMyCell.aCellAddress ); - CellType eCalcType = rExport.GetDocument()->GetCellType( aScAddress ); - switch (eCalcType) + switch (rMyCell.maBaseCell.meType) { case CELLTYPE_VALUE: rMyCell.nType = table::CellContentType_VALUE; @@ -718,7 +717,7 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, table::CellAddre rMyCell.nType = table::CellContentType_EMPTY; } - if (rMyCell.nType == table::CellContentType_FORMULA) + if (rMyCell.maBaseCell.meType == CELLTYPE_FORMULA) if( rExport.IsMatrix( aScAddress, rMyCell.aMatrixRange, bIsMatrixBase ) ) { rMyCell.bIsMatrixBase = bIsMatrixBase; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 980b02561dd6..b083d4fd49bf 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3342,11 +3342,11 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount) if (!bIsEmpty) { - if (aCell.nType == table::CellContentType_TEXT && aCell.maBaseCell.meType == CELLTYPE_EDIT) + if (aCell.maBaseCell.meType == CELLTYPE_EDIT) { WriteEditCell(aCell.maBaseCell.mpEditText); } - else if (aCell.nType == table::CellContentType_FORMULA && IsMultiLineFormulaCell(aCell)) + else if (aCell.maBaseCell.meType == CELLTYPE_FORMULA && aCell.maBaseCell.mpFormula->IsMultilineResult()) { WriteMultiLineFormulaResult(aCell.maBaseCell.mpFormula); } @@ -3798,14 +3798,6 @@ bool ScXMLExport::IsEditCell(ScMyCell& rCell) const return rCell.maBaseCell.meType == CELLTYPE_EDIT; } -bool ScXMLExport::IsMultiLineFormulaCell(ScMyCell& rCell) const -{ - if (rCell.maBaseCell.meType != CELLTYPE_FORMULA) - return false; - - return rCell.maBaseCell.mpFormula->IsMultilineResult(); -} - bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) { ScAddress aCellPos1; diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx index a3b9905dbed3..6c9382742315 100644 --- a/sc/source/filter/xml/xmlexprt.hxx +++ b/sc/source/filter/xml/xmlexprt.hxx @@ -192,8 +192,7 @@ class ScXMLExport : public SvXMLExport bool IsCellTypeEqual (const ScMyCell& aCell1, const ScMyCell& aCell2) const; bool IsEditCell(ScMyCell& rCell) const; - bool IsMultiLineFormulaCell(ScMyCell& rCell) const; - bool IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2); + bool IsCellEqual(ScMyCell& aCell1, ScMyCell& aCell2); void WriteCalculationSettings(const com::sun::star::uno::Reference & xSpreadDoc); void WriteTableSource();