summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-11 20:27:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-12 12:07:22 +0100
commit34a90a7f56b7009bc95cf1b0a0e258fa0af2d52a (patch)
tree7ec653e82b2980e1511b6a66f91d04f72fe554e9 /sw
parent659164be6f4b8f2f26eed42367142333c9ae6200 (diff)
Resolves: tdf#145648 use the same reference device for comments as document
so we get the same text measurements and so positioning matches. Change-Id: I7b3211cbd8eba41269688316d74a8f72ac734f13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142603 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/docvw/AnnotationWin2.cxx1
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx3
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 6a4cebd56cdf..087759047a81 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -501,7 +501,6 @@ void SwAnnotationWin::Rescale()
MapMode aMode = GetParent()->GetMapMode();
aMode.SetOrigin( Point() );
- mpOutliner->SetRefMapMode( aMode );
SetMapMode( aMode );
mxSidebarTextControl->SetMapMode( aMode );
const Fraction& rFraction = mrView.GetWrtShellPtr()->GetOut()->GetMapMode().GetScaleY();
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 789e6289b49d..7b7002b7fbfe 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -54,6 +54,7 @@
#include <view.hxx>
#include <wrtsh.hxx>
#include <AnnotationWin.hxx>
+#include <IDocumentDeviceAccess.hxx>
#include <redline.hxx>
#include <memory>
@@ -116,7 +117,7 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
// for layout in the sidebar.
Size aPaperSize(mrPostItMgr.GetSidebarWidth(), pEditEngine->GetPaperSize().Height());
pEditEngine->SetPaperSize(aPaperSize);
- pEditEngine->SetRefDevice(&rDevice);
+ pEditEngine->SetRefDevice(mrDocView.GetWrtShell().getIDocumentDeviceAccess().getReferenceDevice(false));
pEditView->SetOutputArea(tools::Rectangle(Point(0, 0), aOutputSize));
pEditView->SetBackgroundColor(aBgColor);