summaryrefslogtreecommitdiff
path: root/sc/source/filter/excel/excimp8.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-09-15 14:22:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-09-15 18:09:27 +0200
commit6d61e34e5623eab8f735344b0e659d834f6069e0 (patch)
tree4b6459c88a6bee34685d2f0a531826577796b8de /sc/source/filter/excel/excimp8.cxx
parent5a33420923c76d3e282f6d4ce0f3a63616ca3cff (diff)
reduce casting around ScDocShell
instead of using SfxObjectShell and then static_cast'ing it everywhere. Change-Id: Id3184e44f048228dc4d0d9fa5d579e663c2762cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156945 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/excel/excimp8.cxx')
-rw-r--r--sc/source/filter/excel/excimp8.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 3996e18337b1..28a819f9d6fa 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -37,6 +37,7 @@
#include <unotools/localedatawrapper.hxx>
#include <document.hxx>
+#include <docsh.hxx>
#include <attrib.hxx>
#include <dbdata.hxx>
#include <globalnames.hxx>
@@ -320,7 +321,7 @@ void ImportExcel8::Feat()
void ImportExcel8::ReadBasic()
{
- SfxObjectShell* pShell = GetDocShell();
+ ScDocShell* pShell = GetDocShell();
tools::SvRef<SotStorage> xRootStrg = GetRootStorage();
const SvtFilterOptions& rFilterOpt = SvtFilterOptions::Get();
if( !pShell || !xRootStrg.is() )
@@ -407,7 +408,7 @@ void ImportExcel8::PostDocLoad()
}
// read doc info (no docshell while pasting from clipboard)
- SfxObjectShell* pShell = GetDocShell();
+ ScDocShell* pShell = GetDocShell();
if(!pShell)
return;
@@ -415,7 +416,7 @@ void ImportExcel8::PostDocLoad()
tools::SvRef<SotStorage> xRootStrg = GetRootStorage();
if( xRootStrg.is() ) try
{
- uno::Reference< document::XDocumentPropertiesSupplier > xDPS( pShell->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< document::XDocumentPropertiesSupplier > xDPS( static_cast<cppu::OWeakObject*>(pShell->GetModel()), uno::UNO_QUERY_THROW );
uno::Reference< document::XDocumentProperties > xDocProps( xDPS->getDocumentProperties(), uno::UNO_SET_THROW );
sfx2::LoadOlePropertySet( xDocProps, xRootStrg.get() );
}