Bug 128999 - EDITING:find&replace replaces "\n" in document with newline formatting
Summary: EDITING:find&replace replaces "\n" in document with newline formatting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.6.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 38261 Find&Replace-Regex
  Show dependency treegraph
 
Reported: 2019-11-25 00:22 UTC by VincentYu
Modified: 2021-12-06 14:05 UTC (History)
2 users (show)

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


Attachments
Before (9.04 KB, application/vnd.oasis.opendocument.text)
2019-12-11 13:02 UTC, VincentYu
Details
After (9.12 KB, application/vnd.oasis.opendocument.text)
2019-12-11 13:02 UTC, VincentYu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description VincentYu 2019-11-25 00:22:18 UTC
Description:
Changing font-type with regex find&replace, if a "\n" is present in the document of the find font-type, it is replaced with a newline formatting.
Expected behavior: same "\n" but changed to target font-type.
Find regex: (.+)
Find font-type: Times New Roman
Replace regex: $1
Replace font-type: Courier New

Steps to Reproduce:
1.create a document of text containing: "this is a test\n.Hello!"
2.find&replace with regex: find (.+) current font-type replace $1 other font-type
3.replace-all in find-replace dialog


Actual Results:
this is a test
.Hello!

Expected Results:
this is a test\n.Hello!


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.6.2 (x64)
Build ID: 684e730861356e74889dfe6dbddd3562aae2e6ad
CPU threads: 2; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2019-12-11 12:48:34 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 VincentYu 2019-12-11 13:02:15 UTC
Created attachment 156485 [details]
Before

1. invoke find and replace dialog
2. find: .+, format "Times New Roman"
3. replace: $0, format "Courier New"
Comment 3 VincentYu 2019-12-11 13:02:44 UTC
Created attachment 156487 [details]
After
Comment 4 QA Administrators 2019-12-12 03:41:31 UTC Comment hidden (obsolete)
Comment 5 Dieter 2020-03-06 12:07:28 UTC
I confirm it with

Version: 6.3.5.2 (x64)
Build-ID: dd0751754f11728f69b42ee2af66670068624673
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded