[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sd/sdi sd/source svx/uiconfig

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sun Oct 13 16:13:19 UTC 2019


 sd/sdi/_drvwsh.sdi                |   10 ++++
 sd/sdi/sdraw.sdi                  |   34 ++++++++++++++
 sd/source/ui/view/drviews2.cxx    |    2 
 sd/source/ui/view/drviewsj.cxx    |    8 +++
 svx/uiconfig/ui/sidebarpossize.ui |   88 ++++++++++++++++++++++++++++++++++++++
 5 files changed, 142 insertions(+)

New commits:
commit 307ea1aebb30ee2e72efa7337179fb8d5a473134
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Oct 13 12:00:50 2019 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sun Oct 13 18:12:50 2019 +0200

    tdf#125566 Add arrangement functions to position & size sidebar
    
    Adds arrangement actions to position & size sidebar so it is
    possible to move the object up/down in the stack.
    
    As Draw/Impress uses it's own action names for the same UNO action
    (Forward/Back in Draw and ObjectForwardOne and ObjectBackOne in
    Writer/Calc) also add the global ones to Draw/Impress and connect
    them to the same function as Forward/Back. This commit does not
    unify them however (Forward/Back are still used in menus/toolbars)
    but this could be done in the future.
    
    Change-Id: Ibb152f29dbe11dfb1b6a057e6ea60b21029912e2
    Reviewed-on: https://gerrit.libreoffice.org/80729
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit b2e5f9ead2bb7f2979afe4ba13e3950e8a3cc278)
    Reviewed-on: https://gerrit.libreoffice.org/80735
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 9e30bfc2aaf1..d7c836cc5b58 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -544,6 +544,11 @@ interface DrawView
         ExecMethod = FuTemporary ;
         StateMethod = GetMenuState ;
     ]
+    SID_FRAME_UP // ole : no, status : play rec
+    [
+        ExecMethod = FuTemporary ;
+        StateMethod = GetMenuState ;
+    ]
     SID_BEFORE_OBJ // ole : no, status : no
     [
         ExecMethod = FuTemporary ;
@@ -564,6 +569,11 @@ interface DrawView
         ExecMethod = FuTemporary ;
         StateMethod = GetMenuState ;
     ]
+    SID_FRAME_DOWN // ole : no, status : play rec
+    [
+        ExecMethod = FuTemporary ;
+        StateMethod = GetMenuState ;
+    ]
     SID_FRAME_TO_BOTTOM // ole : no, status : play rec
     [
         ExecMethod = FuTemporary ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index e0c6e03b254f..465751caa27c 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -158,6 +158,23 @@ SfxVoidItem Backward SID_MOREBACK
     GroupId = SfxGroupId::Modify;
 ]
 
+SfxVoidItem ObjectBackOne SID_FRAME_DOWN
+()
+[
+    AutoUpdate = FALSE,
+    FastCall = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    ToolBoxConfig = TRUE,
+    GroupId = SfxGroupId::Modify;
+]
+
 SfxVoidItem BeforeObject SID_BEFORE_OBJ
 ()
 [
@@ -1441,6 +1458,23 @@ SfxVoidItem Forward SID_MOREFRONT
     GroupId = SfxGroupId::Modify;
 ]
 
+SfxVoidItem ObjectForwardOne SID_FRAME_UP
+()
+[
+    AutoUpdate = FALSE,
+    FastCall = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    ToolBoxConfig = TRUE,
+    GroupId = SfxGroupId::Modify;
+]
+
 SfxVoidItem GetBlue SID_GETBLUE
 (SfxUInt32Item WhatKind ID_VAL_WHATKIND)
 [
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index a5349306dc71..c98532f34f42 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2839,6 +2839,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         break;
 
         case SID_MOREFRONT:  // BASIC
+        case SID_FRAME_UP:  // BASIC
         {
             mpDrawView->MovMarkedToTop();
             Cancel();
@@ -2847,6 +2848,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         break;
 
         case SID_MOREBACK:  // BASIC
+        case SID_FRAME_DOWN:  // BASIC
         {
             mpDrawView->MovMarkedToBtm();
             Cancel();
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index f0c32d1bf830..cfd849874386 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -93,7 +93,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
             SfxItemState::DEFAULT == rSet.GetItemState( SID_OBJECT_ALIGN_DOWN ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_TOP ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREFRONT ) ||
+            SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_UP ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_MOREBACK ) ||
+            SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_DOWN ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_FRAME_TO_BOTTOM ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_BEFORE_OBJ ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_BEHIND_OBJ ) ||
@@ -216,7 +218,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
                 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
                 rSet.DisableItem( SID_FRAME_TO_TOP );
                 rSet.DisableItem( SID_MOREFRONT );
+                rSet.DisableItem( SID_FRAME_UP );
                 rSet.DisableItem( SID_MOREBACK );
+                rSet.DisableItem( SID_FRAME_DOWN );
                 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
                 rSet.DisableItem( SID_BEFORE_OBJ );
                 rSet.DisableItem( SID_BEHIND_OBJ );
@@ -393,7 +397,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
                 rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
                 rSet.DisableItem( SID_FRAME_TO_TOP );
                 rSet.DisableItem( SID_MOREFRONT );
+                rSet.DisableItem( SID_FRAME_UP );
                 rSet.DisableItem( SID_MOREBACK );
+                rSet.DisableItem( SID_FRAME_DOWN );
                 rSet.DisableItem( SID_FRAME_TO_BOTTOM );
                 rSet.DisableItem( SID_BEFORE_OBJ );
                 rSet.DisableItem( SID_BEHIND_OBJ );
@@ -453,7 +459,9 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
 
         rSet.DisableItem( SID_FRAME_TO_TOP );
         rSet.DisableItem( SID_MOREFRONT );
+        rSet.DisableItem( SID_FRAME_UP );
         rSet.DisableItem( SID_MOREBACK );
+        rSet.DisableItem( SID_FRAME_DOWN );
         rSet.DisableItem( SID_FRAME_TO_BOTTOM );
         rSet.DisableItem( SID_BEFORE_OBJ );
         rSet.DisableItem( SID_BEHIND_OBJ );
diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui
index 46a920313d95..3f584ac4d31f 100644
--- a/svx/uiconfig/ui/sidebarpossize.ui
+++ b/svx/uiconfig/ui/sidebarpossize.ui
@@ -360,6 +360,94 @@
                 <property name="position">3</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkBox">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkLabel" id="arrangelabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label" translatable="yes" context="sidebarpossize|arrangelabel">_Arrange:</property>
+                    <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="sfxlo-SidebarToolBox" id="arrangetoolbar">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="has_tooltip">True</property>
+                    <property name="tooltip_text" translatable="yes" context="sidebarpossize|arrangetoolbar">Arrange</property>
+                    <property name="halign">end</property>
+                    <property name="show_arrow">False</property>
+                    <child>
+                      <object class="GtkToolButton" id="bringtofront">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="action_name">.uno:BringToFront</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="forward">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="action_name">.uno:ObjectForwardOne</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="backward">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="action_name">.uno:ObjectBackOne</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkToolButton" id="sendtoback">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="action_name">.uno:SendToBack</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="homogeneous">True</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">True</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">True</property>
+                <property name="position">4</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="expand">False</property>


More information about the Libreoffice-commits mailing list