diff options
author | Jim MacArthur <jim-github@mode7.co.uk> | 2019-07-07 11:10:30 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-07-10 12:19:30 +0200 |
commit | 03263d6fffb711f4cf3527c77949253c97ff40fb (patch) | |
tree | a3cff36ece125e9257313999ed0a8d72e92c3717 /sw | |
parent | b9a7be7731ee7f03c8aa5498aa890b34552c94b1 (diff) |
AnnotationWin: Restore lines from annotations to comment anchor
This changes all the uses of GetTopReplyNote, which were using
nullptr to indicate the top reply.
Change-Id: Ibb9b5fac5644a5d6d283e8ea2fa80b988ca0693e
Reviewed-on: https://gerrit.libreoffice.org/75174
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/AnnotationWin.hxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin2.cxx | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index e4c509641851..6002ac615660 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -203,7 +203,11 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin : public vcl::Window DECL_LINK(DeleteHdl, void*, void); sal_uInt32 CountFollowing(); + + /// Find the first annotation for the thread which this annotation is in. + /// This may be the same annotation as this one. SwAnnotationWin* GetTopReplyNote(); + SvxLanguageItem GetLanguage(); VclBuilder maBuilder; diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index eed1976e9b20..e02420809b93 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -747,7 +747,7 @@ void SwAnnotationWin::SetPosAndSize() } SwAnnotationWin* pWin = GetTopReplyNote(); // #i111964# - if ( pWin && pWin->Anchor() ) + if ( pWin != this && pWin->Anchor() ) { pWin->Anchor()->SetAnchorState(AnchorState::End); } @@ -1352,7 +1352,7 @@ void SwAnnotationWin::SetViewState(ViewState bViewState) mpAnchor->SetAnchorState(AnchorState::All); SwAnnotationWin* pWin = GetTopReplyNote(); // #i111964# - if ( pWin && pWin->Anchor() ) + if ( pWin != this && pWin->Anchor() ) { pWin->Anchor()->SetAnchorState(AnchorState::End); } @@ -1394,7 +1394,8 @@ void SwAnnotationWin::SetViewState(ViewState bViewState) ? mrMgr.GetActiveSidebarWin()->GetTopReplyNote() : nullptr; // #i111964# - if ( pTopWinSelf && ( pTopWinSelf != pTopWinActive ) && + if ( ( pTopWinSelf != this ) && + ( pTopWinSelf != pTopWinActive ) && pTopWinSelf->Anchor() ) { if ( pTopWinSelf != mrMgr.GetActiveSidebarWin() ) |