sc/source/filter/xml/XMLExportIterator.cxx | 11 +++-------- sc/source/filter/xml/XMLExportIterator.hxx | 1 - sc/source/filter/xml/xmlexprt.cxx | 12 ++---------- sc/source/filter/xml/xmlexprt.hxx | 3 +-- 4 files changed, 6 insertions(+), 21 deletions(-)
New commits: commit 8f465e27063a04037f555afa40c17eee1a7ccdd5 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Sun Aug 25 16:11:52 2013 -0400 A little more cleanup. Change-Id: I4cf9e6dfd4a6b9202b864693ec5861f1bae0f773 diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx index 1a14daf..df6c2f0 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 980b025..b083d4f 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 a3b9905..6c93827 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 <com::sun::star::sheet::XSpreadsheetDocument>& xSpreadDoc); void WriteTableSource(); commit 2be411acef8bd7ef02ddfbaeb6543fb876934112 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Sun Aug 25 15:58:03 2013 -0400 Combine SetMatrixCellData() with SetCellData(). Change-Id: I170eca29a36e2d2db2f91bd588e912d7d56b4d4d diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx index 2cf4325..1a14daf 100644 --- a/sc/source/filter/xml/XMLExportIterator.cxx +++ b/sc/source/filter/xml/XMLExportIterator.cxx @@ -693,14 +693,11 @@ void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, table::CellAddre if (mpCell) rMyCell.maBaseCell = *mpCell; } -} -void ScMyNotEmptyCellsIterator::SetMatrixCellData( ScMyCell& rMyCell ) -{ rMyCell.bIsMatrixCovered = false; rMyCell.bIsMatrixBase = false; - bool bIsMatrixBase(false); + bool bIsMatrixBase = false; ScAddress aScAddress; ScUnoConversion::FillScAddress( aScAddress, rMyCell.aCellAddress ); @@ -879,7 +876,6 @@ bool ScMyNotEmptyCellsIterator::GetNext(ScMyCell& aCell, ScFormatRangeStyles* pC pDetectiveOp->SetCellData( aCell ); HasAnnotation( aCell ); - SetMatrixCellData( aCell ); bool bIsAutoStyle; // Ranges before the previous cell are not needed by ExportFormatRanges anymore and can be removed sal_Int32 nRemoveBeforeRow = aLastAddress.Row; diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx index 98eedf4..6433510 100644 --- a/sc/source/filter/xml/XMLExportIterator.hxx +++ b/sc/source/filter/xml/XMLExportIterator.hxx @@ -401,7 +401,6 @@ class ScMyNotEmptyCellsIterator : boost::noncopyable void UpdateAddress( ::com::sun::star::table::CellAddress& rAddress ); void SetCellData( ScMyCell& rMyCell, ::com::sun::star::table::CellAddress& rAddress ); - void SetMatrixCellData( ScMyCell& rMyCell ); void HasAnnotation( ScMyCell& aCell ); public: ScMyNotEmptyCellsIterator(ScXMLExport& rExport); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits