You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we search for Testing, the first match will be in the sub paragraph in the frame. The next match in the parent paragraph won't be found though, as the Navigation#getNextMatchElementInTree method automatically calls nextSibling on the parent (note that it'd also be true if Testing was in a single span).
Checking in the parent if it is a paragraph shouldn't be difficult by adding a simple condition, but the tricky part would probably be avoiding re-matching the sub-paragraphs.
The other problem (due to the same assumption) appears when refreshing the selections: Assuming we currently have a selection on parent and one one frame; if we replace frame by, for example, something, the Selection#refresh static method won't refresh the parent selection, as it only considers selections that are in the same element. If we then try to replace parent, we'll get an exception.
The solution would be to also check for selections in parent elements when refreshing (which should be pretty easy), but again, the tricky part is to know if we have to refresh the parent selection or not, depending on where the child selection is regarding to the parent one.
I made a basic PR #81, but it still needs some work on the tricky parts.
The text was updated successfully, but these errors were encountered:
Consider the following odt xml:
If we search for Testing, the first match will be in the sub paragraph in the frame. The next match in the parent paragraph won't be found though, as the Navigation#getNextMatchElementInTree method automatically calls nextSibling on the parent (note that it'd also be true if Testing was in a single span).
Checking in the parent if it is a paragraph shouldn't be difficult by adding a simple condition, but the tricky part would probably be avoiding re-matching the sub-paragraphs.
The other problem (due to the same assumption) appears when refreshing the selections: Assuming we currently have a selection on parent and one one frame; if we replace frame by, for example, something, the Selection#refresh static method won't refresh the parent selection, as it only considers selections that are in the same element. If we then try to replace parent, we'll get an exception.
The solution would be to also check for selections in parent elements when refreshing (which should be pretty easy), but again, the tricky part is to know if we have to refresh the parent selection or not, depending on where the child selection is regarding to the parent one.
I made a basic PR #81, but it still needs some work on the tricky parts.
The text was updated successfully, but these errors were encountered: