[Libreoffice-bugs] [Bug 43107] Regular expression "\n" in replace field inputs "\n" instead of line(paragraph?) break
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 7 20:50:28 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=43107
Cor Nouws <cno at nouenoff.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Regular expression "\n" in |Regular expression "\n" in
|replace field inputs "\n" |replace field inputs "\n"
|instead of paragraph break |instead of line(paragraph?)
| |break
CC| |erack at redhat.com,
| |rb.henschel at t-online.de
--- Comment #21 from Cor Nouws <cno at nouenoff.nl> ---
(In reply to DN from comment #20)
> > Help reads: : "\n is for line end entered with Shft+Enter"
>
> (for anyone else reading - the help page by clicking Help on the
> search/replace window and clicking "List of Regular Expressions")
>
> This is a documentation bug. This refers to Writer only, not Calc.
There is more. Who says Ctrl+Enter creates a new line in a Calc text cell?
Unzip a Calc file with a 'new line', and you see:
<text:p>text on line one</text:p><text:p>And this on line too</text:p>
Unzip a Writer file with a 'new line', and you see:
<text:p text:style-name="P1">This is line one<text:line-break/>and this is
line two</text:p>
So, although the Calc cell UI does not know the paragraph concept, the xml file
does.
Thus the question still stands: what are the bugs, and/or not yet implemented
features? (see below)
> > Hence I do not have a file to test this exactly..
>
> The steps I listed result in a doc to test this.
They don't - hence my request ;)
> > behavior was the same in version 3.3.0 and is in OpenOffice.
> > So, is this really a bug, or something that behaves different than expected??
>
> It's a bug. The content of "replace" should be interpreted as a regex (i.e.
> \n should be interpreted as a newline, not a literal string). It may well
> have always been a bug in Open/LibreOffice.
No doubt that I agree, that one would expect that Find & Replace replaces 'line
breaks'. In any case, in there is no line break, a result 'not found' would be
more appropriate.
So bugs/problems are:
- a 'new line' in Calc text cells, produces a new paragraph;
- it makes sense that, since Shift+Enter does the opposite of Enter,
Ctrl+Enter is used for the line break (new line/paragraph)
- maybe it should really create a line break?
- Find & Replace should either report: no new lines found; or behave different
in Calc text, handling paragraphs as if it were line breaks;
- documentation is not clear/complete.
adding @eike and @regina to cc.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180907/51af13e4/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list