[Libreoffice-commits] core.git: sd/inc sd/source sd/uiconfig

Bryan Quigley gquigs at gmail.com
Wed Feb 3 13:26:02 UTC 2016


 sd/inc/drawdoc.hxx                            |    1 
 sd/source/core/drawdoc.cxx                    |    6 -
 sd/source/ui/dlg/present.cxx                  |    4 -
 sd/source/ui/func/fusldlg.cxx                 |    8 --
 sd/source/ui/slideshow/slideshow.cxx          |   25 -------
 sd/source/ui/slideshow/slideshowimpl.cxx      |   85 --------------------------
 sd/source/ui/view/drviewsd.cxx                |   41 ++----------
 sd/uiconfig/simpress/ui/presentationdialog.ui |   15 ----
 8 files changed, 10 insertions(+), 175 deletions(-)

New commits:
commit 2503a1e99df463aef1bf87c94b7b4a8ee3554efe
Author: Bryan Quigley <gquigs at gmail.com>
Date:   Wed Jan 27 12:19:28 2016 -0500

    tdf#96414 Remove showing navigator during slideshow
    
    This isn't very user-friendly and the presenter console
    does a much better job of this.
    
    Change-Id: I621863b585d763fb65ed8637c3dab7b7f5ea7aed
    Reviewed-on: https://gerrit.libreoffice.org/22062
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 9208e6c..f3a599a 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -126,7 +126,6 @@ namespace sd
         bool mbAnimationAllowed;
         sal_Int32 mnPauseTimeout;
         bool mbShowPauseLogo;
-        bool mbStartWithNavigator;
 
         PresentationSettings();
         PresentationSettings( const PresentationSettings& r );
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 6702e9d..62235b5 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -126,8 +126,7 @@ PresentationSettings::PresentationSettings()
     mbFullScreen( true ),
     mbAnimationAllowed( true ),
     mnPauseTimeout( 10 ),
-    mbShowPauseLogo( false ),
-    mbStartWithNavigator(false)
+    mbShowPauseLogo( false )
 {
 }
 
@@ -144,8 +143,7 @@ PresentationSettings::PresentationSettings( const PresentationSettings& r )
     mbFullScreen( r.mbFullScreen ),
     mbAnimationAllowed( r.mbAnimationAllowed ),
     mnPauseTimeout( r.mnPauseTimeout ),
-    mbShowPauseLogo( r.mbShowPauseLogo ),
-    mbStartWithNavigator( r.mbStartWithNavigator )
+    mbShowPauseLogo( r.mbShowPauseLogo )
 {
 }
 
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 3fe2206..14ee529 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -58,7 +58,6 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
     get( aCbxManuel,            "manualslides"          );
     get( aCbxMousepointer,      "pointervisible"        );
     get( aCbxPen,               "pointeraspen"          );
-    get( aCbxNavigator,         "navigatorvisible"      );
     get( aCbxAnimationAllowed,  "animationsallowed"     );
     get( aCbxChangePage,        "changeslidesbyclick"   );
     get( aCbxAlwaysOnTop,       "alwaysontop"           );
@@ -118,7 +117,6 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
     aCbxManuel->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_MANUEL ) ).GetValue() );
     aCbxMousepointer->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_MOUSE ) ).GetValue() );
     aCbxPen->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_PEN ) ).GetValue() );
-    aCbxNavigator->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_NAVIGATOR ) ).GetValue() );
     aCbxAnimationAllowed->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_ANIMATION_ALLOWED ) ).GetValue() );
     aCbxChangePage->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_CHANGE_PAGE ) ).GetValue() );
     aCbxAlwaysOnTop->Check( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_ALWAYS_ON_TOP ) ).GetValue() );
@@ -170,7 +168,6 @@ void SdStartPresentationDlg::dispose()
     aCbxManuel.clear();
     aCbxMousepointer.clear();
     aCbxPen.clear();
-    aCbxNavigator.clear();
     aCbxAnimationAllowed.clear();
     aCbxChangePage.clear();
     aCbxAlwaysOnTop.clear();
@@ -301,7 +298,6 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_MANUEL, aCbxManuel->IsChecked() ) );
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_MOUSE, aCbxMousepointer->IsChecked() ) );
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_PEN, aCbxPen->IsChecked() ) );
-    rAttr.Put( SfxBoolItem ( ATTR_PRESENT_NAVIGATOR, aCbxNavigator->IsChecked() ) );
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ANIMATION_ALLOWED, aCbxAnimationAllowed->IsChecked() ) );
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_CHANGE_PAGE, aCbxChangePage->IsChecked() ) );
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ALWAYS_ON_TOP, aCbxAlwaysOnTop->IsChecked() ) );
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index f3c2f09..8cf501b 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -97,7 +97,6 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_MANUEL, rPresentationSettings.mbManual ) );
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_MOUSE, rPresentationSettings.mbMouseVisible ) );
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_PEN, rPresentationSettings.mbMouseAsPen ) );
-    aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_NAVIGATOR, rPresentationSettings.mbStartWithNavigator ) );
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_ANIMATION_ALLOWED, rPresentationSettings.mbAnimationAllowed ) );
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_CHANGE_PAGE, !rPresentationSettings.mbLockedPages ) );
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_ALWAYS_ON_TOP, rPresentationSettings.mbAlwaysOnTop ) );
@@ -173,13 +172,6 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
             rPresentationSettings.mbMouseAsPen = bValue;
         }
 
-        bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_NAVIGATOR, SfxBoolItem );
-        if( bValue != rPresentationSettings.mbStartWithNavigator )
-        {
-            bValuesChanged = true;
-            rPresentationSettings.mbStartWithNavigator = bValue;
-        }
-
         bValue = !ITEMVALUE( aDlgSet, ATTR_PRESENT_CHANGE_PAGE, SfxBoolItem );
         if ( bValue != rPresentationSettings.mbLockedPages )
         {
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index aa46aab..e787f03 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -116,7 +116,6 @@ const SfxItemPropertyMapEntry* ImplGetPresentationPropertyMap()
         { OUString("IsShowLogo"),               ATTR_PRESENT_SHOW_PAUSELOGO,    cppu::UnoType<bool>::get(),                0, 0 },
         { OUString("IsTransitionOnClick"),      ATTR_PRESENT_CHANGE_PAGE,       cppu::UnoType<bool>::get(),                0, 0 },
         { OUString("Pause"),                    ATTR_PRESENT_PAUSE_TIMEOUT,     ::cppu::UnoType<sal_Int32>::get(),    0, 0 },
-        { OUString("StartWithNavigator"),       ATTR_PRESENT_NAVIGATOR,         cppu::UnoType<bool>::get(),                0, 0 },
         { OUString("UsePen"),                   ATTR_PRESENT_PEN,               cppu::UnoType<bool>::get(),                0, 0 },
         { OUString(), 0, css::uno::Type(), 0, 0 }
     };
@@ -440,22 +439,6 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
         }
         break;
     }
-    case ATTR_PRESENT_NAVIGATOR:
-    {
-        bool bVal = false;
-
-        if( aValue >>= bVal )
-        {
-            bIllegalArgument = false;
-
-            if( rPresSettings.mbStartWithNavigator != bVal)
-            {
-                bValuesChanged = true;
-                rPresSettings.mbStartWithNavigator = bVal;
-            }
-        }
-        break;
-    }
     case ATTR_PRESENT_PEN:
     {
         bool bVal = false;
@@ -578,8 +561,6 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U
         return Any( rPresSettings.mbMouseVisible );
     case ATTR_PRESENT_ALWAYS_ON_TOP:
         return Any( rPresSettings.mbAlwaysOnTop );
-    case ATTR_PRESENT_NAVIGATOR:
-        return Any( rPresSettings.mbStartWithNavigator );
     case ATTR_PRESENT_PEN:
         return Any( rPresSettings.mbMouseAsPen );
     case ATTR_PRESENT_PAUSE_TIMEOUT:
@@ -1032,12 +1013,6 @@ void SlideShow::pause( bool bPause )
     }
 }
 
-void SlideShow::receiveRequest(SfxRequest& rReq)
-{
-    if( mxController.is() )
-        mxController->receiveRequest( rReq );
-}
-
 sal_Int32 SlideShow::getFirstPageNumber()
 {
     return mxController.is() ? mxController->getFirstSlideNumber() : 0;
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index e9005a7..71beb04 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -54,7 +54,6 @@
 #include <svx/bmpmask.hxx>
 #include <svx/srchdlg.hxx>
 #include <svx/hyperdlg.hxx>
-#include "NavigatorChildWindow.hxx"
 #include "AnimationChildWindow.hxx"
 #include "notifydocumentevent.hxx"
 #include <slideshowimpl.hxx>
@@ -103,14 +102,7 @@ static sal_uInt16 const pAllowed[] =
     SID_OPENDOC                             , //     5501   ///< that internally jumps work
     SID_JUMPTOMARK                          , //     5598
     SID_OPENHYPERLINK                       , //     6676
-    SID_NAVIGATOR                           , //    10366
-    SID_PRESENTATION_END                    , //    27218
-    SID_NAVIGATOR_PAGENAME                  , //    27287
-    SID_NAVIGATOR_STATE                     , //    27288
-    SID_NAVIGATOR_INIT                      , //    27289
-    SID_NAVIGATOR_PEN                       , //    27291
-    SID_NAVIGATOR_PAGE                      , //    27292
-    SID_NAVIGATOR_OBJECT                      //    27293
+    SID_PRESENTATION_END                     //    27218
 };
 
 class AnimationSlideController
