diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-10-20 20:44:22 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-10-21 15:06:40 +0200 |
commit | 4548e98596996d996d03cfd0b8d6d76bc14d77e1 (patch) | |
tree | 255c9cf5c29ae6feb67f770e58dfb5d155a0b6d4 /sc/qa/extras/sctablesheetobj.cxx | |
parent | 5dee00ee50d3d7d7684d0d62f88d0cb206977a67 (diff) |
sc: fix temp file leak in ScTableSheetObj
Change-Id: If75573ffe565ec621aa6c9739cec71bc4b087c7a
Diffstat (limited to 'sc/qa/extras/sctablesheetobj.cxx')
-rw-r--r-- | sc/qa/extras/sctablesheetobj.cxx | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sc/qa/extras/sctablesheetobj.cxx b/sc/qa/extras/sctablesheetobj.cxx index f64905fdeda7..fd9aa7671d06 100644 --- a/sc/qa/extras/sctablesheetobj.cxx +++ b/sc/qa/extras/sctablesheetobj.cxx @@ -26,6 +26,9 @@ class ScTableSheetObj : public CalcUnoApiTest, apitest::XSearchable, apitest::XR public: ScTableSheetObj(); + virtual void setUp() SAL_OVERRIDE; + virtual void tearDown() SAL_OVERRIDE; + virtual uno::Reference< uno::XInterface > init() SAL_OVERRIDE; CPPUNIT_TEST_SUITE(ScTableSheetObj); @@ -40,13 +43,9 @@ public: CPPUNIT_TEST_SUITE_END(); private: - static sal_Int32 nTest; - static uno::Reference< lang::XComponent > mxComponent; + uno::Reference< lang::XComponent > mxComponent; }; -sal_Int32 ScTableSheetObj::nTest = 0; -uno::Reference< lang::XComponent > ScTableSheetObj::mxComponent; - ScTableSheetObj::ScTableSheetObj(): CalcUnoApiTest("/sc/qa/extras/testdocuments"), apitest::XSearchable(OUString("test"), 4), @@ -69,6 +68,19 @@ uno::Reference< uno::XInterface > ScTableSheetObj::init() return xSheet; } +void ScTableSheetObj::setUp() +{ + CalcUnoApiTest::setUp(); +} + +void ScTableSheetObj::tearDown() +{ + closeDocument(mxComponent); + mxComponent.clear(); + + CalcUnoApiTest::tearDown(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ScTableSheetObj); } |