Apache OpenOffice (AOO) Bugzilla – Issue 17167
triple-click should select a sentence, not a line
Last modified: 2009-01-15 06:18:28 UTC
at present, triple-click selects a line of text in OOo writer. This is silly, because a line is an arbitrary unit in word-processed text, with no syntactic meaning. I know it's different when you're writing code. In most languages a line is a distinct unit of meaning. But that's not true in natural language. Triple-click should either select a sentence or a paragraph. I would suggest a sentence.
Reassigned to BH
Can be worked around with a macro. I'm putting it here for the benefit of people looking in IZ who would otherwise report a duplicate bug. REM ***** BASIC ***** Sub Main ' makes mouse clicking useful ' with thanks to Andrew P for all the hard bits. ' acb 11/7/04 ' put the register routine into a document (or template)'s onload event ' and the unregister into the close event End Sub Option Explicit Global oDocView As Object Global oMouseClickHandler As Object Sub RegisterMouseClickHandler oDocView = ThisComponent.currentController oMouseClickHandler = _ createUnoListener("MyApp_", "com.sun.star.awt.XMouseClickHandler") oDocView.addMouseClickHandler(oMouseClickHandler) End Sub Sub UnregisterMouseClickHandler on error resume next oDocView.removeMouseClickHandler(oMouseClickHandler) on error goto 0 End Sub Sub MyApp_disposing(oEvt) End Sub Function MyApp_mousePressed(oEvt) As Boolean MyApp_mousePressed = False End Function Function MyApp_mouseReleased(oEvt) As Boolean dim oVC, oTC, oText,oDoc,oSel oDoc=Thiscomponent oText=oDoc.Text oVC=ThisComponent.CurrentController.getViewCursor() oTC=oText.createTextCursorByRange(oVC.getStart()) With oEvt if .Modifiers=2 and .Buttons=1 then ' Ctrol left click ' msgbox("select this sentence") oTC.gotoStartofSentence(FALSE) oTC.gotoEndofSentence(TRUE) oVC.gotoRange(oTC,TRUE) elseif .ClickCount=3 then ' triple click ' msgbox("select this par") oTC.gotoStartofParagraph(FALSE) oTC.gotoEndofParagraph(TRUE) oVC.gotoRange(oTC,TRUE) end if end With MyApp_mouseReleased = False End Function
fixed by #20126, I think, though I will check that this really works in m_54 *** This issue has been marked as a duplicate of 20126 ***
It works in m54, triple-click selects the sentence and clicking four times selects the paragraph.
closing duplicate.