summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/dialogs/linkdlg.cxx5
2 files changed, 4 insertions, 5 deletions
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 76c6bdd000a7..9ec24c5cb72e 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -30,6 +30,7 @@
#include <i18nlangtag/languagetag.hxx>
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/weldutils.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/linguprops.hxx>
#include <com/sun/star/lang/NoSupportException.hpp>
@@ -216,8 +217,7 @@ namespace svx
, m_xControl(std::move(xControl))
{
// expand the point size of the desired font to the equivalent pixel size
- if (vcl::Window* pDefaultDevice = dynamic_cast<vcl::Window*>(Application::GetDefaultDevice()))
- pDefaultDevice->SetPointFont(*m_xVirDev, m_xControl->get_font());
+ weld::SetPointFont(*m_xVirDev, m_xControl->get_font());
}
void RubyRadioButton::init( const OUString& rPrimaryText, const OUString& rSecondaryText, const PseudoRubyText::RubyPosition& rPosition )
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 764d29e0c191..cc26e551b994 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -26,7 +26,7 @@
#include <vcl/idle.hxx>
#include <vcl/timer.hxx>
#include <vcl/weld.hxx>
-#include <vcl/window.hxx>
+#include <vcl/weldutils.hxx>
#include <strings.hrc>
#include <sfx2/linkmgr.hxx>
@@ -95,8 +95,7 @@ SvBaseLinksDlg::SvBaseLinksDlg(weld::Window * pParent, LinkManager* pMgr, bool b
, m_xVirDev(VclPtr<VirtualDevice>::Create())
{
// expand the point size of the desired font to the equivalent pixel size
- if (vcl::Window* pDefaultDevice = dynamic_cast<vcl::Window*>(Application::GetDefaultDevice()))
- pDefaultDevice->SetPointFont(*m_xVirDev, m_xTbLinks->get_font());
+ weld::SetPointFont(*m_xVirDev, m_xTbLinks->get_font());
m_xTbLinks->set_size_request(m_xTbLinks->get_approximate_digit_width() * 90,
m_xTbLinks->get_height_rows(12));