[Libreoffice-commits] core.git: officecfg/registry sd/inc sd/sdi sd/source sd/uiconfig svx/inc

Jakub Golebiewski kubusg at gmail.com
Tue Apr 16 11:23:47 PDT 2013


 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu           |    5 +
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |    8 +
 sd/inc/sdcommands.h                                                      |    1 
 sd/sdi/SlideSorterController.sdi                                         |    5 +
 sd/sdi/sdraw.sdi                                                         |   25 +++++
 sd/source/ui/inc/DrawViewShell.hxx                                       |    1 
 sd/source/ui/inc/OutlineViewShell.hxx                                    |    1 
 sd/source/ui/slidesorter/controller/SlsSlotManager.cxx                   |   26 +++++
 sd/source/ui/view/drviewse.cxx                                           |   45 ++++++++-
 sd/source/ui/view/outlnvs2.cxx                                           |   46 ++++++++--
 sd/uiconfig/simpress/menubar/menubar.xml                                 |    1 
 svx/inc/svx/svxids.hrc                                                   |    1 
 12 files changed, 147 insertions(+), 18 deletions(-)

New commits:
commit baffab9a4ffca9a4940a3310937d6e858e66cc1f
Author: Jakub Golebiewski <kubusg at gmail.com>
Date:   Tue Apr 9 23:45:52 2013 +0200

    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

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index fd649ba..6cf3ae3 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -2234,6 +2234,11 @@
     </node>
     <node oor:name="F5_SHIFT" oor:op="replace">
      <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
+      <value xml:lang="en-US">.uno:PresentationThisSlide</value>
+     </prop>
+    </node>
+    <node oor:name="F5_SHIFT_MOD2" oor:op="replace">
+     <prop oor:name="Command"><value xml:lang="x-no-translate">I10N SHORTCUTS - NO TRANSLATE</value>
       <value xml:lang="en-US">.uno:RestoreEditingView</value>
      </prop>
     </node>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index d135cd13..9efa408 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -37,6 +37,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:PresentationThisSlide" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">Sl~ide Show From This Slide</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:Remote" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Impress R~emote</value>
diff --git a/sd/inc/sdcommands.h b/sd/inc/sdcommands.h
index daecfe8..f64e686 100644
--- a/sd/inc/sdcommands.h
+++ b/sd/inc/sdcommands.h
@@ -94,6 +94,7 @@
 #define CMD_SID_OUTLINE_TEXT_AUTOFIT                ".uno.OutlineTextAutofit"
 #define CMD_SID_PAGESETUP                           ".uno:PageSetup"
 #define CMD_SID_PRESENTATION                        ".uno:Presentation"
+#define CMD_SID_PRESENTATION_THIS_SLIDE             ".uno:PresentationThisSlide"
 #define CMD_SID_REMOTE_DLG                          ".uno:Remote"
 #define CMD_SID_PRESENTATION_LAYOUT                 ".uno:PresentationLayout"
 #define CMD_SID_RENAMELAYER                         ".uno:RenameLayer"
diff --git a/sd/sdi/SlideSorterController.sdi b/sd/sdi/SlideSorterController.sdi
index f38a3a8..5b717d1 100644
--- a/sd/sdi/SlideSorterController.sdi
+++ b/sd/sdi/SlideSorterController.sdi
@@ -136,6 +136,11 @@ interface SlideSorterView
         ExecMethod = FuTemporary ;
         StateMethod = GetMenuState ;
     ]
+    SID_PRESENTATION_THIS_SLIDE // ole : no, status : ?
+    [
+        ExecMethod = FuTemporary ;
+        StateMethod = GetMenuState ;
+    ]
     SID_HIDE_SLIDE // ole : no, status : ?
     [
         ExecMethod = FuTemporary ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index 83b4d04..5e913a2 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -5196,6 +5196,31 @@ SfxVoidItem Presentation SID_PRESENTATION
 ]
 
 //--------------------------------------------------------------------------
+SfxVoidItem PresentationThisSlide SID_PRESENTATION_THIS_SLIDE
+()
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = TRUE,
+    ReadOnlyDoc = TRUE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Asynchron;
+
+    /* config: */
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = TRUE,
+    GroupId = GID_VIEW;
+]
+
+//--------------------------------------------------------------------------
 SfxVoidItem PresentationDialog SID_PRESENTATION_DLG
 ()
 [
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 64de25e..f8b94ba 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -403,6 +403,7 @@ protected:
     void            GetMenuStateSel(SfxItemSet& rSet);
 
 private:
+    void ShowSlideShow(SfxRequest& rReq);
     /** This flag controls whether the layer mode is active, i.e. the layer
         dialog is visible.
     */
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 616ed42..f4ca53f 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -151,6 +151,7 @@ public:
     bool UpdateOutlineObject( SdPage* pPage, Paragraph* pPara );
 
 private:
+    void ShowSlideShow(SfxRequest& rReq);
     OutlineView* pOlView;
     SdPage*         pLastPage; // Zur performanten Aufbereitung der Preview
     TransferableClipboardListener* pClipEvtLstnr;
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index a07ef14..9df10f5 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -19,6 +19,8 @@
 
 
 #include <com/sun/star/presentation/XPresentation2.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/uno/Any.hxx>
 
 #include <editeng/outlobj.hxx>
 
@@ -91,6 +93,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 { namespace slidesorter { namespace controller {
 
@@ -138,6 +141,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
     switch (rRequest.GetSlot())
     {
         case SID_PRESENTATION:
+        case SID_PRESENTATION_THIS_SLIDE:
         case SID_REHEARSE_TIMINGS:
             ShowSlideShow (rRequest);
             pShell->Cancel();
@@ -882,9 +886,29 @@ void SlotManager::ShowSlideShow( SfxRequest& rReq)
     if( xPresentation.is() )
     {
         if( ( SID_REHEARSE_TIMINGS != rReq.GetSlot() ) )
-            xPresentation->start();
+        {
+            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();
+        }
     }
 }
 
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 02d9cbe..023766a 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 612476e..715da28 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 );
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index 73fa4fa..96505a5 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -300,6 +300,7 @@
     <menu:menu menu:id=".uno:SlideShowMenu">
         <menu:menupopup>
             <menu:menuitem menu:id=".uno:Presentation"/>
+            <menu:menuitem menu:id=".uno:PresentationThisSlide"/>
             <menu:menuitem menu:id=".uno:PresentationDialog"/>
             <menu:menuitem menu:id=".uno:RehearseTimings"/>
             <menu:menuitem menu:id=".uno:Remote"/>
diff --git a/svx/inc/svx/svxids.hrc b/svx/inc/svx/svxids.hrc
index e92b3da..a343df4 100644
--- a/svx/inc/svx/svxids.hrc
+++ b/svx/inc/svx/svxids.hrc
@@ -351,6 +351,7 @@
 #define SID_OUTLINE_COLLAPSE_ALL                        ( SID_SVX_START + 155 )
 #define SID_OUTLINE_BULLET                              ( SID_SVX_START + 156 )
 #define SID_PRESENTATION                                ( SID_SVX_START + 157 )
+#define SID_PRESENTATION_THIS_SLIDE                     ( SID_SVX_START + 158 )
 #define SID_REHEARSE_TIMINGS                            ( SID_SVX_START + 159 )
 #define SID_HIDE_SLIDE                                  ( SID_SVX_START + 161 )
 #define SID_CHOOSE_POLYGON                              ( SID_SVX_START + 162 )


More information about the Libreoffice-commits mailing list