diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-23 11:47:09 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-10-23 23:28:41 +0200 |
commit | 0378bfcea51ff0f379d0954aa6740f1829909dc3 (patch) | |
tree | 5d1695806fbf30fb0a71392dc8cf92c526dac574 /vcl | |
parent | 7a46940d0a8782ed40b7e8182d883b02eb69bc40 (diff) |
Constify VirtDevice::me(Alpha)?Format
Change-Id: I619c19837c3bb6124009787ba0fc53991b4c4d0b
Reviewed-on: https://gerrit.libreoffice.org/62256
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 38 |
1 files changed, 10 insertions, 28 deletions
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index 425b2d153a4e..284706c1a730 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -108,9 +108,9 @@ void VirtualDevice::ReleaseGraphics( bool bRelease ) } void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, - long nDX, long nDY, DeviceFormat eFormat, const SystemGraphicsData *pData ) + long nDX, long nDY, const SystemGraphicsData *pData ) { - SAL_INFO( "vcl.virdev", "ImplInitVirDev(" << nDX << "," << nDY << "," << static_cast<int>(eFormat) << ")" ); + SAL_INFO( "vcl.virdev", "ImplInitVirDev(" << nDX << "," << nDY << ")" ); meRefDevMode = RefDevMode::NONE; mbForceZeroExtleadBug = false; @@ -135,7 +135,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, (void)pOutDev->AcquireGraphics(); pGraphics = pOutDev->mpGraphics; if ( pGraphics ) - mpVirDev = pSVData->mpDefInst->CreateVirtualDevice(pGraphics, nDX, nDY, eFormat, pData); + mpVirDev = pSVData->mpDefInst->CreateVirtualDevice(pGraphics, nDX, nDY, meFormat, pData); else mpVirDev = nullptr; if ( !mpVirDev ) @@ -146,7 +146,6 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, css::uno::Reference< css::uno::XInterface >() ); } - meFormat = eFormat; switch (meFormat) { case DeviceFormat::BITMASK: @@ -159,7 +158,6 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, mnOutWidth = nDX; mnOutHeight = nDY; mbScreenComp = true; - meAlphaFormat = DeviceFormat::NONE; if (meFormat == DeviceFormat::BITMASK) SetAntialiasing( AntialiasingFlags::DisableText ); @@ -200,42 +198,26 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, pSVData->maGDIData.mpFirstVirDev = this; } -VirtualDevice::VirtualDevice(DeviceFormat eFormat) - : OutputDevice(OUTDEV_VIRDEV) -{ - SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" ); - - ImplInitVirDev(Application::GetDefaultDevice(), 0, 0, eFormat); -} - -VirtualDevice::VirtualDevice(const OutputDevice& rCompDev, DeviceFormat eFormat) - : OutputDevice(OUTDEV_VIRDEV) -{ - SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" ); - - ImplInitVirDev(&rCompDev, 0, 0, eFormat); -} - -VirtualDevice::VirtualDevice(const OutputDevice& rCompDev, DeviceFormat eFormat, DeviceFormat eAlphaFormat) +VirtualDevice::VirtualDevice(const OutputDevice* pCompDev, DeviceFormat eFormat, DeviceFormat eAlphaFormat) : OutputDevice(OUTDEV_VIRDEV) + , meFormat(eFormat) + , meAlphaFormat(eAlphaFormat) { SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << ", " << static_cast<int>(eAlphaFormat) << " )" ); - ImplInitVirDev(&rCompDev, 0, 0, eFormat); - - // Enable alpha channel - meAlphaFormat = eAlphaFormat; + ImplInitVirDev(pCompDev ? pCompDev : Application::GetDefaultDevice(), 0, 0); } VirtualDevice::VirtualDevice(const SystemGraphicsData *pData, const Size &rSize, DeviceFormat eFormat) : OutputDevice(OUTDEV_VIRDEV) + , meFormat(eFormat) + , meAlphaFormat(DeviceFormat::NONE) { SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" ); - ImplInitVirDev(Application::GetDefaultDevice(), rSize.Width(), rSize.Height(), - eFormat, pData); + ImplInitVirDev(Application::GetDefaultDevice(), rSize.Width(), rSize.Height(), pData); } VirtualDevice::~VirtualDevice() |