Bug 124552 - A Sentence selection UNO action not provided for assignment to keyboard use
Summary: A Sentence selection UNO action not provided for assignment to keyboard use
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks: UNO-Command-New Customise-Dialog
  Show dependency treegraph
 
Reported: 2019-04-04 16:47 UTC by V Stuart Foote
Modified: 2022-03-30 17:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description V Stuart Foote 2019-04-04 16:47:11 UTC
For use in the GUI, we do not provide a "Select Sentence" action although we provide a "Select Word" and "Select Paragraph".

Other UNO actions for selections are based on current line position, or paragraph position--select to end of line, to start of line. Select to end of paragraph, to start of paragraph. 

Currently the only means to select to "Sentence" runs is with a mouse button action--"triple click". Or to drag text cursor from start to end of sentence (error prone).

The missing, and lexicaly useful ICU lib based "Sentence" selection would complement the mouse controls supporting a keyboard shortcut/accelerator customization assignment.

Current mouse button actions are: double-click--select word; triple-click--select sentence; quadruple-click--select paragraph.  Strange in that Word and Paragraph selection exist and can be assigned to keyboard customizations, not so for making a Sentence selection.
Comment 1 Heiko Tietze 2019-04-06 05:54:48 UTC
Isn't shift+<ctrl>+cursor sufficient?
Comment 2 V Stuart Foote 2019-04-06 12:39:53 UTC
(In reply to Heiko Tietze from comment #1)
> Isn't shift+<ctrl>+cursor sufficient?

No, it selects from current position in _word_ to end of word, and then expands at word bounds. 

The only functional selection that directly uses _sentence_ boundaries is the L-MouseButton triple click (don't know if it is counting the ButtonDown or ButtonUp).
Comment 3 V Stuart Foote 2019-04-06 13:57:37 UTC
Looks like it is handled per module rather than globally. Here is the Writer handling of it:

https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?#3406

https://opengrok.libreoffice.org/xref/core/sw/source/uibase/wrtsh/select.cxx?#94

While the triple-click in Impress/Draw Text Box object will select to the Paragraph boundaries. The double-click for Word selection, and the <Ctrl><Shift>+<Cursor> selections do seem the same in a Draw Text Box object.
Comment 4 Heiko Tietze 2019-04-08 12:42:58 UTC
Patch is here https://gerrit.libreoffice.org/#/c/70411, review pending.

However, I wonder if we not better take uno::SelectText (Select Text) instead of adding another command. "Select Text" toggles the selection cursor in read-only text (and occupies a shortcut!).
Comment 5 Heiko Tietze 2019-04-08 13:15:57 UTC Comment hidden (no-value)
Comment 6 V Stuart Foote 2019-04-08 13:31:32 UTC
Triple click is selects at the Sentence boundaries (not sure if it is ICU lib driven), while Quadruple click selects at the Paragraph boundaries.

The UNO commands already existed for WORD and for PARAGRAPH, what is missing (and not addressed in the patch thusfar) is keyboard selection to SENTENCE boundaries. 

Their selection now is only handled in the sw shell by capturing mouse clicks--see comment 3
Comment 7 V Stuart Foote 2019-04-08 14:35:46 UTC
Just saw patch set 2, implementing a "Select Sentence"--thanks...
Comment 8 Commit Notification 2019-05-03 16:24:23 UTC
heiko tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/180a0688127fc2d3ee337a0c6e38fb573231f3b3%5E%21

Resolves: tdf#124552 - Sentence selection UNO action

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.