From 842c71a1fae1def3e8b694ae3b820b34ad26bce4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 7 Sep 2018 13:42:54 +0100 Subject: weld FontFeaturesDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I67ab7388593aceb00b660e4d40904a4eef247620 Reviewed-on: https://gerrit.libreoffice.org/60148 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svx/source/dialog/fntctrl.cxx | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 69d7b3a82450..93f168e85d75 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -1443,30 +1443,15 @@ Size SvxFontPrevWindow::GetOptimalSize() const return getPreviewStripSize(*this); } -void FontPrevWindow::ResetSettings() -{ - mbResetForeground = true; - mbResetBackground = true; - Invalidate(); -} - void FontPrevWindow::ApplySettings(vcl::RenderContext& rRenderContext) { const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - if (mbResetForeground) - { - svtools::ColorConfig aColorConfig; - Color aTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); - rRenderContext.SetTextColor(aTextColor); - mbResetForeground = false; - } + svtools::ColorConfig aColorConfig; + Color aTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor); + rRenderContext.SetTextColor(aTextColor); - if (mbResetBackground) - { - rRenderContext.SetBackground(rStyleSettings.GetWindowColor()); - mbResetBackground = false; - } + rRenderContext.SetBackground(rStyleSettings.GetWindowColor()); } void FontPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) @@ -1490,12 +1475,10 @@ void FontPrevWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea) initFont(pImpl->maCJKFont); initFont(pImpl->maCTLFont); - ResetSettings(); + Invalidate(); } FontPrevWindow::FontPrevWindow() - : mbResetForeground(true) - , mbResetBackground(true) { } @@ -1513,12 +1496,6 @@ SvxFont& FontPrevWindow::GetCJKFont() return pImpl->maCJKFont; } -void FontPrevWindow::StyleUpdated() -{ - ResetSettings(); - CustomWidgetController::StyleUpdated(); -} - SvxFont& FontPrevWindow::GetFont() { pImpl->Invalidate100PercentFontWidth(); // because the user might change the size @@ -1541,6 +1518,16 @@ void FontPrevWindow::SetFontNameAsPreviewText() pImpl->mbUseFontNameAsText = true; } +void FontPrevWindow::SetFont( const SvxFont& rNormalOutFont, const SvxFont& rCJKOutFont, const SvxFont& rCTLFont ) +{ + setFont(rNormalOutFont, pImpl->maFont); + setFont(rCJKOutFont, pImpl->maCJKFont); + setFont(rCTLFont, pImpl->maCTLFont); + + pImpl->Invalidate100PercentFontWidth(); + Invalidate(); +} + void FontPrevWindow::SetBackColor(const Color &rColor) { pImpl->mpBackColor.reset(new Color(rColor)); -- cgit ue='distro/collabora/cp-4.3'>distro/collabora/cp-4.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-03-02tdf#42949 Fix IWYU warnings in svx/source/s*/*cxxGabor Kelemen
Except for already done svx/source/sdr/ Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I1c4b34cf42aa9faa2f7de36fe1602059460c6c1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89656 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-12Fix typosAndrea Gelmini
Change-Id: I42f7ec098cb03cdbd4aa54b86f1c0171b317f956 Reviewed-on: https://gerrit.libreoffice.org/77282 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-03tdf#42949 Fix IWYU warnings in include/svx/x*Gabor Kelemen
New IWYU and recent developments in f-u-i helped to identify some non self contained files, those were fixed too. Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I5b91a82d25601041b73444f602d033ef62484ba8 Reviewed-on: https://gerrit.libreoffice.org/74563 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-09-11loplugin:simplifyconstruct in svtools..svxNoel Grandin
Change-Id: Ia20fac7cec01ac658a903f8b001807b2e72dbf3e Reviewed-on: https://gerrit.libreoffice.org/60316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-05loplugin:useuniqueptr in MasterPageDescriptorNoel Grandin
Change-Id: I54d46aeec5f74ccf088ea33d03fd1d8a2009d43f Reviewed-on: https://gerrit.libreoffice.org/49211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-16Fix typosAndrea Gelmini
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-20TypedWhichId for XATTR* constantsNoel Grandin
Change-Id: Ie9d637d701b77a549de3b00956f9c74ee8bd08c1 Reviewed-on: https://gerrit.libreoffice.org/44830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12convert SdrLayerId to strong_intNoel Grandin
Also - rename SetOfByte to SdrLayerIDSet - add asserts in SdrLayerAdmin::GetUniqueLayerID so that we don't allocate overlapping SdrLayerID values - add a new constant SDRLAYERPOS_NOTFOUND to be returned from SdrLayerAdmin::GetLayerPos Change-Id: I3bb3489f9338e3d02c4040bcbd811744699941c8 Reviewed-on: https://gerrit.libreoffice.org/37467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-27loplugin:expandablemethods in svxNoel Grandin
Change-Id: I0d193ddf07cc0ddc89b6ce2df6eb71d44e49b631 Reviewed-on: https://gerrit.libreoffice.org/30295 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-01-13loplugin:unusedmethods unused return value in include/svxNoel Grandin
Change-Id: I9a5e937905fd71ecbbf9cb215ff6cc2b7defc6f3
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I71682f28c6a54d33da6b0c971f34d0a705ff04f5