diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/source/screenshot_test.cxx | 5 |
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()) { |