sw/inc/postithelper.hxx | 7 +++++++ sw/source/core/fields/postithelper.cxx | 1 + sw/source/uibase/docvw/AnnotationWin2.cxx | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit aeff40f65f421128ab6c07247ac106cded7323a2 Author: Miklos Vajna <[email protected]> AuthorDate: Mon Jul 15 15:33:39 2019 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Jul 16 10:23:07 2019 +0200 sw comments on frames: avoid overlay that covers only an at-char image The comment is already attached to the image via the anchor, and the overlay would change the image, which is confusing. (cherry picked from commit 5914fae974875366026bb3b1245ef8bffeadd7d2) Change-Id: I7a1c2a25182f628effa224fb82b5bcd71fdf35d4 Reviewed-on: https://gerrit.libreoffice.org/75675 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx index 2a9fb448f7da..84d9674063c0 100644 --- a/sw/inc/postithelper.hxx +++ b/sw/inc/postithelper.hxx @@ -56,6 +56,12 @@ struct SwLayoutInfo std::size_t mRedlineAuthor; + /** + * If true, the overlay arrow points to the comment anchor, otherwise it points to the commented + * frame. + */ + bool mPositionFromCommentAnchor; + SwLayoutInfo() : mpAnchorFrame(nullptr) , mPosition() @@ -66,6 +72,7 @@ struct SwLayoutInfo , mnPageNumber(1) , meSidebarPosition(sw::sidebarwindows::SidebarPosition::NONE) , mRedlineAuthor(0) + , mPositionFromCommentAnchor(true) {} }; diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index d692e829a7c6..26cdd2bf8384 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -142,6 +142,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( { pTextFrame->GetCharRect(o_rInfo.mPosition, rAnchorPos, nullptr, false); } + o_rInfo.mPositionFromCommentAnchor = bPositionFromCommentAnchor; } if (pAnnotationMark != nullptr) { diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 380831b966c8..d5309d0cc8d3 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -794,7 +794,8 @@ void SwAnnotationWin::SetPosAndSize() if (bDisableMapMode) EditWin().EnableMapMode(false); - pTmpCursorForAnnotationTextRange->FillRects(); + if (mrSidebarItem.maLayoutInfo.mPositionFromCommentAnchor) + pTmpCursorForAnnotationTextRange->FillRects(); if (bDisableMapMode) EditWin().EnableMapMode(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
