To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=76449





------- Additional comments from [EMAIL PROTECTED] Tue Apr 17 22:08:52 +0000 
2007 -------
It has been this way since version 1.0. What you do not see is that the "empty"
selection is really the empty cursor selection. Although you may argue that this
is a bug, it is possible that existing code relies on the empty selection as the
cursor position. Consider the following, which provides a little text around the
"empty" selection.

Sub Testselect
 Dim oDoc As Object
 Dim oSelection As Object
 Dim i As Integer
 Dim s As String
 Dim oText
 Dim oSel
 Dim oCurs

 oDoc = ThisComponent
 oSelection = ThisComponent.CurrentSelection
 s = ""
 If oSelection.hasElements() Then
   For i = 0 To oSelection.getCount() - 1
     If i > 0 Then s = s & chr( 13 )
     oSel = oSelection.getByIndex( i )
     s = s & Format( i, "00" ) & (": ") & oSel.getString()
     oText = oSel.getText()
     If oText.compareRegionStarts(oSel.getStart(), oSel.getEnd()) = 0 Then
       oCurs = oText.createTextCursorByRange(oSel)
       oCurs.goLeft(2, False)
       oCurs.goRight(4, True)
       s = s & "<EMPTY> : " & oCurs.getString()
     End If
   Next i
   MsgBox( s )
 Else
   REM You will probably NEVER get here
   MsgBox( "no selection" )
 End If
End Sub

In Summary, yes, the behavior is exactly as you state (you should have read my
book or my free macro guide, which discusses this), but, is it a bug? I would
say no, but I am not in the position to say so.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to