sw/inc/AnnotationWin.hxx | 4 ++++ sw/source/uibase/docvw/AnnotationWin2.cxx | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-)
New commits: commit 03263d6fffb711f4cf3527c77949253c97ff40fb Author: Jim MacArthur <jim-git...@mode7.co.uk> AuthorDate: Sun Jul 7 11:10:30 2019 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jul 10 12:19:30 2019 +0200 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 <vmik...@collabora.com> 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() ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits