diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-12 12:29:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-13 20:28:12 +0100 |
commit | b8d3d4ad0f5bf4f449118214a91219b98ee506c3 (patch) | |
tree | 47bcf39252f1357b0e97a628be4f5b4611297f78 /sw | |
parent | c58cc416b604de0891fc8976bcf7cf099e2e8e00 (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 'sw')
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/FrameControlsManager.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 2ef71463f870..762956faba57 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -36,6 +36,7 @@ #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> +#include <vcl/weldutils.hxx> #include <tools/diagnose_ex.h> #include <sfx2/passwd.hxx> @@ -378,8 +379,7 @@ void SwAddressPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Re Color aPaintColor(IsEnabled() ? rSettings.GetWindowTextColor() : rSettings.GetDisableColor()); rRenderContext.SetLineColor(aPaintColor); - if (vcl::Window* pDefaultDevice = dynamic_cast<vcl::Window*>(Application::GetDefaultDevice())) - pDefaultDevice->SetPointFont(rRenderContext, GetDrawingArea()->get_font()); + weld::SetPointFont(rRenderContext, GetDrawingArea()->get_font()); vcl::Font aFont(rRenderContext.GetFont()); aFont.SetColor(aPaintColor); rRenderContext.SetFont(aFont); diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx index c9503e2a06d6..aaf7aefd1302 100644 --- a/sw/source/uibase/docvw/FrameControlsManager.cxx +++ b/sw/source/uibase/docvw/FrameControlsManager.cxx @@ -23,6 +23,7 @@ #include <IDocumentOutlineNodes.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> +#include <vcl/weldutils.hxx> using namespace std; @@ -334,8 +335,7 @@ void SwFrameMenuButtonBase::SetVirDevFont() { // Get the font and configure it vcl::Font aFont = Application::GetSettings().GetStyleSettings().GetToolFont(); - if (vcl::Window* pDefaultDevice = dynamic_cast<vcl::Window*>(Application::GetDefaultDevice())) - pDefaultDevice->SetPointFont(*m_xVirDev, aFont); + weld::SetPointFont(*m_xVirDev, aFont); } SwFrameControl::SwFrameControl( const VclPtr<vcl::Window> &pWindow ) |