sd/source/ui/annotations/annotationwindow.cxx |    4 +---
 svx/source/dialog/weldeditview.cxx            |    4 +---
 sw/source/uibase/docvw/SidebarTxtControl.cxx  |    2 --
 3 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit cfa5489982a84f847d86b8bf8ce49b25e033ed48
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Mar 18 14:17:28 2022 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Mar 18 15:28:44 2022 +0100

    WeldEditView: Just pass new Size object as param
    
    Just pass `aOutputSize` as parameter instead
    of assigning that to `aSize` again and then
    passing that one as parameter in
    `WeldEditView::SetDrawingArea` and
    overrides in derived classes.
    
    `aSize.setHeight(aSize.Height())` can just be dropped
    as an overly complicated way of keeping the
    height as it is.
    
    In `SidebarTextControl::SetDrawingArea`, `aOutputSize`
    was already passed as param, so the new value of `aSize`
    was ignored anyway.
    
    Change-Id: I23192d3c5c85e4371a48774b3b8f854beb751b82
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131741
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/source/ui/annotations/annotationwindow.cxx 
b/sd/source/ui/annotations/annotationwindow.cxx
index 42ebe77c306f..6c1210575915 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -188,14 +188,12 @@ void 
AnnotationTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
     rDevice.SetBackground(aBgColor);
 
     Size aOutputSize(rDevice.PixelToLogic(aSize));
-    aSize = aOutputSize;
-    aSize.setHeight(aSize.Height());
 
     EditView* pEditView = GetEditView();
     pEditView->setEditViewCallbacks(this);
 
     EditEngine* pEditEngine = GetEditEngine();
-    pEditEngine->SetPaperSize(aSize);
+    pEditEngine->SetPaperSize(aOutputSize);
     pEditEngine->SetRefDevice(&rDevice);
 
     pEditView->SetOutputArea(::tools::Rectangle(Point(0, 0), aOutputSize));
diff --git a/svx/source/dialog/weldeditview.cxx 
b/svx/source/dialog/weldeditview.cxx
index d3f3c3f79c9e..42eb22c12223 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -1554,11 +1554,9 @@ void WeldEditView::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
     rDevice.SetBackground(aBgColor);
 
     Size aOutputSize(rDevice.PixelToLogic(aSize));
-    aSize = aOutputSize;
-    aSize.setHeight(aSize.Height());
 
     makeEditEngine();
-    m_xEditEngine->SetPaperSize(aSize);
+    m_xEditEngine->SetPaperSize(aOutputSize);
     m_xEditEngine->SetRefDevice(&rDevice);
 
     m_xEditEngine->SetControlWord(m_xEditEngine->GetControlWord() | 
EEControlBits::MARKFIELDS);
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx 
b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index fecaf6aafef3..8502601e8b1e 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -107,8 +107,6 @@ void SidebarTextControl::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
     rDevice.SetBackground(aBgColor);
 
     Size aOutputSize(rDevice.PixelToLogic(aSize));
-    aSize = aOutputSize;
-    aSize.setHeight(aSize.Height());
 
     EditView* pEditView = GetEditView();
     pEditView->setEditViewCallbacks(this);

Reply via email to