Bug 113605 - TABLES: Column/row properties of cells should be preserved on copy into an existing table (Paste Special should insert the source unformatted)
Summary: TABLES: Column/row properties of cells should be preserved on copy into an ex...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.2.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL: https://help.libreoffice.org/6.2/en-U...
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2017-11-02 15:56 UTC by Christian Lehmann
Modified: 2023-12-26 17:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test table in Writer (11.17 KB, application/3dr)
2018-10-08 13:18 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lehmann 2017-11-02 15:56:23 UTC
If I copy a column/row, then I want to copy its properties with it. This includes background shading of cells. Currently, this is not reproduced.
Comment 1 Dieter 2017-11-04 08:07:07 UTC
I assume, that background shading is the same as background colour.

1. Open writer and create a table.
2. Set background colour to some cells.
3. Copy the row, containing this cells

a) Paste it in an existing table => background colour doesn't persist
b) Paste it as a new table => background colour persists

I haven't proved, if this is the same with other properties.
Comment 2 Christian Lehmann 2017-11-04 09:30:50 UTC
Thanks for the additional precision, confirmed.

So the bug is: Cell properties (color, shading, borders) are not preserved upon copying a cell or column or row into an existent table (no matter whether the same or another one).

Cell properties are preserved if a new table is created by the transferred material.

This is inconsistent: Cell properties should always be preserved upon copy or cut operations.
Comment 3 Timur 2018-10-08 13:18:43 UTC
Created attachment 145468 [details]
Test table in Writer

We need to reconsider this one. 
On a simple copy to existing table, we copy cell content and don't want to copy whole cells including properties like color and border. 
We should have an option for that and that's via Paste special. 

From what I see, when we copy cells or row (like red row 3) to the existing table (ex. to row 5), from 6.2+ we have somewhat better RTF copying properties but it's still not correct with cells content (cell content from 1st column repeated).
Comment 4 Heiko Tietze 2018-10-15 09:12:33 UTC
Tables can have a direct formatting (cell background or font color, for example, set) and a styles (also known as Table > Autoformat Styles... from the past, now available as Table Style in the sidebar). Copy/paste should preserve the formatting but Paste Special should allow to insert the source unformatted. When copying content from a table with style (let's say even column with shading) the target style has to be used (similar discussion on what should happens for copy/paste with styles but for slides in bug 112697).
Comment 5 QA Administrators 2019-10-16 02:30:19 UTC Comment hidden (obsolete)
Comment 6 Christian Lehmann 2019-10-31 17:55:06 UTC
In LO 6.3.2.2, behavior still is as it was before:

a) I copy a table row/column that has a background color to another table: the background color is not transferred.

b) I copy a row/column whose cells contain indented paragraphs: Indentation is transferred.

c) I copy one part out of a cell content which is an indented paragraph: Indentation is transferred.

Desired behavior, as far as I am concerned, would be:

a: Preserve the attribute.
b: Preserve the attribute.
c: Do not preserve the attribute, since it is one of the entire cell, not of its part.

This is related to Bug 124959: LO still lacks a principled distinction between attributes of entire block elements (paragraphs, table components) and inline elements (parts of a paragraph or of a table cell).
Comment 7 Dieter 2021-09-09 13:42:18 UTC
Still present in

Version: 7.2.1.1 (x64) / LibreOffice Community
Build ID: 3cfc32d9754d2d239bd8ce2941029c12873010c1
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 8 QA Administrators 2023-09-10 03:20:29 UTC Comment hidden (obsolete)
Comment 9 Dieter 2023-09-26 06:49:19 UTC
Still present in

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a4522ef5ce6a625054d83ec907aee07c156e94ed
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-US
Calc: CL threaded
Comment 10 Christian Lehmann 2023-12-26 17:45:28 UTC
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 12; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

Behavior is now as follows:
1) Select and copy an _entire_ cell to a different cell of the same table or to a cell of another table:
Content with paragraph properties is transferred: okay.
Cell attributes (e.g. background color) are not transferred: wrong.

2) Copy a _substring_ from a formated paragraph (no matter whether from running text or from a table cell) into a table cell: Source paragraph format overrides table cell format: wrong.

Behavior #2 is a more general defect of LO Writer: If I copy a _substring_ of a paragraph formated with style A into a paragraph formated with style B, style A must not be transferred; style B must be preserved. Style A ought not, in fact, be included in the copy in the first place; it is of no concern to the copy operation.