summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 8083bfc814f5..6145fcf98b44 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -1171,15 +1171,12 @@ SdrPage* ScShapeChildren::GetDrawPage() const
{
SCTAB nTab( mpViewShell->GetLocationData().GetPrintTab() );
SdrPage* pDrawPage = NULL;
- if (mpViewShell)
+ ScDocument* pDoc = mpViewShell->GetDocument();
+ if (pDoc && pDoc->GetDrawLayer())
{
- ScDocument* pDoc = mpViewShell->GetDocument();
- if (pDoc && pDoc->GetDrawLayer())
- {
- ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
- pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
- }
+ ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
+ if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
+ pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(static_cast<sal_Int16>(nTab)));
}
return pDrawPage;
}