summaryrefslogtreecommitdiff
path: root/cui/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 /cui/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 'cui/source')
-rw-r--r--cui/source/dialogs/FontFeaturesDialog.cxx2
-rw-r--r--cui/source/dialogs/screenshotannotationdlg.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/cui/source/dialogs/FontFeaturesDialog.cxx b/cui/source/dialogs/FontFeaturesDialog.cxx
index f4f53f8c8655..8bdbbc2bf6f4 100644
--- a/cui/source/dialogs/FontFeaturesDialog.cxx
+++ b/cui/source/dialogs/FontFeaturesDialog.cxx
@@ -55,7 +55,7 @@ static sal_Int32 makeEnumComboBox(weld::ComboBox& rNameBox,
void FontFeaturesDialog::initialize()
{
ScopedVclPtrInstance<VirtualDevice> aVDev(*Application::GetDefaultDevice(),
- DeviceFormat::DEFAULT, DeviceFormat::DEFAULT);
+ DeviceFormat::WITH_ALPHA);
std::vector<vcl::font::Feature> rFontFeatures = getFontFeatureList(m_sFontName, *aVDev);
std::unordered_set<sal_uInt32> aDoneFeatures;
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index 6994ce1ed7e8..c23146f91fbd 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -232,7 +232,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
maDimmedDialogBitmap.Adjust(-15, 0, 0, 0, 0);
// init paint buffering VirtualDevice
- mxVirtualBufferDevice = VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT);
+ mxVirtualBufferDevice = VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), DeviceFormat::WITHOUT_ALPHA);
mxVirtualBufferDevice->SetOutputSizePixel(maParentDialogSize);
mxVirtualBufferDevice->SetFillColor(COL_TRANSPARENT);
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 194dfd65f830..7f418a762047 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -224,7 +224,7 @@ SvxCharNamePage::SvxCharNamePage(weld::Container* pPage, weld::DialogController*
, m_xCTLFontFeaturesButton(m_xBuilder->weld_button("btnCTLFeatures"))
, m_xCTLFontTypeFT(m_xBuilder->weld_label("lbCTLFontinfo"))
- , m_xVDev(*Application::GetDefaultDevice(), DeviceFormat::DEFAULT, DeviceFormat::DEFAULT)
+ , m_xVDev(*Application::GetDefaultDevice(), DeviceFormat::WITH_ALPHA)
{
m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin));
#ifdef IOS