Issue 66141 - gotoEndofWord, isEndofWord misbehavior with footnote anchor
Summary: gotoEndofWord, isEndofWord misbehavior with footnote anchor
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: thomas.lange
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-06 00:51 UTC by untel
Modified: 2017-05-20 09:32 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description untel 2006-06-06 00:51:02 UTC
In a Write document, if a word is followed by a footnote anchor, the method
gotoEndofWord() returns FALSE. Related to this, if the cursor is placed at the
end of that word, the method isEndofWord() also returns FALSE.

To reproduce this, create a Write document with some words. At the end of one
word, insert a footnote. Then place your cursor within that word.

Use the following macro:

Sub Main
  oDoc = thiscomponent
  oVCursor = oDoc.getCurrentController().getViewCursor()
  oText = oVCursor.getText()
  mySelection = oText.createTextCursorByRange (oVCursor.getstart())
  msgbox "isEndOfWord= " + mySelection.isEndofword()
  msgbox "gotoEndofWord= " + mySelection.gotoEndOfWord(TRUE)
End Sub

Upon execution, the second message shows that gotoEndOfWord returns FALSE (using
gotoEndOfWord(FALSE) does the same).
If now you put the cursor at the end of that word, just before the footnote
anchor, executing the macro shows both methods return FALSE.
(Putting the cursor after the footnote anchor also gives isEndofWord=FALSE)

The same tests executed on words not followed by footnote anchors give the
expected appropriate behavior.

(If the footnote is within a word -- who would do that!? -- the method is
working; in fact, it works if a period, letter or number is inserted after the
footnote. But doesn't work if a comma or semi-colon is after the footnote. I had
these details in the hope it could help pinpoint the problem.)


There was a similar issue here by andrewb, but which involved smart quotes:
http://www.openoffice.org/issues/show_bug.cgi?id=12036
It was closed in March 2004.
Comment 1 untel 2006-06-06 00:56:18 UTC
[Unfortunately can't edit my previous post. Of course, use following in the sub:

Dim oDoc as Object, oText as Object, oVCursor As Object, mySelection As Object

]
Comment 2 jsc 2006-06-06 09:13:57 UTC
JSC -> TL: can you please check this, it's writer API
Comment 3 jsc 2006-06-06 11:47:04 UTC
change owner
Comment 4 untel 2006-12-14 14:03:24 UTC
Six months later, is this still unconfirmed? I'm the only one?
Comment 5 thomas.lange 2007-12-03 16:11:06 UTC
.
Comment 6 thomas.lange 2008-01-14 14:03:40 UTC
No more issues accepted for OOo 2.4 unless there are serious problems.