[Libreoffice-bugs] [Bug 70423] FILEOPEN: Unexpected Addition Of Windows Line Breaks to LinuxText File

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun May 17 09:54:03 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=70423

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |difficultyBeginner,
                   |                            |easyHack, skillCpp

--- Comment #9 from Mike Kaganski <mikekaganski at hotmail.com> ---
This is caused by three things:

1. Opening a text file with incorrect paragraph break specification. Opening a
text file by default uses Text filter (not Text (encoded)) with system line
endings; thus opening a Linux (with LF ends of line) text file on Windows would
*not* consider LFs as paragraph terminators (they would be imported as line
breaks), and they would start becoming a large single peragraph;
2. Writer's ASCII filter has a hard arbitrary limit of 10 000 characters per a
single paragraph. It splits paragraphs about 100 characters before that
boundary.
3. Writing back using the same Text filter again uses system breaks, CRLF on
Windows; so all *new* ~10000-char paragraphs get separated by those CRLFs.

The only thing to solve here IMO is removing the arbitrary limit, since Writer
is already able to handle 2G character long paragraphs.

Code pointer: MAX_ASCII_PARA defined in sw/inc/shellio.hxx, and used in
sw/source/filter/ascii/parasc.cxx.

-- 
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/20200517/31d6820d/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list