Kaydet (Commit) baffab9a authored tarafından Jakub Golebiewski's avatar Jakub Golebiewski Kaydeden (comit) Thorsten Behrens

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
üst f4ebb99d
...@@ -2233,6 +2233,11 @@ ...@@ -2233,6 +2233,11 @@
</prop> </prop>
</node> </node>
<node oor:name="F5_SHIFT" oor:op="replace"> <node oor:name="F5_SHIFT" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:PresentationThisSlide</value>
</prop>
</node>
<node oor:name="F5_SHIFT_MOD2" oor:op="replace">
<prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value> <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
<value xml:lang="en-US">.uno:RestoreEditingView</value> <value xml:lang="en-US">.uno:RestoreEditingView</value>
</prop> </prop>
......
...@@ -37,6 +37,14 @@ ...@@ -37,6 +37,14 @@
<value>1</value> <value>1</value>
</prop> </prop>
</node> </node>
<node oor:name=".uno:PresentationThisSlide" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Sl~ide Show From This Slide</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>1</value>
</prop>
</node>
<node oor:name=".uno:Remote" oor:op="replace"> <node oor:name=".uno:Remote" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string"> <prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Impress R~emote</value> <value xml:lang="en-US">Impress R~emote</value>
......
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
#define CMD_SID_OUTLINE_TEXT_AUTOFIT ".uno.OutlineTextAutofit" #define CMD_SID_OUTLINE_TEXT_AUTOFIT ".uno.OutlineTextAutofit"
#define CMD_SID_PAGESETUP ".uno:PageSetup" #define CMD_SID_PAGESETUP ".uno:PageSetup"
#define CMD_SID_PRESENTATION ".uno:Presentation" #define CMD_SID_PRESENTATION ".uno:Presentation"
#define CMD_SID_PRESENTATION_THIS_SLIDE ".uno:PresentationThisSlide"
#define CMD_SID_REMOTE_DLG ".uno:Remote" #define CMD_SID_REMOTE_DLG ".uno:Remote"
#define CMD_SID_PRESENTATION_LAYOUT ".uno:PresentationLayout" #define CMD_SID_PRESENTATION_LAYOUT ".uno:PresentationLayout"
#define CMD_SID_RENAMELAYER ".uno:RenameLayer" #define CMD_SID_RENAMELAYER ".uno:RenameLayer"
......
...@@ -136,6 +136,11 @@ interface SlideSorterView ...@@ -136,6 +136,11 @@ interface SlideSorterView
ExecMethod = FuTemporary ; ExecMethod = FuTemporary ;
StateMethod = GetMenuState ; StateMethod = GetMenuState ;
] ]
SID_PRESENTATION_THIS_SLIDE // ole : no, status : ?
[
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
SID_HIDE_SLIDE // ole : no, status : ? SID_HIDE_SLIDE // ole : no, status : ?
[ [
ExecMethod = FuTemporary ; ExecMethod = FuTemporary ;
......
...@@ -5195,6 +5195,31 @@ SfxVoidItem Presentation SID_PRESENTATION ...@@ -5195,6 +5195,31 @@ SfxVoidItem Presentation SID_PRESENTATION
GroupId = GID_VIEW; 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 SfxVoidItem PresentationDialog SID_PRESENTATION_DLG
() ()
......
...@@ -403,6 +403,7 @@ protected: ...@@ -403,6 +403,7 @@ protected:
void GetMenuStateSel(SfxItemSet& rSet); void GetMenuStateSel(SfxItemSet& rSet);
private: private:
void ShowSlideShow(SfxRequest& rReq);
/** This flag controls whether the layer mode is active, i.e. the layer /** This flag controls whether the layer mode is active, i.e. the layer
dialog is visible. dialog is visible.
*/ */
......
...@@ -151,6 +151,7 @@ public: ...@@ -151,6 +151,7 @@ public:
bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara ); bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
private: private:
void ShowSlideShow(SfxRequest& rReq);
OutlineView* pOlView; OutlineView* pOlView;
SdPage* pLastPage; // Zur performanten Aufbereitung der Preview SdPage* pLastPage; // Zur performanten Aufbereitung der Preview
TransferableClipboardListener* pClipEvtLstnr; TransferableClipboardListener* pClipEvtLstnr;
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <com/sun/star/presentation/XPresentation2.hpp> #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> #include <editeng/outlobj.hxx>
...@@ -91,6 +93,7 @@ ...@@ -91,6 +93,7 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::presentation;
using namespace ::com::sun::star::beans;
namespace sd { namespace slidesorter { namespace controller { namespace sd { namespace slidesorter { namespace controller {
...@@ -138,6 +141,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest) ...@@ -138,6 +141,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
switch (rRequest.GetSlot()) switch (rRequest.GetSlot())
{ {
case SID_PRESENTATION: case SID_PRESENTATION:
case SID_PRESENTATION_THIS_SLIDE:
case SID_REHEARSE_TIMINGS: case SID_REHEARSE_TIMINGS:
ShowSlideShow (rRequest); ShowSlideShow (rRequest);
pShell->Cancel(); pShell->Cancel();
...@@ -882,9 +886,29 @@ void SlotManager::ShowSlideShow( SfxRequest& rReq) ...@@ -882,9 +886,29 @@ void SlotManager::ShowSlideShow( SfxRequest& rReq)
if( xPresentation.is() ) if( xPresentation.is() )
{ {
if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) ) 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 else
{
xPresentation->rehearseTimings(); xPresentation->rehearseTimings();
}
} }
} }
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TransliterationModulesExtra.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> #include <comphelper/processfactory.hxx>
...@@ -97,6 +99,7 @@ ...@@ -97,6 +99,7 @@
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::presentation;
using namespace ::com::sun::star::beans;
namespace sd { namespace sd {
...@@ -681,16 +684,10 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) ...@@ -681,16 +684,10 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
break; break;
case SID_PRESENTATION: case SID_PRESENTATION:
case SID_PRESENTATION_THIS_SLIDE:
case SID_REHEARSE_TIMINGS: case SID_REHEARSE_TIMINGS:
{ {
Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); ShowSlideShow(rReq);
if( xPresentation.is() )
{
if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) )
xPresentation->start();
else
xPresentation->rehearseTimings();
}
rReq.Ignore (); rReq.Ignore ();
} }
break; break;
...@@ -1649,6 +1646,38 @@ void DrawViewShell::ShowUIControls (bool bVisible) ...@@ -1649,6 +1646,38 @@ void DrawViewShell::ShowUIControls (bool bVisible)
maTabControl.Show (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*/) void DrawViewShell::StopSlideShow (bool /*bCloseFrame*/)
{ {
Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() ); Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() );
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include "OutlineViewShell.hxx" #include "OutlineViewShell.hxx"
#include <com/sun/star/presentation/XPresentation2.hpp> #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 "app.hrc"
#include <svx/hlnkitem.hxx> #include <svx/hlnkitem.hxx>
...@@ -64,6 +66,7 @@ ...@@ -64,6 +66,7 @@
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::presentation;
using namespace ::com::sun::star::beans;
namespace sd { namespace sd {
...@@ -229,18 +232,11 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) ...@@ -229,18 +232,11 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
break; break;
case SID_PRESENTATION: case SID_PRESENTATION:
case SID_PRESENTATION_THIS_SLIDE:
case SID_REHEARSE_TIMINGS: case SID_REHEARSE_TIMINGS:
{ {
pOlView->PrepareClose(); pOlView->PrepareClose();
ShowSlideShow(rReq);
Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() );
if( xPresentation.is() )
{
if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) )
xPresentation->start();
else
xPresentation->rehearseTimings();
}
Cancel(); Cancel();
rReq.Done(); rReq.Done();
} }
...@@ -335,6 +331,38 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq) ...@@ -335,6 +331,38 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
Invalidate(SID_PASTE); 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) void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
{ {
OutlineViewModelChangeGuard aGuard( *pOlView ); OutlineViewModelChangeGuard aGuard( *pOlView );
......
...@@ -300,6 +300,7 @@ ...@@ -300,6 +300,7 @@
<menu:menu menu:id=".uno:SlideShowMenu"> <menu:menu menu:id=".uno:SlideShowMenu">
<menu:menupopup> <menu:menupopup>
<menu:menuitem menu:id=".uno:Presentation"/> <menu:menuitem menu:id=".uno:Presentation"/>
<menu:menuitem menu:id=".uno:PresentationThisSlide"/>
<menu:menuitem menu:id=".uno:PresentationDialog"/> <menu:menuitem menu:id=".uno:PresentationDialog"/>
<menu:menuitem menu:id=".uno:RehearseTimings"/> <menu:menuitem menu:id=".uno:RehearseTimings"/>
<menu:menuitem menu:id=".uno:Remote"/> <menu:menuitem menu:id=".uno:Remote"/>
......
...@@ -351,6 +351,7 @@ ...@@ -351,6 +351,7 @@
#define SID_OUTLINE_COLLAPSE_ALL ( SID_SVX_START + 155 ) #define SID_OUTLINE_COLLAPSE_ALL ( SID_SVX_START + 155 )
#define SID_OUTLINE_BULLET ( SID_SVX_START + 156 ) #define SID_OUTLINE_BULLET ( SID_SVX_START + 156 )
#define SID_PRESENTATION ( SID_SVX_START + 157 ) #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_REHEARSE_TIMINGS ( SID_SVX_START + 159 )
#define SID_HIDE_SLIDE ( SID_SVX_START + 161 ) #define SID_HIDE_SLIDE ( SID_SVX_START + 161 )
#define SID_CHOOSE_POLYGON ( SID_SVX_START + 162 ) #define SID_CHOOSE_POLYGON ( SID_SVX_START + 162 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment