Bug 171041 - Landscape page: print preview switches to portrait on printer change
Summary: Landscape page: print preview switches to portrait on printer change
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.8.0 target:25.8.6 target:26...
Keywords:
: 164088 165592 171364 (view as bug list)
Depends on:
Blocks: Print-Preview
  Show dependency treegraph
 
Reported: 2026-02-26 15:43 UTC by Mike Kaganski
Modified: 2026-03-17 15:32 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
A sample configured as Landscape Letter (9.64 KB, application/vnd.oasis.opendocument.spreadsheet)
2026-02-26 15:43 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2026-02-26 15:43:21 UTC
Created attachment 205811 [details]
A sample configured as Landscape Letter

Create a Calc document. Configure page style (Format -> Page Style) to be landscape. Add some text to some cells.

File->Print to open Print dialog. The preview shows the page landscape, as expected. Now change printer.

Expected: the preview shows the landscape page with newly selected printer, as it did initially.

Actual: the page is now shown portrait.

The attachment has page style configured Landscape Letter, with some text and some borders, to see the result easily.
Comment 1 Mike Kaganski 2026-02-26 15:55:57 UTC
https://gerrit.libreoffice.org/c/core/+/200456
Comment 2 BogdanB 2026-02-26 16:29:36 UTC
Waiting for this patch to land.
A lot of different bugs could be solved by this.
Comment 3 Commit Notification 2026-02-26 18:47:32 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#171041: avoid setting mbUsePrintSetting for automatic orientation

It will be available in 26.8.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 4 BogdanB 2026-02-26 19:53:36 UTC
Resolved in
Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: b7957bf31e05dc55015e41c9dfcaa7e26b533eef
CPU threads: 16; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Bad in
Version: 26.2.0.3 (X86_64)
Build ID: afbbd0df0edb6d40b450b0337ac646b0913a760c
CPU threads: 16; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: ro-RO (en_US.UTF-8); UI: en-US
Calc: threaded

Thanks, Mike.
Comment 5 BogdanB 2026-02-26 19:55:35 UTC
*** Bug 164088 has been marked as a duplicate of this bug. ***
Comment 6 BogdanB 2026-02-26 20:36:54 UTC
*** Bug 165592 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2026-02-26 20:49:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/2a0fa8b18afe6446b8e801a182ea0e8144291861

tdf#171041: avoid setting mbUsePrintSetting for automatic orientation

It will be available in 25.8.6.

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 8 Commit Notification 2026-02-26 20:49:47 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/88f0dfc4baa421e24ab0650b384d95ed0a19d30c

tdf#171041: avoid setting mbUsePrintSetting for automatic orientation

It will be available in 26.2.2.

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 9 BogdanB 2026-02-27 05:32:50 UTC
*** Bug 171051 has been marked as a duplicate of this bug. ***
Comment 10 Mike Kaganski 2026-03-17 11:27:44 UTC
*** Bug 171364 has been marked as a duplicate of this bug. ***
Comment 11 helpdesk 2026-03-17 15:32:20 UTC
(In reply to Commit Notification from comment #7)
> Mike Kaganski committed a patch related to this issue.
> It has been pushed to "libreoffice-25-8":
> 
> https://git.libreoffice.org/core/commit/
> 2a0fa8b18afe6446b8e801a182ea0e8144291861
> 
> tdf#171041: avoid setting mbUsePrintSetting for automatic orientation
> 
> It will be available in 25.8.6.
> 
> 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.

Tested with LibreOfficeDev_25.8.7.0.0_Win_x86-64.msi and can confirm that the described issue did not occur!