Bug 125174 - Triple click selection (sentence) misses the last guillemet
Summary: Triple click selection (sentence) misses the last guillemet
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.2.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Selection
  Show dependency treegraph
 
Reported: 2019-05-08 14:53 UTC by Dominique Meeùs
Modified: 2023-11-08 10:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample Writer document (8.78 KB, application/vnd.oasis.opendocument.text)
2019-05-08 23:03 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Meeùs 2019-05-08 14:53:50 UTC
Description:
Triple click selects the sentence. Consider a sentence included in guillemets (French angle quotes), a closing guillemet after the full stop (and a non breaking space). Example : « This is a quotation, supposedly in French. » The selection ends at the non breaking space, dropping the guillemet.

Steps to Reproduce:
1. Write a sentence ending with full stop.
2. Enclose the sentence (with its full stop) in guillemets (with non breaking spaces between sentence and guillemets). (This obtains in French with default preferences by typing an ordinary double quote.)
3. Triple click in the sentence.

Actual Results:
The selection includes the first guillemet but stops at the non breaking space after the full stop, leaving the closing guillemet out of the selection.

Expected Results:
Select the full sentence with its quotations marks, in all languages and varieties of quotations marks and rules and positions relative to the full stop. (Allowing an easy correct copy-paste.)


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Comment 1 V Stuart Foote 2019-05-08 20:27:03 UTC
Confirmed on Windows 10 Ent 64-bit en-US with recent master/6.3.0
Version: 6.3.0.0.alpha0+ (x64)
Build ID: db39336550ff547bcb7ca15793b12291c913ab42
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-04-29_23:46:36
Locale: en-US (en_US); UI-Language: en-US
Calc: CL

Behavior as to what ends a sentence is not correct.

Two sentences with localize quotations, English with .", French with .»; the sentence in English will select through the " but in French it stops at the .

But, easy work around of a <shift>+<Right cursor> to extend the selection after a triple click sentence selection.

I don't beleive we use ICU lib for this, so probably need Writer shell/edit engine tweak to accommodate the localizations that close a sentence run.
Comment 2 V Stuart Foote 2019-05-08 22:50:36 UTC
So, positioned by Writer ViewShell, and then Writer cursor definition for END_SENT [1], with Lang and Locale considered. So guess the break iterator [2] for fr_FR script just does not recognize the guillemet quotation as a valid sentence closing--stopping at the period.

These parts of the Writer shell and cursor are ancient, don't know if they can be corrected without major rework.

=-refs-=

[1] https://opengrok.libreoffice.org/xref/core/sw/source/core/crsr/swcrsr.cxx#1550

[2] https://opengrok.libreoffice.org/xref/core/sw/inc/breakit.hxx#60
Comment 3 V Stuart Foote 2019-05-08 23:03:14 UTC
Created attachment 151256 [details]
sample Writer document

sample document, one sentence in en-US, duplicated fr-FR.

Selection via "tripple click", or using the newly provided "Select Sentence" UNO command (bug 124552) as menu/button/context menu customized action.

Selection of the first sentence in en-US with a closing '"' does include the quotation.

But selection of the first sentence in fr-FR with closing '»' will not include the quotation in the selection. Selecting the second sentence will start that sentence selection with the '»'

The guillemet -- U+00BB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK is not recognized as valid punctuation bounding a sentence.
Comment 4 QA Administrators 2021-05-09 03:50:54 UTC Comment hidden (obsolete)
Comment 5 Dominique Meeùs 2021-05-09 06:58:18 UTC
I did download the latest proposed and followed the installation instructions, which gives :
Version: 7.1.3.2 / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: fr-BE (fr_BE.UTF-8); UI: en-US
Calc: threaded

There is no change of behavior with this version. The bug I mentioned 2019-05-08 14:53:50 UTC is still unchanged.
Using my example from 2019, with no break spaces inside the quotation marks
˘Example : « This is a quotation, supposedly in French. » The selection ends at the non breaking space, dropping the guillemet.”
The triple click selection on the quotation ends with the last no break space leaving out the last quotation mark. Using ordinary spaces, the selection ends with the endpoint leaving out the space and the last quotation mark. As V Stuart Foote observed 2019-05-08 23:03:14 UTC (comment 3), the triple click selection of the next sentence includes the closing quotation mark of the preceding sentence. (Same result with no break space or ordinary space.)
The bug is linked to the spaces. There is no bug if one does write: «This is a quotation, supposedly in French, but incorrect by the French typographical rules.»