Bin DestroyVirtualDevice(): Just use delete directly at call sites
Change-Id: I47c67d3d89ab22b07b3ec6fe7ea6e035d21e85b6
This commit is contained in:
@@ -228,11 +228,6 @@ SalVirtualDevice* SvpSalInstance::CreateVirtualDevice( SalGraphics* /* pGraphics
|
||||
return pNew;
|
||||
}
|
||||
|
||||
void SvpSalInstance::DestroyVirtualDevice( SalVirtualDevice* pDevice )
|
||||
{
|
||||
delete pDevice;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
SalTimer* SvpSalInstance::CreateSalTimer()
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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 );
|
||||
|
@@ -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 )
|
||||
|
@@ -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
|
||||
|
@@ -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 )
|
||||
{
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user