<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
    <br>
    We've been trying to fix this bug
    <a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/show_bug.cgi?id=33092">https://bugs.freedesktop.org/show_bug.cgi?id=33092</a><br>
    <br>
    However, we don't know whether the approach that we've tried is the
    right thing, so can you please review the following idea.<br>
    <br>
    Step to reproduced the bug:<br>
    <br>
    1.Use Thai locale, open a blank Writer document<br>
    2.Switch keyboard to Thai.<br>
    3.Type text “มิถุ” by press “,b5”.<br>
    4.The function autocomplete will display the full word "มิถุนายน"
    (June in Thai)<br>
    5. Press enter to accept the suggestion, and another enter for
    readability<br>
    6. Repeat the step 3-5 once<br>
    <br>
    Expect result:<br>
    There should be two lines of  “มิถุนายน”.<br>
    <br>
    Real result: <br>
    There are two lines of “มิถุนายน” but the first one has a
    doubled/overlapped cluster. See below.<br>
    <img src="cid:part1.05060200.05020007@osdev.co.th" alt=""><br>
    <br>
    It is strange that the second (and later) autocompletion of the same
    word doesn't trigger the same bug.<br>
    <br>
    Look at the content.xml<br>
    <blockquote>
      <pre class="bz_comment_text" id="comment_text_7"><tt>&lt;style:style style:name="T1" style:family="text"&gt;
   &lt;style:text-properties style:language-complex="th"
style:country-complex="TH"/&gt;
&lt;/style:style&gt;
....snip.....
&lt;text:p text:style-name="P1"&gt;มิถ&lt;text:span text:style-name="T1"&gt;ุนายน&lt;/text:span&gt;&lt;/text:p&gt;
&lt;text:p text:style-name="P1"&gt;&lt;text:span text:style-name="T1"&gt;มิถุนายน&lt;/text:span&gt;&lt;/text:p&gt;</tt>
</pre>
    </blockquote>
    There is an auto-style T1 which switch the locale to th. In the 2nd
    paragraph, the auto-style is placed around the autocompleted word.
    However, in the first line, the auto-style is placed just before the
    suggestion. Moreover, for the word มิถุนายน, the auto-style happen
    to be placed inside a cluster ถ+ ุ , which result in ugly display of
    the cluster. Because the display function still cannot handle this
    case well.<br>
    <br>
    We've tried removing the whole auto-style T1 from the ODT and
    everything is fine again. Then we couldn't find a reason why LO need
    to put the auto-style while autocomplete in the first place. Because
    the user is typing in a locale, then autocompletion of the same
    locale is fired. So the whole text must be in the same locale. Why
    put and auto-style to switch to the same locale?<br>
    <br>
    So we've try an experimental patch
    (<a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/attachment.cgi?id=45511">https://bugs.freedesktop.org/attachment.cgi?id=45511</a> ) that get rid
    of the auto-style when autocomplete altogether. We've tried it with
    no side-effect as of now. But I don't know whether actually the
    auto-style is needed for a reason we don't understand.<br>
    <br>
    Any idea?<br>
    <br>
    Thanks,<br>
    Samphan.<br>
    <div class="moz-signature">-- <br>
      _/|\_ <i>Samphan Raruenrom.</i>  Osdev - Open Source Development
      Co., Ltd.<br>
      <i>สัมพันธ์ ระรื่นรมย์.</i>  โอเอสเด็บ - บริษัท
      โอเพนซอร์สดิเวลอปเมนต์ จำกัด<br>
      tel: +66 2 269 9889  web: <a href="http://www.osdev.co.th/">osdev.co.th</a><br>
      twitter: <a href="http://twitter.com/osdev">@osdev</a>  facebook:
      <a href="http://www.facebook.com/osdev">facebook.com/osdev</a></div>
  </body>
</html>