Bug 64144 - REPLACE LINEFEED
Summary: REPLACE LINEFEED
Status: RESOLVED DUPLICATE of bug 43107
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.6.2 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 10:55 UTC by advapi32
Modified: 2013-07-09 10:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
search popup (38.78 KB, image/gif)
2013-05-02 10:57 UTC, advapi32
Details

Note You need to log in before you can comment on or make changes to this bug.
Description advapi32 2013-05-02 10:55:01 UTC
I tried to replace double linefeeds with one linefeed.

Option:
'Regular expression' is checked.
Tried 'search in' formular and value.

Search for: "\n\n"  (empty lines)
Replace with: "\n"   (remove empty line)

Result: all double-linefeeds are replaced with text "\n".

sample:
before:
AAA

BBB

after replace:
AAA\nBBB

expected:
AAA
BBB
Comment 1 advapi32 2013-05-02 10:57:13 UTC
Created attachment 78775 [details]
search popup
Comment 2 Jorendc 2013-05-02 14:18:33 UTC
Thanks for reporting.

As far I tested, I can not reproduce this behavior. But I think it highly depends on what kind of newlines you used in the file. There is a shift+enter (hard return) or a 'normal' return (sorry if I'm using the wrong terms).

Is it possible to attach a test file you can reproduce this behavior with?

Thanks in advance,
Joren
Comment 3 ign_christian 2013-07-08 14:50:57 UTC
Simple steps to reproduce: (based on bug desc)
1. In cell A1, enter: AAA+(ctrl+enter)+(ctrl+enter)+BBB -> enter to ok
2. Ctrl+H -> checkmark 'Regular expressions' & 'Backwards' -> enter: \n\n in 'Search for'; \n in 'Replace with'
3. Click 'Replace' or 'Replace All'

Note that if we only enter \n in 'Search for' & blank 'Replace with', we can get result as expected on comment 0 (by clicking 'Replace'). 
But...clicking 'Replace all' get different result. 
Strange..I don't know what behavior should be with this regular expression.

Confirmed with LO 3.6.6.2 (Ubuntu 12.04 32bit). As far as I remember this also happen on LO 4.0.3 or 4.0.4 (Win7 32bit)

Seems like duplicate of Bug 43107
Comment 4 Jorendc 2013-07-09 10:18:39 UTC
(In reply to comment #3)
> Seems like duplicate of Bug 43107

Nice one :)! Looks indeed a dupe of that bug to me too.

Kind regards,
Joren

*** This bug has been marked as a duplicate of bug 43107 ***