-
Eike Rathke yazdı
For intra-Calc on-cell pastes using the paste special toolbar button the SotClipboardFormatId::STRING_TSVC format can be used, which preserves embedded line breaks and tabs by enclosing such content in double quotes and escaping quotes by doubling them, similar to CSV. This differs from the IANA text/tab-separated-values MIME type (see https://www.iana.org/assignments/media-types/text/tab-separated-values) that does not allow quoted fields or embedded line breaks or tabs. The text/plain "Unformatted text" format now again (after the change with commit cdcd262ea4aa3c3e407b14ed533e514f75de2d3a for tdf#32213) results in unquoted/unescaped content as expected for external pastes. A follow-up commit probably should distinguish whether the source is one single cell or multiple cells and for multiple cells use a strict TSV (with embedded line breaks and tabs changed to spaces) if a simple "Unformatted text" is requested, which always uses tabs as field separators anyway. Further enhancement could be to offer strict text/tab-separated-values and also text/csv at the clipboard if there are applications that actually handle these MIME types. Change-Id: Ica60f256e26867d854639823c62eedbf13eb4d4b Reviewed-on: https://gerrit.libreoffice.org/44686Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
f435cdba