summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-07-28 18:05:20 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-10-02 10:54:52 +0530
commit0f58e974a7d6a88491a97ea3d0f30755ec330253 (patch)
tree8c3a15974009324443e042c5f6916cd435d93da5 /vcl
parent1325fabbdd2e52169a7d1a1b9a6b9b59d908e8bb (diff)
lokdialog: Better dialog rendering API
After painting the dialog, also write width and height of the rendered dialog. The dialog is rendered always on the top left of the given canvas, so client can crop the canvas accordingly. Change-Id: If052058a6db8a85d4e28ec88cffcca05564b17f0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/dialog.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index e4aac9dbf322..679c83ba462b 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -51,6 +51,7 @@
#include <vcl/settings.hxx>
#include <vcl/uitest/uiobject.hxx>
#include <vcl/uitest/logger.hxx>
+#include <vcl/virdev.hxx>
#include <salframe.hxx>
#include <iostream>
@@ -857,6 +858,17 @@ bool Dialog::selectPageByUIXMLDescription(const OString& /*rUIXMLDescription*/)
return true;
}
+void Dialog::paintDialog(VirtualDevice& rDevice)
+{
+ setDeferredProperties();
+ ImplAdjustNWFSizes();
+ Show();
+ ToTop();
+ ensureRepaint();
+
+ PaintToDevice(&rDevice, Point(0, 0), Size());
+}
+
void Dialog::ensureRepaint()
{
// ensure repaint