incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Uhlmann (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ODFTOOLKIT-371) Replacing multiple TextSelections in table cell
Date Sun, 11 Aug 2013 16:48:47 GMT
Torsten Uhlmann created ODFTOOLKIT-371:
------------------------------------------

             Summary: Replacing multiple TextSelections in table cell
                 Key: ODFTOOLKIT-371
                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-371
             Project: ODF Toolkit
          Issue Type: Bug
          Components: simple api
    Affects Versions: 0.7-incubating
         Environment: Mac OSX 10.8.4, Java 7
            Reporter: Torsten Uhlmann


I'm using the simple api to substitute markers in text ("<%someLabel%>"). The markers
are TextSelections that I find with calling "nextSelection" on a TextNavigation element (created
from the whole document and a select pattern). Selecting the text works find, also replacing
the selecting with a value seems to work fine according to the "toString" output of a TextSelection.

The only place I encounter problems is when I try to replace TextSelections inside a table
cell.

To replicate:
- create ODT document, create a table
- in one table cell, create two markers ("<%...%>") separated by ENTER to create two
paragraphs
-> In the resulting document, the first marker is replaced, then the second marker is repeated
("the marker key, not the replaced value"), then the replacement value of the second marker
is shown. The ENTER seems to be located just before the second markers replacement value,
and after the display of the marker key.

So, my problem is that while the TextSelection is replaced with a new value, the old value
of the TextSelection (the marker key) is still printed- but only when inside a table cell
and only if the two TextSelections are separated by an ENTER.

Separating them with a Shift-ENTER shows an exception: org.odftoolkit.simple.common.navigation.InvalidNavigationException:
No matched string at this position...

Any help or workaround appreciated.

Thanks,
Torsten.

--
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: http://www.atlassian.com/software/jira

Mime
View raw message