Bug 117643 - Word search does not work in LibreOffice Writer if search term contains an apostrophe
Summary: Word search does not work in LibreOffice Writer if search term contains an ap...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.4
Keywords: bibisectNotNeeded, regression
: 129732 138196 (view as bug list)
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2018-05-16 10:42 UTC by mwtjunkmail
Modified: 2021-02-02 07:37 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
apostrophe examples (2.48 KB, image/png)
2020-11-15 04:37 UTC, mwtjunkmail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mwtjunkmail 2018-05-16 10:42:36 UTC
Description:
I cannot find even simple words like:  don't   
using the word search feature in Writer.
Search fails if an apostrophe is in the search term.

Steps to Reproduce:
1. Open Writer.
2. Type a word containing an apostrophe to search for
3. Hit Control-F and enter the search term with the apostrophe


Actual Results:  
Word not found.

Expected Results:
Word found.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36 OPR/52.0.2871.99
Comment 1 mwtjunkmail 2018-05-16 10:45:49 UTC
Bug is also present in Version: 6.1.0.0.alpha1 (x64)
Comment 2 Dieter 2018-05-16 16:11:43 UTC
1. I copied and pasted the text of the bug report
2. Strg + F
3. I typed don't => search term was found

But when I type "don't" in the document, the apostroph looks different and isn't found.

Depends on language settings:
Tools => AutoCorrect => AutoCorrect Options: If I disable "replace" for single quotes and type "don't", the search term is found.


@mwtjunkmail: Can you confirm this?


Version: 6.1.0.0.alpha1+ (x64)
Build ID: 775d0f26beecffccf3ed27a6a011aff20d91f842
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-04-26_01:05:25
Locale: en-US (de_DE); Calc: CL
Comment 3 mwtjunkmail 2018-05-16 23:55:50 UTC
That would be the issue, I have the replacement on. 


I created a new writer document in 6.1.0.0.alpha1+, typed don't and it wasn't found.

I then entered Notepad, typed don't, copied and pasted into the document, and it was found.

