summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
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/oox
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/oox')
-rw-r--r--sc/source/filter/oox/excelfilter.cxx2
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/oox/excelfilter.cxx b/sc/source/filter/oox/excelfilter.cxx
index b992a43a52fc..3a2d822d1431 100644
--- a/sc/source/filter/oox/excelfilter.cxx
+++ b/sc/source/filter/oox/excelfilter.cxx
@@ -106,7 +106,7 @@ bool ExcelFilter::importDocument()
rtl::Reference<WorkbookFragment> xWorkbookFragment( new WorkbookFragment(*xBookGlob, aWorkbookPath));
ScDocument& rDoc = xWorkbookFragment->getScDocument();
- ScDocShell* pDocSh = static_cast<ScDocShell*>(rDoc.GetDocumentShell());
+ ScDocShell* pDocSh = rDoc.GetDocumentShell();
assert( pDocSh );
pDocSh->SetInitialLinkUpdate( pDocSh->GetMedium());
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index b8a52b09db2c..eaeca2d09912 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -487,7 +487,7 @@ Reference< XDatabaseRange > WorkbookGlobals::createUnnamedDatabaseRangeObject( c
aDestRange.aStart.Col(), aDestRange.aStart.Row(),
aDestRange.aEnd.Col(), aDestRange.aEnd.Row() ));
rDoc.SetAnonymousDBData( aDestRange.aStart.Tab() , std::move(pNewDBData) );
- ScDocShell* pDocSh = static_cast< ScDocShell* >(rDoc.GetDocumentShell());
+ ScDocShell* pDocSh = rDoc.GetDocumentShell();
xDatabaseRange.set(new ScDatabaseRangeObj(pDocSh, aDestRange.aStart.Tab()));
}
catch( Exception& )