diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2016-11-28 05:24:24 +0100 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-11-29 09:27:58 +0000 |
commit | a029a479429d334875b73e2fc4e34b314a1ad369 (patch) | |
tree | 87b99250da9d332a4940e9c69e7fdf12fa7ec9ff /sw/inc/unocrsr.hxx | |
parent | 361c6eb18c9ba4043652ba91036094379aeaf05f (diff) |
get rid of LegacyModifyHint
Change-Id: Idb789f8786abeed07299baf4ce7507628f9ff173
Reviewed-on: https://gerrit.libreoffice.org/31304
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/inc/unocrsr.hxx')
-rw-r--r-- | sw/inc/unocrsr.hxx | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx index e6cbee0e622f..eeb1b4a4ef2a 100644 --- a/sw/inc/unocrsr.hxx +++ b/sw/inc/unocrsr.hxx @@ -24,10 +24,18 @@ namespace sw { - struct SW_DLLPUBLIC DocDisposingHint final : public SfxHint + enum class UnoCursorHintType { - DocDisposingHint() {} - virtual ~DocDisposingHint() override; + DOC_DISPOSING, + LEAVES_SECTION + }; + + struct SW_DLLPUBLIC UnoCursorHint final : public SfxHint + { + UnoCursorHintType m_eType; + UnoCursorHint(UnoCursorHintType eType) + : m_eType(eType) {}; + virtual ~UnoCursorHint() override; }; } @@ -132,14 +140,8 @@ namespace sw SwClient::SwClientNotify(rModify, rHint); if(m_pCursor) { - if(typeid(rHint) == typeid(DocDisposingHint)) + if(typeid(rHint) == typeid(UnoCursorHint)) m_pCursor->Remove(this); - else if(m_bSectionRestricted && typeid(rHint) == typeid(LegacyModifyHint)) - { - const auto pLegacyHint = static_cast<const LegacyModifyHint*>(&rHint); - if(pLegacyHint->m_pOld && pLegacyHint->m_pOld->Which() == RES_UNOCURSOR_LEAVES_SECTION) - m_pCursor->Remove(this); - } } if(!GetRegisteredIn()) m_pCursor.reset(); |