@@ -772,7 +764,6 @@ bool SlideshowImpl::startPreview(
         maPresSettings.mbAnimationAllowed = true;
         maPresSettings.mnPauseTimeout = 0;
         maPresSettings.mbShowPauseLogo = false;
-        maPresSettings.mbStartWithNavigator = false;
 
         Reference< XDrawPagesSupplier > xDrawPages( mpDoc->getUnoModel(), UNO_QUERY_THROW );
         Reference< XIndexAccess > xSlides( xDrawPages->getDrawPages(), UNO_QUERY_THROW );
@@ -893,7 +884,6 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
             maPresSettings.mbMouseAsPen = false;
             maPresSettings.mnPauseTimeout = 0;
             maPresSettings.mbShowPauseLogo = false;
-            maPresSettings.mbStartWithNavigator = false;
         }
 
         if( pStartPage )
@@ -947,9 +937,6 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
             if ( ! maPresSettings.mbFullScreen)
                 mpPaneHider.reset(new PaneHider(*mpViewShell,this));
 
-            if( getViewFrame() )
-                getViewFrame()->SetChildWindow( SID_NAVIGATOR, maPresSettings.mbStartWithNavigator );
-
             // these Slots are forbidden in other views for this document
             if( mpDocSh )
             {
@@ -1377,12 +1364,6 @@ void SlideshowImpl::displayCurrentSlide (const bool bSkipAllMainSequenceEffects)
         registerShapeEvents(mpSlideController->getCurrentSlideNumber());
         update();
 
-        SfxBindings* pBindings = getBindings();
-        if( pBindings )
-        {
-            pBindings->Invalidate( SID_NAVIGATOR_STATE );
-            pBindings->Invalidate( SID_NAVIGATOR_PAGENAME );
-        }
     }
     // send out page change event and notify to update all acc info for current page
     if (mpViewShell)
@@ -2450,8 +2431,6 @@ FncGetChildWindowId aShowChildren[] =
     &SfxInfoBarContainerChild::GetChildWindowId
 };
 
