[Libreoffice-commits] core.git: vcl/win
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jul 25 20:46:46 UTC 2018
vcl/win/gdi/DWriteTextRenderer.cxx | 4 ++--
vcl/win/gdi/winlayout.cxx | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 9779ba452b523d45805a3d2a18f68194005ef977
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Jul 25 19:03:51 2018 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Jul 25 22:46:18 2018 +0200
-Wc++11-narrowing (clang-cl)
...from 'int' to 'FLOAT' (aka 'float')
Change-Id: I999fc322d0ace0d32c675a22337077d7a95eed3c
Reviewed-on: https://gerrit.libreoffice.org/58006
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 27f24a9332d6..ffca720f3e6b 100644
--- a/vcl/win/gdi/DWriteTextRenderer.cxx
+++ b/vcl/win/gdi/DWriteTextRenderer.cxx
@@ -296,9 +296,9 @@ bool D2DWriteTextOutRenderer::performRender(GenericSalLayout const & rLayout, Sa
while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
{
UINT16 glyphIndices[] = { pGlyph->maGlyphId };
- FLOAT glyphAdvances[] = { pGlyph->mnNewWidth };
+ FLOAT glyphAdvances[] = { static_cast<FLOAT>(pGlyph->mnNewWidth) };
DWRITE_GLYPH_OFFSET glyphOffsets[] = { { 0.0f, 0.0f }, };
- D2D1_POINT_2F baseline = { aPos.X() - bounds.Left(), aPos.Y() - bounds.Top() };
+ D2D1_POINT_2F baseline = { static_cast<FLOAT>(aPos.X() - bounds.Left()), static_cast<FLOAT>(aPos.Y() - bounds.Top()) };
DWRITE_GLYPH_RUN glyphs = {
mpFontFace,
mlfEmHeight,
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index fa0c2b683387..1295d5bf1d4b 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -163,8 +163,8 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S
}
D2D1_POINT_2F baseline = {
- aElement.getExtraOffset(),
- aElement.getExtraOffset() + aElement.mnBaselineOffset
+ static_cast<FLOAT>(aElement.getExtraOffset()),
+ static_cast<FLOAT>(aElement.getExtraOffset() + aElement.mnBaselineOffset)
};
DWRITE_GLYPH_RUN glyphs = {
More information about the Libreoffice-commits
mailing list