Bug 127729 - Extranous comma at end of Find & Replace search description list
Summary: Extranous comma at end of Find & Replace search description list
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: lowest trivial
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2019-09-24 05:45 UTC by Jim Raykowski
Modified: 2020-09-25 19:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
empty search attribute (42.02 KB, image/png)
2019-10-12 04:07 UTC, Jim Raykowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Raykowski 2019-09-24 05:45:12 UTC
This happens when the Text Flow tab is visited in the Search for formatting dialog.

To repro:

1) Open Writer
2) Menu > Edit > Find & Replace... or Ctrl+H
3) Press the Format... button
4) Select Text Flow tab
5) Select Font tab and choose a font
6) Press OK button

Results: Below the Find combobox a search description list is shown that ends with an extranous comma.

Expected Results: No comma at the end of the search description list.

I repro'd this back to Version: 4.2.0.0.alpha1+
Comment 1 Xisco Faulí 2019-09-24 10:41:14 UTC
I believe the comma is always added as a separator in case more formats are used.
We could remove it if only one format is used
Comment 2 Jim Raykowski 2019-09-25 06:07:11 UTC
(In reply to Xisco Faulí from comment #1)
> I believe the comma is always added as a separator in case more formats are
> used.

AFAIK the comma followed by empty string only happens when the Text Flow tab is visited.

The Text Flow tab has a SvxPageModelItem which returns an empty string for presentation.

https://opengrok.libreoffice.org/xref/core/include/editeng/pmdlitem.hxx?r=30179955#25

https://opengrok.libreoffice.org/xref/core/editeng/source/items/paraitem.cxx?r=8fe85c24#1070

The text string for the search description list built in SvxSearchDialog::BuildAttrText_Impl

https://opengrok.libreoffice.org/xref/core/svx/source/dialog/srchdlg.cxx?r=1e8f0940#2081
Comment 3 Jim Raykowski 2019-10-12 04:07:56 UTC
Created attachment 154946 [details]
empty search attribute
Comment 4 Commit Notification 2020-09-23 10:52:43 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2f135f9e319beb0aea28c26eb9e39e50a6851a6e

tdf#127729 Don't include empty string presentations in search

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 5 BogdanB 2020-09-25 19:12:01 UTC
Solved.

Verified in
Version: 7.1.0.0.alpha0+
Build ID: 4a899a5f8a72ea29a6919316afe3627de9f33e95
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded