summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-02-06 18:14:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-02-07 10:19:32 +0000
commit00659bcdbbb167596e6fd18e283a54819dd6fe91 (patch)
tree65316f99002c5aa6851ee1770df557b789772f20 /sw/source
parent545ddfbaa98cfeaa35c95d7db7b16cd241cedc89 (diff)
improve readability of VirtualDevice constructor
(a) It is not obvious what DeviceFormat::DEFAULT means (b) There are two parameters (each with two states), but only really 2 possible overall states So (1) use more useful names (2) combine the two parameters into one enum Change-Id: Ic0595b39e032cc9e019b88326389d055b977da00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146589 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/DocumentDeviceManager.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx
index 251007bde7a6..b90474082c92 100644
--- a/sw/source/core/doc/DocumentDeviceManager.cxx
+++ b/sw/source/core/doc/DocumentDeviceManager.cxx
@@ -262,7 +262,7 @@ VirtualDevice& DocumentDeviceManager::CreateVirtualDevice_() const
#ifdef IOS
VclPtr<VirtualDevice> pNewVir = VclPtr<VirtualDevice>::Create(DeviceFormat::GRAYSCALE);
#else
- VclPtr<VirtualDevice> pNewVir = VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT);
+ VclPtr<VirtualDevice> pNewVir = VclPtr<VirtualDevice>::Create(DeviceFormat::WITHOUT_ALPHA);
#endif
pNewVir->SetReferenceDevice( VirtualDevice::RefDevMode::MSO1 );
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index abc6fb9bbc80..3ee457723a40 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3771,7 +3771,7 @@ void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_I
sal_Int64 nWindowHandle;
Parent >>= nWindowHandle;
aData.hWnd = reinterpret_cast<HWND>(nWindowHandle);
- ScopedVclPtrInstance<VirtualDevice> xDevice(aData, Size(1, 1), DeviceFormat::DEFAULT);
+ ScopedVclPtrInstance<VirtualDevice> xDevice(aData, Size(1, 1), DeviceFormat::WITHOUT_ALPHA);
paintTile(*xDevice, nOutputWidth, nOutputHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
#else
// TODO: support other platforms