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: 2025-11-22 03:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


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
Comment 6 kdub 2023-11-22 15:12:27 UTC
*** Bug 138931 has been marked as a duplicate of this bug. ***
Comment 7 QA Administrators 2025-11-22 03:13:39 UTC
Dear VincentYu,

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