Download it now!
Bug 106177 - Paste special of Only Formulas unmerges cells (steps in Comment 9)
Summary: Paste special of Only Formulas unmerges cells (steps in Comment 9)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
Depends on:
Blocks: Cell-Formula Calc-Merge-Split Paste-Special
  Show dependency treegraph
Reported: 2017-02-24 16:29 UTC by James B. Byrne
Modified: 2018-12-28 09:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Example of merged cells split by formula paste (14.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-28 19:16 UTC, James B. Byrne
gdb trace of formula paste splitting merged cells (1.67 KB, text/x-log)
2017-03-10 16:58 UTC, James B. Byrne

Note You need to log in before you can comment on or make changes to this bug.
Description James B. Byrne 2017-02-24 16:29:34 UTC
If a formula is entered into a cell that has been merged with adjacent cells and that cell is then copied and pasted (special) into another group of merged cells with only the formula specified then the merged target cells are split.  They then need to be manually merged again.

This happens if only one group of merged cells are copied from/to or if an entire row is copied.  If the formatting is copied as well then the format from the source is properly applied to the target, which in the present case, is not desired.

This happens on Linux as well as the Microsoft versions of LO.
Comment 1 Xisco Faulí 2017-02-26 21:49:57 UTC Comment hidden (obsolete)
Comment 2 James B. Byrne 2017-02-28 19:16:37 UTC
Created attachment 131543 [details]
Example of merged cells split by formula paste

This a simple ods with merged cells in three columns.  The centre cell at row ten column 2 had the formula from cell row 2, column 2 copied and then the formula only pasted into it.  Th result is that the formerly meged cells at that location are now split.
Comment 3 James B. Byrne 2017-03-10 16:58:36 UTC
Created attachment 131801 [details]
gdb trace of formula paste splitting merged cells

The request trace from LibreOffice-5.3 is attached.  

Installed Packages
Name        : libreoffice5.3
Arch        : x86_64
Version     :
Release     : 3
Size        : 4.3 M
Repo        : installed
From repo   : /libreoffice5.3-
Summary     : Brand module for LibreOffice 5.3 .0.3
License     : LGPL
Description : Brand module for LibreOffice 5.3
Comment 4 Xisco Faulí 2017-03-10 18:52:59 UTC
Confirmed in

Build ID: 5f33745c1d6750126e53a02b2a95355a3e5b16a0
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Steps to reproduce:
1. Open attach document
2. Merge 3 columns in E:22 to H:22
3. Copy E4
4. Paste special in E:22

Result: Merged cells get split.
Comment 5 Xisco Faulí 2017-03-10 19:19:04 UTC Comment hidden (obsolete)
Comment 6 Xisco Faulí 2017-03-10 19:23:37 UTC Comment hidden (obsolete)
Comment 7 James B. Byrne 2017-03-13 15:37:32 UTC Comment hidden (obsolete)
Comment 8 James B. Byrne 2017-03-13 15:40:50 UTC
In any case, why would copying and pasting text and numbers without format split merged cells in the target as an expected behaviour?
Comment 9 Buovjaga 2017-03-23 11:48:25 UTC
Clarified steps to reproduce:
1. Open attachment 131543 [details]
2. Merge the cells E22 to H22
3. Copy E4
4. Paste special in E22, only tick the Formulas checkbox

Result: Merged cells get split.

Not related to the commit mentioned in comment 5 as this already happens in 3.5.

Win 7 Pro 64-bit Version:
Build ID: 1670cc25bc2771e87f7956a4b0dd634abaa4128b
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-22_23:28:42
Locale: fi-FI (fi_FI); Calc: CL

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 10 QA Administrators 2018-03-24 03:31:40 UTC Comment hidden (obsolete)
Comment 11 Timur 2018-12-28 09:15:08 UTC
Repro 6.3+.