[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - vcl/source

László Németh laszlo.nemeth at collabora.com
Mon Mar 16 03:42:42 PDT 2015


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

New commits:
commit 3313aee8436ea248c8292314aa51f124aaed49fe
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Mon Mar 16 00:18:51 2015 +0100

    fdo#52540, fdo#88051: fix Graphite layout
    
    The previous fixes were incomplete solutions (see the new test
    cases of the bug reports).
    
    Change-Id: I928f09d94edf68d268de9046c16582e6f016d561

diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 50e2a2d..eeda997 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -599,9 +599,12 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
         static com::sun::star::uno::Reference< com::sun::star::i18n::XCharacterClassification > xCharClass;
         if ( !xCharClass.is() )
             xCharClass = vcl::unohelper::CreateCharacterClassification();
-        size_t numchars2 = rArgs.mnEndCharPos - mnSegCharOffset; // fdo#52540, fdo#68313, fdo#70666 avoid bad ligature replacement
-        if (numchars > numchars2 && (rArgs.mpStr[numchars2] == '\t' || xCharClass->getType(rArgs.mpStr, numchars2 + 1) == ::com::sun::star::i18n::UnicodeType::LOWERCASE_LETTER))
+        size_t numchars2 = rArgs.mnEndCharPos - mnSegCharOffset; // fdo#52540, fdo#68313, fdo#70666 avoid bad ligature replacement, fdo#88051 layout problem
+        if (numchars > numchars2 && (rArgs.mpStr[mnSegCharOffset + numchars2] == '\t' ||
+            xCharClass->getType(rArgs.mpStr + mnSegCharOffset, numchars2 + 1) == ::com::sun::star::i18n::UnicodeType::LOWERCASE_LETTER))
+        {
             numchars = numchars2;
+        }
         if (mpFeatures)
             pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16,
                                         rArgs.mpStr + mnSegCharOffset, numchars, bRtl);


More information about the Libreoffice-commits mailing list