summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2018-01-27 01:40:45 +0000
committerJens Carl <j.carl43@gmx.de>2018-01-27 18:48:41 +0100
commit894b93f5ca03988aaa42b259f0b5a12d5cb3e67c (patch)
tree664f42f4fa8339f27844ef98a8b118b3d949aa32
parent6a36c66dd18db6507d66bdaed822e513d92e8127 (diff)
Remove shared mxComponent in scconsolidationdescriptorobj
Change-Id: I4b71673fa19459eeb7ea97bb291a62f327d69958 Reviewed-on: https://gerrit.libreoffice.org/48736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r--sc/qa/extras/scconsolidationdescriptorobj.cxx23
1 files changed, 4 insertions, 19 deletions
diff --git a/sc/qa/extras/scconsolidationdescriptorobj.cxx b/sc/qa/extras/scconsolidationdescriptorobj.cxx
index 16c4ea8b820e..a68f5fe0ef5b 100644
--- a/sc/qa/extras/scconsolidationdescriptorobj.cxx
+++ b/sc/qa/extras/scconsolidationdescriptorobj.cxx
@@ -23,8 +23,6 @@ using namespace com::sun::star;
namespace sc_apitest
{
-#define NUMBER_OF_TESTS 12
-
class ScConsolidationDescriptorObj : public CalcUnoApiTest, public apitest::XConsolidationDescriptor
{
public:
@@ -53,13 +51,9 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- static sal_Int32 nTest;
- static uno::Reference<lang::XComponent> mxComponent;
+ uno::Reference<lang::XComponent> mxComponent;
};
-sal_Int32 ScConsolidationDescriptorObj::nTest = 0;
-uno::Reference<lang::XComponent> ScConsolidationDescriptorObj::mxComponent;
-
ScConsolidationDescriptorObj::ScConsolidationDescriptorObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
{
@@ -67,10 +61,6 @@ ScConsolidationDescriptorObj::ScConsolidationDescriptorObj()
uno::Reference<uno::XInterface> ScConsolidationDescriptorObj::init()
{
- // create a calc document
- if (!mxComponent.is())
- mxComponent = loadFromDesktop("private:factory/scalc");
-
uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW);
CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is());
@@ -80,19 +70,14 @@ uno::Reference<uno::XInterface> ScConsolidationDescriptorObj::init()
void ScConsolidationDescriptorObj::setUp()
{
- nTest++;
- CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
CalcUnoApiTest::setUp();
+ // create a calc document
+ mxComponent = loadFromDesktop("private:factory/scalc");
}
void ScConsolidationDescriptorObj::tearDown()
{
- if (nTest == NUMBER_OF_TESTS)
- {
- closeDocument(mxComponent);
- mxComponent.clear();
- }
-
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}