summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
diff options
context:
space:
mode:
authorJakub Golebiewski <kubusg@gmail.com>2013-04-09 23:45:52 +0200
committerThorsten Behrens <tbehrens@suse.com>2013-04-16 20:21:59 +0200
commitbaffab9a4ffca9a4940a3310937d6e858e66cc1f (patch)
tree16f2cfe479eed9e44a29b5bb4ee214b2fff704b5 /sd/source/ui/view
parentf4ebb99de6e93f6d38e7b0486d66e99a196b1f6e (diff)
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/source/ui/view')
-rw-r--r--sd/source/ui/view/drviewse.cxx45
-rw-r--r--sd/source/ui/view/outlnvs2.cxx46
2 files changed, 74 insertions, 17 deletions
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 );