Bug 122328 - find replace does not work
Summary: find replace does not work
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2018-12-26 05:02 UTC by Elmar
Modified: 2019-01-08 15:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
simple example file (19.89 KB, application/vnd.oasis.opendocument.text)
2018-12-26 05:03 UTC, Elmar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar 2018-12-26 05:02:11 UTC
Description:
Find and replace does not work any more.

Steps to Reproduce:
1. created document 
2. use different ways to end line
3. use edit / find and replace
4. find \n replace all with \n
5. find \n replace all with <space>

Actual Results:
Nothing happens

same is true in 
Version: 6.0.7.3
Build ID: 1:6.0.7-0ubuntu0.18.04.2

Expected Results:
multiple lines should become one line


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: TextDocument
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Version: 6.3.0.0.alpha0+
Build ID: 9520378e37b97b0a44130c86be482060465b479e
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-12-24_17:23:37
Locale: en-GB (en_ZA.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Elmar 2018-12-26 05:03:36 UTC
Created attachment 147826 [details]
simple example file
Comment 2 Elmar 2018-12-26 05:11:34 UTC
works as expected when use xed text editor (also uses \n for search).

There is an extension called <altsearch.oxt> that worked wonderfully and was not such a mission to understand. Unfortunately it stopped working when the version of Writer changed from 5 to 6.

Is there no way that you could make an updated version of that the standard tool?
Comment 3 Dieter 2018-12-26 06:29:50 UTC
(In reply to Elmar from comment #2)
> There is an extension called <altsearch.oxt> that worked wonderfully and was
> not such a mission to understand. Unfortunately it stopped working when the
> version of Writer changed from 5 to 6.

I use Altsearch 1.4.2 with LO 6.1.4 (Windows) and it works.
Comment 4 Roman Kuznetsov 2018-12-26 13:31:12 UTC
can't repro in

Version: 6.3.0.0.alpha0+
Build ID: 49fcd3bbb30f93763fc5cb80fa6ac5cec5d00834
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-25_00:15:08
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

I'll try it later in Linux too
Comment 5 raal 2019-01-08 15:03:16 UTC
I can confirm with 6.3 on windows, but it's not a bug. See https://help.libreoffice.org/Common/List_of_Regular_Expressions

\n Represents a line break that was inserted with the Shift+Enter key combination. To change a line break into a paragraph break, enter \n in the Find and Replace boxes, and then perform a search and replace.

\n in the Find text box stands for a line break that was inserted with the Shift+Enter key combination.

\n in the Replace text box stands for a paragraph break that can be entered with the Enter or Return key.


Switch on formatting marks and you can see that first replace works like in documentation - replace line break on 4th line. For searching paragraph break tick "Regular expressions" in "Search and replace" dialog. Search for $, replace with space.


So your steps should be:

1. created document 
2. use different ways to end line
3. use edit / find and replace; tick "Regular expressions" 
4. find \n replace all with \n
5. find $ replace all with <space>