Kaydet (Commit) 2831ae4d authored tarafından Jens Carl's avatar Jens Carl

Remove shared mxComponent in scfunctionlistobj

Change-Id: I7fe5778afb397d62d9a7530fc094dd97011fbca7
Reviewed-on: https://gerrit.libreoffice.org/48882Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJens Carl <j.carl43@gmx.de>
üst a52970b5
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment