diff options
author | David Tardon <dtardon@redhat.com> | 2014-06-12 12:10:33 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-06-18 14:12:53 +0200 |
commit | c53500d3af2009f0954b662e76167198dbac7c49 (patch) | |
tree | c712ae1be3b81de2d9379bd2cff25bcf6a011165 /svx/source | |
parent | 0941f86f75cec4e78466cac0964ea1aab2c36266 (diff) |
fdo#79883 the page view object contact must exist
Change-Id: I5c6bd3ea267f1ea84b46e46aa508a27d00903347
(cherry picked from commit 551c915dcbf3e1d6bfd799c6e13e5700e2c3e535)
Reviewed-on: https://gerrit.libreoffice.org/9747
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-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 08f11004e96a..98b4243a53cb 100644 --- a/svx/source/sdr/contact/viewcontactofunocontrol.cxx +++ b/svx/source/sdr/contact/viewcontactofunocontrol.cxx @@ -106,10 +106,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 ); |