[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/inc

Michael Stahl mstahl at redhat.com
Tue Jul 4 10:29:22 UTC 2017


 sw/inc/swevent.hxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit e82c8a27cce84fae10b1a1e9d730a66948067d1c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jun 28 16:30:28 2017 +0200

    tdf#108826 sw: also handle RES_REMOVE_UNO_OBJECT in SwCallMouseEvent
    
    This is sent from SwUndoFlyBase::DelFly(); the SwFrameFormat isn't
    deleted in this case but it's no longer part of the document, so
    an UI class like SwCallMouseEvent should stop pointing to it.
    
    Change-Id: I05349271d14bb1948ea30528cd85c68ed638f28e
    (cherry picked from commit e7c6301e707fcc461bdda5ac74c7499f568ff716)
    Reviewed-on: https://gerrit.libreoffice.org/39362
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/inc/swevent.hxx b/sw/inc/swevent.hxx
index 3eb0fb8bfa23..8cb2e2b55c5e 100644
--- a/sw/inc/swevent.hxx
+++ b/sw/inc/swevent.hxx
@@ -130,9 +130,11 @@ struct SwCallMouseEvent
     {
         assert(EVENT_OBJECT_IMAGE == eType || EVENT_OBJECT_URLITEM == eType || EVENT_OBJECT_IMAGEMAP == eType);
         SwClient::Modify(pOldValue, pNewValue);
-        if (!GetRegisteredIn() ||
-            (RES_FMT_CHG == pOldValue->Which()
-             && static_cast<SwFormatChg const*>(pOldValue)->pChangedFormat == PTR.pFormat))
+        if (!GetRegisteredIn()
+            || (RES_FMT_CHG == pOldValue->Which()
+                && static_cast<SwFormatChg const*>(pOldValue)->pChangedFormat == PTR.pFormat)
+            || (RES_REMOVE_UNO_OBJECT == pOldValue->Which()
+                && static_cast<SwPtrMsgPoolItem const*>(pOldValue)->pObject == PTR.pFormat))
         {
             Clear();
         }


More information about the Libreoffice-commits mailing list