[Libreoffice-commits] core.git: vcl/win

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 27 13:27:39 UTC 2020


 vcl/win/gdi/DWriteTextRenderer.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 092ec538045f443dce3e45ff73064eb46d0a4fc0
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Nov 27 11:10:56 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Nov 27 14:26:58 2020 +0100

    DWRITE_GLYPH_METRICS members are of INT32 and UINT32 types
    
    Change-Id: Ie09e0150bf73efd552e3a3b455ffc395d6b6370c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106754
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx
index 185925ae7967..abf9be7d5f86 100644
--- a/vcl/win/gdi/DWriteTextRenderer.cxx
+++ b/vcl/win/gdi/DWriteTextRenderer.cxx
@@ -349,10 +349,10 @@ std::vector<tools::Rectangle> D2DWriteTextOutRenderer::GetGlyphInkBoxes(uint16_t
     auto pOut = aOut.begin();
     for (auto &m : metrics)
     {
-        const long left  = m.leftSideBearing,
-                   top   = m.topSideBearing - m.verticalOriginY,
-                   right = m.advanceWidth - m.rightSideBearing,
-                   bottom = INT32(m.advanceHeight) - m.verticalOriginY - m.bottomSideBearing;
+        const auto left  = m.leftSideBearing;
+        const auto top   = m.topSideBearing - m.verticalOriginY;
+        const auto right = m.advanceWidth - m.rightSideBearing;
+        const auto bottom = INT32(m.advanceHeight) - m.verticalOriginY - m.bottomSideBearing;
 
         // Scale to screen space.
         pOut->SetLeft( std::floor(left * mlfEmHeight / aFontMetrics.designUnitsPerEm) );


More information about the Libreoffice-commits mailing list