diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2023-11-23 20:50:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-24 12:47:23 +0100 |
commit | ca0609368edf80c4e56abf36fefc2bfabfd82deb (patch) | |
tree | d27c4dc949a4a09c203b0dfeaea92ea396a550a2 /sc/source/ui | |
parent | 57974af130e7421da6b07589d4a63a754b757ad6 (diff) |
use more concrete UNO in sc
Change-Id: I20f0200a4ed74b32b67b740e0084dae9620c2912
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159871
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/unoobj/servuno.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 8680179f162a..432681702738 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -124,12 +124,11 @@ public: OUString sSheetName; if( rDoc.GetName( i, sSheetName ) ) { - uno::Reference< frame::XModel > xModel( mpDocShell->GetModel() ); - uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( xModel, uno::UNO_QUERY_THROW ); + rtl::Reference< ScModelObj > xSpreadDoc( mpDocShell->GetModel() ); uno::Reference<sheet::XSpreadsheets > xSheets( xSpreadDoc->getSheets(), uno::UNO_SET_THROW ); uno::Reference< container::XIndexAccess > xIndexAccess( xSheets, uno::UNO_QUERY_THROW ); uno::Reference< sheet::XSpreadsheet > xSheet( xIndexAccess->getByIndex( i ), uno::UNO_QUERY_THROW ); - uno::Sequence< uno::Any > aArgs{ maWorkbook, uno::Any(xModel), uno::Any(sSheetName) }; + uno::Sequence< uno::Any > aArgs{ maWorkbook, uno::Any(uno::Reference< frame::XModel >(xSpreadDoc)), uno::Any(sSheetName) }; // use the convenience function maCachedObject <<= ooo::vba::createVBAUnoAPIServiceWithArgs( mpDocShell, "ooo.vba.excel.Worksheet", aArgs ); break; |