summaryrefslogtreecommitdiff
path: root/sc/qa/extras/scautoformatsobj.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-10-14 00:28:18 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2022-10-14 16:09:37 +0200
commita96b911c112386b1af89115c9a96d4ace9d68326 (patch)
treeb73ec43df26c760f10aba907d2fbaddccf1e4ad0 /sc/qa/extras/scautoformatsobj.cxx
parent99e019708609a52ea6b2ad29fc945c4dc4160351 (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/scautoformatsobj.cxx')
-rw-r--r--sc/qa/extras/scautoformatsobj.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/qa/extras/scautoformatsobj.cxx b/sc/qa/extras/scautoformatsobj.cxx
index a51bd76ab9af..7dfd54eb1a62 100644
--- a/sc/qa/extras/scautoformatsobj.cxx
+++ b/sc/qa/extras/scautoformatsobj.cxx
@@ -80,9 +80,6 @@ public:
CPPUNIT_TEST(testSupportsService);
CPPUNIT_TEST_SUITE_END();
-
-private:
- uno::Reference<lang::XComponent> m_xComponent;
};
ScAutoFormatsObj::ScAutoFormatsObj()
@@ -98,7 +95,7 @@ ScAutoFormatsObj::ScAutoFormatsObj()
uno::Reference<uno::XInterface> ScAutoFormatsObj::init()
{
- uno::Reference<lang::XMultiServiceFactory> xMSF(m_xComponent, uno::UNO_QUERY_THROW);
+ uno::Reference<lang::XMultiServiceFactory> xMSF(mxComponent, uno::UNO_QUERY_THROW);
uno::Reference<uno::XInterface> xTAF(
xMSF->createInstance("com.sun.star.sheet.TableAutoFormats"), uno::UNO_SET_THROW);
@@ -121,12 +118,12 @@ void ScAutoFormatsObj::setUp()
{
CalcUnoApiTest::setUp();
// create calc document
- m_xComponent = loadFromDesktop("private:factory/scalc");
+ mxComponent = loadFromDesktop("private:factory/scalc");
}
void ScAutoFormatsObj::tearDown()
{
- closeDocument(m_xComponent);
+ closeDocument(mxComponent);
CalcUnoApiTest::tearDown();
}