Hi, chatting with some folks yesterday at the OOo congress for business and administration, and two users approached me with a problem most prevalent when saving to network volumes: LibO save progress bars are basically driven by the xml export code (when saving to odf, of course), but there's some non-trivial postprocessing happening inside sfx2/source/doc/objstor.cxx:SaveTo_Impl(), some of which is bound to IO. The observed behaviour thusly, when saving to a slowish network volume, is that the save progress bar is stuck at 100% (because all xml content is written), but the apps are still unresponsive (sometimes for a minute or so). Changing SaveTo_Impl() to use async IO is prolly out of scope for 3.3, so another workaround would be to keep the progress bar from reaching 100% before all work is finished - see attached patches for a sketchy attempt. Problem here: the progress bar will not move either way, it's just not stuck at 100%, but at 90% now. Any UX insight on how to best get this across? Cheers, -- Thorsten
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index e160861..102068a 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -730,7 +730,8 @@ void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCo } } sal_Int32 nRef(nCellCount + (2 * nTableCount) + (2 * nShapesCount)); - GetProgressBarHelper()->SetReference(nRef); + // leave ~10% for zip swappage + GetProgressBarHelper()->SetReference(nRef*10/9); GetProgressBarHelper()->SetValue(0); } diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 82d6078..5868fab 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -620,8 +620,9 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent } } - // #82003# init progress bar - GetProgressBarHelper()->SetReference(mnObjectCount); + // #82003# init progress bar - leave ~10% of progress for + // final zip swappage + GetProgressBarHelper()->SetReference(std::max(mnObjectCount*10/9,sal_uInt32(1))); } // add namespaces diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx index ba0bde7..117fd28 100644 --- a/sw/source/filter/xml/xmlexp.cxx +++ b/sw/source/filter/xml/xmlexp.cxx @@ -325,7 +325,8 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass ) nRef *= 2; // for the above styles, xmloff will increment by 2! // #i93174#: count all paragraphs for the progress bar nRef += aDocStat.nAllPara; // 1: only content, no autostyle - pProgress->SetReference( nRef ); + // leave ~10% for zip swappage + pProgress->SetReference( nRef*10/9 ); pProgress->SetValue( 0 ); } }
Attachment:
pgpxf0CExTL7b.pgp
Description: PGP signature