summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentDeviceManager.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-23 09:14:13 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:06:20 +0100
commit0e491a7a2affbb08071e6378dacc1995cb301655 (patch)
treec93205745e1fcd69ff508a3d04aa064bb90606ae /sw/source/core/doc/DocumentDeviceManager.cxx
parentc612c3b0aed9ad7f7f42b4313f821b71995ead15 (diff)
vclptr: add isDisposed method - and assert for it here & there.
Change-Id: I2b154e0ed9eee0a45900ada7f805a1d444a31bc0
Diffstat (limited to 'sw/source/core/doc/DocumentDeviceManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index 5d38a936b13a..a8ef613150aa 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -65,6 +65,7 @@ SfxPrinter* DocumentDeviceManager::getPrinter(/*[in]*/ bool bCreate ) const
void DocumentDeviceManager::setPrinter(/*[in]*/ SfxPrinter *pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged )
{
+ assert ( !pP->isDisposed() );
if ( pP != mpPrt )
{
if ( bDeleteOld )
@@ -100,11 +101,15 @@ VirtualDevice* DocumentDeviceManager::getVirtualDevice(/*[in]*/ bool bCreate ) c
else
pRet = &CreateVirtualDevice_();
+ assert ( !pRet->isDisposed() );
+
return pRet;
}
void DocumentDeviceManager::setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool )
{
+ assert ( !pVd->isDisposed() );
+
if ( mpVirDev.get() != pVd )
{
if ( bDeleteOld )
@@ -133,6 +138,8 @@ OutputDevice* DocumentDeviceManager::getReferenceDevice(/*[in]*/ bool bCreate )
pRet = getVirtualDevice( bCreate );
}
+ assert ( !pRet->isDisposed() );
+
return pRet;
}