diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-06-28 16:30:28 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-06-28 16:34:59 +0200 |
commit | e7c6301e707fcc461bdda5ac74c7499f568ff716 (patch) | |
tree | 3d51efe6b028c1537d147dfd75f799a016a1ce5d /sw/inc/swevent.hxx | |
parent | d8bd2d900ae67fe7c7253fbc6d04d3e5b73eaf12 (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
Diffstat (limited to 'sw/inc/swevent.hxx')
-rw-r--r-- | sw/inc/swevent.hxx | 8 |
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(); } |