summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw/PostItMgr.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-02 12:31:00 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-02 16:15:02 +0200
commit225930119543975697d3f5f042e271f0ec6c6b15 (patch)
tree29cbe8b3938b7d2026c2508d319865fe68838703 /sw/source/uibase/docvw/PostItMgr.cxx
parent39bd7b97f00f0b6f0bbb01ab882207760b77e349 (diff)
sw comments on frames: no overlay in the LOK API, either: insert case
This is similar to commit 28fcb7d86765194b4015e7023449333f43aba0c5 (sw comments on frames: no overlay in the LOK API, either, 2019-07-16), but that one handled the initial fetch of comment states, while this one does the incremental updates. With this, there is no overlay on commented images right after inserting them. Change-Id: I060303806a6611b113b4813300ed1cafd0b654fa Reviewed-on: https://gerrit.libreoffice.org/76859 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/docvw/PostItMgr.cxx')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 3e7f48844fae..48121d7d8dd5 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -155,10 +155,17 @@ namespace {
const SwPostItField* pField = pWin->GetPostItField();
const SwRect& aRect = pWin->GetAnchorRect();
- const tools::Rectangle aSVRect(aRect.Pos().getX(),
+ tools::Rectangle aSVRect(aRect.Pos().getX(),
aRect.Pos().getY(),
aRect.Pos().getX() + aRect.SSize().Width(),
aRect.Pos().getY() + aRect.SSize().Height());
+
+ if (!pItem->maLayoutInfo.mPositionFromCommentAnchor)
+ {
+ // Comments on frames: anchor position is the corner position, not the whole frame.
+ aSVRect.SetSize(Size(0, 0));
+ }
+
std::vector<OString> aRects;
for (const basegfx::B2DRange& aRange : pWin->GetAnnotationTextRanges())
{