Bug 91909 - Uno commands for slide navigation and slide sorting -- and fix side effect on Home End key function
Summary: Uno commands for slide navigation and slide sorting -- and fix side effect on...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium enhancement
Assignee: Philippe Jung
URL:
Whiteboard: target:5.1.1 target:5.2.0 target:5.1.0.4
Keywords:
: 96973 97876 98433 98742 (view as bug list)
Depends on:
Blocks: UNO-Command-New Impress-UX
  Show dependency treegraph
 
Reported: 2015-06-07 00:21 UTC by Yousuf Philips (jay) (retired)
Modified: 2020-12-28 23:17 UTC (History)
10 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 Yousuf Philips (jay) (retired) 2015-06-07 00:21:56 UTC
In impress, you can navigate to a next, previous, first and last slide by means of the page down, page up, home and end keyboard keys, but this functionality isnt shown anywhere, so it would be good to have uno commands of this functionality so that it can include in the menu bar.

It would also be useful to have uno commands for slide sorting like move slide up, move slide down, move slide to beginning, and move slide to end, so they can also appear in the menu bar with suitable shortcut keys. Are there presently shortcut keys for these operations as i couldnt find them in the customize dialog?
Comment 1 tommy27 2015-06-07 11:36:39 UTC
you are right. UNO commands for slide sorting would be a bless.
status NEW.

In the meantime, you can use this macro to move a slide to the end of the presentation, and assign it to a toolbar custom button.

here's the code (i think it can be tweaked to obtain ad least a MoveSlideToTop but I'm not a macro expert)

Sub MoveSlideToEnd

oDoc = ThisComponent
opages = oDoc.drawpages
oController = oDoc.CurrentController
oCurrentPage = oController.CurrentPage
nIndex = oCurrentPage.Number - 1
oDispatch = createUnoService( "com.sun.star.frame.DispatchHelper")
oProvider = oController.Frame
oDispatch.executeDispatch(oProvider, ".uno:Copy","", 0, Array())
oPage = opages.getByIndex(opages.Count() - 1)
oController.setCurrentPage(oPage)
oDispatch.executeDispatch(oProvider, ".uno:Paste", "", 0, Array())
opages.remove(oCurrentPage)
oController.setCurrentPage(opages(nIndex))

End Sub
Comment 2 Philippe Jung 2015-06-07 15:42:14 UTC
Jay, please define names of new Uno command :-)
Comment 3 Yousuf Philips (jay) (retired) 2015-06-07 15:54:39 UTC
Well as impress and draw share the same code and we have uno commands like InsertPage and DuplicatePage, so i'd assume we'd follow that same naming but we'd have aliases so we dont fall into having the same label or icon for both commands. (bug 84258)

NextPage - alias NextSlide
PreviousPage - alias PreviousSlide
FirstPage - alias FirstSlide
LastPage - alias LastSlide

