incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Florian Hopf (JIRA)" <>
Subject [jira] [Updated] (ODFTOOLKIT-362) TextSelection.replaceWith() ends in an infinite loop
Date Thu, 22 Aug 2013 21:41:51 GMT


Florian Hopf updated ODFTOOLKIT-362:

    Attachment: ODFTOOLKIT-362-test.patch

This took longer than expected but here is at least a test that reproduces the problem.

The problem is that in TextSelection the character count but not the node count is taken into
account when determining where to insert the text. The new text will be inserted after the
last non replaced character, which in this case is with the wrong formatting.

I am not sure if we can be correct for all cases but it should help if we just remember the
node where we deleted the text.
> 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:, ODFTOOLKIT-362-test.patch, 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