summaryrefslogtreecommitdiff
path: root/svx/source/form/fmvwimp.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form/fmvwimp.cxx')
-rw-r--r--svx/source/form/fmvwimp.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 546540e7a0f6..b22c63318594 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -940,8 +940,10 @@ IMPL_LINK(FmXFormView, OnAutoFocus, void*, /*EMPTYTAG*/)
do
{
+ SdrPageView *pPageView = m_pView ? m_pView->GetSdrPageView() : NULL;
+ SdrPage *pSdrPage = pPageView ? pPageView->GetPage() : NULL;
// get the forms collection of the page we belong to
- FmFormPage* pPage = m_pView ? PTR_CAST( FmFormPage, m_pView->GetSdrPageView()->GetPage() ) : NULL;
+ FmFormPage* pPage = PTR_CAST( FmFormPage, pSdrPage );
Reference< XIndexAccess > xForms( pPage ? Reference< XIndexAccess >( pPage->GetForms(), UNO_QUERY ) : Reference< XIndexAccess >() );
const PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? NULL : m_aPageWindowAdapters[0];