diff options
-rw-r--r-- | sc/source/filter/xml/xmlwrap.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index 7aa54c029138..f170f31f1b33 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -719,8 +719,22 @@ bool ScXMLImportWrapper::ExportToComponent(const uno::Reference<uno::XComponentC bool ScXMLImportWrapper::Export(bool bStylesOnly) { + // Prevent all broadcasting and repaints and notification of accessibility + // during mass creation of captions, which is a major bottleneck and not + // needed during Save. + ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer(); + bool bOldLock = bool(); + if (pDrawLayer) + { + bOldLock = pDrawLayer->isLocked(); + pDrawLayer->setLock(true); + } + rDoc.CreateAllNoteCaptions(); + if (pDrawLayer) + pDrawLayer->setLock(bOldLock); + uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext()); uno::Reference<xml::sax::XWriter> xWriter = xml::sax::Writer::create(xContext); |