vcl/jsdialog/executor.cxx    |    2 +-
 vcl/source/window/layout.cxx |   13 ++++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 584c9914fc4da76839ecdb3efed36381bee21954
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Tue Mar 14 15:32:29 2023 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Mar 23 07:01:00 2023 +0000

    jsdialog: render full edit engine content
    
    Change-Id: I43c2deb75619956b95cdc1d2693a7540d5c8f894
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148888
    Tested-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149326
    Tested-by: Jenkins

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 4668193cb579..94f2ad058bde 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -206,7 +206,7 @@ bool ExecuteAction(const std::string& nWindowId, const 
OString& rWidget, StringM
                         // We send OutPutSize for the drawing area bitmap
                         // get_size_request is not necessarily updated
                         // therefore it may be incorrect.
-                        Size size = rRefDevice.GetOutputSize();
+                        Size size = rRefDevice.GetOutputSizePixel();
                         posX = posX * size.Width();
                         posY = posY * size.Height();
                         if (sAction == "click")
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 6befd3399520..f119b050d567 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -3089,10 +3089,17 @@ void 
VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
     rJsonWriter.put("type", "drawingarea");
 
     ScopedVclPtrInstance<VirtualDevice> pDevice;
-    pDevice->SetOutputSize( GetSizePixel() );
-    tools::Rectangle aRect(Point(0,0), GetSizePixel());
+    OutputDevice* pRefDevice = GetOutDev();
+    Size aRenderSize(pRefDevice->PixelToLogic(GetOutputSizePixel()));
+    Size aOutputSize = GetSizePixel();
+    pDevice->SetOutputSize(aRenderSize);
+    tools::Rectangle aRect(Point(0,0), aRenderSize);
+
     Paint(*pDevice, aRect);
-    BitmapEx aImage = pDevice->GetBitmapEx( Point(0,0), GetSizePixel() );
+
+    BitmapEx aImage = pDevice->GetBitmapEx(Point(0,0), aRenderSize);
+    aImage.Scale(aOutputSize);
+
     SvMemoryStream aOStm(65535, 65535);
     if(GraphicConverter::Export(aOStm, aImage, ConvertDataFormat::PNG) == 
ERRCODE_NONE)
     {

Reply via email to