diff options
author | Frank Schönheit <fs@openoffice.org> | 2009-10-27 13:52:51 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2009-10-27 13:52:51 +0000 |
commit | 968c12b498f78515b32caada57da8f4e8eb90060 (patch) | |
tree | 985418075d57b18d3ce3ab51c42c43be8fa978c5 | |
parent | 32c239bd6ac8e6b8d20650aa87e0ee041b86af2a (diff) |
#i105717# properly propagate the (changed) reference device to the drawing layer
-rw-r--r-- | sw/source/core/doc/doc.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 2edfbb8bf7ba..491d46bab345 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -465,8 +465,6 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ if ( bDeleteOld ) delete pPrt; pPrt = pP; - if( pDrawModel ) - pDrawModel->SetRefDevice( pP ); } if ( bCallPrtDataChanged && @@ -495,8 +493,6 @@ void SwDoc::setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOl if ( bDeleteOld ) delete pVirDev; pVirDev = pVd; - if( pDrawModel ) - pDrawModel->SetRefDevice( pVd ); } } @@ -532,6 +528,9 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH pMyVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE06 ); else pMyVirDev->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 ); + + if( pDrawModel ) + pDrawModel->SetRefDevice( pMyVirDev ); } else { @@ -541,8 +540,10 @@ void SwDoc::setReferenceDeviceType(/*[in]*/ bool bNewVirtual,/*[in]*/ bool bNewH // triggers this funny situation: // getReferenceDevice()->getPrinter()->CreatePrinter_() // ->setPrinter()-> PrtDataChanged() - getPrinter( true ); + SfxPrinter* pPrinter = getPrinter( true ); // <-- + if( pDrawModel ) + pDrawModel->SetRefDevice( pPrinter ); } set(IDocumentSettingAccess::USE_VIRTUAL_DEVICE, bNewVirtual ); |