Bug 152440 - BOOK VIEW: Switching page view to book view or from book view results in a switch to a semi-random page
Summary: BOOK VIEW: Switching page view to book view or from book view results in a sw...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: Writer-View-Jumps
  Show dependency treegraph
 
Reported: 2022-12-09 17:23 UTC by rferraro
Modified: 2024-09-18 12:47 UTC (History)
5 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 rferraro 2022-12-09 17:23:15 UTC
Description:
Switching between single page view and multiple page view remains at the page you are on but when you select book view or page preview it goes to what seems to be a random page. The same happens when in book view and you go to single or multiple page view. 
Also, when you exit page preview it would be nice if within the document it exits at the page you are at. Instead, it seems to go to a random page just as when switching views in the top paragraph. I am working with a 1,600-page document and it makes it very clumsy to work with.

Actual Results:
You just have to switch page views in the bottom status bar.

Expected Results:
It goes to random pages.


Reproducible: Always


User Profile Reset: No

Additional Info:
It has been occurring for as long as I have been using Writer - a couple of years. So, it has been in all the versions.
Comment 1 Dieter 2022-12-24 12:42:29 UTC
I confirm it with

Version: 7.4.4.1 (x64) / LibreOffice Community
Build ID: 988f4a351a6fa8cf4bdf2bdc873ca12cf8cbe625
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Single page -> multi-page: OK.
Multi-page -> single-page: OK.
Single-page -> Book View: view jumps to a total different page
Book View -> single-page: view jumps to a total different page
Book view -> multiple-page: view jumps to a total different page
Multiple-page -> Book view: view jumps to total different page
Comment 2 V Stuart Foote 2022-12-24 18:47:17 UTC
@Jim, any hints to make this easy-hackable?
Comment 3 Jim Raykowski 2022-12-27 02:16:46 UTC
(In reply to V Stuart Foote from comment #2)
> @Jim, any hints to make this easy-hackable?
If we want to make the page the cursor is on be a visible page in the view when the modes are switched I would investigate the removal of LockView and as an aside LockPaint in the SwView::SetViewLayout function[1].

[1] sw/source/uibase/uiview/viewmdi.cxx
Comment 4 Buovjaga 2024-09-15 17:44:57 UTC
Still repro. To repro, you need to be on some page other than the first.

Already in oldest of 43all repo.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fb39ae1bc7e4b1cbfc3108efca52ec310faf7363
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 14 September 2024
Comment 5 Commit Notification 2024-09-17 17:50:34 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

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

Resolves tdf#152440 BOOK VIEW: Switching page view to book view

It will be available in 25.2.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 6 Buovjaga 2024-09-18 12:47:20 UTC
Verified, thanks

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 36b988312ae8013deefcdf4800592230e7c95ad8
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded