summaryrefslogtreecommitdiff
path: root/vcl/win/gdi/salgdi2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/gdi/salgdi2.cxx')
-rw-r--r--vcl/win/gdi/salgdi2.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx
index a28a59116518..277fbc3b9f98 100644
--- a/vcl/win/gdi/salgdi2.cxx
+++ b/vcl/win/gdi/salgdi2.cxx
@@ -119,7 +119,7 @@ void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap)
sal_uInt8* pSource(pRead->mpBits);
sal_uInt8* pDestination(pWrite->mpBits);
tools::Long readRowChange = pRead->mnScanlineSize;
- if(pRead->mnFormat & ScanlineFormat::TopDown)
+ if (pRead->meDirection == ScanlineDirection::TopDown)
{
pSource += pRead->mnScanlineSize * (pRead->mnHeight - 1);
readRowChange = -readRowChange;
@@ -127,12 +127,14 @@ void convertToWinSalBitmap(SalBitmap& rSalBitmap, WinSalBitmap& rWinSalBitmap)
std::unique_ptr<ColorScanlineConverter> pConverter;
- if (RemoveScanline(pRead->mnFormat) == ScanlineFormat::N24BitTcRgb)
- pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N24BitTcRgb,
- 3, pRead->mnScanlineSize));
- else if (RemoveScanline(pRead->mnFormat) == ScanlineFormat::N32BitTcRgba)
- pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N32BitTcRgba,
- 4, pRead->mnScanlineSize));
+ if (pRead->meFormat == ScanlineFormat::N24BitTcRgb)
+ {
+ pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N24BitTcRgb, 3, pRead->mnScanlineSize));
+ }
+ else if (pRead->meFormat == ScanlineFormat::N32BitTcRgba)
+ {
+ pConverter.reset(new ColorScanlineConverter(ScanlineFormat::N32BitTcRgba, 4, pRead->mnScanlineSize));
+ }
if (pConverter)
{
for (tools::Long y = 0; y < pRead->mnHeight; y++)