[Libreoffice-commits] core.git: sc/qa
Jens Carl
j.carl43 at gmx.de
Tue Jan 30 17:30:14 UTC 2018
sc/qa/extras/scfilterdescriptorbaseobj.cxx | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
New commits:
commit a52970b535759bf862a7786e12da282aa5acfd74
Author: Jens Carl <j.carl43 at gmx.de>
Date: Tue Jan 30 07:44:24 2018 +0000
Remove shared mxComponent in scfilterdescriptorbaseobj
Change-Id: If92339f38bdb24e364fd378de772fa714f73e380
Reviewed-on: https://gerrit.libreoffice.org/48881
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jens Carl <j.carl43 at gmx.de>
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();
}
More information about the Libreoffice-commits
mailing list