summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/tabcont.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/tabcont.cxx')
-rw-r--r--sc/source/ui/view/tabcont.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index e10a0a129728..a2f5d101a14d 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -488,7 +488,7 @@ static sal_uInt16 lcl_DocShellNr( ScDocument* pDoc )
SfxObjectShell* pShell = SfxObjectShell::GetFirst();
while ( pShell )
{
- if ( pShell->Type() == TYPE(ScDocShell) )
+ if ( dynamic_cast<const ScDocShell *>(pShell) != nullptr )
{
if ( &static_cast<ScDocShell*>(pShell)->GetDocument() == pDoc )
return nShellCnt;