Bug 116685 - Copy-pasting a range of cells from Calc to Writer should produce a table by default
Summary: Copy-pasting a range of cells from Calc to Writer should produce a table by d...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: Paste Writer-Tables-Enhancements
  Show dependency treegraph
Reported: 2018-03-28 16:51 UTC by Aron Budea
Modified: 2019-01-21 10:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-03-28 16:51:36 UTC
Copy-pasting cells from Calc to Writer creates an embedded spreadsheet by default. This, while might be useful in some cases, is rarely what users want.

Not only that, the other paste options (namely HTML and Formatted Text (RTF)) don't produce anything that is like a normal table in Writer:
-they have grey borders instead of black,
-they don't have automatic alignment.

I'd expect the default paste option to produce a table that looks close to the original (in terms of formatting), but is based on the style of a Writer table.
Comment 1 Heiko Tietze 2018-03-28 16:53:10 UTC
Paste Special > HTML (or plain and convert) => Worksforme.
Comment 2 Aron Budea 2018-03-28 17:17:04 UTC
(In reply to Heiko Tietze from comment #1)
> Paste Special > HTML (or plain and convert) => Worksforme.

1. It's not the default paste.
2. It doesn't look close enough like a Writer table.
Comment 3 Telesto 2018-03-28 17:38:09 UTC Comment hidden (obsolete)
Comment 4 V Stuart Foote 2018-03-28 18:54:20 UTC
There is no means to paste data into an existing table--that is bug 37223 and/or bug 95741

Copy -> Paste from Calc to Writer by default pastes a Calc8 OLE object.

Copy -> Paste Special DDE, or HTML will paste either active DDE content, or HTML table which picks up Writer templates "Default Style" table. The style can then be changed.

Point here is that you _can_ bring data over from Calc -- just that the default now is a static OLE object that can not be styled, with an option of DDE or HTML--either of which can be styled.

Would the HTML table be a better paste default than the Calc8 OLE? And at some point we would need to be able to modify the Default Table style.
Comment 5 V Stuart Foote 2018-03-28 19:11:54 UTC
(In reply to V Stuart Foote from comment #4)
The paste special options--RTF will also paste the selection as a table with the calc formatting--that can also be styled.

So, it is really a question of what should the default be?  Kind of agree that the calc8 OLE object is not especially helpful.
Comment 6 Mike Kaganski 2018-03-30 06:38:53 UTC
After fixing bug 115574, pasting from Excel to Writer now works differently (in this regard) to pasting from Calc to Writer.
Comment 7 Aron Budea 2018-03-30 10:02:03 UTC
We discussed this a bit with Miklos yesterday, the priority of format filters is defined here:

Technically, switching the order SotClipboardFormatId::EMBEDDED_OBJ and SotClipboardFormatId::RTF fixes the precedence, but the list is more general, so it might have unwanted side effects elsewhere. Introducing a blacklist, and/or more granular priorities depending on the type of content seems to be the way forward.
Comment 8 Jean-Baptiste Faure 2018-03-31 17:34:19 UTC
Valid enhancement request.

Best regards. JBF