[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svtools/source vcl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jan 16 16:26:14 UTC 2019
svtools/source/control/valueset.cxx | 2 +-
vcl/source/app/salvtables.cxx | 24 +++++++++++++++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
New commits:
commit 86915eb7a0dd33d6633a3eded3f3e82cb892e0a1
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jan 14 21:05:41 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 16 17:25:44 2019 +0100
Resolves: tdf#122656 keypress handled twice
Change-Id: I8a9ec82d46a3df04554c139264755c8f28f5e897
Reviewed-on: https://gerrit.libreoffice.org/66336
Tested-by: Jenkins
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 4e57665d21ed..ad6101bb6cae 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -2615,7 +2615,7 @@ bool SvtValueSet::KeyInput( const KeyEvent& rKeyEvent )
}
if ( nItemPos == VALUESET_ITEM_NOTFOUND )
- return false;
+ return true;
if ( nItemPos!=VALUESET_ITEM_NONEITEM && nItemPos<nLastItem )
{
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 97626e1f762b..c62230b079ed 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -224,6 +224,9 @@ private:
}
}
+protected:
+ virtual void HandleEventListener(VclWindowEvent& rEvent);
+
public:
SalInstanceWidget(vcl::Window* pWidget, bool bTakeOwnership)
: m_xWidget(pWidget)
@@ -532,7 +535,7 @@ public:
}
};
-IMPL_LINK(SalInstanceWidget, EventListener, VclWindowEvent&, rEvent, void)
+void SalInstanceWidget::HandleEventListener(VclWindowEvent& rEvent)
{
if (rEvent.GetId() == VclEventId::WindowGetFocus || rEvent.GetId() == VclEventId::WindowActivate)
m_aFocusInHdl.Call(*this);
@@ -552,6 +555,11 @@ IMPL_LINK(SalInstanceWidget, EventListener, VclWindowEvent&, rEvent, void)
}
}
+IMPL_LINK(SalInstanceWidget, EventListener, VclWindowEvent&, rEvent, void)
+{
+ HandleEventListener(rEvent);
+}
+
namespace
{
Image createImage(const OUString& rImage)
@@ -2804,6 +2812,20 @@ private:
DECL_LINK(PopupMenuHdl, const Point&, bool);
DECL_LINK(QueryTooltipHdl, tools::Rectangle&, OUString);
+ // SalInstanceWidget has a generic listener for all these
+ // events, ignore the ones we have specializations for
+ // in VclDrawingArea
+ virtual void HandleEventListener(VclWindowEvent& rEvent) override
+ {
+ if (rEvent.GetId() == VclEventId::WindowResize ||
+ rEvent.GetId() == VclEventId::WindowKeyInput ||
+ rEvent.GetId() == VclEventId::WindowKeyUp)
+ {
+ return;
+ }
+ SalInstanceWidget::HandleEventListener(rEvent);
+ }
+
public:
SalInstanceDrawingArea(VclDrawingArea* pDrawingArea, const a11yref& rAlly,
FactoryFunction pUITestFactoryFunction, void* pUserData, bool bTakeOwnership)
More information about the Libreoffice-commits
mailing list