Issue 17167 - triple-click should select a sentence, not a line
Summary: triple-click should select a sentence, not a line
Status: CLOSED DUPLICATE of issue 20126
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1 RC
Hardware: All All
: P3 Trivial with 1 vote (vote)
Target Milestone: ---
Assignee: bettina.haberer
QA Contact: issues@sw
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2003-07-21 11:12 UTC by ingenstans
Modified: 2009-01-15 06:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ingenstans 2003-07-21 11:12:49 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.
Comment 1 h.ilter 2003-07-21 11:15:29 UTC
Reassigned to BH
Comment 2 ingenstans 2004-07-11 09:51:28 UTC
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
Comment 3 ingenstans 2004-09-20 10:05:06 UTC
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 ***
Comment 4 avagula 2004-09-20 10:10:40 UTC
It works in m54, triple-click selects the sentence and clicking four times
selects the paragraph.
Comment 5 lohmaier 2004-09-23 21:03:51 UTC
closing duplicate.