Issue 35553

Summary: sentence cursor reverses in empty par
Product: App Dev Reporter: ingenstans
Component: apiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: issues
Version: 3.3.0 or older (OOo)   
Target Milestone: ---   
Hardware: All   
OS: Windows 2000   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
Document with macro to check the behaviour none

Description ingenstans 2004-10-14 16:27:00 UTC

jumping the cursor to the beginning of a sentence jumps to the end instead if 
the cursor is in a sentence which follows an emppty paragraph (two carriage 

Correspondingly, depeting to the beginning of such a sentence deletes instead 
from the cursor to the end.

Placing anything inside the empty paragraph, even a space, is a workaround.
Comment 1 stephan.wunderlich 2004-10-20 17:10:21 UTC
Created attachment 18572 [details]
Document with macro to check the behaviour
Comment 2 stephan.wunderlich 2004-10-20 17:12:59 UTC
The attached document is a text document, which contains the following text:
First sentence

begin and end

when I now place the cursor somewhere in the second sentence and run the macro

	viewCursor = ThisComponent.currentController.getViewCursor	
	xCursor = thiscomponent.text.createTextCursorByRange(viewCursor.start)
	msgbox xCursor.String

the word "begin" is returned as expected ... I used a m_57 ... am I missing
something ?
Comment 3 ingenstans 2004-10-20 17:37:24 UTC
That's strange. I can definitely reproduce it in m56. 

Running this macro:

Sub bugtest
dim viewcursor
dim xcursor
viewCursor = ThisComponent.currentController.getViewCursor
xCursor = thiscomponent.text.createTextCursorByRange(viewCursor.start)
' xCursor.goRight(5,true)
msgbox xCursor.getString
end sub

with the cursor in the middle of "test" in a document that says


a test

and so is this."

gives me a message of "st" and not "is a"

could you check that in m57, since you've got it. 
Comment 4 stephan.wunderlich 2004-10-21 08:49:58 UTC
SW->TL: ok the problem isn't "gotoStartOfSentence" which works fine, but
"gotoPreviousSentence" ... the macro provided by andrewb shows indeed the
described behaviour
Comment 5 andreas.martens 2004-12-03 10:56:06 UTC
Set to target OOoLater due to lack of resources.