To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=91504





------- Additional comments from m...@openoffice.org Wed Oct 28 20:04:17 +0000 
2009 -------
hi majun51,

no matter about the delay, i was on vacation anyway :)

> ii)Yes, this function sorts whole paragraphs and according you suggestion that
> just expand the PaM seems work well.

good to hear!

> iii)OK, new members for storing the selection start/end index seems
> needless.(They are needless for sort function,they may be need just when user
> want to see their seletion range in UI after undo sort feature)

hmm... i am not sure what the selection after Undo should be:
it could be either the selection that was changed by the Undo operation, or the
selection that was originally done by the user.
For most actions, these two would be the same, but Sort seems to be an exception
here.

But unfortunately i have found another problem with your patch...
Actually it was already in your second patch, but i did not notice.
The problem is the Move operation that actually does the sort in SortText():
it reorders the nodes (obviously), but it does not modify the rPaM.
So the order of the nodes changes, but the rPaM is still registered at the same
nodes as before:
these are not necessarily the nodes at the start and end of the sorted range!
As a consequence, after the move the rPaM should not be used any more, like in
the SetValues(rPaM) in your patch.

Sorry for not noticing this earlier, in my tests i must have used already-sorted
text.
(did i already complain that the redlining code is too complicated?)

But it seems to me that when adding the INSERT redline, the pRedlPam should have
the right values...
Can you try moving the SetValues a couple lines down, and use pRedlPam; i hope
that fixes the problem.


---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to