diff options
author | David Tardon <dtardon@redhat.com> | 2014-06-12 12:10:33 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-06-12 12:12:30 +0200 |
commit | 551c915dcbf3e1d6bfd799c6e13e5700e2c3e535 (patch) | |
tree | bd3c1b3af9279219d59765beb90d0ef36e2411f0 | |
parent | fc4f5d2f8576097953b83d7fecfe5eb5184811b1 (diff) |
fdo#79883 the page view object contact must exist
Change-Id: I5c6bd3ea267f1ea84b46e46aa508a27d00903347
-rw-r--r-- | svx/source/sdr/contact/viewcontactofunocontrol.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx index edc551baaaff..617b05392eaa 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -101,10 +101,13 @@ namespace sdr { namespace contact { { // print or print preview requires special handling const OutputDevice* pDevice = _rObjectContact.TryToGetOutputDevice(); - bool bPrintOrPreview = ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER ); + ObjectContactOfPageView* const pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact ); - ObjectContactOfPageView* pPageViewContact = dynamic_cast< ObjectContactOfPageView* >( &_rObjectContact ); - bPrintOrPreview |= ( pPageViewContact != NULL ) && pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview(); + const bool bPrintOrPreview = pPageViewContact + && ( ( ( pDevice != NULL ) && ( pDevice->GetOutDevType() == OUTDEV_PRINTER ) ) + || pPageViewContact->GetPageWindow().GetPageView().GetView().IsPrintPreview() + ) + ; if ( bPrintOrPreview ) return *new UnoControlPrintOrPreviewContact( *pPageViewContact, *this ); |