MovePageUp - alias MoveSlideUp
MovePageDown - alias MoveSlideDown
MovePageTop - alias MoveSlideTop
MovePageBottom - alias MoveSlideBottom
Comment 4 Heiko Tietze 2015-06-07 21:28:17 UTC
Please no camelcase in captions.
Comment 5 Yousuf Philips (jay) (retired) 2015-06-07 23:04:15 UTC
(In reply to Heiko Tietze from comment #4)
> Please no camelcase in captions.

The are uno command names. :D
Comment 6 Philippe Jung 2015-06-14 21:20:29 UTC
New commands
https://gerrit.libreoffice.org/16211

For the moment no aliases
Comment 7 Commit Notification 2015-06-16 15:09:54 UTC
Philippe Jung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d18afcc9125f427c0e6693900d24f894068d7e56

tdf#91909 Uno commands for slide navigation and sorting

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Yousuf Philips (jay) (retired) 2015-06-28 01:24:11 UTC
Commands work great and have been added to the slide menu as well.
Comment 9 Yousuf Philips (jay) (retired) 2015-06-28 01:28:32 UTC
Looking over the slide navigation menu items, i just noticed that they hadnt been linked up with their shortcut keys.

About the slide sorting, do we have existing shortcuts for these, or do we need to come up with new ones?
Comment 10 tommy27 2015-11-13 03:14:40 UTC
@Jay
is the issue fixed or still needs tweaking?
Comment 11 Yousuf Philips (jay) (retired) 2015-11-17 08:02:55 UTC
@Tommy: Still needs tweaks.
Comment 12 Philippe Jung 2015-11-18 23:31:33 UTC
> Looking over the slide navigation menu items, i just noticed that they hadnt
> been linked up with their shortcut keys.

If you are thinking of Home / End / Arrows keys, these are not shortcuts. 

It' more hardcoded values in the code such as (slideshowimpl.cxx for ex.)

case KEY_END:
   gotoLastSlide();

Not sure we can link these keys to these actions.

> About the slide sorting, do we have existing shortcuts for these, or do we
> need to come up with new ones?

I would say we have no shortcut for the moment but it looks like Ctrl+Shift+(Home/Up/Down/End) would be ok for this (and they look free)
Comment 13 Philippe Jung 2015-11-18 23:56:39 UTC
@Jay: if you want to include these shortcuts, you can merge https://gerrit.libreoffice.org/#/c/20048/ into master.
Comment 14 Commit Notification 2015-11-19 11:56:58 UTC
Philippe Jung committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8f07a723f932ac83b48afe55518b0a1e81e36f20

tdf#91909 Add shortcuts for MovePage actions

It will be available in 5.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Yousuf Philips (jay) (retired) 2015-11-20 05:54:31 UTC
(In reply to Philippe Jung from comment #12)
> If you are thinking of Home / End / Arrows keys, these are not shortcuts. 
> 
> It' more hardcoded values in the code such as (slideshowimpl.cxx for ex.)
> 
> case KEY_END:
>    gotoLastSlide();
> 
> Not sure we can link these keys to these actions.

It would be good to try to do so if it isnt to hard, as we dont hardcode them in Writer. I've sent in a patch to do the necessary in the Accelerators.xcu file, so the shortcuts appear in the menu entries, which was main reason to have them in the menu.

https://gerrit.libreoffice.org/20070

If removing the hardcoding isnt easy/possible, then we should just disable the modification of the shortcut in sd/sdi/sdraw.sdi by setting AccelConfig = FALSE.
Comment 16 Philippe Jung 2015-11-23 16:06:05 UTC
I have visual side effect with the given gerrit patch. You should include the AccelConfig = FALSE
Comment 17 Commit Notification 2015-12-07 15:45:30 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9149dbf17329180e2c9e2fb39243c65acc07a182

tdf#91909 Add shortcuts to slide navigation

It will be available in 5.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2015-12-15 19:25:22 UTC
Yousuf Philips committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0145083c067effe56cc30c7ea4b2e95b9f600d17&h=libreoffice-5-1

tdf#91909 Add shortcuts to slide navigation

It will be available in 5.1.0.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 19 Caolán McNamara 2016-02-02 12:50:09 UTC
home end in impress when editing a box now changes slides and doesn't go to the start/end of a line. Which is undesirable
Comment 20 Commit Notification 2016-02-02 13:12:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=758a50110aae8c0b339e3230b39f8d8343ce6bbc

Related: tdf#91909 home/end don't work in impress text boxes anymore

It will be available in 5.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2016-02-02 14:04:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=19d4cf5dcb45c1b8722f218f85dcd08530539804&h=libreoffice-5-1

Related: tdf#91909 home/end don't work in impress text boxes anymore

It will be available in 5.1.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2016-02-02 19:29:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=78d3ba011b8866416b59c2fdffa9ab0c16da9ed2&h=libreoffice-5-1-0

Related: tdf#91909 home/end don't work in impress text boxes anymore

It will be available in 5.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 23 Maxim Monastirsky 2016-02-16 21:46:25 UTC
*** Bug 97876 has been marked as a duplicate of this bug. ***
Comment 24 V Stuart Foote 2016-03-05 02:15:10 UTC
*** Bug 96973 has been marked as a duplicate of this bug. ***
Comment 25 V Stuart Foote 2016-03-05 02:16:17 UTC
*** Bug 98433 has been marked as a duplicate of this bug. ***
Comment 26 V Stuart Foote 2016-03-05 02:18:58 UTC
Fixed, backported to 5.1.0 but as there will be no 5.1.0.4 build--use a 5.1.1 release.
Comment 27 V Stuart Foote 2016-03-18 14:14:13 UTC
*** Bug 98742 has been marked as a duplicate of this bug. ***
Comment 28 Cor Nouws 2016-03-31 15:42:12 UTC
As a side effect, the next happens
   "Ctrl+Shift combinations (Home, End, Up/Down) move slide in slide sorter when editing text on a slide"

See https://bugs.documentfoundation.org/show_bug.cgi?id=98404#c6