Bug 108317 - Calc "export selection" exports whole page
Summary: Calc "export selection" exports whole page
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.0.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-03 09:27 UTC by Yan Pas
Modified: 2017-10-22 09:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yan Pas 2017-06-03 09:27:34 UTC
Description:
Calc "export selection" whole exports page

Steps to Reproduce:
1. Open any calc spreadsheet
2. Select some range of cells
3. File -> Export -> (check "Selection") ; (file type png | pdf) -> Save

Actual Results:  
It exports the page, but not selection

Expected Results:
It should export only selected cells


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Comment 1 Xavier Van Wijmeersch 2017-06-04 07:36:00 UTC
I confirmed the behavior

Version: 5.4.0.0.beta1
Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU threads: 2; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 2 m.a.riosv 2017-06-04 17:08:56 UTC
I think the issue it's that seems 'selection' refers to selected sheets not range, I understand it creates confusion.

In anyway a bug or with not working properly or with a confuse title.

But if you have defined the cell range on Menu/Format/Print ranges, it works fine
Comment 3 John Wf 2017-06-21 07:31:35 UTC
Assuming that the selection refers to pages instead of cells (does this even work?) is bound to cause confusion because Excel 2016 has a very similar tick-box to export a selection (to HTML) and in that case clearly refers to a cell-range because the cell-range is specified next to the tick-box.

In any case I tried using your suggested Menu>Format>PrintRanges approach in attempting to export a range of cells *to HTML* and it did not work any better than selecting the cells and ticking the selection box.  It seemed to simply export the entire page of cells (with lots of empty ones on the right and below where the page is larger than the small area of cells I wished to export)
Comment 4 Buovjaga 2017-07-27 19:01:20 UTC
Check it out, guys: https://cgit.freedesktop.org/libreoffice/core/commit/?id=a7a99a574660fc62a9514b2ed3f8ddfe8ad8540c

Test with latest master and hopefully mark as fixed.
Comment 5 Yan Pas 2017-08-16 11:45:55 UTC
High!
Tested with latest master (this night), patch doesn't work, still exports the page
Comment 6 Eike Rathke 2017-08-16 12:52:31 UTC
Master exports the selected cell range, but the PNG is of the size of a page, hence the confusion I guess. Exporting only the selection without any empty space will need further work.
Comment 7 Yan Pas 2017-08-16 12:56:21 UTC
Yes, you are correct. Moreover PNG contains footer and header with page number and sheet title respectively. IMO The desired behaviour would be just cells and nothing else
Comment 8 Eike Rathke 2017-08-16 13:10:50 UTC
And it still doesn't work at all with PDF or XHTML.
Taking.
Comment 9 Commit Notification 2017-08-29 10:45:44 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Export to PNG: export selected cell range only, not as page, tdf#108317

It will be available in 6.0.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.
Comment 10 Commit Notification 2017-08-29 10:45:51 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8c0c897c8cb92285e6461cc99ab0f2bbe15be65f

Export to PNG: init DPI with screen resolution, tdf#108317

It will be available in 6.0.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.
Comment 11 Commit Notification 2017-09-18 16:11:47 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Export to PNG: use proper dialog and filter options, tdf#108317

It will be available in 6.0.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.
Comment 12 Commit Notification 2017-09-18 16:47:15 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=52a6c68fb2fc817fc58419835cca73f6cd20b8fe

Calc: support export to JPEG, just because we can.. tdf#108317 related

It will be available in 6.0.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.
Comment 13 Commit Notification 2017-09-22 19:56:39 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d0d777fe8830a39a316b01e08864e4694a51964

Export to PNG: selected shapes via drawing::GraphicExportFilter, tdf#108317

It will be available in 6.0.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.
Comment 14 Yan Pas 2017-10-21 15:34:12 UTC
Thanks! Confirm that it's fixed