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

    <meta http-equiv="content-type" content="text/html; charset=TIS-620">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    I'm going to work on this bug. Anyone have any idea about the
    problematic auto-style T1 in the bug report?<br>
    <br>
    Bug 33092 &#8211; Autocomplete display double character for this word [CTL
    / Thai]<br>
    <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>
    <blockquote type="cite">
      <pre class="bz_comment_text" id="comment_text_0">Step to reproduced:

1.Open a blank Writer document.
2.Switch keyboard to Thai.
3.Type text &#8220;มิถุ&#8221; by press &#8220;,b5&#8221;.
4.The function autocomplete will display the full word.

Expect result:
This function should display the text as &#8220;มิถุนายน&#8221;.

Real result:
It displays the text with the second character doubled and overlapped.
(See the pictures)
<img alt="bugdoc" src="cid:part1.00080301.02030700@osdev.co.th">

This problem occurs when some text is splitted into 2 runs. if a non-spacing
vowel mark (e.g. ุ) is placed at the first character of the second run, the
text
will be displayed overlap. But the problem will occur in the first (regarding
position in the document) autocompleted word in a document. I've pasted 2
snipplets of content.xml to show examples:-

A: Western autocomplete case:
&lt;text:p text:style-name="Standard"&gt;January&lt;/text:p&gt;&lt;text:p
text:style-name="Standard"&gt;february&lt;/text:p&gt;

B1: Thai autocomplete case with overlapped text:
&lt;text:p text:style-name="Standard"&gt;มิถ&lt;text:span text:style-name="T1"&gt;
ุนายน&lt;/text:span&gt;&lt;/text:p&gt;&lt;text:p text:style-name="Standard"&gt;&lt;text:span
text:style-name="T1"&gt;มิถุนายน&lt;/text:span&gt;&lt;/text:p&gt;

B2: Thai autocomplete case without problem:
&lt;text:p text:style-name="Standard"&gt;กรก&lt;text:span text:style-name="T1"&gt;
ฎาคม&lt;/text:span&gt;&lt;/text:p&gt;&lt;text:p text:style-name="Standard"&gt;&lt;text:span
text:style-name="T1"&gt;สิงหาคม&lt;/text:span&gt;&lt;/text:p&gt;

You will see that, in case B1 and B2, the first autocompleted word (e.g.
"มิถุนายน") is splitted before the vowel mark (ุ). But in the second
autocompleted
word (e.g. "มิถุนายน"), the entire autocompleted word is placed in the
text:span
element. OOo seems not to be able to display non-spacing mark at the begining
of
a text run so that's why the text is displayed overlapped.

Note that the splitted autocompleted word always happend if you insert the word
before any other autocompleted word. That is, it happend only for the first
occurance of such autocompleted words.</pre>
    </blockquote>
    <br>
    <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>