Bug 77786 - EDITING: When doing Find and Replace with formatting attributes, the Replace button changes the next item, not currently found item
Summary: EDITING: When doing Find and Replace with formatting attributes, the Replace ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.2.1 release
Hardware: Other All
: medium minor
Assignee: Bojidar Marinov [:bojidar-bg]
URL:
Whiteboard: BSA target:26.2.0
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2014-04-22 21:28 UTC by D. Browne
Modified: 2025-10-09 14:30 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 D. Browne 2014-04-22 21:28:49 UTC
Problem description: 
Find/Replace for format is reversed from proper operation - the replace button finds the next format, and does a replacement.
IT DOES THIS ON 4.2.3.3, EVEN THOUGH IT WON'T LET ME SAY THAT IN THE BUG REPORT VERSION THE BUG APPEARED LINE ABOVE...
Steps to reproduce:
1. Enter 5 short, 1-sentence paragraphs.
2. Italicize several words randomly in those sentences.
3. put the cursor at the top
4. bring up Find & Replace dialog
5. expand "Other options"
6. click in "Search for:" box
7. click Format button, on Font tab, select Italic for the Style drop-down, click OK.
8. click in "Replace with:" box
9. click Format button, on Font tab, select "Bold Italic" from Style drop-down, click OK.

Current behavior:
When click "Find" button, it finds the first italic word. When I click the "Replace" button, it moves to the next italic word, and makes it bold italic.

Expected behavior:
I expect that when I click the "Find" button, it will find the first italic word, and when I click the "Replace" button, it will replace what it just found - an italic word, with bold italic attributes, and then find the next italic word, but not replace the text attributes until I click the "Replace" button once again.

Operating System: Windows 7
Version: 4.2.2.1 release
Comment 1 Yousuf Philips (jay) (retired) 2014-06-07 23:25:34 UTC
Confirmed in Linux Mint in 3.6.7, 4.1.6, 4.2.4 and 4.3 beta.

Instead of replacing the entry that was last found and highlighted and then highlight following entry, it jumps to the following entry and replaces it and doesnt highlight anything after that.
Comment 2 QA Administrators 2015-06-08 14:41:58 UTC Comment hidden (obsolete)
Comment 3 Buovjaga 2015-06-21 18:41:00 UTC
Repro.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 4 QA Administrators 2016-09-20 10:10:23 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-12-03 14:15:48 UTC Comment hidden (obsolete)
Comment 6 sdc.blanco 2021-01-10 02:21:31 UTC
repro.  (modified summary to better describe the problem)

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 4041c68ea59181f1c4774c356809066d2051db41
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DK); UI: en-US
Calc: threaded
Comment 7 QA Administrators 2023-03-03 03:25:27 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2025-03-03 03:10:18 UTC Comment hidden (obsolete)
Comment 9 Bojidar Marinov [:bojidar-bg] 2025-07-12 14:08:58 UTC
https://gerrit.libreoffice.org/c/core/+/187774
Comment 10 Commit Notification 2025-10-09 06:27:06 UTC
Bojidar Marinov committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/78ca6a8b55fbe557b1fde54aad4a393879c3d4ec

tdf#77786 Replace format: Replace current found string and not next one

It will be available in 26.2.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 11 Buovjaga 2025-10-09 07:05:07 UTC
Bojidar: thanks and feel free to close as fixed.
Comment 12 Bojidar Marinov [:bojidar-bg] 2025-10-09 14:30:41 UTC
Wohoo! One issue old enough to drive a car closed!