Bug 134882 - Calc: PageStyle: Fit print range to width/height is not expanding to the margins
Summary: Calc: PageStyle: Fit print range to width/height is not expanding to the margins
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.5.2 release
Hardware: All All
: medium normal
Assignee: BogdanB
URL:
Whiteboard: target:7.5.0
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Print-Range
  Show dependency treegraph
 
Reported: 2020-07-16 19:36 UTC by BogdanB
Modified: 2022-11-03 16:23 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
exemple file (9.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-07-16 19:37 UTC, BogdanB
Details
video showing the bug (2.92 MB, video/mp4)
2020-07-16 19:37 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BogdanB 2020-07-16 19:36:31 UTC
Description:
1. Open the file exemple-file.ods I provided.
2. Press Shift+Ctrl+O and go to Format Page
3. From the Sheet tab choose "Fit print range to width/height"
4. What I expect: even if the table doesnt fit in one page, because it is to big, if the height is to big and I set to be one page, everything should be forced to be in one page by height, so from up to down everything match. And also if the width is much larger, everything should fit. And here everything works as expacted. But if the text is smaller than the width or smaller than the heigt of the page it is not forced to FIT to it's width/height. 

So I ended having a table in a corner of a page. If the option is FIT, this is what it should do, even if the text is smaller than the page... Should fit by height or witdh, depending which one is first to reach margins...

See the video. It's much easier to understand.




Steps to Reproduce:
1. See description

Actual Results:
Everything fit only when width or height is bigger than one page...

Expected Results:
Everything fit even when width and height are smaler than margins of the page...


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 6.4.5.2
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 BogdanB 2020-07-16 19:37:05 UTC
Created attachment 163134 [details]
exemple file

exemple-file.ods
Comment 2 BogdanB 2020-07-16 19:37:26 UTC
Created attachment 163135 [details]
video showing the bug
Comment 3 SteveDee 2020-08-13 02:30:37 UTC
I can confirm that the bug is present in the following builds:

Version: 6.4.5.2 (x64)
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: GL; VCL: win; 
Locale: en-AU (en_US); UI-Language: en-GB
Calc: CL

and:

Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-AU (en_US); UI: en-GB
Calc: CL
Comment 4 BogdanB 2021-01-15 21:20:15 UTC
Also in
Version: 7.2.0.0.alpha0+
Build ID: 5adc93a9a9426ef79054751be2904896f787a8a2
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 5 BogdanB 2021-07-14 10:20:32 UTC
The same. Retested in
Version: 7.2.0.1.0+ (x64) / LibreOffice Community
Build ID: ffeeb78118a887419c5f33bb5311f0e2ddae463c
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 6 Kevin Suo 2021-11-18 15:43:46 UTC
This is not a bug. How about when you have only one column and one row? Should it be enlarged to take the full paper space? Of course not in my opinion.

And how is Excel and other Spreadsheet softwares handling this?


@Eike, what do you think?
Comment 7 Eike Rathke 2021-11-18 19:16:51 UTC
We maybe should label it "Shrink to fit width/height if necessary" to prevent wrong expectations like this.
Comment 8 BogdanB 2021-11-18 20:44:11 UTC
Exactly, from that expresion I have expectation that the content will fit.

Fit "print range" to width/height
So, if I choose a single cell as a print range this cell should fit to width or height of the page dimension I choose. This is what is offered by this expression.
Comment 9 BogdanB 2021-11-18 20:46:45 UTC
Many people use LibreOffice for one page setup, like an invoice. Now, if the invoice is smaller on that page (width and height) this will look small on page, but with this option I could very easy fix my problem with one check.

For pages that are on more pages this option works well. But just for decreasing to one page, not to increasing to fit one page.
Comment 10 QA Administrators 2021-11-19 05:19:42 UTC Comment hidden (obsolete)
Comment 11 BogdanB 2022-01-21 02:09:53 UTC
I added keyword needsUXEval about comment 7. If not implemented it is the best solution to change the expression there.
Comment 12 Heiko Tietze 2022-01-25 10:02:10 UTC
So the idea is to rename

Fit print range(s) on number of pages
Fit print range(s) to width/height

to, probably more precisely

Shrink to fit on number of pages, if necessary
Shrink to width/height, if necessary

Not sure this is more easy to understand. An alternative could be to just exchange "Fit" to "Shrink" only for the first option.
Comment 13 BogdanB 2022-01-25 19:58:31 UTC
Variant 1. To keep "print ranges" like before, "if necessary" in paranthesis

Shrink print ranges(s) to width/height (if necessary)
Shrink print ranges(s) to fit on number of pages (if necessary)

------------------------------------------------------------------
Variant 2. To keep "print ranges" like before, "if necessary" without paranthesis

Shrink print ranges(s) to width/height, if necessary
Shrink print ranges(s) to fit on number of pages, if necessary

------------------------------------------------------------------
Variant 3. Without "print ranges", "if necessary" with paranthesis

Shrink to fit width/height (if necessary)
Shrink to fit on number of pages (if necessary)

------------------------------------------------------------------

Variant 4. Without "print ranges", "if necessary" without paranthesis
Shrink to fit width/height, if necessary
Shrink to fit on number of pages, if necessary

------------------------------------------------------------------
Variant 5. Simple

Shrink to fit width/height
Shrink to fit on number of pages

------------------------------------------------------------------
Variant 6. Like before, but replacing Fit with shrink

Shrink print ranges(s) to width/height
Shrink print ranges(s) on number of pages
Comment 14 Heiko Tietze 2022-01-26 07:00:16 UTC
(In reply to BogdanB from comment #13)
> Variant(s)...

And which one would be your preference?
Comment 15 BogdanB 2022-01-26 07:07:45 UTC
I prefer variant 6. Reason: it is mentioning print ranges, so is very clear that you need to define print ranges, it has the new term "shrink", and also is very simple in the end. No more text to interpret. Is needed, why is neewdwd and when. LibreOffice will take care of your criteria and if needed you will have a maximum number of pages, or a maximum height, width.
Comment 16 Buovjaga 2022-01-27 13:40:59 UTC
Relevant help file to adjust when doing rename: source/text/scalc/01/05070500.xhp
Comment 17 Heiko Tietze 2022-01-28 11:21:23 UTC
Seems we have an agreement to carefully change the wording. That means "Fit" should become "Shrink". 

Code pointer: 
* sc/inc/globstr.hrc: STR_SCATTR_PAGE_SCALETOPAGES and STR_SCATTR_PAGE_SCALETO 
* sc/uiconfig/sclc/ui/sheetprintpage.ui: entries at the combobox comboLB_SCALEMODE
Comment 18 Commit Notification 2022-11-02 10:14:20 UTC
Bogdan B committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c4f5d456e5801843f00a43afd9c0fa43c412d265

tdf#134882 Change label in the dialog: 'fit' is replaced with 'shrink'

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2022-11-03 06:43:21 UTC
Bogdan B committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/f129a53a423805628f95cf72469f48f5279147a6

tdf#134882 Improve help about changing label from 'fit' to 'shrink'