summaryrefslogtreecommitdiff
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
commit4a72548a893b94c5915a4f603ec69606c9484395 (patch)
treef16064f588ac202e22e43a1ade3fe240b5fe306f
parent8e2fd900e4a6f9fb29d70585fc11c97160d0ca71 (diff)
parent8c63ca04733c18caf1403b37b95cdd0138c0a58f (diff)
CWS-TOOLING: integrate CWS controltextrendering
Notes
split repo tag: writer_ooo/DEV300_m66
-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 5fec1ae726c6..0c18b725d9f7 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 );