sc/qa/extras/macros-test.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
New commits: commit 78c66e1aaf353a6a30d53c071f9313b6b2d1b9d4 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon Oct 31 16:22:13 2022 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Oct 31 17:38:44 2022 +0100 CppunitTest_sc_macros_test: simplify code a bit Change-Id: I419f5a0c09643455be992f68b72f4903cfe98a9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142080 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx index 9a633d79854c..3c8e01fbf7ff 100644 --- a/sc/qa/extras/macros-test.cxx +++ b/sc/qa/extras/macros-test.cxx @@ -411,13 +411,7 @@ void ScMacrosTest::testTdf114427() { loadFromURL(u"tdf114427.ods"); - SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(mxComponent); - - CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell); - ScDocShell* pDocSh = static_cast<ScDocShell*>(pFoundShell); - - uno::Reference< frame::XModel > xModel = pDocSh->GetModel(); - uno::Reference< sheet::XSpreadsheetDocument > xDoc(xModel, UNO_QUERY_THROW); + uno::Reference< sheet::XSpreadsheetDocument > xDoc(mxComponent, UNO_QUERY_THROW); uno::Reference< container::XIndexAccess > xIA(xDoc->getSheets(), UNO_QUERY_THROW); uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( xIA->getByIndex(0), UNO_QUERY_THROW); uno::Reference< container::XIndexAccess > xDraws(xDrawPageSupplier->getDrawPage(), UNO_QUERY_THROW);