diff options
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/parallelism.cxx | 17 | ||||
-rw-r--r-- | sc/qa/unit/range.cxx | 1 | ||||
-rw-r--r-- | sc/qa/unit/rangelst_test.cxx | 1 |
3 files changed, 8 insertions, 11 deletions
diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx index 2b5b0ba73cc5..39a133648a00 100644 --- a/sc/qa/unit/parallelism.cxx +++ b/sc/qa/unit/parallelism.cxx @@ -30,8 +30,6 @@ public: virtual void setUp() override; virtual void tearDown() override; - void getNewDocShell(ScDocShellRef& rDocShellRef); - void testSUMIFS(); void testDivision(); void testVLOOKUP(); @@ -148,7 +146,10 @@ void ScParallelismTest::setUp() ScDLL::Init(); - getNewDocShell(m_xDocShell); + m_xDocShell = new ScDocShell( + SfxModelFlags::EMBEDDED_OBJECT | + SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | + SfxModelFlags::DISABLE_DOCUMENT_RECOVERY); m_pDoc = &m_xDocShell->GetDocument(); sc::FormulaGroupInterpreter::disableOpenCL_UnitTestsOnly(); @@ -164,17 +165,11 @@ void ScParallelismTest::tearDown() if (!m_bThreadingFlagCfg) setThreadingFlag(false); + m_xDocShell->DoClose(); + m_xDocShell.clear(); test::BootstrapFixture::tearDown(); } -void ScParallelismTest::getNewDocShell( ScDocShellRef& rDocShellRef ) -{ - rDocShellRef = new ScDocShell( - SfxModelFlags::EMBEDDED_OBJECT | - SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS | - SfxModelFlags::DISABLE_DOCUMENT_RECOVERY); -} - void ScParallelismTest::testSUMIFS() { m_pDoc->InsertTab(0, "1"); diff --git a/sc/qa/unit/range.cxx b/sc/qa/unit/range.cxx index 4eb490d81b56..7ca6e631caf0 100644 --- a/sc/qa/unit/range.cxx +++ b/sc/qa/unit/range.cxx @@ -57,6 +57,7 @@ void ScAddressTest::setUp() void ScAddressTest::tearDown() { + m_xDocShRef->DoClose(); m_xDocShRef.clear(); BootstrapFixture::tearDown(); } diff --git a/sc/qa/unit/rangelst_test.cxx b/sc/qa/unit/rangelst_test.cxx index e0f8bbefbf33..bfd4acd5dae1 100644 --- a/sc/qa/unit/rangelst_test.cxx +++ b/sc/qa/unit/rangelst_test.cxx @@ -105,6 +105,7 @@ void Test::setUp() void Test::tearDown() { + m_xDocShRef->DoClose(); m_xDocShRef.clear(); BootstrapFixture::tearDown(); } |