summaryrefslogtreecommitdiff
path: root/sd/source/ui/slideshow
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2013-07-17 17:42:15 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-07-29 11:53:05 +0000
commitb8608fddf09bc243af63f3721443f518138f9be0 (patch)
tree1c59beba35d5544de2fff6ad55f65278c56a3c37 /sd/source/ui/slideshow
parentdd9c97d587d2a295d44e8685d253d30542a2c85a (diff)
fdo#45233 Allow editing pps/ppsx Autoplay Presentations
Added a context menu "Edit Presentation" when in Autplay mode. This has been discussed and approved by the Design team: https://wiki.documentfoundation.org/Design/Meetings/2013-07-20 Change-Id: Ic229e54bd10d23f999f1d746cce38c4004504d28 Reviewed-on: https://gerrit.libreoffice.org/4960 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'sd/source/ui/slideshow')
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx4
-rw-r--r--sd/source/ui/slideshow/slideshow.hrc2
-rw-r--r--sd/source/ui/slideshow/slideshow.src5
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx19
4 files changed, 28 insertions, 2 deletions
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index a34e66008c49..a51058940293 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -802,9 +802,9 @@ void SAL_CALL SlideShow::end() throw(RuntimeException)
}
}
- if( pViewShell->GetDoc()->IsStartWithPresentation() )
+ if( pViewShell->GetDoc()->IsExitAfterPresenting() )
{
- pViewShell->GetDoc()->SetStartWithPresentation( false );
+ pViewShell->GetDoc()->SetExitAfterPresenting( false );
Reference<frame::XDispatchProvider> xProvider(pViewShell->GetViewShellBase().GetController()->getFrame(),
UNO_QUERY);
diff --git a/sd/source/ui/slideshow/slideshow.hrc b/sd/source/ui/slideshow/slideshow.hrc
index 98a058bdf4c4..4e6169f43b87 100644
--- a/sd/source/ui/slideshow/slideshow.hrc
+++ b/sd/source/ui/slideshow/slideshow.hrc
@@ -41,6 +41,8 @@
#define CM_WIDTH_PEN_VERY_THICK 17
#define CM_PEN_MODE 18
+#define CM_EDIT_PRESENTATION 19
+
#define CM_SLIDES 21 // this must be the last id!
#endif
diff --git a/sd/source/ui/slideshow/slideshow.src b/sd/source/ui/slideshow/slideshow.src
index 324ec0997bbb..480cc096063a 100644
--- a/sd/source/ui/slideshow/slideshow.src
+++ b/sd/source/ui/slideshow/slideshow.src
@@ -142,6 +142,11 @@ Menu RID_SLIDESHOW_CONTEXTMENU
};
MenuItem
{
+ Identifier = CM_EDIT_PRESENTATION ;
+ Text [ en-US ] = "E~dit Presentation" ;
+ };
+ MenuItem
+ {
Identifier = CM_ENDSHOW ;
Text [ en-US ] = "~End Show" ;
};
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 68b9b7766731..21687ef25bf2 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -897,6 +897,11 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if (mpParentWindow == NULL)
return false;
+ // Autoplay (pps/ppsx)
+ if (mpViewShell->GetDoc()->IsStartWithPresentation()){
+ mpViewShell->GetDoc()->SetExitAfterPresenting(true);
+ }
+
bool bRet = false;
try
@@ -2158,6 +2163,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl)
const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
pMenu->EnableItem( CM_NEXT_SLIDE, ( mpSlideController->getNextSlideIndex() != -1 ) );
pMenu->EnableItem( CM_PREV_SLIDE, ( mpSlideController->getPreviousSlideIndex() != -1 ) || (eMode == SHOWWINDOWMODE_END) || (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) );
+ pMenu->EnableItem( CM_EDIT_PRESENTATION, mpViewShell->GetDoc()->IsStartWithPresentation());
PopupMenu* pPageMenu = pMenu->GetPopupMenu( CM_GOTO );
@@ -2384,6 +2390,19 @@ IMPL_LINK( SlideshowImpl, ContextMenuSelectHdl, Menu *, pMenu )
mbWasPaused = false;
}
break;
+ case CM_EDIT_PRESENTATION:
+ // When in autoplay mode (pps/ppsx), offer editing of the presentation
+ // Turn autostart off, else Impress will close when exiting the Presentation
+ mpViewShell->GetDoc()->SetExitAfterPresenting(false);
+ if( mpSlideController.get() && (ANIMATIONMODE_SHOW == meAnimationMode) )
+ {
+ if( mpSlideController->getCurrentSlideNumber() != -1 )
+ {
+ mnRestoreSlide = mpSlideController->getCurrentSlideNumber();
+ }
+ }
+ endPresentation();
+ break;
case CM_ENDSHOW:
// in case the user cancels the presentation, switch to current slide
// in edit mode