Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1722

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/22/1722/1

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)
---
M sw/source/ui/app/docst.cxx
1 file changed, 9 insertions(+), 0 deletions(-)



diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index ad8c702..f974fe7 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -22,6 +22,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>
@@ -76,6 +78,8 @@
 #include <list.hxx>
 
 #include <paratr.hxx>   //#outline level,add by zhaojianwei
+
+extern bool bNoInterrupt;       // in mainwn.cxx
 
 using namespace ::com::sun::star;
 
@@ -1280,6 +1284,11 @@
             ((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();

-- 
To view, visit https://gerrit.libreoffice.org/1722
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c91ca882891c8dfcd9dc08ba197233cfefddefd
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Michael Stahl <mstahl@redhat.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.