[Libreoffice-commits] core.git: sc/qa
Jens Carl
j.carl43 at gmx.de
Sat Jan 27 07:32:46 UTC 2018
sc/qa/extras/scautoformatobj.cxx | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
New commits:
commit 05e4ffc1e67656c2c25caf9e51198127cafe363b
Author: Jens Carl <j.carl43 at gmx.de>
Date: Sat Jan 27 01:11:05 2018 +0000
Remove shared mxComponent in scautoformatobj
Change-Id: Iedd50a219f04d906573a5f7d9b3efe582f8ac9c4
Reviewed-on: https://gerrit.libreoffice.org/48731
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jens Carl <j.carl43 at gmx.de>
diff --git a/sc/qa/extras/scautoformatobj.cxx b/sc/qa/extras/scautoformatobj.cxx
index bf5722e7159a..27d96f94f2fe 100644
--- a/sc/qa/extras/scautoformatobj.cxx
+++ b/sc/qa/extras/scautoformatobj.cxx
@@ -25,8 +25,6 @@ using namespace com::sun::star;
namespace sc_apitest
{
-#define NUMBER_OF_TESTS 1
-
class ScTableAutoFormatObj : public CalcUnoApiTest, public apitest::TableAutoFormat
{
public:
@@ -44,13 +42,9 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
- static sal_Int32 nTest;
- static uno::Reference<lang::XComponent> mxComponent;
+ uno::Reference<lang::XComponent> mxComponent;
};
-sal_Int32 ScTableAutoFormatObj::nTest = 0;
-uno::Reference<lang::XComponent> ScTableAutoFormatObj::mxComponent;
-
ScTableAutoFormatObj::ScTableAutoFormatObj()
: CalcUnoApiTest("/sc/qa/extras/testdocuments")
{
@@ -58,10 +52,6 @@ ScTableAutoFormatObj::ScTableAutoFormatObj()
uno::Reference<uno::XInterface> ScTableAutoFormatObj::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());
@@ -76,19 +66,13 @@ uno::Reference<uno::XInterface> ScTableAutoFormatObj::init()
void ScTableAutoFormatObj::setUp()
{
- nTest++;
- CPPUNIT_ASSERT(nTest <= NUMBER_OF_TESTS);
CalcUnoApiTest::setUp();
+ mxComponent = loadFromDesktop("private:factory/scalc");
}
void ScTableAutoFormatObj::tearDown()
{
- if (nTest == NUMBER_OF_TESTS)
- {
- closeDocument(mxComponent);
- mxComponent.clear();
- }
-
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}
More information about the Libreoffice-commits
mailing list