summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-22 12:20:16 +0100
committerDavid Tardon <dtardon@redhat.com>2013-11-13 15:10:03 +0000
commit393c38129284fe3b9b9fc0b927f8cd128f016a86 (patch)
treeaa8382e3e613409f74d933272b208105cf1581a3
parent310396aaa9c8b0e25053decbb673af339eebdec3 (diff)
Resolves: fdo#69975 honour custom show settings
if a custom show is set, then don't override it with current/first page, just accept it Change-Id: Icd04711028b3e11a576df6cd325ddb0db8974111 (cherry picked from commit 438f5cf4229dafe2100e36d818b05535091054d7) merge all three ShowSlideShow impls together Change-Id: If82f6313b258a79d59fbe34ab7846db5f9f45f76 (cherry picked from commit 368e94ce33bb4de1d2c0348082a349331a17f332) bStartWithActualSlide is always false (cherry picked from commit a1b0b68c0f1fe2467cddf021e09123085d043de2) Conflicts: sd/source/ui/slideshow/slideshowimpl.cxx sd/source/ui/slideshow/slideshowimpl.hxx Change-Id: Icf61858730e2576439fdc7bdd1c8a911f2b34bd7 Reviewed-on: https://gerrit.libreoffice.org/6374 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--sd/source/ui/inc/slideshow.hxx5
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx6
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.hxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx29
-rw-r--r--sd/source/ui/view/drviewse.cxx40
-rw-r--r--sd/source/ui/view/outlnvs2.cxx30
6 files changed, 39 insertions, 73 deletions
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index a309c82a8de2..be44a51f926e 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -214,6 +214,11 @@ private:
sal_Int32 mnInPlaceConfigEvent;
};
+namespace slideshowhelp
+{
+ void ShowSlideShow(SfxRequest& rReq, SdDrawDocument &rDoc);
+}
+
}
#endif /* _SD_SLIDESHOW_HXX */
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index b096dc48a844..6fbd86203ee3 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -974,7 +974,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
}
// build page list
- createSlideList( maPresSettings.mbAll, false, aPresSlide );
+ createSlideList( maPresSettings.mbAll, aPresSlide );
// remember Slide number from where the show was started
if( pStartPage )
@@ -2449,7 +2449,7 @@ Reference< XSlideShow > SlideshowImpl::createSlideShow() const
// ---------------------------------------------------------
-void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide )
+void SlideshowImpl::createSlideList( bool bAll, const String& rPresSlide )
{
const long nSlideCount = mpDoc->GetSdPageCount( PK_STANDARD );
@@ -2457,7 +2457,7 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
{
SdCustomShow* pCustomShow;
- if( !bStartWithActualSlide && mpDoc->GetCustomShowList() && maPresSettings.mbCustomShow )
+ if( mpDoc->GetCustomShowList() && maPresSettings.mbCustomShow )
pCustomShow = mpDoc->GetCustomShowList()->GetCurObject();
else
pCustomShow = NULL;
diff --git a/sd/source/ui/slideshow/slideshowimpl.hxx b/sd/source/ui/slideshow/slideshowimpl.hxx
index 8be006b320da..89db0b2caa5c 100644
--- a/sd/source/ui/slideshow/slideshowimpl.hxx
+++ b/sd/source/ui/slideshow/slideshowimpl.hxx
@@ -265,7 +265,7 @@ private:
double update();
- void createSlideList( bool bAll, bool bStartWithActualSlide, const String& rPresSlide );
+ void createSlideList( bool bAll, const String& rPresSlide );
void displayCurrentSlide (const bool bSkipAllMainSequenceEffects = false);
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 6b9c69048143..ecb7761b0595 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -883,34 +883,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
void SlotManager::ShowSlideShow( SfxRequest& rReq)
{
- Reference< XPresentation2 > xPresentation( mrSlideSorter.GetModel().GetDocument()->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, *mrSlideSorter.GetModel().GetDocument());
}
void SlotManager::RenameSlide (void)
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 36d8f7802336..408a0909d885 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1646,15 +1646,32 @@ 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())
+ xPresentation->rehearseTimings();
+ else if (rDoc.getPresentationSettings().mbCustomShow)
+ {
+ //fdo#69975 if a custom show has been set, then
+ //use it whether or not we've been asked to
+ //start from the current or first slide
+ xPresentation->start();
+ }
+ else if (SID_PRESENTATION_CURRENT_SLIDE == rReq.GetSlot())
{
+ //If there is no custom show set, start will automatically
+ //start at the current page
+ xPresentation->start();
+ }
+ else
+ {
+ //Start at page 0, this would blow away any custom
+ //show settings if any were set
Sequence< PropertyValue > aArguments(1);
PropertyValue aPage;
OUString sValue("0");
@@ -1666,18 +1683,15 @@ void DrawViewShell::ShowSlideShow(SfxRequest& rReq)
xPresentation->startWithArguments( aArguments );
}
- else
- {
- xPresentation->start();
- }
- }
- 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 87086ac60af3..c3aa7d728c09 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)