I'm keeping the replacement on, so I guess I'll just live with this.
Comment 4 Dieter 2018-05-17 10:19:09 UTC
(In reply to mwtjunkmail from comment #3)

> I'm keeping the replacement on, so I guess I'll just live with this.

There is another solution. If you use keyboard combination both in text and in search field, it works. Example for text in German: ALT + 0146 inserts the correct type of the apostroph. The word "don't" is found, if you use this combination in the docuemnt as well as in the search field.

So I would say NOTABUG in this case.
Comment 5 mwtjunkmail 2018-05-20 08:04:04 UTC
Hm... I just tested this in MS Word 365, which I'm trying to stay away from by using LibreOffice. 

Word doesn't have this issue.  Type and replace turned on for apostrophes doesn't kill the application's ability to find apostrophes in word search terms.

Why should Writer require gymnastics to type in alt codes to achieve the same thing?
Comment 6 Daniel MOYNE 2020-05-28 07:54:01 UTC
I have the same problem with "d'affixe" which is not found by search. The solution proposed is not acceptable. Before it worked without doing it. It should work the same way.
Comment 7 Dieter 2020-05-28 08:08:49 UTC
Back to UNCONFIRMED because of comment 5 and comment 6
Comment 8 mwtjunkmail 2020-08-23 12:53:33 UTC
(In reply to Daniel MOYNE from comment #6)
> I have the same problem with "d'affixe" which is not found by search. The
> solution proposed is not acceptable. Before it worked without doing it. It
> should work the same way.

I agree, unacceptable. Users don't have to enter alt codes in MSWord, even with smart quotes turned on, to perform a word search on words containing apostrophes, so it's a bit ludicrous that we must enter alt codes in a search field to accomplish the exact same thing in LO.
Comment 9 JustinJacob 2020-09-11 15:59:04 UTC Comment hidden (spam)
Comment 10 JustinJacob 2020-10-11 10:00:46 UTC Comment hidden (spam)
Comment 11 László Németh 2020-11-11 17:58:46 UTC
~Regression from changing the ASCII apostrophe to the typographic ’ (U+2019).
Comment 12 Heiko Tietze 2020-11-12 07:29:47 UTC Comment hidden (off-topic)
Comment 13 László Németh 2020-11-12 08:51:30 UTC
*** Bug 129732 has been marked as a duplicate of this bug. ***
Comment 14 NISZ LibreOffice Team 2020-11-12 11:30:42 UTC
For the record this begun in 5.1:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=e6fade1ce133039d28369751b77ac8faff6e40c

author	László Németh <laszlo.nemeth@collabora.com>	2015-11-16 00:03:16 +0100
committer	László Németh <laszlo.nemeth@collabora.com>	2015-11-16 00:03:16 +0100

tdf#38395 enable smart apostrophe replacement by default
Comment 15 Commit Notification 2020-11-13 15:07:45 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d40f2d02df26e216f367b5da3f9546b73f250469

tdf#117643 Writer: fix apostrophe search regression

It will be available in 7.1.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.
Comment 16 László Németh 2020-11-13 18:03:01 UTC
*** Bug 138196 has been marked as a duplicate of this bug. ***
Comment 17 mwtjunkmail 2020-11-15 04:36:47 UTC
This fix did not take into consideration the usage of both apostrophes, just the trailing one, not the leading one.

The fix finds:

 o'clock 

but not 

'hi' 

meaning no subquote in a quoted sentence will ever be found.


Version: 7.1.0.0.alpha1+ (x64)
Build ID: 42a691933429dbb315de2bd7ba2724993c60411f
CPU threads: 8; OS: Windows 10.0 Build 20257; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 18 mwtjunkmail 2020-11-15 04:37:36 UTC
Created attachment 167307 [details]
apostrophe examples
Comment 19 Xisco Faulí 2020-11-16 09:36:35 UTC
Hi mwtjunkmail@gmail.com,
thanks for checking the fix. Would it be possible to report the problem mentioned in comment 17 in a follow-up report < https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice&format=guided > ?
it's always clearer to keep every problem in different reports. Thanks for your understanding
Comment 20 mwtjunkmail 2020-11-17 02:59:21 UTC
(In reply to Xisco Faulí from comment #19)
> Hi mwtjunkmail@gmail.com,
> thanks for checking the fix. Would it be possible to report the problem
> mentioned in comment 17 in a follow-up report <
> https://bugs.documentfoundation.org/enter_bug.
> cgi?product=LibreOffice&format=guided > ?
> it's always clearer to keep every problem in different reports. Thanks for
> your understanding

See Bug 138258
Comment 21 Commit Notification 2020-11-17 08:57:25 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/853c9199444cf893583992bede981c494da21ceb

tdf#117643 Writer: fix apostrophe search regression

It will be available in 7.0.4.

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.
Comment 22 mwtjunkmail 2020-11-18 22:27:52 UTC
Not working in

Version: 7.1.0.0.alpha1+ (x64)
Build ID: ccd0e5f445d4a7d0e7aca6c23c02c61bf14510b2
CPU threads: 8; OS: Windows 10.0 Build 20257; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Will wait for another daily build.
Comment 23 Dieter 2020-11-19 08:17:18 UTC
(In reply to mwtjunkmail from comment #22)
> Not working in
> 
> Version: 7.1.0.0.alpha1+ (x64)
> Build ID: ccd0e5f445d4a7d0e7aca6c23c02c61bf14510b2
> CPU threads: 8; OS: Windows 10.0 Build 20257; UI render: Skia/Vulkan; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: threaded

But you've confirmed in comment 17, that it is fixed for a trailing apostrophe. And that's not true anymore?????
Comment 24 mwtjunkmail 2020-11-19 11:48:15 UTC
one apostrophe works, the other does not.
Comment 25 Dieter 2020-11-19 12:11:17 UTC
(In reply to mwtjunkmail from comment #24)
> one apostrophe works, the other does not.

But that is bug 138258. So, if you confirm that the problem with one apostrophe has been fixed, you can change status to VERIFIED FIXED and erverything else should be done in bug 138258.
Comment 26 mwtjunkmail 2020-11-19 13:37:58 UTC
(In reply to Dieter from comment #25)
> (In reply to mwtjunkmail from comment #24)
> > one apostrophe works, the other does not.
> 
> But that is bug 138258. So, if you confirm that the problem with one
> apostrophe has been fixed, you can change status to VERIFIED FIXED and
> erverything else should be done in bug 138258.

I've flipped the status of this bug. Hopefully 138258 will get confirmed and assigned. Right now I'm on the only email on it so it's dead in the water until someone picks it up.