Kaydet (Commit) fd4d8cee authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Now we don't need to increment progress bar on every edit cell.

Change-Id: Id5d460c134c6683a4e876856575ce269a43ea66f
üst d5d96b15
......@@ -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;
......
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment