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

            Bug ID: 160563
           Summary: Pasting very long string when editing in the formula
                    input inserts newline(s)
           Product: LibreOffice
           Version: 7.6.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
Strings that are longer than around 17k characters will have a new line
automatically inserted when pasted when editing in the formula input (with
Ctr-Shift-V - unformulated text). This happens each ~16k characters (if you
paste a string of ~40k you will get two new lines).

This is a problem if you paste - for example - a very long JSON file.

Steps to Reproduce:
1. Generate a string of more than 17k (actual limit is a bit below 16385 but
did not compute exactly) (example in extra_newline.txt, generated with "head -c
16385 < /dev/zero | tr '\0' 'a' > extra_newline.txt")
2. Click on empty cell, click on the formula input (or press F2), press
Ctrl-Shift-V, select "Unformatted text"). Press Enter or click somewhere else.
(result in extra_newline.ods)
3. Copy value in cell and paste in a text editor (or check content.xml in the
ods)



Actual Results:
The string had a new line (and a character transformed to caps).

Expected Results:
The string is the same as the pasted string.


Reproducible: Always


User Profile Reset: No

Additional Info:
Keep the string as it is.

Note: if you paste without going to the formula input (so, just click on cell
and Ctrl-Shift-V) the cell will be displayed with the extra newline, but when
copied back will be correct. If I check the actual file saved on disk it will
contain the correct value (without the newline).

This suggests that there is somewhere in the code a transformation that happens
for both display (probably not that important these cells are not meant to be
read) but also, more importantly  while pasting when editing - which then is
used as the correct value.

But if there is no reason to such transformation (adding the newline), probably
it should be removed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to