summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-08-25 16:11:52 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-08-25 16:12:19 -0400
commit8f465e27063a04037f555afa40c17eee1a7ccdd5 (patch)
tree45b36db29ecfcba6c5fe4a699b72f3760534f4b8
parent2be411acef8bd7ef02ddfbaeb6543fb876934112 (diff)
A little more cleanup.
Change-Id: I4cf9e6dfd4a6b9202b864693ec5861f1bae0f773
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx5
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx12
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx3
3 files changed, 5 insertions, 15 deletions
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 <com::sun::star::sheet::XSpreadsheetDocument>& xSpreadDoc);
void WriteTableSource();