Bug 90943 - During merge, don't ask to move cells if they are empty
Summary: During merge, don't ask to move cells if they are empty
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Laurent Balland
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks: Calc-Merge-Split
  Show dependency treegraph
 
Reported: 2015-04-29 17:13 UTC by myplace4yourspam
Modified: 2017-06-03 19:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
screencapture of bug (33.97 KB, image/png)
2015-04-29 17:13 UTC, myplace4yourspam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description myplace4yourspam 2015-04-29 17:13:01 UTC
Created attachment 115193 [details]
screencapture of bug

Steps to reproduce bug...

1.  Enter any text into cell A1
2.  Right click row 1 and select "Insert Rows Above"
3.  Select cells A1 to B1
4.  Click the "Merge and Center Cells" toolbar button

The aforementioned procedure results in a dialog which displays the following...
"Should the contents of the hidden cells be moved into the first cell?"

Selecting B1 to C1 and merging works as expected.  I suspect this has something to do with the insert new row command carrying information about the row below it since the dialog only appears when merging cells above cells that contain data.
Comment 1 Buovjaga 2015-04-29 18:51:37 UTC
Reproduced, but not with 3.5.0!!

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+ (x64)
Build ID: f0edb677f09ad338e22ac3b5d91497b4479e0b3c
TinderBox: Win-x86_64@42, Branch:master, Time: 2015-04-27_01:54:20
Locale: fi_FI

Ubuntu 15.04 64-bit 
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 2 Matthew Francis 2015-05-06 11:57:59 UTC
I can reproduce this back to OOo 3.3.0

@Beluga: Also reproduces for me on libreoffice-3.5.0rc3, could you re-check? Thanks

-> Version: Inherited from OOo
Comment 3 Buovjaga 2015-05-06 13:40:47 UTC
(In reply to Matthew Francis from comment #2)
> I can reproduce this back to OOo 3.3.0
> 
> @Beluga: Also reproduces for me on libreoffice-3.5.0rc3, could you re-check?
> Thanks
> 
> -> Version: Inherited from OOo

unable to reproduce on Win 7 
LibreOffice 3.5.0rc3 
Käännöksen ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 4 Laurent Balland 2016-07-20 08:42:09 UTC
The bug is simpler to reproduce:
1. Enter value in A2
2. Select A1:B1
3. Click the "Merge and Center Cells" toolbar button

Actual behavior:
A dialog asks "Should the contents of the hidden cells be moved into the first cell?"

Expected behavior:
As B1 is empty, there is nothing to move, so there should not be any question

Conditions to reproduce:
- select only 1 line
- a value is present in the first column of the next line of the selection

Entry point:
http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/viewfun2.cxx#MergeCells
Test here fails:
http://opengrok.libreoffice.org/xref/core/sc/source/ui/view/viewfun2.cxx#1066
Comment 5 Commit Notification 2016-07-22 11:59:13 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0baeea95f38a5cdb19936290c69d33541274ad41

tdf#90943 Don't ask to move cells if they are empty

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.