[Libreoffice-commits] core.git: svx/source
David Tardon
dtardon at redhat.com
Thu Jun 12 03:13:18 PDT 2014
svx/source/sdr/contact/viewcontactofunocontrol.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 551c915dcbf3e1d6bfd799c6e13e5700e2c3e535
Author: David Tardon <dtardon at redhat.com>
Date: Thu Jun 12 12:10:33 2014 +0200
fdo#79883 the page view object contact must exist
Change-Id: I5c6bd3ea267f1ea84b46e46aa508a27d00903347
diff --git a/svx/source/sdr/contact/viewcontactofunocontrol.cxx b/svx/source/sdr/contact/viewcontactofunocontrol.cxx
index edc551b..617b053 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 );
More information about the Libreoffice-commits
mailing list