Summary: | DDE link from Pivot Table to Writer loses CR and LF control characters | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | titanemdg <titanemdg> |
Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | erack, titanemdg |
Priority: | medium | ||
Version: | 7.1.8.1 release | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: |
Description
titanemdg
2022-02-08 08:53:23 UTC
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... |