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

Khaled Hosny khaledhosny at eglug.org
Thu Nov 10 17:48:56 UTC 2016


 vcl/source/gdi/CommonSalLayout.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit ba2137d5117f3cd63d781dd545726cefddbcb1ff
Author: Khaled Hosny <khaledhosny at eglug.org>
Date:   Thu Nov 10 19:48:08 2016 +0200

    Reduce scope
    
    Change-Id: I12f9f5edc4929264627ba949ebf95abd369778c6

diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx
index ac67aa7..ae5e442 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -508,9 +508,6 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
                         continue;
                 }
 
-                sal_Int32 indexUtf16 = nCharPos;
-                sal_UCS4 aChar = rArgs.mrStr.iterateCodePoints(&indexUtf16, 0);
-
                 bool bInCluster = false;
                 if (i > 0 && pHbGlyphInfos[i].cluster == pHbGlyphInfos[i - 1].cluster)
                     bInCluster = true;
@@ -532,10 +529,11 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
                 else
                 {
 #if HB_VERSION_ATLEAST(0, 9, 42)
+                    sal_Int32 indexUtf16 = nCharPos;
+                    sal_UCS4 aChar = rArgs.mrStr.iterateCodePoints(&indexUtf16, 0);
                     if (u_getIntPropertyValue(aChar, UCHAR_GENERAL_CATEGORY) == U_NON_SPACING_MARK)
                         bDiacritic = true;
 #else
-                    (void) aChar;
                     // the font lacks GDEF table
                     if (pHbPositions[i].x_advance == 0)
                         bDiacritic = true;


More information about the Libreoffice-commits mailing list