Kaydet (Commit) 551c915d authored tarafından David Tardon's avatar David Tardon

fdo#79883 the page view object contact must exist

Change-Id: I5c6bd3ea267f1ea84b46e46aa508a27d00903347
üst fc4f5d2f
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment