Bug 129162 - UI: PDF Export: Disable range options when "Whole sheet export" option is checked (See comment#4)
Summary: UI: PDF Export: Disable range options when "Whole sheet export" option is che...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, implementationError, skillCpp, topicUI
: 161268 (view as bug list)
Depends on:
Blocks: PDF-Export-Options-Dialog
  Show dependency treegraph
 
Reported: 2019-12-03 16:42 UTC by Cor Nouws
Modified: 2024-05-25 06:43 UTC (History)
6 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 Cor Nouws 2019-12-03 16:42:18 UTC
With a spreadsheet, with multiple sheets and a defined print range

- Select one sheet
- File > Export as PDF
- Tab General, Range.. choose Selected sheets

  > one expects that only selected sheet (possibly print range) is exported.

If however the Full-sheet Preview (Structure) is set (is remembered from last export), the result of the export is the full spreadsheet.
Comment 1 Cor Nouws 2019-12-03 16:45:27 UTC
So should "Full-sheet previews" disable the widgets for setting the range?

The distance/position of the various controls is not ideal for that, I think.
Comment 2 Heiko Tietze 2019-12-06 10:11:23 UTC
First of all it behaves differently depending on the checkbox on or off. And that's a clear bug (if Full Preview alters the printing options it's required to enabled/disable those respectively, but that's likely not true here).

The "Full-Sheet previews" (why plural) is another undocumented and misleading function. At least we should provide a tooltip explaining "If this option is enabled you see all pages in one" (with a better text of course).
Comment 3 Muhammet Kara 2019-12-06 10:32:13 UTC
(In reply to Heiko Tietze from comment #2)
> First of all it behaves differently depending on the checkbox on or off. And
> that's a clear bug (if Full Preview alters the printing options it's
> required to enabled/disable those respectively, but that's likely not true
> here).

That's actually the case here. full-sheet previews option disregards some other options intentionally.

> 
> The "Full-Sheet previews" (why plural) is another undocumented and
> misleading function. At least we should provide a tooltip explaining "If
> this option is enabled you see all pages in one" (with a better text of
> course).

I explained it on a blog post[0], but might have forgotten to add to the release notes. I'll add it to the release notes, and create a documentation bug report also.

I agree on disabling/greying-out the disregarded options.

[0] https://muhammetkara.com/post/2019-10-18-full-sheet-previews-in-libreoffice/
Comment 4 Muhammet Kara 2019-12-06 10:55:25 UTC
Let's make this an easyhack.

Check for the value of mbSinglePageSheets in the ImpPDFTabDialog class, and disable related items (all of the items under "General > Range" of the "PDF Options" dialog, which could be displayed by following "File > Export as PDF..." menu) on the dialog based on the value of it.

You will need to do the first disabling (if needed) inside ImpPDFTabGeneralPage::SetFilterConfigItem() method, probably just after this line:

mxCbSinglePageSheets->set_active(pParent->mbSinglePageSheets);

Then you need to add a toggle handler for the mxCbSinglePageSheets checkbox, and enable/disable the range options inside that toggle handler based on the value/state of the checkbox. (You may check the toggle handlers of the mxCbReduceImageResolution and the mxCbWatermark checkboxes to see how it is done.)

It is also probably a good idea to check the related blog post to understand the option, and get some tips: https://muhammetkara.com/post/2019-10-18-full-sheet-previews-in-libreoffice/
Comment 5 Mohamed Sameh 2020-02-15 20:11:22 UTC
I would like to work on this easy hack but I can not reproduce it as I can't find the 'Full-Sheet previewes' option. I have a Calc window with 2 empty sheets and I dont have the option described in https://muhammetkara.com/post/2019-10-18-full-sheet-previews-in-libreoffice/

a screenshot of my options https://imgur.com/a/d7Vw7DS
Comment 6 Muhammet Kara 2020-02-18 13:26:39 UTC
(In reply to Mohamed Sameh from comment #5)
> I would like to work on this easy hack but I can not reproduce it as I can't
> find the 'Full-Sheet previewes' option. I have a Calc window with 2 empty
> sheets and I dont have the option described in
> https://muhammetkara.com/post/2019-10-18-full-sheet-previews-in-libreoffice/
> 
> a screenshot of my options https://imgur.com/a/d7Vw7DS

It was renamed to "Whole sheet export"
Comment 7 QA Administrators 2022-02-18 03:42:00 UTC Comment hidden (obsolete)
Comment 8 Cor Nouws 2022-02-20 20:49:48 UTC
(In reply to QA Administrators from comment #7)

> If you have time, please do the following:

Still the same in Version: 7.1.0.1
Build ID: b585d7d90ab863bf29b2d110c174c0c2a98f3ee4
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: nl-NL (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 9 QA Administrators 2024-02-21 03:14:06 UTC Comment hidden (obsolete)
Comment 10 Stéphane Guillou (stragu) 2024-03-06 23:50:35 UTC
Same in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9574a62add8e4901405e12117e75c86c2d2c2f21
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Already the case in:

Version: 6.4.0.0.alpha1
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: CL

(In reply to Muhammet Kara from comment #4)
> Check for the value of mbSinglePageSheets in the ImpPDFTabDialog class, and
> disable related items (all of the items under "General > Range" of the "PDF
> Options" dialog
I think the idea solution would be to only disable the "Page" option, still allowing the user to export all sheets / a selection of sheet(s) / the active sheet / the selected sheet with the "whole sheet" option on.
Comment 11 Stéphane Guillou (stragu) 2024-03-07 00:09:45 UTC
(In reply to Stéphane Guillou (stragu) from comment #10)
> I think the idea solution
*ideal* solution
Comment 12 raal 2024-05-25 06:43:04 UTC
*** Bug 161268 has been marked as a duplicate of this bug. ***