summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/AnnotationWin.hxx4
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx7
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() )