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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 19 09:49:18 UTC 2020


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

New commits:
commit a3f93ced82f8d4d122468cc4a1c4298141d67507
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 19 09:20:35 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Oct 19 11:48:41 2020 +0200

    Simplify single-wchar_t LPCWSTR argument to ExtTextOutW
    
    Change-Id: I5c66408297ab03da29494d00ce222b3ef1e0ef13
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104515
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 884b1be6e670..3438e3b79deb 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -266,7 +266,7 @@ bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
     const GlyphItem* pGlyph;
     while (rLayout.GetNextGlyph(&pGlyph, aPos, nStart))
     {
-        WORD glyphWStr[] = { pGlyph->glyphId() };
+        wchar_t glyphWStr = pGlyph->glyphId();
         if (hAltFont && pGlyph->IsVertical() == bUseAltFont)
         {
             bUseAltFont = !bUseAltFont;
@@ -275,7 +275,7 @@ bool ExTextOutRenderer::operator ()(GenericSalLayout const &rLayout,
         if (bShift && pGlyph->IsVertical())
             SetTextAlign(hDC, TA_TOP|TA_LEFT);
 
-        ExtTextOutW(hDC, aPos.X(), aPos.Y(), ETO_GLYPH_INDEX, nullptr, LPCWSTR(&glyphWStr), 1, nullptr);
+        ExtTextOutW(hDC, aPos.X(), aPos.Y(), ETO_GLYPH_INDEX, nullptr, &glyphWStr, 1, nullptr);
 
         if (bShift && pGlyph->IsVertical())
             SetTextAlign(hDC, nTextAlign);


More information about the Libreoffice-commits mailing list