Bug 66646 - EDITING: Paste Special... Add does not treat Empty Cells as zero value
Summary: EDITING: Paste Special... Add does not treat Empty Cells as zero value
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: x86 (IA32) All
: medium major
Assignee: Markus Mohrhard
URL:
Whiteboard: target:4.2.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-07-06 15:16 UTC by rh_libre
Modified: 2013-09-27 15:53 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Paste Special... Add bug demo containing instructions to replicate (18.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-07-06 15:16 UTC, rh_libre
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rh_libre 2013-07-06 15:16:38 UTC
Created attachment 82123 [details]
Simple Paste Special... Add bug demo containing instructions to replicate

The instructions are in the attached file
PasteSpecialAddEmptyCellBug.ods

This bug is NOT present in the stable version of LibO I have installed:
Version 4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539)

The bug IS present in a recent nightly build:
Version: 4.2.0.0.alpha0+
Build ID: 6f86d931b4266d00fec75c0124ac9fc3026a4f1b
TinderBox: Win-x86@6, Branch:master, Time: 2013-07-02_23:36:17

I noticed the bug after the Conditional Format display bug 62267 was fixed in the Dev version nightly builds.

In brief, Copy from Row 1 then Paste Special/Add onto Row 2, should produce the values in Row 3 (and Row 3's Conditional Format will then have green background to confirm this. I deliberately did not include CF in the destination row as there had been a problem with that in Bug 62267 that is now fixed)

If the Row 2 value is an Empty Cell (but not if it's a numerical zero) no value is pasted into Row 2 and the cell remains empty. The two wrong values are indicated by Row 3 conditional formatting background remaining red.

I hope this can be fixed before it's incorporated into a public release because it will produce numerical errors compared to earlier versions and other spreadsheet applications such as MS Excel.
Comment 1 m_a_riosv 2013-07-06 19:39:33 UTC
Hi rh_libre, thanks for reporting.

Reproducible with:
Win7x64 Ultimate. 
Version: 4.2.0.0.alpha0+ Build ID: e703b429cf448deddc7682a33c3e6221889efe98

Skip empty destination cells.

Works as expected:
Version 4.0.4.2 (Build ID: 9e9821abd0ffdbc09cd8c52eaa574fa09eb08f2)
Version: 4.1.0.1 Build ID: 1b3956717a60d6ac35b133d7b0a0f5eb55e9155
Comment 2 rh_libre 2013-07-07 08:23:47 UTC
Not wanting to derail this topic, but it is appropriate to report display-refresh bugs in the Dev version or should they be expected just because it's a Dev Build?

(I have an 8000-row spreadsheet using Window/Freeze where the top half, above the freeze, refreshes but the bottom half doesn't until I scroll, showing, for example, the last webpage I was viewing before Alt-Tab)
Comment 3 m_a_riosv 2013-07-07 10:45:20 UTC
Hi rh, please report a new bug about it and if possible attach a file to see the issue, remember deleting or changing any private information.
Comment 4 Michel Rudelle 2013-07-15 09:01:05 UTC
Hi,
I confirm  with last download:
Version: 4.2.0.0.alpha0+ Build ID: cb14b1e56d2aab70d28afca8bf039a27f89671c8
TinderBox: Win-x86@6, Branch:master, Time: 2013-07-11_04:05:08
Vista-32b
Comment 5 Markus Mohrhard 2013-09-25 14:31:22 UTC
It is fixed now.
Comment 6 Commit Notification 2013-09-25 15:30:25 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=21da9b11df716a21a552e7b32357af49b728b233

fdo#66646: fix paste special with empty cells



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.
Comment 7 Commit Notification 2013-09-27 15:53:01 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=690228ad4dd4cf10ad6292686d4aad8dcc9e2793

add a unit test for fdo#66646



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.