From c43a3a58677b467274ce6c21d7db1a6c0cc65cb4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 17 Nov 2015 13:03:23 +0000 Subject: establish that Virtual Devices either match Physical Device depth or ... are 1 or (rarely) 8 bit and lock that down. Change-Id: I3d946ebef34ffb71c5adea7aa420af50e9584e05 --- desktop/source/lib/init.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'desktop') diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 211371e49879..68eb01dd67ba 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -882,12 +882,12 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, SystemGraphicsData aData; aData.rCGContext = reinterpret_cast(pBuffer); // the Size argument is irrelevant, I hope - ScopedVclPtrInstance pDevice(&aData, Size(1, 1), (sal_uInt16)0); + ScopedVclPtrInstance pDevice(&aData, Size(1, 1), DeviceFormat::FULLCOLOR); pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); #elif defined(ANDROID) - ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)0) ; + ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), DeviceFormat::FULLCOLOR) ; boost::shared_array aBuffer(pBuffer, NoDelete< sal_uInt8 >()); @@ -900,7 +900,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis, pDoc->paintTile(*pDevice.get(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); #else - ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), (sal_uInt16)0) ; + ScopedVclPtrInstance< VirtualDevice > pDevice(nullptr, Size(1, 1), DeviceFormat::FULLCOLOR) ; // Set background to transparent by default. memset(pBuffer, 0, nCanvasWidth * nCanvasHeight * 4); -- cgit