From ca534064c56022dd7bbb4cfdaa9fa658dcb341a9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 29 Jan 2026 16:33:56 +0200 Subject: [PATCH] use more concrete UNO in ScTabViewShell Change-Id: Ibd9ce1d7a5cb5a7012c9c99235234ca16818f871 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198370 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/ui/view/tabvwsh4.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index e8526a0e4d70..9431577b5a4b 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -1867,14 +1867,14 @@ uno::Reference ScTabViewShell::GetRangeWithSheet(css:: uno::Reference xController(xModel->getCurrentController()); // spreadsheet's extension of com.sun.star.frame.Controller service - uno::Reference SpreadsheetDocument(xController, uno::UNO_QUERY); - uno::Reference ActiveSheet = SpreadsheetDocument->getActiveSheet(); + ScTabViewObj* pSpreadsheetDocument = dynamic_cast(xController.get()); + assert(pSpreadsheetDocument); + uno::Reference ActiveSheet = pSpreadsheetDocument->getActiveSheet(); if (!bHasUnoArguments) { // get the selection supplier, extract selection in XSheetCellRange - uno::Reference xSelectionSupplier(SpreadsheetDocument, uno::UNO_QUERY); - uno::Any Selection = xSelectionSupplier->getSelection(); + uno::Any Selection = pSpreadsheetDocument->getSelection(); uno::Reference SelectedCellRange; Selection >>= SelectedCellRange;