summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/pagedlg/areasdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/pagedlg/areasdlg.cxx')
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 6b46dd41790b..de0196609adf 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -124,9 +124,9 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Win
get(pBtnCancel,"cancel");
ScTabViewShell* pScViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
- ScDocShell* pScDocSh = dynamic_cast<ScDocShell*>( SfxObjectShell::Current() );
-
- OSL_ENSURE( pScDocSh, "Current DocumentShell not found :-(" );
+ SfxObjectShell* pSfxObjSh = SfxObjectShell::Current();
+ assert(dynamic_cast<ScDocShell*>(pSfxObjSh) && "Current DocumentShell not found :-(");
+ ScDocShell* pScDocSh = static_cast<ScDocShell*>(pSfxObjSh);
pDoc = &pScDocSh->GetDocument();