Bug Hunting Session
Bug 126844 - Find & Replace Dialog no longer permits me to format "Replace" text. (GTK3)
Summary: Find & Replace Dialog no longer permits me to format "Replace" text. (GTK3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2019-08-12 00:04 UTC by Lewis Biggs
Modified: 2019-08-19 14:23 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Confirmation of No Bug in Windows 7 OS (32.24 KB, image/png)
2019-08-12 15:58 UTC, Lewis Biggs
Details
In selecting Formatting for replace text, extra formatting is getting added. (44.38 KB, image/png)
2019-08-16 19:11 UTC, Lewis Biggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lewis Biggs 2019-08-12 00:04:29 UTC
Description:
In Writer, I frequently use the search and replace dialog to change the formatting of certain things using regular expressions, such as:

- Underlining all paragraph headings
- underlining all quoted terms
- Highlighting defined terms to make sure they are all used consistently

This involves typing the search term in the "Find" text box, then typing '&' in the "Replace" text box (with regular expressions enabled). Then, with the "Replace" text box highlighted, pressing the "Format Button" and choosing the formatting desired for the replace term.

This feature appears to have been broken in one of the recent updates.  I am using ver. 6.3.  

Now, no matter what I do, the formatting affects only the search term, and not the replace term (which completely breaks the functionality). I cannot select formatting for the "Replace" term.  It does not matter how or were I put focus or the cursor. It does not matter whether I use Regex or not ...

This occurs on multiple installs (but always using I3WM in linux).  Prior versions of writer did not do this.

Steps to Reproduce:
1.Type a sentence into Writer
2.Use Find and Replace and enter a word from your sentence in the Find field. 
3. Enter another word in the Replace field.
4. Try to select different formatting for the Replace field, such as underlined (or a different font, or a highlighted word, etc.)
5.  On my system, it changes the formatting of the Find word, not the Replace word no matter what I do.

Actual Results:
On my system, using the Format button changes the formatting of the Find word, not the Replace word, no matter what I do or where focus is in the dialog box.

Expected Results:
Using the format button when the Replace word is selected or when focus is on the Replace edit box should affect the formatting of the Replace field.  This is how previous versions of Writer worked and it was a great feature.  Now it seems broken.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Comment 1 Lewis Biggs 2019-08-12 15:58:28 UTC
Created attachment 153324 [details]
Confirmation of No Bug in Windows 7 OS
Comment 2 Lewis Biggs 2019-08-12 16:00:08 UTC
Comment on attachment 153324 [details]
Confirmation of No Bug in Windows 7 OS

I was able to test LO Writer 6.3 on a Windows 7 machine, and I could not replicate it.  The Format button correctly applied selected formatting to the Replace text box when such text box had focus.  A attach a screenshot shows correct formatting selection.

So, the problem appears to be limited to linux (or i3 windows manager).
Comment 3 Xisco Faulí 2019-08-13 10:08:48 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 2812610f4f39ed5892da08864893c758325d1d39
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

but not in GEN or GTK2
Comment 4 Xisco Faulí 2019-08-13 10:25:01 UTC
Regression introduced by:

author	Caolán McNamara <caolanm@redhat.com>	2019-03-22 15:59:00 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2019-03-24 18:19:29 +0100
commit	f920e86fbf3968104e1dfc0e9934e80652ed0837 (patch)
tree	01f8ed9c445821739b9709c5fee6e51eab0ae24d
parent	da881f38c088c439f034e340bbbb4ca53e67389f (diff)
weld SvxSearchDialog

Bisected with: bibisect-linux64-6.3

Adding Cc: to Caolán McNamara
Comment 5 Commit Notification 2019-08-13 14:26:49 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#126844 focus in to combobox with entries not seen in parent

It will be available in 6.4.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 6 Xisco Faulí 2019-08-14 10:52:24 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 744f70386727c78a19bd7c1de7425392b98783c7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!
Comment 7 Commit Notification 2019-08-14 10:53:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

Resolves: tdf#126844 focus in to combobox with entries not seen in parent

It will be available in 6.3.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 8 Lewis Biggs 2019-08-14 13:33:02 UTC
Thank you for fixing this problem.  The ability to use regex to change or implement formatting is, I think, the LO Writer's best feature.
Comment 9 Lewis Biggs 2019-08-16 19:11:40 UTC
Created attachment 153444 [details]
In selecting Formatting for replace text, extra formatting is getting added.

Please see attached screenshot showing extra formatting being automatically added to selection.
Comment 10 Lewis Biggs 2019-08-16 19:22:20 UTC
I am testing the patch made by Caolán McNamara. I notice the following:

1.  open Find & Replace Dialog
2.  type search text in the Find box
3.  type replacement text in the Replace box
4.  hit "format" button to format replace text
5.  select "Without Underlining" in "Font Effects" tab.
6.  hit OK.
7.  notice that other paragraph formatting is being applied, not just "without underlining."  Please see the screenshot I just uploaded.

Sometimes I am able to purge the other formatting by hitting the "Reset" button, but that does not usually work.
Comment 11 Xisco Faulí 2019-08-19 06:22:52 UTC
(In reply to Lewis Biggs from comment #10)
> I am testing the patch made by Caolán McNamara. I notice the following:
> 
> 1.  open Find & Replace Dialog
> 2.  type search text in the Find box
> 3.  type replacement text in the Replace box
> 4.  hit "format" button to format replace text
> 5.  select "Without Underlining" in "Font Effects" tab.
> 6.  hit OK.
> 7.  notice that other paragraph formatting is being applied, not just
> "without underlining."  Please see the screenshot I just uploaded.
> 
> Sometimes I am able to purge the other formatting by hitting the "Reset"
> button, but that does not usually work.

Hello Lewis,
Please report a follow-up bug.
The initial issue described in this ticket is fixed.
Comment 12 Caolán McNamara 2019-08-19 14:23:38 UTC
See https://bugs.documentfoundation.org/show_bug.cgi?id=127029 as the follow up