Bug 160601 - [UI] Slide sorter starts with hard coded number of slides per row (5 on Linux, 4 on Windows it seems) - no mean to set a preferred number
Summary: [UI] Slide sorter starts with hard coded number of slides per row (5 on Linux...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-09 15:42 UTC by Cor Nouws
Modified: 2024-04-21 20:16 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 2024-04-09 15:42:53 UTC
Open presentation
Choose View > Slide sorter
  > Number of slides per row is 5.
Set number to 3
Choose View > Normal
Choose View > Slide sorter
  > Number of slides per row is 3
  >  :)

Close presentation
Open same presentation
Choose View > Slide sorter
  > Number of slides per row is 5.
  >  :(


Also in Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 56767830b81fa21382b87cf43d78b1c73ca5dbd8
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 m_a_riosv 2024-04-09 18:57:16 UTC
For me, there are always 4 slides per row, it doesn't change after reopening the file.

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 432c866072aa62cf90168d569dc56cbc7269bcda
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Cor Nouws 2024-04-09 21:30:59 UTC
(In reply to m_a_riosv from comment #1)
> For me, there are always 4 slides per row, it doesn't change after reopening
> the file.

Me noticing the same when starting Windows..
Interesting, Miguel :)
Comment 3 Rafael Lima 2024-04-09 23:56:05 UTC
Apparently the number of slides per row is not persistent. It is neither saved to the file, nor to the registry (at the application level).

@Cor, what do you propose? You would like to have it saved to the file?
Comment 4 Cor Nouws 2024-04-10 10:26:25 UTC
Hi Rafael,
(In reply to Rafael Lima from comment #3)
> Apparently the number of slides per row is not persistent. 
Could it be that the hard coded 4* is interpreted as number on Windows and as index on Linux?
 *) https://opengrok.libreoffice.org/xref/core/sd/source/ui/view/frmview.cxx?r=83f7c6fe#225

> @Cor, what do you propose? You would like to have it saved to the file?
(Expert) option  :)
Comment 5 Cor Nouws 2024-04-10 10:27:06 UTC
(In reply to Cor Nouws from comment #4)
> (Expert) option  :)
&& happy to give it a try.
Comment 6 Cor Nouws 2024-04-12 09:02:18 UTC
patch for review in gerrit
https://gerrit.libreoffice.org/c/core/+/166028
Comment 7 Armondo Lopez 2024-04-13 15:09:01 UTC
I'm unable to reproduce this behavior in 

Version: 24.2.1.2 (X86_64) / LibreOffice Community
Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

or

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a2265e8faa099d9652efd12392c2877c2df1d1eb
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Whenever I restart the presentation, my slide view is at 4.
Comment 8 Cor Nouws 2024-04-14 08:26:58 UTC
(In reply to Armondo Lopez from comment #7)
> I'm unable to reproduce this behavior in 
thanks Armando. This confirms earlier reports that on Windows it is (always?) 4.
Comment 9 Cor Nouws 2024-04-14 08:27:36 UTC
(In reply to Cor Nouws from comment #8)
> thanks Armando. This confirms earlier reports that on Windows it is
Armondo - apologies.
Comment 10 Justin L 2024-04-18 12:06:33 UTC
I'm also on Linux 5.15 (Ubuntu 20.04) and I only get 4 slides per row - which based on the code patch is exactly what I would expect to get. So I'm a little concerned you seeing 5 "by default".

Your
Comment 11 Cor Nouws 2024-04-19 10:29:44 UTC
(In reply to Justin L from comment #10)
> I'm also on Linux 5.15 (Ubuntu 20.04) and I only get 4 slides per row -
> which based on the code patch is exactly what I would expect to get. So I'm
> a little concerned you seeing 5 "by default".
I didn't try to figure out where the difference comes from. Could be some calculation based on e.g. metric of some default font, or ..
Giving the user the option to set a number (thanks for commenting on the patch!) at least gives influence.
But it may be nice/better to try to figure out that later, indeed.
Comment 12 Commit Notification 2024-04-19 22:35:24 UTC
Cor Nouws committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7c2ed9919d6d9d286d9062b91577d6bb2b7de8aa

tdf#160601 add expert option for default slides per row in slide sorter

It will be available in 24.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 13 V Stuart Foote 2024-04-20 18:01:12 UTC
The "SorterSlidesPerRow" expert config stanza takes differing count and applies on restart of Impress. Entering 2, 3, 5, or 6 instead of default 4 responds accordingly. Thumbnails on the sorter shrink or expand to fit the count of slides on the sorter.  

Verified as working on Windows builds.

2024-04-20 nightly
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7c2ed9919d6d9d286d9062b91577d6bb2b7de8aa
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 14 Cor Nouws 2024-04-21 20:16:39 UTC
thanks for verifying etc.

Previous to this patch, as explained, it was hard coded as 4. The number had different outcomes in different installations: 4 or 5. Possibly a difference between Windows and Linux..?
Few developers I spoke with, suggested that there might be some calculation based on e.g. a default font or ...

If that still appears to be the case (on my installation, setting to 4 now does translate in 4 as result..) we may get reports from users (after the release notes) and I suggest that it then is interesting to find out the root cause of that.