summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorJens Carl <j.carl43@gmx.de>2018-01-30 07:44:24 +0000
committerJens Carl <j.carl43@gmx.de>2018-01-30 18:29:47 +0100
commita52970b535759bf862a7786e12da282aa5acfd74 (patch)
tree3d350f2b9bc328717664503d2c618d49d8ffcd10 /sc
parentb6bf9327d32f0ce1b61331646cddafcc04c9b8f7 (diff)
Remove shared mxComponent in scfilterdescriptorbaseobj
Change-Id: If92339f38bdb24e364fd378de772fa714f73e380 Reviewed-on: https://gerrit.libreoffice.org/48881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/scfilterdescriptorbaseobj.cxx23
1 files changed, 4 insertions, 19 deletions
diff --git a/sc/qa/extras/scfilterdescriptorbaseobj.cxx b/sc/qa/extras/scfilterdescriptorbaseobj.cxx
index 1fc814af2cbd..993016b77ebb 100644
--- a/sc/qa/extras/scfilterdescriptorbaseobj.cxx
+++ b/sc/qa/extras/scfilterdescriptorbaseobj.cxx
@@ -22,8 +22,6 @@ using namespace css::uno;
namespace sc_apitest {
-#define NUMBER_OF_TESTS 1
-
class ScFilterDescriptorBaseObj : public CalcUnoApiTest, public apitest::XSheetFilterDescriptor
{
public:
@@ -42,13 +40,9 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- static sal_Int32 nTest;
- static uno::Reference< lang::XComponent > mxComponent;
+ uno::Reference< lang::XComponent > mxComponent;
};
-sal_Int32 ScFilterDescriptorBaseObj::nTest = 0;
-uno::Reference< lang::XComponent > ScFilterDescriptorBaseObj::mxComponent;
-
ScFilterDescriptorBaseObj::ScFilterDescriptorBaseObj():
CalcUnoApiTest("/sc/qa/extras/testdocuments")
{
@@ -56,10 +50,6 @@ ScFilterDescriptorBaseObj::ScFilterDescriptorBaseObj():
uno::Reference< uno::XInterface > ScFilterDescriptorBaseObj::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());
@@ -77,19 +67,14 @@ uno::Reference< uno::XInterface > ScFilterDescriptorBaseObj::init()
void ScFilterDescriptorBaseObj::setUp()
{
- nTest++;
- CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
CalcUnoApiTest::setUp();
+ // create a calc document
+ mxComponent = loadFromDesktop("private:factory/scalc");
}
void ScFilterDescriptorBaseObj::tearDown()
{
- if (nTest == NUMBER_OF_TESTS)
- {
- closeDocument(mxComponent);
- mxComponent.clear();
- }
-
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}