summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-10-25 14:51:02 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-10-25 17:03:53 +0200
commit51d366712c55c61bea5169c238098d7007e4ce20 (patch)
tree60a003053acddc9a9c9705577dac8daa313b3a1c /test
parent4b0f51efbcb9e71034089f431117e6bac92a26b2 (diff)
ChartTest: inherit from UnoApiTest
Change-Id: Ie826b66364f61bdab555228ca3a348f86b34847f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141824 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'test')
-rw-r--r--test/source/unoapi_test.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/source/unoapi_test.cxx b/test/source/unoapi_test.cxx
index 395a10db1c37..aaf3db10eccf 100644
--- a/test/source/unoapi_test.cxx
+++ b/test/source/unoapi_test.cxx
@@ -55,6 +55,12 @@ OUString UnoApiTest::createFileURL(std::u16string_view aFileBase)
OUString UnoApiTest::loadFromURL(std::u16string_view aFileBase)
{
+ if (mxComponent.is())
+ {
+ mxComponent->dispose();
+ mxComponent.clear();
+ }
+
OUString aFileName = createFileURL(aFileBase);
mxComponent = loadFromDesktop(aFileName);
return aFileName;