Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||TextCursor includes paragraph numbering with length "0" for numbering|
|Product:||App Dev||Reporter:||noelson <noelsond>|
|Component:||api||Assignee:||AOO issues mailing list <issues>|
|Status:||CONFIRMED ---||QA Contact:|
|Priority:||P3||CC:||issues, pet.ebe, rainerbielefeld_ooo_qa|
|Version:||3.3.0 or older (OOo)||Keywords:||needhelp, oooqa|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description noelson 2006-08-11 01:48:15 UTC
It seems that there's something wrong with text cursors at the begin of a numbered paragraph. Follow a few tests: 1) select the first word of a numbered paragraph and run this code: sub test1 oSel = thisComponent.getCurrentSelection() print oSel(0).getString() ' print numbers and word end sub 2) with the view_cursor after the 1st character of the 1st word in a numbered paragraph, run this code: sub test2 oSel = thisComponent.getCurrentSelection() txtCur = oSel(0).getText().createTextCursorByRange(oSel(0)) txtCur.goLeft(1,True) print txtCur.getString() ' print numbers AND char end sub 3) with the view_cursor before the numbering: sub test3 oSel = thisComponent.getCurrentSelection() txtCur = oSel(0).getText().createTextCursorByRange(oSel(0)) txtCur.goRight(1,True) print txtCur.getString() ' print numbering AND 1st char of 1st word end sub
Comment 1 jsc 2006-08-23 08:40:57 UTC
jsc -> tl: writer API issue
Comment 2 thomas.lange 2006-08-23 09:14:16 UTC
Comment 3 Rainer Bielefeld 2007-01-24 08:57:49 UTC
@noelson: Please contribute a sample document containing the macros! Please explain what behaviour you expected (and why aou did) and what unexpected observations you saw. Please contribute a more meaningful Summary!
Comment 4 noelson 2007-01-25 19:37:36 UTC
Created attachment 42469 [details] doc for testing purpose
Comment 5 Rainer Bielefeld 2007-01-26 08:30:18 UTC
I checked with "2.0.2 German version WIN XP: [680m5(Build9011)]" and can confirm all effects listed in document "issue_68511.odt". I can't decide whether that is a bug (indeed it might be unexpected that the numbering will be included) or a feature: _If you want to move the cursor position, it should not matter how long the numbering is (100 or 99 with 3 or 2 digits).
Comment 6 emlm 2007-03-19 15:21:57 UTC
You wrote : ".. I can't decide whether that is a bug .." For me, it's definitively a bug : I can't get properly the text content of a paragraph without the numbering sticked to the first word. With the Java API, all kind of access to a numbered paragraph I tried provide with this trouble : with a text range or a text cursor, enumeration paragraph by paragraph, sub-enumeration of the paragraph content, ... See discussion here : http://www.oooforum.org/forum/viewtopic.phtml?t=54466 The workaround I found is to add a space (or something else) before the paragraph text, get the text after this added space (properly provided without the numbering), and then remove the added space to restore the original text.
Comment 7 kpalagin 2007-04-21 07:10:32 UTC
as per desc6 I am confirming described behavior.
Comment 8 thomas.lange 2007-12-03 15:24:27 UTC
Comment 9 thomas.lange 2008-01-14 14:01:50 UTC
No more issues accepted for OOo 2.4 unless there are serious problems.