diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/basflt/fltshell.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 4f725a98b9a9..ceae383380af 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -962,7 +962,15 @@ SwFltAnchorListener::SwFltAnchorListener(SwFltAnchor* pFltAnchor) void SwFltAnchorListener::Notify(const SfxHint& rHint) { - if(auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) + if (rHint.GetId() == SfxHintId::Dying) + m_pFltAnchor->SetFrameFormat(nullptr); + else if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint)) + { + if (pDrawFrameFormatHint->m_eId != sw::DrawFrameFormatHintId::DYING) + return; + m_pFltAnchor->SetFrameFormat(nullptr); + } + else if (auto pLegacyHint = dynamic_cast<const sw::LegacyModifyHint*>(&rHint)) { if(pLegacyHint->m_pNew->Which() != RES_FMT_CHG) return; @@ -971,12 +979,6 @@ void SwFltAnchorListener::Notify(const SfxHint& rHint) if(pFrameFormat) m_pFltAnchor->SetFrameFormat(pFrameFormat); } - else if (auto pDrawFrameFormatHint = dynamic_cast<const sw::DrawFrameFormatHint*>(&rHint)) - { - if (pDrawFrameFormatHint->m_eId != sw::DrawFrameFormatHintId::DYING) - return; - m_pFltAnchor->SetFrameFormat(nullptr); - } } // methods of SwFltRedline follow |