summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-06-28 16:30:28 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-07-04 12:28:57 +0200
commite82c8a27cce84fae10b1a1e9d730a66948067d1c (patch)
treedd9075d9dc93faf710cf61aabed6c09907bb8e31 /sw
parent67f60fb315d8a7f235034bf2960ffb939033fcc4 (diff)
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@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swevent.hxx8
1 files changed, 5 insertions, 3 deletions
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();
}