incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Büsse (JIRA) <>
Subject [jira] [Commented] (ODFTOOLKIT-362) TextSelection.replaceWith() ends in an infinite loop
Date Tue, 30 Jul 2013 06:47:49 GMT


Jörg Büsse commented on ODFTOOLKIT-362:

replace(String) in 0.6.1-incubating-rc3 works fine and the loop is gone
Also the formatting is maintained, with some minor flaws. I've made a new test template and
replaced my patterns. I formated <<ONE>> using a bold font.


It seems that the </text:span> element from the text "a" move behind the text pattern
"<<ONE>>". The replacement was done with the same code as initially provided in
the only the template was modified and the text pattern "<<ONE>>"
was formated "bold"

old: <text:p text:style-name="P3"><text:span text:style-name="T5">a</text:span><text:span
text:style-name="T1"><<ONE>></text:span>            <text:span text:style-name="T5">b</text:span></text:p>
new: <text:p text:style-name="P3"><text:span text:style-name="T5">a          
 <text:span                     ><<<1>>></text:span></text:span><text:span
old: <text:p text:style-name="P3"><text:span text:style-name="T5">c</text:span>
          <<TWO>>                        <text:span text:style-name="T5">d</text:span></text:p>
new: <text:p text:style-name="P3"><text:span text:style-name="T5">c          

> TextSelection.replaceWith() ends in an infinite loop
> ----------------------------------------------------
>                 Key: ODFTOOLKIT-362
>                 URL:
>             Project: ODF Toolkit
>          Issue Type: Bug
>          Components: simple api
>    Affects Versions: odfdom-0.8.7
>            Reporter: Jörg Büsse
>             Fix For: 0.6.1-incubating
>         Attachments:, testTemplate.odt
> Replacing text parts of a table cell can end in an infinite loop. We created a simple
class to reproduce/demonstrate the issue.
> Used libraries:
> odfdom-java-0.8.7.jar
> simple-odf-0.6.6.jar
> Also tried the libraries from odftoolkit-0.5-incubating-bin.tar.gz:
> odfdom-java-0.8.8-incubating.jar
> simple-odf-0.7-incubating.jar

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message