sw/source/uibase/docvw/AnnotationWin2.cxx | 1 - sw/source/uibase/docvw/SidebarTxtControl.cxx | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 34a90a7f56b7009bc95cf1b0a0e258fa0af2d52a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Nov 11 20:27:55 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sat Nov 12 12:07:22 2022 +0100 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 <caol...@redhat.com> 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);