summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2009-11-25 13:27:22 +0100
committerVladimir Glazunov <vg@openoffice.org>2009-11-25 13:27:22 +0100
commitb4528e495f967184f1eae0420a6e4f64ceefe976 (patch)
tree844374fb5cf133321746aa98b1f4866fdac2a566 /sw/source/core
parent970e293c4717738e7b374054f4879d2684e424dd (diff)
parente8ffdc47b1c5c96e6d1cb395d622db91d0b8a033 (diff)
CWS-TOOLING: integrate CWS controltextrenderingooo/DEV300_m66
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/doc.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index f731b853d2..252ab069c1 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -467,6 +467,9 @@ void SwDoc::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/
if ( bDeleteOld )
delete pPrt;
pPrt = pP;
+
+ if ( pDrawModel && !get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
+ pDrawModel->SetRefDevice( pPrt );
}
if ( bCallPrtDataChanged &&
@@ -495,6 +498,9 @@ void SwDoc::setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOl
if ( bDeleteOld )
delete pVirDev;
pVirDev = pVd;
+
+ if ( pDrawModel && get( IDocumentSettingAccess::USE_VIRTUAL_DEVICE ) )
+ pDrawModel->SetRefDevice( pVirDev );
}
}
@@ -530,6 +536,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
{
@@ -539,8 +548,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 );