[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - sd/source

Caolán McNamara caolanm at redhat.com
Wed Nov 13 07:10:30 PST 2013


 sd/source/ui/inc/slideshow.hxx                         |    5 ++
 sd/source/ui/slideshow/slideshowimpl.cxx               |    6 +-
 sd/source/ui/slideshow/slideshowimpl.hxx               |    2 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx |   29 ------------
 sd/source/ui/view/drviewse.cxx                         |   40 +++++++++++------
 sd/source/ui/view/outlnvs2.cxx                         |   30 ------------
 6 files changed, 39 insertions(+), 73 deletions(-)

New commits:
commit 393c38129284fe3b9b9fc0b927f8cd128f016a86
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 22 12:20:16 2013 +0100

    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 at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index a309c82..be44a51 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 b096dc4..6fbd862 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 8be006b..89db0b2 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 6b9c690..ecb7761 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 36d8f78..408a090 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 87086ac..c3aa7d7 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)


More information about the Libreoffice-commits mailing list