Issue 25180 - goteendof Word() broken
Summary: goteendof Word() broken
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
Depends on:
Reported: 2004-02-06 17:26 UTC by ingenstans
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this issue.
Description ingenstans 2004-02-06 17:26:17 UTC
This is the mirror image bug to #12036, which has just been fixed. 

If the cursor is moved to the end of a word that is followed by punctuation, 
rather than a space, it gets stuck, and can't then be moved back to select to 
the beginning of the word.

Steps to reproduce.

type a word surrounded by double quotes, eg "deadbeat"

run this macro

Dim oDocument, oDesktop as Object
Dim oText, alpha, omega as Object
Dim oVCursor, mySelection As Object
Dim snot as string,changeme as string

        oDocument = thisComponent
        oText = oDocument.Text
        oVCursor = oDocument.currentcontroller.getViewCursor()
        If len(snot)>0 Then             ' there is a selection: use that
                mySelection = oText.createTextCursorByRange(alpha)
        else            ' the cursor is a point; grab the word it's in.
                mySelection = oText.createTextCursorByRange(oVCursor.getstart())
        end if
end Sub

The first time you do this, it works fine; but once the cursor has got to the 
end of the word, between the t and the smartquote, it gets stuck, and selects an
empty string.
Comment 1 ooo 2004-02-09 16:13:35 UTC
forwarding to responsible developer
Comment 2 ooo 2004-02-10 09:51:39 UTC
forwarding to responsible developer - next try
Comment 3 thomas.lange 2004-02-20 12:57:49 UTC
Comment 4 ingenstans 2004-03-23 17:19:12 UTC
just a note: #12036 has broken again in m_30. So in that version the presnce of 
any punctuation at either end of a word will trap the cursor.
Comment 5 ingenstans 2004-03-26 14:20:22 UTC
not that a comma has the same efect as a double quote.
Comment 6 thomas.lange 2004-06-21 12:47:36 UTC
Fixed in CWS tleamisc.

Files changed:
- swcrsr.hxx
- swcrsr.cxx
- unoobj.cxx

TL->QA: Please make a test case for this.

Comment 7 thomas.lange 2004-08-06 12:24:36 UTC
Comment 8 thomas.lange 2004-08-06 12:39:25 UTC
OK in CWS tleamisc.
Comment 9 stephan.wunderlich 2004-08-10 15:07:11 UTC
fixed in cws_tleamisc
Comment 10 stephan.wunderlich 2004-08-10 15:07:26 UTC
works as expected in cws_tleamisc => verified
Comment 11 stephan.wunderlich 2004-09-10 11:58:10 UTC
works in src680_m52 => closed