Comment 40 for bug 892476

Revision history for this message
In , Cno (cno) wrote :

(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.