[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 17 00:22:50 PST 2013
sw/source/ui/app/docst.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit 6306c7befaa676df62272da7f3ddbcba54c5759c
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jan 16 16:23:30 2013 +0100
rhbz#818557: fix it differently: SwDocShell::_LoadStyles():
Try to prevent pushing of SfxShells from this function via EndAllAction
and SwView::AttrChangedNotify() by setting a ridiculous pre-exising
global bNoInterrupt variable.
Change-Id: I9c91ca882891c8dfcd9dc08ba197233cfefddefd
(cherry picked from commit beacee6fad46aa2c8fc813bb0150e5c7a5175b26)
Reviewed-on: https://gerrit.libreoffice.org/1724
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 8f90a15..81ed1a7 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -31,6 +31,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <comphelper/flagguard.hxx>
+
#include <hintids.hxx>
#include <sfx2/app.hxx>
#include <svl/whiter.hxx>
@@ -86,6 +88,8 @@
#include <paratr.hxx> //#outline level,add by zhaojianwei
+extern bool bNoInterrupt; // in mainwn.cxx
+
using namespace ::com::sun::star;
void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
@@ -1223,6 +1227,11 @@ void SwDocShell::_LoadStyles( SfxObjectShell& rSource, sal_Bool bPreserveCurrent
((SwDocShell&)rSource).pDoc->SetFixFields(false, NULL);
if( pWrtShell )
{
+ // rhbz#818557, fdo#58893: EndAllAction will call SelectShell(),
+ // which pushes a bunch of SfxShells that are not cleared
+ // (for unknown reasons) when closing the document, causing crash;
+ // setting bNoInterrupt appears to avoid the problem.
+ ::comphelper::FlagRestorationGuard g(bNoInterrupt, true);
pWrtShell->StartAllAction();
pDoc->ReplaceStyles( *((SwDocShell&)rSource).pDoc );
pWrtShell->EndAllAction();
More information about the Libreoffice-commits
mailing list