Bug 137601 - export to PNG incorrectly uses first worksheet instead of current one
Summary: export to PNG incorrectly uses first worksheet instead of current one
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 158413 (view as bug list)
Depends on:
Blocks: File-Export
  Show dependency treegraph
 
Reported: 2020-10-19 19:23 UTC by Oliver Grimm
Modified: 2023-11-28 12:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of export window (Windows OS) (27.88 KB, image/png)
2020-11-03 08:44 UTC, wingednova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Grimm 2020-10-19 19:23:25 UTC
Description:
Using the "export PNG" feature of LO Calc leads to Calc exporting the first worksheet instead of exporting the current worksheet.

Steps to Reproduce:
1. create a new calc document
2. type some text, e.g. "test page 1"
3. add a second worksheet by pressing the "plus" sign in the worksheet area
4. type some text "test page 2" on the second worksheet
5. select "file | export" and select PNG file type
6. run the export and have a look at the exported PNG

Actual Results:
the PNG file contains the line "test page 1"

Expected Results:
the PNG file should contain the line "test page 2"


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.2.2
Build ID: 00(Build:2)
CPU threads: 2; OS: Linux 5.8; UI render: default; VCL: kf5
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.0.2-2
Calc: threaded
Comment 1 wingednova 2020-11-03 08:44:55 UTC
Created attachment 166962 [details]
Screenshot of export window (Windows OS)
Comment 2 wingednova 2020-11-03 08:47:30 UTC
(In reply to wingednova from comment #1)
> Created attachment 166962 [details]
> Screenshot of export window (Windows OS)

Could you try:
On the sheet you wish you specifically export, open File -> Export. The Export dialog window that pops up should have, in addition to fields for file format, location, name, etc., two checkboxes - one of them is marked 'Selection'. Check that, and proceed as usual. You should be able to export a png with 'test page 2' showing up.

Does that work for you?
Comment 3 Martin Srdoš 2020-11-06 22:17:47 UTC
(In reply to wingednova from comment #2)
> (In reply to wingednova from comment #1)
> > Created attachment 166962 [details]
> > Screenshot of export window (Windows OS)
> 
> Could you try:
> On the sheet you wish you specifically export, open File -> Export. The
> Export dialog window that pops up should have, in addition to fields for
> file format, location, name, etc., two checkboxes - one of them is marked
> 'Selection'. Check that, and proceed as usual. You should be able to export
> a png with 'test page 2' showing up.
> 
> Does that work for you?

Hei,
I have same behavior in versions 6.4.7.2 and 7.0.3.1
I had simulated the issue and mark the checkbox "Selection" how you've written and there is no problem then.
Comment 4 Oliver Grimm 2020-11-09 11:55:56 UTC
Ticking the check box "selection" works for me, i.e correctly exports the second page. However, this reveals two usability bugs in my opinion:

I would not have guessed for "selection" to export the "selected worksheet". I understand that if I select some cells (not all) that "export selected" would export the selected cells. But I do not understand why the first page is exported instead of the second page if *no multiple* cells are selected.

Therefore please

1) relabel the checkbox "selection" to "only export selected cells" (there is no section title in this dialog (as in the print dialog), so we need to be somewhat specific here.

2) change the behaviour such that exporting always uses the currently selected worksheet.


If 2) is not acceptable for some reason please add a selector widget to set the worksheet to be exported.
Comment 5 Buovjaga 2020-11-14 09:01:18 UTC
(In reply to Oliver Grimm from comment #4)
> Ticking the check box "selection" works for me, i.e correctly exports the
> second page. However, this reveals two usability bugs in my opinion:
> 
> I would not have guessed for "selection" to export the "selected worksheet".
> I understand that if I select some cells (not all) that "export selected"
> would export the selected cells. But I do not understand why the first page
> is exported instead of the second page if *no multiple* cells are selected.
> 
> Therefore please
> 
> 1) relabel the checkbox "selection" to "only export selected cells" (there
> is no section title in this dialog (as in the print dialog), so we need to
> be somewhat specific here.
> 
> 2) change the behaviour such that exporting always uses the currently
> selected worksheet.
> 
> 
> If 2) is not acceptable for some reason please add a selector widget to set
> the worksheet to be exported.

Let's ask UX team for advice
Comment 6 Heiko Tietze 2020-11-16 09:43:23 UTC
Export > XHTML and XLS exports both Sheet1 and 2, 
       > PDF does Sheet2, 
       > PNG/JPG Sheet1

So I agree with Oliver. We should export the current/active sheet for formats that can handle only one sheet.
Ideally we have radio buttons with "(o) Table, ( ) Selection" and "( ) Current Sheet, ( ) Selection" but changing the label adds up confusion.


As an alternative solution I could imagine a dropdown on the export dialog that allows to pick a sheet. A bit weird, however, with the chance to check "selection" before.
Comment 7 David García 2023-11-28 12:20:24 UTC
*** Bug 158413 has been marked as a duplicate of this bug. ***
Comment 8 David García 2023-11-28 12:24:00 UTC
Hi,

I've also struggled with this issue on LO 7.6.3.2. I hadn't noticed the "Selection" button, and I agree it's a bit confusing. By default, it makes sense for the export feature to affect the current sheet.
Comment 9 David García 2023-11-28 12:26:38 UTC
By the way, I don't wish to open another issue now, as I've been bothering developers too much today, but when I export a sheet as an PNG, is it normal that I can't seem to improve the quality of the image by changing the dimension, the resolution or even the compression?