Bug 144089 - Find and Replace works incorrectly with regex "^." and selection only
Summary: Find and Replace works incorrectly with regex "^." and selection only
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.3.0 target:7.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-25 18:33 UTC by Xisco Faulí
Modified: 2021-08-26 08:38 UTC (History)
1 user (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 Xisco Faulí 2021-08-25 18:33:22 UTC
This is just a follow-up of https://bugs.documentfoundation.org/show_bug.cgi?id=137737#c11 for future reference

1. Create a lorem ipsum text.
2. Select any random part inside any paragraph.
3. Using F&R, use regex "^." (any character in the beginning of the paragraph), ad replace with "A" (character A).
4. Use "Current selection only"
5. Replace All.

The expected result is that the text is not found (unless we also selected the very first character of the paragraph, in which case the very first character of the paragraph should be replaced). The actual result now is that all the selected text is replaced with AAAAA...

Introduced by https://git.libreoffice.org/core/+/a511bffd67a9cebfdc878766581ac08c79d7ff51%5E%21
Comment 1 Commit Notification 2021-08-25 22:40:55 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#144089: Revert "tdf#137737 i18n search: don't expand start/end with regex ^ or $"

It will be available in 7.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.
Comment 2 Commit Notification 2021-08-26 07:23:30 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#144089: Revert "tdf#137737 i18n search: don't expand start/end with regex ^ or $"

It will be available in 7.2.1.

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 3 Commit Notification 2021-08-26 08:38:36 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#144089: sw: Add UItest

It will be available in 7.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.