-#define NAVIGATOR_CHILD_MASK        0x80000000UL
-
 void SlideshowImpl::hideChildWindows()
 {
     mnChildMask = 0UL;
@@ -2462,9 +2441,6 @@ void SlideshowImpl::hideChildWindows()
 
         if( pViewFrame )
         {
-            if( pViewFrame->GetChildWindow( SID_NAVIGATOR ) != nullptr )
-                mnChildMask |= NAVIGATOR_CHILD_MASK;
-
             for( sal_uLong i = 0, nCount = sizeof( aShowChildren ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
             {
                 const sal_uInt16 nId = ( *aShowChildren[ i ] )();
@@ -2486,8 +2462,6 @@ void SlideshowImpl::showChildWindows()
         SfxViewFrame* pViewFrame = getViewFrame();
         if( pViewFrame )
         {
-            pViewFrame->SetChildWindow( SID_NAVIGATOR, ( mnChildMask & NAVIGATOR_CHILD_MASK ) != 0 );
-
             for( sal_uLong i = 0, nCount = sizeof( aShowChildren ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
             {
                 if( mnChildMask & ( 1 << i ) )
@@ -2646,58 +2620,6 @@ sal_Bool SAL_CALL SlideshowImpl::isActive() throw (RuntimeException, std::except
     return mbActive;
 }
 
-void SlideshowImpl::receiveRequest(SfxRequest& rReq)
-{
-    const SfxItemSet* pArgs      = rReq.GetArgs();
-
-    switch ( rReq.GetSlot() )
-    {
-        case SID_NAVIGATOR_PEN:
-            setUsePen(!mbUsePen);
-        break;
-
-        case SID_NAVIGATOR_PAGE:
-        {
-            PageJump    eJump = (PageJump)static_cast<const SfxAllEnumItem&>( pArgs->Get(SID_NAVIGATOR_PAGE)).GetValue();
-            switch( eJump )
-            {
-                case PAGE_FIRST:        gotoFirstSlide(); break;
-                case PAGE_LAST:         gotoLastSlide(); break;
-                case PAGE_NEXT:         gotoNextSlide(); break;
-                case PAGE_PREVIOUS:     gotoPreviousSlide(); break;
-                case PAGE_NONE:         break;
-            }
-        }
-        break;
-
-        case SID_NAVIGATOR_OBJECT:
-        {
-            const OUString aTarget( static_cast<const SfxStringItem&>(pArgs->Get(SID_NAVIGATOR_OBJECT)).GetValue() );
-
-            // is the bookmark a Slide?
-            bool        bIsMasterPage;
-            sal_uInt16  nPgNum = mpDoc->GetPageByName( aTarget, bIsMasterPage );
-            SdrObject*  pObj   = nullptr;
-
-            if( nPgNum == SDRPAGE_NOTFOUND )
-            {
-                // is the bookmark an object?
-                pObj = mpDoc->GetObj( aTarget );
-
-                if( pObj )
-                    nPgNum = pObj->GetPage()->GetPageNum();
-            }
-
-            if( nPgNum != SDRPAGE_NOTFOUND )
-            {
-                nPgNum = ( nPgNum - 1 ) >> 1;
-                displaySlideNumber( nPgNum );
-            }
-        }
-        break;
-    }
-}
-
 void SlideshowImpl::setAutoSaveState( bool bOn)
 {
     try
@@ -3331,11 +3253,6 @@ void PresentationSettingsEx::SetPropertyValue( const OUString& rProperty, const
             return;
         }
     }
-    else if ( rProperty == "StartWithNavigator" )
-    {
-        if( rValue >>= mbStartWithNavigator )
-            return;
-    }
     else if ( rProperty == "UsePen" )
     {
         if( rValue >>= mbMouseAsPen )
diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx
index bfc7d1d..9c01295 100644
--- a/sd/source/ui/view/drviewsd.cxx
+++ b/sd/source/ui/view/drviewsd.cxx
@@ -35,7 +35,6 @@
 #include "sdpage.hxx"
 #include "drawdoc.hxx"
 #include "DrawDocShell.hxx"
-#include "slideshow.hxx"
 #include "pgjump.hxx"
 #include "NavigatorChildWindow.hxx"
 #include "navigatr.hxx"
@@ -71,12 +70,7 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
         case SID_NAVIGATOR_PAGE:
         case SID_NAVIGATOR_OBJECT:
         {
-            rtl::Reference< SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) );
-            if (xSlideshow.is() && xSlideshow->isRunning() )
-            {
-                xSlideshow->receiveRequest( rReq );
-            }
-            else if (nSId == SID_NAVIGATOR_PAGE)
+            if (nSId == SID_NAVIGATOR_PAGE)
             {
                 if ( mpDrawView->IsTextEdit() )
                     mpDrawView->SdrEndTextEdit();
@@ -166,36 +160,15 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet )
     bool   bEndless = false;
     OUString aPageName;
 
-    rtl::Reference< SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) );
-    if( xSlideshow.is() && xSlideshow->isRunning() )
-    {
-        // pen activated?
-        nState |= xSlideshow->isDrawingPossible() ? NAVBTN_PEN_CHECKED : NAVBTN_PEN_UNCHECKED;
-
-        nCurrentPage = (sal_uInt16)xSlideshow->getCurrentPageNumber();
-        nFirstPage = (sal_uInt16)xSlideshow->getFirstPageNumber();
-        nLastPage = (sal_uInt16)xSlideshow->getLastPageNumber();
-        bEndless = xSlideshow->isEndless();
-
-        // Get the page for the current page number.
-        SdPage* pPage = nullptr;
-        if( nCurrentPage < GetDoc()->GetSdPageCount( PK_STANDARD ) )
-            pPage = GetDoc()->GetSdPage (nCurrentPage, PK_STANDARD);
+    nState |= NAVBTN_PEN_DISABLED | NAVTLB_UPDATE;
 
-        if(pPage)
-            aPageName = pPage->GetName();
-    }
-    else
+    if (mpActualPage != nullptr)
     {
-        nState |= NAVBTN_PEN_DISABLED | NAVTLB_UPDATE;
-
-        if (mpActualPage != nullptr)
-        {
-            nCurrentPage = ( mpActualPage->GetPageNum() - 1 ) / 2;
-            aPageName = mpActualPage->GetName();
-        }
-        nLastPage = GetDoc()->GetSdPageCount( mePageKind ) - 1;
+        nCurrentPage = ( mpActualPage->GetPageNum() - 1 ) / 2;
+        aPageName = mpActualPage->GetName();
     }
+    nLastPage = GetDoc()->GetSdPageCount( mePageKind ) - 1;
+
 
     // first page / previous page
     if( nCurrentPage == nFirstPage )
diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui b/sd/uiconfig/simpress/ui/presentationdialog.ui
index c044a5a..ebb5de5 100644
--- a/sd/uiconfig/simpress/ui/presentationdialog.ui
+++ b/sd/uiconfig/simpress/ui/presentationdialog.ui
@@ -488,21 +488,6 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkCheckButton" id="navigatorvisible">
-                                <property name="label" translatable="yes">_Navigator visible</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="use_underline">True</property>
-                                <property name="xalign">0</property>
-                                <property name="draw_indicator">True</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">0</property>
-                                <property name="top_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
                               <object class="GtkCheckButton" id="animationsallowed">
                                 <property name="label" translatable="yes">_Animations allowed</property>
                                 <property name="visible">True</property>


More information about the Libreoffice-commits mailing list