From 14af38f429f84a75a9dae60d74d41c57efd709f6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 18 Nov 2016 17:29:20 +0100 Subject: [PATCH] Missing XComponent.dispose calls in screenshot tests Change-Id: I5df25a16303719593d40f08d1e7c15e4636a2d02 --- sc/qa/unit/screenshots/screenshots.cxx | 3 +++ sd/qa/unit/dialogs-test.cxx | 7 +++++++ sw/qa/unit/sw-dialogs-test.cxx | 8 ++++++++ 3 files changed, 18 insertions(+) diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index 870f774b1b9fd..0f1e5a21f9bf8 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -282,6 +282,9 @@ void ScScreenshotTest::testOpeningModalDialogs() /// process input file containing the UXMLDescriptions of the dialogs to dump processDialogBatchFile("sc/qa/unit/screenshots/data/screenshots.txt"); + + mxComponent->dispose(); + mxComponent.clear(); } CPPUNIT_TEST_SUITE_REGISTRATION(ScScreenshotTest); diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index 37104a4ba1dd6..66a4fd63e6eea 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -101,6 +101,8 @@ class SdDialogsTest : public ScreenshotTest virtual void setUp() override; + void tearDown() override; + // try to open a dialog void openAnyDialog(); @@ -138,6 +140,11 @@ void SdDialogsTest::setUp() CPPUNIT_ASSERT(mpImpressDocument); } +void SdDialogsTest::tearDown() +{ + mxComponent->dispose(); + ScreenshotTest::tearDown(); +} SdAbstractDialogFactory* SdDialogsTest::getSdAbstractDialogFactory() { diff --git a/sw/qa/unit/sw-dialogs-test.cxx b/sw/qa/unit/sw-dialogs-test.cxx index 1fb4f7b57ae18..a6f96d9c32119 100644 --- a/sw/qa/unit/sw-dialogs-test.cxx +++ b/sw/qa/unit/sw-dialogs-test.cxx @@ -43,6 +43,8 @@ class SwDialogsTest : public ScreenshotTest void setUp() override; + void tearDown() override; + // try to open a dialog void openAnyDialog(); @@ -78,6 +80,12 @@ void SwDialogsTest::setUp() (*fn)(); } +void SwDialogsTest::tearDown() +{ + component_->dispose(); + ScreenshotTest::tearDown(); +} + void SwDialogsTest::registerKnownDialogsByID(mapType& /*rKnownDialogs*/) { // fill map of known dialogs