Resolves: tdf#152128 consider input engine events as well as keystrokes

Change-Id: I2884c6feb388050dd962fba5ef85117da2a039d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143411
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143454
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 04cc0a8..53e4165 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -25,6 +25,7 @@
#include <o3tl/safeint.hxx>
#include <svl/grabbagitem.hxx>
#include <svl/itemset.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -1099,6 +1100,17 @@ bool AddressMultiLineEdit::KeyInput(const KeyEvent& rKEvt)
    return WeldEditView::KeyInput(rKEvt);
}

bool AddressMultiLineEdit::Command(const CommandEvent& rCEvt)
{
    if (rCEvt.GetCommand() == CommandEventId::StartExtTextInput ||
        rCEvt.GetCommand() == CommandEventId::EndExtTextInput ||
        rCEvt.GetCommand() == CommandEventId::ExtTextInput)
    {
        return true;
    }
    return WeldEditView::Command(rCEvt);
}

bool AddressMultiLineEdit::MouseButtonDown(const MouseEvent& rMEvt)
{
    if (rMEvt.GetClicks() >= 2)
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index 65071c1..c32ad57 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -144,6 +144,7 @@ class AddressMultiLineEdit : public WeldEditView
    virtual css::uno::Reference<css::datatransfer::dnd::XDropTarget> GetDropTarget() override;

    virtual bool KeyInput(const KeyEvent& rKEvt) override;
    virtual bool Command(const CommandEvent& rCEvt) override;
    virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;

public: