diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-14 00:28:18 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-10-14 16:09:37 +0200 |
commit | a96b911c112386b1af89115c9a96d4ace9d68326 (patch) | |
tree | b73ec43df26c760f10aba907d2fbaddccf1e4ad0 /sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx | |
parent | 99e019708609a52ea6b2ad29fc945c4dc4160351 (diff) |
CalcUnoApiTest: Move mxComponent to parent and use it everywhere
Change-Id: Ibea7a300b7f302936f872d7133aadafeb13d6d82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141350
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx')
-rw-r--r-- | sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx b/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx index 9adba41f6977..12eb4e795620 100644 --- a/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx +++ b/sc/qa/extras/scindexenumeration_subtotalfieldsenumeration.cxx @@ -46,9 +46,6 @@ public: CPPUNIT_TEST(testNextElement); CPPUNIT_TEST_SUITE_END(); - -private: - uno::Reference<lang::XComponent> m_xComponent; }; ScIndexEnumeration_SubTotalFieldsEnumeration::ScIndexEnumeration_SubTotalFieldsEnumeration() @@ -58,7 +55,7 @@ ScIndexEnumeration_SubTotalFieldsEnumeration::ScIndexEnumeration_SubTotalFieldsE uno::Reference<uno::XInterface> ScIndexEnumeration_SubTotalFieldsEnumeration::init() { - uno::Reference<sheet::XSpreadsheetDocument> xDoc(m_xComponent, uno::UNO_QUERY_THROW); + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is()); uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), uno::UNO_SET_THROW); @@ -80,12 +77,12 @@ uno::Reference<uno::XInterface> ScIndexEnumeration_SubTotalFieldsEnumeration::in void ScIndexEnumeration_SubTotalFieldsEnumeration::setUp() { CalcUnoApiTest::setUp(); - m_xComponent = loadFromDesktop("private:factory/scalc"); + mxComponent = loadFromDesktop("private:factory/scalc"); } void ScIndexEnumeration_SubTotalFieldsEnumeration::tearDown() { - closeDocument(m_xComponent); + closeDocument(mxComponent); CalcUnoApiTest::tearDown(); } |