summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-07-21 17:05:32 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-08-18 02:39:12 +0200
commite56334255291a0ccb5165d7ceaa1391b906bb4de (patch)
tree5d56264f76e83b7ccf93637511fc936b161ee62f /test
parentdc1e30095fa02fa4116fa96783bd4d51fe912473 (diff)
screenshots: fix fallback cases for sd and sc
Change-Id: I27dab5552e3924df30c8b09c46994b2d645bcde9
Diffstat (limited to 'test')
-rw-r--r--test/source/screenshot_test.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index 92f48ee28823..dfbd2cee257c 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -178,16 +178,24 @@ void ScreenshotTest::dumpDialogToPath(const OString& rUIXMLDescription)
if (!rUIXMLDescription.isEmpty())
{
VclPtrInstance<Dialog> pDialog(Application::GetDefDialogParent(), WB_STDDIALOG | WB_SIZEABLE, Dialog::InitFlag::NoParent);
- VclBuilder aBuilder(pDialog, VclBuilderContainer::getUIRootDir(), OStringToOUString(rUIXMLDescription, RTL_TEXTENCODING_UTF8));
- vcl::Window *pRoot = aBuilder.get_widget_root();
- Dialog *pRealDialog = dynamic_cast<Dialog*>(pRoot);
- if (!pRealDialog)
- pRealDialog = pDialog;
+ {
+ VclBuilder aBuilder(pDialog, VclBuilderContainer::getUIRootDir(), OStringToOUString(rUIXMLDescription, RTL_TEXTENCODING_UTF8));
+ vcl::Window *pRoot = aBuilder.get_widget_root();
+ Dialog *pRealDialog = dynamic_cast<Dialog*>(pRoot);
+
+ if (!pRealDialog)
+ {
+ pRealDialog = pDialog;
+ }
+
+ pRealDialog->SetText("LibreOffice DialogScreenshot");
+ pRealDialog->SetStyle(pDialog->GetStyle() | WB_CLOSEABLE);
+
+ dumpDialogToPath(*pRealDialog);
+ }
- pRealDialog->SetText("LibreOffice DialogScreenshot");
- pRealDialog->SetStyle(pDialog->GetStyle() | WB_CLOSEABLE);
- dumpDialogToPath(*pRealDialog);
+ pDialog.disposeAndClear();
}
}