Bug 148441 - Hide ViewLayout in status bar in print preview mode
Summary: Hide ViewLayout in status bar in print preview mode
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:7.6.0
Keywords: difficultyMedium, easyHack, needsDevAdvice, skillCpp, topicUI
: 151815 (view as bug list)
Depends on:
Blocks: Print-Preview Page-View
  Show dependency treegraph
 
Reported: 2022-04-07 10:26 UTC by sdc.blanco
Modified: 2023-02-07 13:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
for testing print preview (11.77 KB, application/vnd.oasis.opendocument.text)
2022-04-07 10:26 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2022-04-07 10:26:40 UTC
Created attachment 179371 [details]
for testing print preview

Tested with 7.4.0.0.alpha0+

1. Open multiple page document (or use attached)
2. File > Print Preview
3. Notice View Layout icons in lower right corner (of Status Bar)

     Actual: Two Page icon is highlighted blue
   Expected: One Page icon is highlighted.

4. In Print Preview bar, choose another View Layout  (e.g., Book Preview, Multiple Page)

    Actual: Two Page icon is (still) highlighted blue.
  Expected: Icon shows which layout is selected

5.  Choose Two Pages Preview (in Print Preview bar)
6.  Click on the Single Page icon in Status bar

    Actual: Two pages shown, with Two Pages icon highlighted in Status Bar
  Expected: One page shown, and One Page icon highlighted in Status Bar.

7. Resize the Window

   Actual: One page icon now highlighted blue, but two pages remain shown.

Question:  Are the View Layout Icons in the status bar supposed to "work" (i.e., clickable to change appearance) or be "informational" (i.e., to show the chosen layout)?

If not, then maybe they should be removed.
Comment 1 Heiko Tietze 2022-04-08 10:11:21 UTC
(In reply to sdc.blanco from comment #0)
> Question:  Are the View Layout Icons in the status bar supposed to "work"
> (i.e., clickable to change appearance) or be "informational" (i.e., to show
> the chosen layout)?
Apparently not

> If not, then maybe they should be removed.
Maybe the easiest solution.

My guess for a code pointer (needsDevAdvice to review):
sw/source/uibase/uiview/pview.cxx -> SwPagePreview::GetState()
.uno:ViewLayout
Comment 2 Heiko Tietze 2022-09-07 05:39:15 UTC
The previewobjectbar lists the commands and allows to switch between view modes. Weird that it cannot be done via statubar.
Comment 3 Timur 2022-09-08 10:16:56 UTC
Seems like lazy man approach to remove..yes, that's a step forward from the current confusion - but better of course would be that those buttons also work for print preview mode.
Comment 4 Dieter 2022-11-13 06:11:34 UTC
*** Bug 151815 has been marked as a duplicate of this bug. ***
Comment 5 Sakura286 2022-11-24 08:39:19 UTC
The logic of the status bar buttons are different from the print preview bar buttons.

The three buttons on status bar:

1. Single-page view
2. Multiple-page view
3. Book view

↑ They are independent between each other.

The buttons on print preview bar:

1. Single Page Preview
2. Two Pages Preview
3. Book Preview
4. Multiple Pages Preview

↑ 1,2 and 4 are not independent with Book Preview button - you can press Book Preview and Single Page buttons at the same time.

Since they have the different logic, the status bar buttons and the print preview bar buttons are NOT in one-to-one correspondence. Maybe the status bar view buttons should be removed in print-preview mode.
Comment 6 Stéphane Guillou (stragu) 2023-01-20 09:44:04 UTC
Repro in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 579d144290c1617fdb38d09b30900a6bbe390b8d
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Very confusing, as users are likely more used to go to the status bar to change the page layout than looking at the toolbar. They find three buttons that are not functional anymore.
Comment 7 Commit Notification 2023-02-07 13:54:28 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0b9aef0aaa7c17cc7da722002e27996a01ffc7fa

Resolves tdf#148441 - Hide viewlayout in statusbar in preview mode

It will be available in 7.6.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.