[Libreoffice-commits] core.git: sw/sdi sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Tue May 28 17:47:17 UTC 2019


 sw/sdi/_frmsh.sdi                 |    5 +++++
 sw/source/uibase/inc/frmsh.hxx    |    1 +
 sw/source/uibase/shells/frmsh.cxx |   13 +++++++++++++
 3 files changed, 19 insertions(+)

New commits:
commit 40c096508da7ee14f36715eee3185041f4a36ddd
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue May 28 18:11:13 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue May 28 19:46:23 2019 +0200

    sw: implement select-all for the frame shell
    
    There is no reason why Ctrl-A should be a NOP when you have an image
    selected.
    
    No test, there is one in the cp-6.0 copy&paste code, that coverage will
    arrive as part of that copy&paste code forward-port.
    
    Change-Id: If0013ee0e9ff9a6fb038a22de7b5d3c76e5c52b9
    Reviewed-on: https://gerrit.libreoffice.org/73118
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/sdi/_frmsh.sdi b/sw/sdi/_frmsh.sdi
index 6d02c04efdeb..398cd30a93ff 100644
--- a/sw/sdi/_frmsh.sdi
+++ b/sw/sdi/_frmsh.sdi
@@ -406,5 +406,10 @@ interface BaseTextFrame
         ExecMethod = Execute ;
         DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
     ]
+    SID_SELECTALL
+    [
+        ExecMethod = ExecMove ;
+        StateMethod = NoState ;
+    ]
 }
 
diff --git a/sw/source/uibase/inc/frmsh.hxx b/sw/source/uibase/inc/frmsh.hxx
index f86e0d06501f..4b8a64c75823 100644
--- a/sw/source/uibase/inc/frmsh.hxx
+++ b/sw/source/uibase/inc/frmsh.hxx
@@ -35,6 +35,7 @@ public:
     virtual ~SwFrameShell() override;
 
     void    Execute(SfxRequest &);
+    void    ExecMove(SfxRequest& rReq);
     void    GetState(SfxItemSet &);
     void    ExecFrameStyle(SfxRequest const & rReq);
     void    GetLineStyleState(SfxItemSet &rSet);
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index d0fead931a0b..dfb403b9ffcf 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -115,6 +115,19 @@ void SwFrameShell::InitInterface_Impl()
     GetStaticInterface()->RegisterObjectBar(SFX_OBJECTBAR_OBJECT, SfxVisibilityFlags::Invisible, ToolbarId::Frame_Toolbox);
 }
 
+void SwFrameShell::ExecMove(SfxRequest& rReq)
+{
+    SwWrtShell& rSh = GetShell();
+    sal_uInt16 nSlot = rReq.GetSlot();
+    switch (nSlot)
+    {
+        case SID_SELECTALL:
+            rSh.SelAll();
+            rReq.Done();
+            break;
+    }
+}
+
 void SwFrameShell::Execute(SfxRequest &rReq)
 {
     //First those who do not need FrameMgr.


More information about the Libreoffice-commits mailing list