Bug 129449 - FIND&REPLACE: Empty paragraph at the end of a document is not found when searching for paragraph styles in Find & Replace
Summary: FIND&REPLACE: Empty paragraph at the end of a document is not found when sear...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Styles
  Show dependency treegraph
 
Reported: 2019-12-17 13:32 UTC by sdc.blanco
Modified: 2020-12-27 12:46 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2019-12-17 13:32:43 UTC
Version 1 (to illustrate "not found when at the end of the document"):  Procedure to produce the bug:

1.  Open New Document and insert a few characters on the first line with Default Style
2.  Insert 2 CR, then  change paragraph style of the second blank line to Numbering 1 (so that this is the last line in the document)
3.  Place cursor on first line, then Find & Replace, check Paragraph Styles, and select "Numbering 1" in the Find box.
4.  Click on ‟Find Next”

Actual Result:  Search key not found.
Expected Result:  Cursor is placed and shown on the paragraph with Numbering 1 Style

Additional Information:

1.  If a character is added to the last line with ‟Numbering 1” Style , then it is found as expected.


Version 2 (to illustrate "finds, but does not indicate blank lines with paragraph style"):  Procedure:

1.  Make a document with the following 4 lines using paragraph styles shown in []:

abcd  [Default Style]
(only CR here)  [Default Style]
(only CR here)  [Numbering 1]
a  [Default Style]

2.  Place cursor on first line, then Find & Replace, check Paragraph Styles, and select ‟Numbering 1” in the Find box.
3.  Click on ‟Find Next”

Actual Result:   Finds CR, but no cursor is shown
Expected Result:   Cursor is shown on Numbering 1 paragraph

4.   Place cursor on first line, then Find & Replace, check Paragraph Styles, and select ‟Default Style” in the Find box.

5.  Click on ‟Find Next” (multiple times)

Actual Result:  Finds each paragraph with Default Style (but shows nothing for the blank line with Default Style)

Expected Result:  Would also show some indicator (e.g., blinking cursor) for the blank line with default style.

Additional information.

Use case:  This ‟toy example” only illustrates the problem.  But consider having a 30 page document, and wanting to search on a particular style (in part to ‟clean up” stray blank lines that have paragraphs styles that you want to remove or change.)  It is hard and confusing to get ‟hits” but not be able to see where on the page the actual paragraph style is located. 

Tested with:

Version: 6.3.3.2 (x64)
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: da-DK (en_DK); UI-Language: en-US
Calc: threaded

and 

Version: 6.4.0.0.beta1 (x64)
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: en-US (en_DK); UI-Language: en-US
Calc: CL
Comment 1 Dieter 2019-12-19 07:29:53 UTC
I confirm it with

Version: 6.5.0.0.alpha0+ (x64)
Build ID: e26d89371f0e4f41476c9a99be01d98dedb76776
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

But I think, we have two issues

a) If last paragraph is empty it is not found when searching for paragraph style (this is a bug)
b) LO should indicate that a paragraph style is found in an empty paragraph (enhancement)

So I propose to narrow down this bug report to the first issue and to open a new report for the second.