diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-01-31 00:57:29 +0530 |
---|---|---|
committer | pranavk <pranavk@collabora.co.uk> | 2017-02-05 17:13:28 +0000 |
commit | 6d243a10724da6836b7f3e623d2815cc7b0a13c5 (patch) | |
tree | e0f7dad2126fe17cd8623f8cbfb015d05ad51058 /sw/source/uibase/uno/unotxdoc.cxx | |
parent | 0b819a1f0704b82b16007ba707e49ad4082311df (diff) |
lok: Send complete anchor rectangle
... instead of just sending the X, Y coordinates
Change-Id: Ie87b252ebfd64e806e1e5f66cfc27e77282cbaab
Reviewed-on: https://gerrit.libreoffice.org/33875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/uno/unotxdoc.cxx')
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index bbe2077bc474..a6aadb546ad8 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3194,7 +3194,11 @@ OUString SwXTextDocument::getPostIts() sw::annotation::SwAnnotationWin* pWin = static_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt.get()); const SwPostItField* pField = pWin->GetPostItField(); - const OString aAnchorPos = OString::number(pWin->GetAnchorPos().X()) + ", " + OString::number(pWin->GetAnchorPos().Y()); + const SwRect& aRect = pWin->GetAnchorRect(); + const Rectangle aSVRect(aRect.Pos().getX(), + aRect.Pos().getY(), + aRect.Pos().getX() + aRect.SSize().Width(), + aRect.Pos().getY() + aRect.SSize().Height()); std::vector<OString> aRects; for (const basegfx::B2DRange& aRange : pWin->GetAnnotationTextRanges()) { @@ -3209,7 +3213,7 @@ OUString SwXTextDocument::getPostIts() aAnnotation.put("author", pField->GetPar1().toUtf8().getStr()); aAnnotation.put("text", pField->GetPar2().toUtf8().getStr()); aAnnotation.put("dateTime", utl::toISO8601(pField->GetDateTime().GetUNODateTime())); - aAnnotation.put("anchorPos", aAnchorPos.getStr()); + aAnnotation.put("anchorPos", aSVRect.toString()); aAnnotation.put("textRange", sRects.getStr()); aAnnotations.push_back(std::make_pair("", aAnnotation)); |