[Libreoffice-commits] core.git: sc/qa
Jens Carl
j.carl43 at gmx.de
Tue Jan 30 17:37:57 UTC 2018
sc/qa/extras/scfunctionlistobj.cxx | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
New commits:
commit 2831ae4d07ecc04893022bc9412218f898e4d739
Author: Jens Carl <j.carl43 at gmx.de>
Date: Tue Jan 30 07:46:33 2018 +0000
Remove shared mxComponent in scfunctionlistobj
Change-Id: I7fe5778afb397d62d9a7530fc094dd97011fbca7
Reviewed-on: https://gerrit.libreoffice.org/48882
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jens Carl <j.carl43 at gmx.de>
diff --git a/sc/qa/extras/scfunctionlistobj.cxx b/sc/qa/extras/scfunctionlistobj.cxx
index bf95e9d7e81f..91ab22b59f66 100644
--- a/sc/qa/extras/scfunctionlistobj.cxx
+++ b/sc/qa/extras/scfunctionlistobj.cxx
@@ -22,8 +22,6 @@ using namespace com::sun::star;
namespace sc_apitest
{
-#define NUMBER_OF_TESTS 1
-
class ScFunctionListObj : public CalcUnoApiTest, public apitest::XFunctionDescriptions
{
public:
@@ -41,13 +39,9 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- static sal_Int32 nTest;
- static uno::Reference<lang::XComponent> mxComponent;
+ uno::Reference<lang::XComponent> mxComponent;
};
-sal_Int32 ScFunctionListObj::nTest = 0;
-uno::Reference<lang::XComponent> ScFunctionListObj::mxComponent;
-
ScFunctionListObj::ScFunctionListObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
{
@@ -55,10 +49,6 @@ ScFunctionListObj::ScFunctionListObj()
uno::Reference<uno::XInterface> ScFunctionListObj::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());
@@ -68,19 +58,14 @@ uno::Reference<uno::XInterface> ScFunctionListObj::init()
void ScFunctionListObj::setUp()
{
- nTest++;
- CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
CalcUnoApiTest::setUp();
+ // create a calc document
+ mxComponent = loadFromDesktop("private:factory/scalc");
}
void ScFunctionListObj::tearDown()
{
- if (nTest == NUMBER_OF_TESTS)
- {
- closeDocument(mxComponent);
- mxComponent.clear();
- }
-
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}
More information about the Libreoffice-commits
mailing list