diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index aaf1592a3136..2ce2a01c0b70 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -228,11 +228,6 @@ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics return pNew; } -void SvpSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) -{ - delete pDevice; -} - #endif SalTimer* SvpSalInstance::CreateSalTimer() diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx index 4a7b7b2bc421..4090e35fd471 100644 --- a/vcl/inc/headless/svpinst.hxx +++ b/vcl/inc/headless/svpinst.hxx @@ -122,7 +122,6 @@ public: virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ); - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); // Printer // pSetupData->mpDriverData can be 0 diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 69261e4db077..6d9a8d662818 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -91,8 +91,6 @@ public: virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData ) SAL_OVERRIDE; - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) SAL_OVERRIDE; - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, ImplJobSetup* pSetupData ) SAL_OVERRIDE; virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ) SAL_OVERRIDE; diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 75b390a0897f..b7d199373475 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -86,7 +86,6 @@ public: CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) = 0; - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ) = 0; // Printer // pSetupData->mpDriverData can be 0 diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h index d91deaabba0b..77bcb335a6b6 100644 --- a/vcl/inc/unx/salinst.h +++ b/vcl/inc/unx/salinst.h @@ -55,7 +55,6 @@ public: virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ); - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); virtual void PostPrintersChanged(); virtual GenPspGraphics *CreatePrintGraphics(); diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h index 083920335cce..a6ccbb57f216 100644 --- a/vcl/inc/win/salinst.h +++ b/vcl/inc/win/salinst.h @@ -44,8 +44,6 @@ public: virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData ); - virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice ); - virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, ImplJobSetup* pSetupData ); virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter ); diff --git a/vcl/quartz/salvd.cxx b/vcl/quartz/salvd.cxx index b54f7ced1755..fb3e9a799449 100644 --- a/vcl/quartz/salvd.cxx +++ b/vcl/quartz/salvd.cxx @@ -55,15 +55,6 @@ SalVirtualDevice* AquaSalInstance::CreateVirtualDevice( SalGraphics* pGraphics, #endif } - - -void AquaSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) -{ - delete pDevice; -} - - - AquaSalVirtualDevice::AquaSalVirtualDevice( AquaSalGraphics* pGraphic, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData ) : mbGraphicsUsed( false ) , mxBitmapContext( NULL ) diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 8dcc804103ae..df30533616d1 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -254,8 +254,7 @@ VirtualDevice::~VirtualDevice() ImplReleaseGraphics(); - if ( mpVirDev ) - pSVData->mpDefInst->DestroyVirtualDevice( mpVirDev ); + delete mpVirDev; // remove this VirtualDevice from the double-linked global list if( mpPrev ) @@ -350,7 +349,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra pGraphics->CopyBits( aPosAry, mpGraphics, this, this ); pNewVirDev->ReleaseGraphics( pGraphics ); ImplReleaseGraphics(); - pSVData->mpDefInst->DestroyVirtualDevice( mpVirDev ); + delete mpVirDev; mpVirDev = pNewVirDev; mnOutWidth = rNewSize.Width(); mnOutHeight = rNewSize.Height(); @@ -359,7 +358,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra else { bRet = false; - pSVData->mpDefInst->DestroyVirtualDevice( pNewVirDev ); + delete pNewVirDev; } } else diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index e5044545ef1f..a858223c939b 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -78,11 +78,6 @@ SalVirtualDevice* X11SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, return pVDev; } -void X11SalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) -{ - delete pDevice; -} - void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, bool bDeleteColormap ) { diff --git a/vcl/win/source/gdi/salvd.cxx b/vcl/win/source/gdi/salvd.cxx index 2daa846f973d..f349cd943f37 100644 --- a/vcl/win/source/gdi/salvd.cxx +++ b/vcl/win/source/gdi/salvd.cxx @@ -151,15 +151,6 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, } } - - -void WinSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice ) -{ - delete pDevice; -} - - - WinSalVirtualDevice::WinSalVirtualDevice() { setHDC((HDC)NULL); // HDC or 0 for Cache Device