A little more cleanup.

Change-Id: I4cf9e6dfd4a6b9202b864693ec5861f1bae0f773
This commit is contained in:
Kohei Yoshida 2013-08-25 16:11:52 -04:00
parent 2be411acef
commit 8f465e2706
3 changed files with 5 additions and 15 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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();