sw/qa/core/macros-test.cxx | 5 +++++ sw/qa/extras/uiwriter/uiwriter.cxx | 2 ++ 2 files changed, 7 insertions(+)
New commits: commit 123b41c3870810d61fde5e17c74a352e3fd2a694 Author: Aleksas Pantechovskis <[email protected]> Date: Sat Mar 5 23:56:35 2016 +0200 tdf#65219 Fix temp files clean up in sw unit tests Change-Id: I57f4dc90bc2ad8488af8cd42515b195f4320a9d9 Reviewed-on: https://gerrit.libreoffice.org/22939 Tested-by: Jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index ab9203e..44ac68f 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -45,6 +45,7 @@ #include <sfx2/sfxmodelfactory.hxx> #include <svl/intitem.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/scopeguard.hxx> #include <basic/sbxdef.hxx> #include <unotools/tempfile.hxx> @@ -483,6 +484,10 @@ void SwMacrosTest::testFindReplace() // we need a full document with view and layout etc. because ::GetNode() Reference<lang::XComponent> const xComponent = loadFromDesktop("private:factory/swriter", "com.sun.star.text.TextDocument"); + + const ::comphelper::ScopeGuard xComponentScopeGuard( + [&xComponent]() { xComponent->dispose(); } ); + SwXTextDocument *const pTextDoc = dynamic_cast<SwXTextDocument *>(xComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwDoc *const pDoc = pTextDoc->GetDocShell()->GetDoc(); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 7887874..a7e92537 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1004,6 +1004,8 @@ void SwUiWriterTest::testMergeDoc() getParagraph(5, "Para Six: One Three Four Five"); getParagraph(6, ""); getParagraph(7, ""); + + xDoc2Component->dispose(); } void SwUiWriterTest::testCreatePortions() _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
