summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-12 12:29:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-13 20:28:12 +0100
commitb8d3d4ad0f5bf4f449118214a91219b98ee506c3 (patch)
tree47bcf39252f1357b0e97a628be4f5b4611297f78 /svtools
parentc58cc416b604de0891fc8976bcf7cf099e2e8e00 (diff)
merge the various SetPointFont via DefaultDevice calls
Change-Id: I769bb95c588c7222ff0dc6c4b845dfc3f0d7cbc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112390 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 393c7439e2cb..7e39f8eab8c2 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -30,6 +30,7 @@
#include <vcl/settings.hxx>
#include <vcl/image.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/weldutils.hxx>
#include <rtl/math.hxx>
#include <sal/macros.h>
#include <sal/log.hxx>
@@ -772,8 +773,7 @@ OutputDevice& FontNameBox::CachePreview(size_t nIndex, Point* pTopLeft)
gFontPreviewVirDevs.emplace_back(m_xComboBox->create_render_virtual_device());
VirtualDevice& rDevice = *gFontPreviewVirDevs.back();
rDevice.SetOutputSizePixel(Size(gUserItemSz.Width(), gUserItemSz.Height() * gPreviewsPerDevice));
- if (vcl::Window* pDefaultDevice = dynamic_cast<vcl::Window*>(Application::GetDefaultDevice()))
- pDefaultDevice->SetPointFont(rDevice, m_xComboBox->get_font());
+ weld::SetPointFont(rDevice, m_xComboBox->get_font());
assert(gFontPreviewVirDevs.size() == nPage + 1);
}