Issue 35553 - sentence cursor reverses in empty par
Summary: sentence cursor reverses in empty par
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-14 16:27 UTC by ingenstans
Modified: 2013-02-24 21:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document with macro to check the behaviour (6.81 KB, application/vnd.sun.xml.writer)
2004-10-20 17:10 UTC, stephan.wunderlich
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description ingenstans 2004-10-14 16:27:00 UTC
REGRESSION

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 
returns). 

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)
	xCursor.gotoStartOfSentence(false)
	xCursor.goRight(5,true)
	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.gotoPreviousSentence(false)
xCursor.gotoPreviousSentence(TRUE)
' xCursor.goRight(5,true)
msgbox xCursor.getString
end sub

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

"This
is

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.