vcl/source/glyphs/graphite_layout.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit f2df80410b34faa88740f2c0c2b021c74a19d5ca
Author: Martin Hosken <martin_hos...@sil.org>
Date:   Thu Feb 11 14:05:55 2016 +0700

    Fix graphite line final diacritics
    
    Change-Id: If5175fd489e835dbf9d37a45fd266c6ce44eae1a
    Reviewed-on: https://gerrit.libreoffice.org/22280
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Martin Hosken <martin_hos...@sil.org>

diff --git a/vcl/source/glyphs/graphite_layout.cxx 
b/vcl/source/glyphs/graphite_layout.cxx
index 2405967..2038a24 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -676,12 +676,16 @@ unsigned int GraphiteLayout::ScanFwdForChar(int 
&findChar, bool fallback) const
             for (++findChar; findChar - mnMinCharPos < 
int(mvChar2Glyph.size()); ++findChar)
                 if ((res = mvChar2Glyph[findChar - mnMinCharPos]) != -1)
                     return res;
+            --findChar;
+            return mvGlyphs.size() - 1;
         }
         else
         {
             for (--findChar; findChar >= mnMinCharPos; --findChar)
                 if ((res = mvChar2Glyph[findChar - mnMinCharPos]) != -1)
                     return res;
+            ++findChar;
+            return 0;
         }
         fallback = !fallback;
     }
@@ -693,8 +697,8 @@ void GraphiteLayout::ApplyDXArray(ImplLayoutArgs &args, 
std::vector<int> & rDelt
     bool bRtl(mnLayoutFlags & SalLayoutFlags::BiDiRtl);
     int startChar = args.mnMinCharPos < mnMinCharPos ? mnMinCharPos : 
args.mnMinCharPos;
     int endChar = args.mnEndCharPos >= mnEndCharPos ? mnEndCharPos - 1 : 
args.mnEndCharPos;
-    unsigned int startGi = ScanFwdForChar(startChar, !bRtl);
-    unsigned int endGi = ScanFwdForChar(endChar, bRtl);
+    unsigned int startGi = ScanFwdForChar(startChar, bRtl);
+    unsigned int endGi = ScanFwdForChar(endChar, !bRtl);
     int nChars = endChar - startChar + 1;
     if (nChars <= 0) return;
     if (startGi > endGi)
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to