Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | XTextCursor: bExpand doesn't work for go-Methods anymore | ||||||
---|---|---|---|---|---|---|---|
Product: | Writer | Reporter: | eberlein <pet.ebe> | ||||
Component: | code | Assignee: | AOO issues mailing list <issues> | ||||
Status: | ACCEPTED --- | QA Contact: | |||||
Severity: | Trivial | ||||||
Priority: | P3 | CC: | cno, issues, maison.godard, oliver.brinzing | ||||
Version: | OOo 3.2 | ||||||
Target Milestone: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
eberlein
2010-02-17 10:27:51 UTC
Created attachment 67873 [details]
file to reproduce
target and blocker set. meant goRight(1,true) like in the example of course. This did not even work in OOo 2.4 thus it is not qualified as a stopper for OOo 3.2.1. . I consider this a really heavy bug. It prevents our users (6,500 in Berlins tax administration) from updating to version 3. Is there really a rule that only regressions introduced with 3.2 must be fixed in 3.2.1? overlapped ->eberlein: It is unclear what the cursor should do in such cases. As there is a selection a goLeft/goRight can either move the left or the right selected position. The cursor implementation in the core has a fix point and a movable point. This cursor allows to determine which one is left/right. The API TextCursor needs an additional interface to make this also possible. Changed issue type to Enhancement. @os: Disagree. the idl says clear here: Parameter bExpand specifies if the current selection of the cursor should be expanded or not. If you have "abc" and the current range of the cursor is "b", then goRight(1,true) cannot mean an negative expansion (moveable point cannot be the left one resp this means a collapseToEnd()). That is one point. The other is: Why breaking existing code here? Of course you can introduce an additional interface to make it clear. But what has worked in OpenOffice 1 and 2 should work in OpenOffice 3 too. The XTextCursor Interface is a central point in swriter and should be touched carefully. ->eberlein: There was no change I just checked the code below in a 2.0: If the first paragraph contains "123456789" it prints: 56 6 456 If the two marked changes are done: 56 567 5 The two move commands at the beginning determine which position of the cursor moves and which one is fixed. Following the description of the Expand parameter it might make sense to always expand but it doesn't help much if you want to reduce the selection. That's why a new interface is necessary. Sub Main xtextcursor = thiscomponent.gettext.createtextcursor xtextcursor.goright( 6, false )'replace with 4 xtextcursor.goleft( 2, true )'replace with goright print xtextcursor.getstring xtextcursor.goright( 1, true ) print xtextcursor.getstring xtextcursor.goleft( 2, true ) print xtextcursor.getstring End Sub at least something must have changed since oo 1.1.5, cause eberlein's example has a different result if run with oo 1.1.5 ... added me to cc @os: Your example works in OpenOffice 1, 2, 3 identically. So I guess the changes are made in createTextCursorByRange() (see my example). Second: I propose to file a new issue for introducing a new Interface and to handle this one as a bug. Maybe the summary has to be corrected. > eberlein: There was no change I just checked the code below in a 2.0:
seems not to be true, XTextCursor will be expanded in
OO 2.3.1 Linux, OO 2.4.1 Win XP and OO 2.4.3 Win 2000 too
(same as in OO 1.1.5) ...
Reset assigne to the default "issues@openoffice.apache.org". |