[Libreoffice-commits] core.git: 2 commits - compilerplugins/clang drawinglayer/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 29 09:14:34 UTC 2020
compilerplugins/clang/toolslong.cxx | 3 +--
drawinglayer/source/primitive2d/textlayoutdevice.cxx | 14 ++++++++++++++
2 files changed, 15 insertions(+), 2 deletions(-)
New commits:
commit e58592414da353aaef9432277d7155fc0c0f0213
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Oct 29 08:13:48 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Oct 29 10:14:03 2020 +0100
Clean up loplugin:toolslong ignorelist
...after c070fac05fef41f788b53fe2c1f60519688a40b1 "Teach loplugin:toolslong
about curl_easy_getinfo"
Change-Id: Ia0c09c8d35fb7d023e3794532c240d53ee248752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104990
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/compilerplugins/clang/toolslong.cxx b/compilerplugins/clang/toolslong.cxx
index 094087911e6a..32e94f8397e5 100644
--- a/compilerplugins/clang/toolslong.cxx
+++ b/compilerplugins/clang/toolslong.cxx
@@ -125,8 +125,7 @@ void ToolsLong::run()
StringRef fn(handler.getMainFileName());
// sberg says this is fine
- if (loplugin::isSamePathname(fn, SRCDIR "/extensions/source/update/check/download.cxx")
- || loplugin::isSamePathname(fn, SRCDIR "/pyuno/source/module/pyuno.cxx"))
+ if (loplugin::isSamePathname(fn, SRCDIR "/pyuno/source/module/pyuno.cxx"))
return;
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
commit f39e4b6b6f8aa8b4af22b6eb30a52e98cd5a6455
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Oct 28 14:21:20 2020 +0100
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Thu Oct 29 10:13:54 2020 +0100
Revert "tdf#127471 Remove font width scaling hack"
This reverts commit 8891a2fc2a4bf86add68691b7ac167a07a8add84.
Reason for revert: Causes regressions like tdf#136891
Change-Id: I940c447bec38231b666eeac4212f09e22117504e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104847
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 2820ebfbc03d..0730dc397707 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -427,6 +427,20 @@ namespace drawinglayer::primitive2d
aRetval.SetPitch(rFontAttribute.getMonospaced() ? PITCH_FIXED : PITCH_VARIABLE);
aRetval.SetLanguage(LanguageTag::convertToLanguageType( rLocale, false));
+#ifdef _WIN32
+ // for WIN32 systems, correct the FontWidth if FontScaling is used
+ if(bFontIsScaled && nHeight > 0)
+ {
+ const FontMetric aUnscaledFontMetric(Application::GetDefaultDevice()->GetFontMetric(aRetval));
+
+ if(aUnscaledFontMetric.GetAverageFontWidth() > 0)
+ {
+ const double fScaleFactor(static_cast<double>(nWidth) / static_cast<double>(nHeight));
+ const sal_uInt32 nScaledWidth(basegfx::fround(static_cast<double>(aUnscaledFontMetric.GetAverageFontWidth()) * fScaleFactor));
+ aRetval.SetAverageFontWidth(nScaledWidth);
+ }
+ }
+#endif
// handle FontRotation (if defined)
if(!basegfx::fTools::equalZero(fFontRotation))
{
More information about the Libreoffice-commits
mailing list