diff options
author | Jakub Golebiewski <kubusg@gmail.com> | 2013-04-09 23:45:52 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-04-16 20:21:59 +0200 |
commit | baffab9a4ffca9a4940a3310937d6e858e66cc1f (patch) | |
tree | 16f2cfe479eed9e44a29b5bb4ee214b2fff704b5 /sd | |
parent | separate inc and dtd packages in xmlscript for global header move (diff) | |
download | core-baffab9a4ffca9a4940a3310937d6e858e66cc1f.tar.gz core-baffab9a4ffca9a4940a3310937d6e858e66cc1f.zip |
Bug 58505 - Tweak F5 for slide display, and add Shift-F5
Added menu entry to start the presentation from current slide.
Changed "Start Presentation" menu entry behavior so it starts
from the first slide.
Change-Id: Iebba85d2d1dcacad7da6b050e2152be5c0d47261
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/sdcommands.h | 1 | ||||
-rw-r--r-- | sd/sdi/SlideSorterController.sdi | 5 | ||||
-rw-r--r-- | sd/sdi/sdraw.sdi | 25 | ||||
-rw-r--r-- | sd/source/ui/inc/DrawViewShell.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/inc/OutlineViewShell.hxx | 1 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 26 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 45 | ||||
-rw-r--r-- | sd/source/ui/view/outlnvs2.cxx | 46 | ||||
-rw-r--r-- | sd/uiconfig/simpress/menubar/menubar.xml | 1 |
9 files changed, 133 insertions, 18 deletions
diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h index daecfe819ffc..f64e686f1e51 100644 --- a/sd/inc/sdcommands.h +++ b/sd/inc/sdcommands.h @@ -94,6 +94,7 @@ #define CMD_SID_OUTLINE_TEXT_AUTOFIT ".uno.OutlineTextAutofit" #define CMD_SID_PAGESETUP ".uno:PageSetup" #define CMD_SID_PRESENTATION ".uno:Presentation" +#define CMD_SID_PRESENTATION_THIS_SLIDE ".uno:PresentationThisSlide" #define CMD_SID_REMOTE_DLG ".uno:Remote" #define CMD_SID_PRESENTATION_LAYOUT ".uno:PresentationLayout" #define CMD_SID_RENAMELAYER ".uno:RenameLayer" diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi index f38a3a8f6ea1..5b717d1409dc 100644 --- a/sd/sdi/SlideSorterController.sdi +++ b/sd/sdi/SlideSorterController.sdi @@ -136,6 +136,11 @@ interface SlideSorterView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] + SID_PRESENTATION_THIS_SLIDE // ole : no, status : ? + [ + ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; + ] SID_HIDE_SLIDE // ole : no, status : ? [ ExecMethod = FuTemporary ; diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index 83b4d04d67a0..5e913a2671fa 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -5196,6 +5196,31 @@ SfxVoidItem Presentation SID_PRESENTATION ] //-------------------------------------------------------------------------- +SfxVoidItem PresentationThisSlide SID_PRESENTATION_THIS_SLIDE +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_VIEW; +] + +//-------------------------------------------------------------------------- SfxVoidItem PresentationDialog SID_PRESENTATION_DLG () [ diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 64de25ea84e3..f8b94ba63f49 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -403,6 +403,7 @@ protected: void GetMenuStateSel(SfxItemSet& rSet); private: + void ShowSlideShow(SfxRequest& rReq); /** This flag controls whether the layer mode is active, i.e. the layer dialog is visible. */ diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx index 616ed4269305..f4ca53f62fc8 100644 --- a/sd/source/ui/inc/OutlineViewShell.hxx +++ b/sd/source/ui/inc/OutlineViewShell.hxx @@ -151,6 +151,7 @@ public: bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara ); private: + void ShowSlideShow(SfxRequest& rReq); OutlineView* pOlView; SdPage* pLastPage; // Zur performanten Aufbereitung der Preview TransferableClipboardListener* pClipEvtLstnr; diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index a07ef14b017e..9df10f5d8026 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -19,6 +19,8 @@ #include <com/sun/star/presentation/XPresentation2.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/uno/Any.hxx> #include <editeng/outlobj.hxx> @@ -91,6 +93,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; +using namespace ::com::sun::star::beans; namespace sd { namespace slidesorter { namespace controller { @@ -138,6 +141,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) switch (rRequest.GetSlot()) { case SID_PRESENTATION: + case SID_PRESENTATION_THIS_SLIDE: case SID_REHEARSE_TIMINGS: ShowSlideShow (rRequest); pShell->Cancel(); @@ -882,9 +886,29 @@ void SlotManager::ShowSlideShow( SfxRequest& rReq) if( xPresentation.is() ) { if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) - xPresentation->start(); + { + if( (SID_PRESENTATION == rReq.GetSlot() ) ) + { + Sequence< PropertyValue > aArguments(1); + PropertyValue aPage; + OUString sValue("0"); + + aPage.Name = "FirstPage"; + aPage.Value <<= sValue; + + aArguments[0] = aPage; + + xPresentation->startWithArguments( aArguments ); + } + else + { + xPresentation->start(); + } + } else + { xPresentation->rehearseTimings(); + } } } diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 02d9cbecc531..023766a8a3b5 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -23,6 +23,8 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/TransliterationModulesExtra.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/uno/Any.hxx> #include <comphelper/processfactory.hxx> @@ -97,6 +99,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; +using namespace ::com::sun::star::beans; namespace sd { @@ -681,16 +684,10 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) break; case SID_PRESENTATION: + case SID_PRESENTATION_THIS_SLIDE: case SID_REHEARSE_TIMINGS: { - Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); - if( xPresentation.is() ) - { - if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) - xPresentation->start(); - else - xPresentation->rehearseTimings(); - } + ShowSlideShow(rReq); rReq.Ignore (); } break; @@ -1649,6 +1646,38 @@ void DrawViewShell::ShowUIControls (bool bVisible) maTabControl.Show (bVisible); } +void DrawViewShell::ShowSlideShow(SfxRequest& rReq) +{ + Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); + if( xPresentation.is() ) + { + if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) + { + if( (SID_PRESENTATION == rReq.GetSlot() ) ) + { + Sequence< PropertyValue > aArguments(1); + PropertyValue aPage; + OUString sValue("0"); + + aPage.Name = "FirstPage"; + aPage.Value <<= sValue; + + aArguments[0] = aPage; + + xPresentation->startWithArguments( aArguments ); + } + else + { + xPresentation->start(); + } + } + else + { + xPresentation->rehearseTimings(); + } + } +} + void DrawViewShell::StopSlideShow (bool /*bCloseFrame*/) { Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx index 612476ea5db0..715da282e61e 100644 --- a/sd/source/ui/view/outlnvs2.cxx +++ b/sd/source/ui/view/outlnvs2.cxx @@ -21,6 +21,8 @@ #include "OutlineViewShell.hxx" #include <com/sun/star/presentation/XPresentation2.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/uno/Any.hxx> #include "app.hrc" #include <svx/hlnkitem.hxx> @@ -64,6 +66,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; +using namespace ::com::sun::star::beans; namespace sd { @@ -229,18 +232,11 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) break; case SID_PRESENTATION: + case SID_PRESENTATION_THIS_SLIDE: case SID_REHEARSE_TIMINGS: { pOlView->PrepareClose(); - - Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); - if( xPresentation.is() ) - { - if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) - xPresentation->start(); - else - xPresentation->rehearseTimings(); - } + ShowSlideShow(rReq); Cancel(); rReq.Done(); } @@ -335,6 +331,38 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) Invalidate(SID_PASTE); } +void OutlineViewShell::ShowSlideShow(SfxRequest& rReq) +{ + Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); + if( xPresentation.is() ) + { + if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) + { + if( (SID_PRESENTATION == rReq.GetSlot() ) ) + { + Sequence< PropertyValue > aArguments(1); + PropertyValue aPage; + OUString sValue("0"); + + aPage.Name = "FirstPage"; + aPage.Value <<= sValue; + + aArguments[0] = aPage; + + xPresentation->startWithArguments( aArguments ); + } + else + { + xPresentation->start(); + } + } + else + { + xPresentation->rehearseTimings(); + } + } +} + void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq) { OutlineViewModelChangeGuard aGuard( *pOlView ); diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index 73fa4fac578b..96505a5d2243 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -300,6 +300,7 @@ <menu:menu menu:id=".uno:SlideShowMenu"> <menu:menupopup> <menu:menuitem menu:id=".uno:Presentation"/> + <menu:menuitem menu:id=".uno:PresentationThisSlide"/> <menu:menuitem menu:id=".uno:PresentationDialog"/> <menu:menuitem menu:id=".uno:RehearseTimings"/> <menu:menuitem menu:id=".uno:Remote"/> |