Bug 34596 - Search and replace empty paragraphs in a Writer document with tables
Summary: Search and replace empty paragraphs in a Writer document with tables
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Regex
  Show dependency treegraph
 
Reported: 2011-02-23 00:59 UTC by Antanas
Modified: 2023-02-19 04:28 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 Antanas 2011-02-23 00:59:13 UTC
The issue while automaticaly removing empty paragraphs.
Minimal example containing folowing document elements in order:
1. Empty paragraph.
2. Two paragraphs in the tables' cell: the first empty, the second contains one or more characters.

Using "Search and replace" tool with regular expressions. 
Search for: ^$ 
Replace with: (empty).
Replace All.
Search key replaced 60000 times.

With bigger LibreOffice document application becomes not responding.
Comment 1 Antanas 2011-02-26 10:03:03 UTC
The bug remains in 3.3.1 final
Comment 2 Cédric Bosdonnat 2011-02-28 07:23:12 UTC
This is not the only case happening: the empty paragraph before a table doesn't match either. Taking it, but lowered importance.
Comment 3 Cyril Brosch 2013-01-31 19:48:24 UTC
I can confirm the problem persists in LO 3.6.4.
I have a lot of tables with empty paragraphs around it like in the following example: http://www.cyrilbrosch.net/ex_1.odt
The search never finds the empty line right before the table, which effectively makes it impossible for me to correct the 1000+ tables in my document automatically.
Comment 4 QA Administrators 2015-04-01 14:41:52 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2015-04-24 10:31:31 UTC
(In reply to Cyril Brosch from comment #3)
> I can confirm the problem persists in LO 3.6.4.
> I have a lot of tables with empty paragraphs around it like in the following
> example: http://www.cyrilbrosch.net/ex_1.odt
> The search never finds the empty line right before the table, which
> effectively makes it impossible for me to correct the 1000+ tables in my
> document automatically.

Reproduced. It only replaces 1 time now, NOT 60000 times.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f3375fa07f27bd2ade519af3c07d69040d10eaa9
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-22_23:38:50
Locale: fi_FI
Comment 6 Antanas 2015-04-24 12:54:34 UTC
The critical part of the original bug seems now resolved – no more 60000 times replace (testing with LibreOffice 4.4.2.2 40m0(Build:2), Ubuntu 14.04.2 LTS 32 bit) 

All empty paragraphs are removed using regular expression, *exept* those:
- one empty paragraph directly before the table,
- the last empty paragraph in the tables' cell(s).
Comment 7 QA Administrators 2016-09-20 09:32:22 UTC Comment hidden (obsolete)
Comment 8 Antanas 2016-09-22 09:34:05 UTC
The bug remains in the state, described in the comment 6.
https://bugs.documentfoundation.org/show_bug.cgi?id=34596#c6

LibreOffice 5.2.1.2 20m0(Build:2)
Ubuntu 14.04.5 LTS
and
Ubuntu 16.04.1 LTS
Comment 9 QA Administrators 2018-05-27 02:32:03 UTC Comment hidden (obsolete)
Comment 10 Antanas 2018-05-27 17:31:29 UTC
The bug is still present in state of the 6th comment (2015-04-24 12:54:34 UTC):

empty paragraphs are removed using regular expression (^$), *exept* those:
- one empty paragraph directly before the table,
- the last empty paragraph in the tables' cell(s).

LO version: 6.0.4.2
Comment 11 Roman Kuznetsov 2018-06-16 11:08:10 UTC
I think that this bug is fixed and WFM now, because non deleting of empty paragraph before table does not refer to the original description of the problem.

And last empty paragraph in table's cells there are always, because there are cells.
 
And empty paragraph after table there is always in Writer and cannot be delete by default (there is a method, but it's dirty hack)

@Xisco, what do you think?
Comment 12 Pawel 2019-03-27 16:35:48 UTC
The search and replace bug still exists, when searching with the Attributes/Format options. E.g. when I search for all the words that have a changed colour (Attribute: Font colour), it finds all the words, but when I try to replace them with e.g. Format: bold, the program pauses and then throws the message: 'To proceed with this action, you must first turn off the "undo" function. Do you want to turn off the "undo" function?'
If I select yes, it basically freezes. If I select no, it replaces only part of the selected items and says "Search key replaced 60000 times"
Comment 13 Diego Leo 2020-07-15 16:16:15 UTC Comment hidden (spam)
Comment 14 larry 2020-08-25 15:54:52 UTC Comment hidden (spam)
Comment 15 QA Administrators 2023-02-19 03:20:10 UTC
Dear Antanas,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug