Description: When I do DDE link from a pivot table that cell contains CR+LF(windows) or LF(Unix)they become a space in the destination Writer document Steps to Reproduce: 1.Create a pivot table in a sheet from a database table 2.Copy a cell that have a multi line and CR/LF (or LF unix) 3.Paste it in a Writer document as DDE link 4.Check the cell in the new table: it is flatten and CR/LF becomes a Space characters Actual Results: CR/LF becomes a Space character Expected Results: Do not modify CR/LF characters Reproducible: Always User Profile Reset: Yes OpenGL enabled: Yes Additional Info: If the paste is not a DDE then CR/LF are preserved. Paste in text editor preserves CR/LF
Code pointer: This is done explicitly in ScServerObject::GetData [1]: > aObj.SetExportTextOptions( ScExportTextOptions( ScExportTextOptions::ToSpace, ' ', false ) ); No idea what could break - looks like there may be opposite expectations in some people, who prefer the current way, or maybe it's simply the code that is used in very different scenarios? Eike, do you have an idea? [1] https://opengrok.libreoffice.org/xref/core/sc/source/ui/docshell/servobj.cxx?r=8930b1f6#195
Reading SwDDETable::ChangeContent [1], it may be even that it can't be changed at all: it seems that the format transferred over DDE is simply a text, where each table line is separated by newline, and each table cell is separated by a tab. And there's no escaping, like use of quotes in CSV. [1] https://opengrok.libreoffice.org/xref/core/sw/source/core/fields/ddetbl.cxx?r=9fdb06d6#135
OTOH, when I enable DDE in Excel (see https://stackoverflow.com/questions/55868217), and put the following formula into a spreadsheet there: ="abc"&CHAR(9)&"def"&CHAR(13)&"ghi" then run the following VBA from Word: Sub DDETest() ch = DDEInitiate("Excel", "D:\Documents\DDETest.xlsm") s = DDERequest(ch, "R1C1") DDETerminate ch MsgBox s End Sub the text arriving from Excel is exactly "abc def ghi" including the double quotes. It actually looks to me that Excel uses normal TSV, with double quotes according to CSV standard...
Hello, It's been a while since this issue was reported. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Is this related to bug 119928 where I have just added clear (and simpler) instructions? It seems to be similar and possibly caused by the same underlying issue.