diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu index fd649ba7294d..6cf3ae31b5bc 100644 --- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu @@ -2233,6 +2233,11 @@ + I10N SHORTCUTS - NO TRANSLATE + .uno:PresentationThisSlide + + + I10N SHORTCUTS - NO TRANSLATE .uno:RestoreEditingView diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index d135cd13d100..9efa4080cf34 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -37,6 +37,14 @@ 1 + + + Sl~ide Show From This Slide + + + 1 + + Impress R~emote 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 @@ -5195,6 +5195,31 @@ SfxVoidItem Presentation SID_PRESENTATION GroupId = GID_VIEW; ] +//-------------------------------------------------------------------------- +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 +#include +#include #include @@ -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 #include #include +#include +#include #include @@ -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 +#include +#include #include "app.hrc" #include @@ -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 @@ + diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc index e92b3da33ff6..a343df421e53 100644 --- a/svx/inc/svx/svxids.hrc +++ b/svx/inc/svx/svxids.hrc @@ -351,6 +351,7 @@ #define SID_OUTLINE_COLLAPSE_ALL ( SID_SVX_START + 155 ) #define SID_OUTLINE_BULLET ( SID_SVX_START + 156 ) #define SID_PRESENTATION ( SID_SVX_START + 157 ) +#define SID_PRESENTATION_THIS_SLIDE ( SID_SVX_START + 158 ) #define SID_REHEARSE_TIMINGS ( SID_SVX_START + 159 ) #define SID_HIDE_SLIDE ( SID_SVX_START + 161 ) #define SID_CHOOSE_POLYGON ( SID_SVX_START + 162 )