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 <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2026-01-29 18:23:32 +01:00
parent 3423b46c54
commit ca534064c5
+4 -4
View File
@@ -1867,14 +1867,14 @@ uno::Reference<css::sheet::XSpreadsheet> ScTabViewShell::GetRangeWithSheet(css::
uno::Reference<frame::XController> xController(xModel->getCurrentController());
// spreadsheet's extension of com.sun.star.frame.Controller service
uno::Reference<sheet::XSpreadsheetView> SpreadsheetDocument(xController, uno::UNO_QUERY);
uno::Reference<sheet::XSpreadsheet> ActiveSheet = SpreadsheetDocument->getActiveSheet();
ScTabViewObj* pSpreadsheetDocument = dynamic_cast<ScTabViewObj*>(xController.get());
assert(pSpreadsheetDocument);
uno::Reference<sheet::XSpreadsheet> ActiveSheet = pSpreadsheetDocument->getActiveSheet();
if (!bHasUnoArguments)
{
// get the selection supplier, extract selection in XSheetCellRange
uno::Reference<view::XSelectionSupplier> xSelectionSupplier(SpreadsheetDocument, uno::UNO_QUERY);
uno::Any Selection = xSelectionSupplier->getSelection();
uno::Any Selection = pSpreadsheetDocument->getSelection();
uno::Reference<sheet::XSheetCellRange> SelectedCellRange;
Selection >>= SelectedCellRange;