diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-25 14:42:37 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-08-25 14:51:11 -0400 |
commit | fd4d8cee4b8c3bc7ec50d30c25090bfe61fd8037 (patch) | |
tree | 20492e2ca67190dc5ccedf98a4fe44db0173a837 | |
parent | d5d96b15551fb685a99a4ee4217a152e00bc0dbf (diff) |
Now we don't need to increment progress bar on every edit cell.
Change-Id: Id5d460c134c6683a4e876856575ce269a43ea66f
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 10 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.hxx | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 42cac6d5cfb2..980b02561dd6 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3340,18 +3340,14 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount) WriteAnnotation(aCell); WriteDetective(aCell); - bool bEditCell = false; - if (!bIsEmpty) { if (aCell.nType == table::CellContentType_TEXT && aCell.maBaseCell.meType == CELLTYPE_EDIT) { - bEditCell = true; WriteEditCell(aCell.maBaseCell.mpEditText); } else if (aCell.nType == table::CellContentType_FORMULA && IsMultiLineFormulaCell(aCell)) { - bEditCell = true; WriteMultiLineFormulaResult(aCell.maBaseCell.mpFormula); } else @@ -3364,7 +3360,7 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount) } WriteShapes(aCell); if (!bIsEmpty) - IncrementProgressBar(bEditCell); + IncrementProgressBar(false); } void ScXMLExport::WriteEditCell(const EditTextObject* pText) @@ -5006,10 +5002,10 @@ void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uIn XML_NAMESPACE_PRESENTATION ); } -void ScXMLExport::IncrementProgressBar(bool bEditCell, sal_Int32 nInc) +void ScXMLExport::IncrementProgressBar(bool bFlush, sal_Int32 nInc) { nProgressCount += nInc; - if (bEditCell || nProgressCount > 100) + if (bFlush || nProgressCount > 100) { GetProgressBarHelper()->Increment(nProgressCount); nProgressCount = 0; diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx index 4276e8eb9a0e..a3b9905dbed3 100644 --- a/sc/source/filter/xml/xmlexprt.hxx +++ b/sc/source/filter/xml/xmlexprt.hxx @@ -220,7 +220,7 @@ class ScXMLExport : public SvXMLExport const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >& xRowProperties, const OUString* pOldName, sal_Int32& rIndex ); - void IncrementProgressBar(bool bEditCell, sal_Int32 nInc = 1); + void IncrementProgressBar(bool bFlush, sal_Int32 nInc = 1); void CopySourceStream( sal_Int32 nStartOffset, sal_Int32 nEndOffset, sal_Int32& rNewStart, sal_Int32& rNewEnd ); |