summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-07 16:43:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-08 16:31:21 +0200
commit64fc5986607eaba5db627c546cb1321f00abc501 (patch)
tree9016569f3c8c3da8e744db3daeadd8e39714f739 /test
parent1c68ab312c5473ce642f75fc35a1edd6be187489 (diff)
implement gtk dialog screenshotting
Change-Id: If4e570f775bd1e29dfb75cb7e5dd9d9dfc35e654 Reviewed-on: https://gerrit.libreoffice.org/80416 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/source/screenshot_test.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index b2173b57bf25..e849bae672ce 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -19,6 +19,7 @@
#include <vcl/abstdlg.hxx>
#include <vcl/pngwrite.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/virdev.hxx>
#include <unotools/configmgr.hxx>
#include <tools/stream.hxx>
@@ -109,7 +110,9 @@ void ScreenshotTest::saveScreenshot(VclAbstractDialog const & rDialog)
void ScreenshotTest::saveScreenshot(Dialog& rDialog)
{
- const BitmapEx aScreenshot(rDialog.createScreenshot());
+ VclPtr<VirtualDevice> xDialogSurface(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
+ rDialog.createScreenshot(*xDialogSurface);
+ const BitmapEx aScreenshot(xDialogSurface->GetBitmapEx(Point(), xDialogSurface->GetOutputSizePixel()));
if (!aScreenshot.IsEmpty())
{