diff options
author | Jens Carl <j.carl43@gmx.de> | 2018-01-30 21:48:26 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-01-31 19:13:45 +0100 |
commit | ad39f63d4d46abed6786f9b2337d07b3ab443efb (patch) | |
tree | e0f458b90f18036c8bcf0d39bce052513887d921 /sc | |
parent | 4696d3728f0aba1087001bc543fc0867dd0ebdda (diff) |
Remove shared mxComponent (test document) in sctableconditionalentryobj
Change-Id: Id95c3d528ac3f50653c69778ca0b497662669f8e
Reviewed-on: https://gerrit.libreoffice.org/48938
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/extras/sctableconditionalentryobj.cxx | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/sc/qa/extras/sctableconditionalentryobj.cxx b/sc/qa/extras/sctableconditionalentryobj.cxx index ad39a74ef20e..bec1a3dde562 100644 --- a/sc/qa/extras/sctableconditionalentryobj.cxx +++ b/sc/qa/extras/sctableconditionalentryobj.cxx @@ -35,8 +35,6 @@ using namespace com::sun::star; namespace sc_apitest { -#define NUMBER_OF_TESTS 5 - class ScTableConditionalEntryObj : public CalcUnoApiTest, public apitest::XSheetConditionalEntry, public apitest::XSheetCondition @@ -62,13 +60,9 @@ public: CPPUNIT_TEST_SUITE_END(); private: - static sal_Int32 nTest; - static uno::Reference<lang::XComponent> mxComponent; + uno::Reference<lang::XComponent> mxComponent; }; -sal_Int32 ScTableConditionalEntryObj::nTest = 0; -uno::Reference<lang::XComponent> ScTableConditionalEntryObj::mxComponent; - ScTableConditionalEntryObj::ScTableConditionalEntryObj() : CalcUnoApiTest("/sc/qa/extras/testdocuments") { @@ -76,10 +70,6 @@ ScTableConditionalEntryObj::ScTableConditionalEntryObj() uno::Reference<uno::XInterface> ScTableConditionalEntryObj::init() { - // create a calc document - if (!mxComponent.is()) - mxComponent = loadFromDesktop("private:factory/scalc"); - uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is()); @@ -115,19 +105,14 @@ uno::Reference<uno::XInterface> ScTableConditionalEntryObj::init() void ScTableConditionalEntryObj::setUp() { - nTest++; - CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS); CalcUnoApiTest::setUp(); + // create a calc document + mxComponent = loadFromDesktop("private:factory/scalc"); } void ScTableConditionalEntryObj::tearDown() { - if (nTest == NUMBER_OF_TESTS) - { - closeDocument(mxComponent); - mxComponent.clear(); - } - + closeDocument(mxComponent); CalcUnoApiTest::tearDown(); } |