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 --- sw/source/core/doc/DocumentDeviceManager.cxx | 4 ++-- sw/source/uibase/uno/unotxdoc.cxx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index 234a0e2f04b6..1b47d299138f 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -261,9 +261,9 @@ DocumentDeviceManager::~DocumentDeviceManager() VirtualDevice& DocumentDeviceManager::CreateVirtualDevice_() const { #ifdef IOS - VclPtr pNewVir = VclPtr::Create( 8 ); + VclPtr pNewVir = VclPtr::Create(DeviceFormat::GRAYSCALE); #else - VclPtr pNewVir = VclPtr::Create( 1 ); + VclPtr pNewVir = VclPtr::Create(DeviceFormat::BITMASK); #endif pNewVir->SetReferenceDevice( VirtualDevice::REFDEV_MODE_MSO1 ); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 4bede9964e10..738be4b47fa6 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3426,8 +3426,8 @@ void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_I sal_Int64 nWindowHandle; Parent >>= nWindowHandle; aData.hWnd = (HWND) nWindowHandle; - VirtualDevice aDevice(&aData, Size(1, 1), (sal_uInt16)32); - paintTile( aDevice, nOutputWidth, nOutputHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight ); + ScopedVclPtrInstance xDevice(&aData, Size(1, 1), DeviceFormat::FULLCOLOR); + paintTile(*xDevice, nOutputWidth, nOutputHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); #else // TODO: support other platforms (void)Parent; -- cgit