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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 13 15:36:24 UTC 2021


 sd/source/ui/annotations/annotationwindow.cxx |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

New commits:
commit d1d56ed835549bb10995d4d240abf692e198bf78
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 12 11:03:07 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Feb 13 16:35:44 2021 +0100

    Related: tdf#62688 support Ctrl+A to select all in impress comments
    
    Change-Id: Ic8e052752e333202cb44719a85ae949c85b735e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110823
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 36e7c28f0e3b..00413a9b8ca2 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -122,6 +122,20 @@ bool AnnotationTextWindow::KeyInput(const KeyEvent& rKeyEvt)
                 if (EditView* pEditView = GetEditView())
                 {
                     bDone = pEditView->PostKeyEvent(rKeyEvt);
+                    if (!bDone && rKeyEvt.GetKeyCode().IsMod1() && !rKeyEvt.GetKeyCode().IsMod2())
+                    {
+                        if (nKey == KEY_A)
+                        {
+                            EditEngine* pEditEngine = GetEditEngine();
+                            sal_Int32 nPar = pEditEngine->GetParagraphCount();
+                            if (nPar)
+                            {
+                                sal_Int32 nLen = pEditEngine->GetTextLen(nPar - 1);
+                                pEditView->SetSelection(ESelection(0, 0, nPar - 1, nLen));
+                            }
+                            bDone = true;
+                        }
+                    }
                 }
             }
         }


More information about the Libreoffice-commits mailing list