Download it now!
Bug 55870 - When copying filtered table, which contains subtotals, from calc and pasting as GDI Metafile into writer, wrong values are pasted.
Summary: When copying filtered table, which contains subtotals, from calc and pasting ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.6.2 release
Hardware: Other All
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste-Special Function-Subtotal
  Show dependency treegraph
 
Reported: 2012-10-11 11:45 UTC by Nikos
Modified: 2019-11-22 09:04 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Ods table with filters and subtotal function (8.27 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-10-11 11:45 UTC, Nikos
Details
Odt file showing the wrong result (9.86 KB, application/vnd.oasis.opendocument.text)
2012-10-11 11:46 UTC, Nikos
Details
Comparisson Metafile - bitmap (12.04 KB, application/vnd.oasis.opendocument.text)
2012-10-19 07:06 UTC, Nikos
Details
after removing auto filter (42.95 KB, image/png)
2013-03-23 12:07 UTC, Brenda Granados
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikos 2012-10-11 11:45:16 UTC
Created attachment 68434 [details]
Ods table with filters and subtotal function

Steps to reproduce

Open file 20121110bug.ods.
Select visible cells (with filter set)
copy
Create new .odt file
paste special --> GDI Metafile

Expected behavior:
A picture is inserted in the .odt file, with the values that were visible in the .ods (correctly calculated subtotal)

Actual behavior:
A picture is inserted in the .odt file, even though only the filtered cells are shown, the subtotal function is wrong!
Comment 1 Nikos 2012-10-11 11:46:53 UTC
Created attachment 68435 [details]
Odt file showing the wrong result
Comment 2 Nikos 2012-10-11 15:41:25 UTC
BTW Bitmap works fine
Comment 3 Nikos 2012-10-11 16:46:00 UTC
Tested on Win7 and OpenSuse 12.2 64bit with LibreOffice 3.6.2.2.
Also reproducible on Win7 with Libreoofice 3.5.6
Comment 4 Nikos 2012-10-16 07:42:17 UTC
I also tested, that this is unrelated to enabling "experimental features". Please feel free to ask for clarifications if the bug description is not clear enough.
Comment 5 Nikos 2012-10-19 07:06:45 UTC
Created attachment 68784 [details]
Comparisson Metafile - bitmap
Comment 6 Nikos 2012-11-01 14:00:53 UTC
Changed component to writer. I don't know if this is really a writer issue or a calc issue, but I got the feeling if I don't select something, simply nobody will ever look at it.
Comment 7 Nikos 2012-12-24 09:26:54 UTC
How, about giving me a little feedback on this bug...as a Christmas present?

Thank you, and have nice holiday.
Comment 8 Nikos 2013-02-05 07:58:32 UTC
Persists on 4.0.3
Comment 9 Brenda Granados 2013-03-23 12:05:14 UTC
Hi, I am sorry it took so long to respond to this bug. I did want to let you know I have confirmed the behavior- the subtotal after copy-paste from the .ods is incorrect.

Here are the steps I followed:

1. Open the bug .ods file.
2. Highlight all the data, including subtotal.
3. Go to Data -> Filter. Check Auto Filter.
4. Ctrl- C to copy cells, including subtotal.
5. Copy -> Paste (or Copy -> Paste special -> GDI Metafile) into Writer document.

Expected Result: cell information, including subtotal, copied as is.

Actual Result: subtotal is different.


As you mentioned, Copy-> Paste Special -> Bitmap does not result in an error.

Something else I noticed: When I try to remove the filter by going to Data -> Filter and unchecking Auto Filter.... the .ods changes. The left column shows a, b, c, and the right column repeats 1, 2, 3. The new subtotal after that is now 42. So maybe when you copy-paste to .odt, the filter is removed. I will include a screenshot.
Comment 10 Brenda Granados 2013-03-23 12:07:37 UTC
Created attachment 76936 [details]
after removing auto filter
Comment 11 Brenda Granados 2013-03-23 12:14:34 UTC
I forgot to include the version/ platform used to test:

Version: Version 4.0.2.1 (Build ID: 7e5467ff8f30d821f4fbf69cb2769163eb64c2c)
Platform: Ubuntu Linux 12.04 LTS x64

Finally, I think the priority should be lowered to a Normal - High/Highest. The Major priority is for things such as unable to print, save documents, tediously slow. There is a temporary workaround, the Bitmap copy-paste. I hope you agree.

-Brenda

-----------------------------
LibreOffice is powered by a team of volunteers, every bug is confirmed (triaged) by human beings who mostly give their time for free. We invite you to join our triaging by checking out this link: https://wiki.documentfoundation.org/QA/BugTriage  There are also other ways to get involved including with marketing, UX, documentation, and of course developing -  http://www.libreoffice.org/get-help/mailing-lists
Comment 12 Nikos 2013-06-20 12:35:50 UTC
No problem, I think I had only changed that in desperate search for attention...At least now I know this is not my diary ;-)
Comment 13 Nikos 2013-09-19 06:12:59 UTC
Persists on 4.1.2.2
Comment 14 QA Administrators 2015-04-19 03:20:03 UTC Comment hidden (obsolete)
Comment 15 Nikos 2015-04-19 08:37:23 UTC
Still reproducible on 4.4.3 on Windows 7, Ubuntu 14.04 and on 4.4.1 OpenSuse 13.2.
Comment 16 QA Administrators 2016-09-20 09:24:31 UTC Comment hidden (obsolete)
Comment 17 Nikos 2017-10-19 07:49:55 UTC
Still reproducible on 5.4.4.2
Comment 18 Helder Guerreiro 2018-04-16 09:59:35 UTC
Just to report that I was caught by this bug in 5.4.5.1 (running in Kubuntu 16.10 but reproducible in windows 7).

I think this is a serious bug since this causes harm in the real world. One colleague of mine created a report with wrong values. In a way, we can think of this bug as data corruption. The bitmap workaround is not entirely satisfactory.

I was not able to create a minimal example.
Comment 19 Jean-Baptiste Faure 2018-07-23 20:47:25 UTC
Tested with LO 6.1.1.0.0+ under Ubuntu 16.04.
It works as expected if the subtotal formula is changed as follows:
=SUBTOTAL(109;B2:B22)

https://help.libreoffice.org/6.1/en-US/text/scalc/01/04060106.html?DbPAR=CALC#bm_id3165633

I guess the code that produces the GDI metafile confuses hidden rows and filtered-out cells.

Best regards. JBF
Comment 20 QA Administrators 2019-08-01 03:36:50 UTC Comment hidden (obsolete)
Comment 21 Helder Guerreiro 2019-08-01 07:36:36 UTC
I can still reproduce this bug in Libreoffice 6.1.6.3 in Ubuntu 18.10 and in LibreOffice 6.2.5.2 in Windows 10.
Comment 22 JohnML 2019-10-02 09:34:14 UTC
Same (??) issue for Calc (LibreOffice-fresh) 

If only SubTotals are Shown and copied: ALL cells ( also non visible) will be inserted
Comment 23 Nikos 2019-11-22 09:04:45 UTC
(In reply to JohnML from comment #22)
> Same (??) issue for Calc (LibreOffice-fresh) 
> 
> If only SubTotals are Shown and copied: ALL cells ( also non visible) will
> be inserted

What you describe is actually not the same problem. In the original bug, only visible cells are copied, but the sums are wrong.