summaryrefslogtreecommitdiff
path: root/sd/source/ui/view
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r--sd/source/ui/view/drviewse.cxx42
-rw-r--r--sd/source/ui/view/outlnvs2.cxx30
2 files changed, 27 insertions, 45 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index f23b16807977..4793653455a4 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1641,38 +1641,46 @@ void DrawViewShell::ShowUIControls (bool bVisible)
maTabControl.Show (bVisible);
}
-void DrawViewShell::ShowSlideShow(SfxRequest& rReq)
+namespace slideshowhelp
{
- Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() );
- if( xPresentation.is() )
+ void ShowSlideShow(SfxRequest& rReq, SdDrawDocument &rDoc)
{
- if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) )
+ Reference< XPresentation2 > xPresentation( rDoc.getPresentation() );
+ if( xPresentation.is() )
{
- if( (SID_PRESENTATION == rReq.GetSlot() ) )
+ if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) )
{
- Sequence< PropertyValue > aArguments(1);
- PropertyValue aPage;
- OUString sValue("0");
+ if( (SID_PRESENTATION == rReq.GetSlot() ) )
+ {
+ Sequence< PropertyValue > aArguments(1);
+ PropertyValue aPage;
+ OUString sValue("0");
- aPage.Name = "FirstPage";
- aPage.Value <<= sValue;
+ aPage.Name = "FirstPage";
+ aPage.Value <<= sValue;
- aArguments[0] = aPage;
+ aArguments[0] = aPage;
- xPresentation->startWithArguments( aArguments );
+ xPresentation->startWithArguments( aArguments );
+ }
+ else
+ {
+ xPresentation->start();
+ }
}
else
{
- xPresentation->start();
+ xPresentation->rehearseTimings();
}
}
- else
- {
- xPresentation->rehearseTimings();
- }
}
}
+void DrawViewShell::ShowSlideShow(SfxRequest& rReq)
+{
+ slideshowhelp::ShowSlideShow(rReq, *GetDoc());
+}
+
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 23ead9a52797..6bdb2b33656d 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -63,6 +63,7 @@
#include "sdabstdlg.hxx"
#include "framework/FrameworkHelper.hxx"
#include "DrawViewShell.hxx"
+#include "slideshow.hxx"
#include <boost/scoped_ptr.hpp>
using namespace ::com::sun::star::uno;
@@ -334,34 +335,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
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();
- }
- }
+ slideshowhelp::ShowSlideShow(rReq, *GetDoc());
}
void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)