summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-02 09:16:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-11-18 17:36:43 +0100
commit9a21a3295c57f5692c5cf9b14f7342138a38e3db (patch)
tree164dc6a3f071b989e2e072b8839fe8568128747b /sfx2
parent070bb33d301daeb8767d31847c0eeaa19165d761 (diff)
Related: tdf#128104 extend popup handler to cover all CommandEvents
Reviewed-on: https://gerrit.libreoffice.org/80021 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 947150821e985c255f6c802322e696eff4257a5d) Change-Id: I26360ce5c696d0e571385d83a15876eb2286e12f Reviewed-on: https://gerrit.libreoffice.org/82741 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/templatelocalview.cxx5
-rw-r--r--sfx2/source/control/templatesearchview.cxx5
-rw-r--r--sfx2/source/inc/templatesearchview.hxx2
3 files changed, 9 insertions, 3 deletions
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index 80232e4205e2..4c281929c9a0 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -1199,8 +1199,11 @@ bool SfxTemplateLocalView::MouseButtonDown( const MouseEvent& rMEvt )
return SfxThumbnailView::MouseButtonDown(rMEvt);
}
-bool SfxTemplateLocalView::ContextMenu(const CommandEvent& rCEvt)
+bool SfxTemplateLocalView::Command(const CommandEvent& rCEvt)
{
+ if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
+ return CustomWidgetController::Command(rCEvt);
+
if (rCEvt.IsMouseEvent())
{
deselectItems();
diff --git a/sfx2/source/control/templatesearchview.cxx b/sfx2/source/control/templatesearchview.cxx
index 0203352a0040..759c888ce8d7 100644
--- a/sfx2/source/control/templatesearchview.cxx
+++ b/sfx2/source/control/templatesearchview.cxx
@@ -83,8 +83,11 @@ bool TemplateSearchView::KeyInput( const KeyEvent& rKEvt )
return SfxThumbnailView::KeyInput(rKEvt);
}
-bool TemplateSearchView::ContextMenu(const CommandEvent& rCEvt)
+bool TemplateSearchView::Command(const CommandEvent& rCEvt)
{
+ if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
+ return CustomWidgetController::Command(rCEvt);
+
if (rCEvt.IsMouseEvent())
{
deselectItems();
diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx
index ae7658f3ae44..69073653be2a 100644
--- a/sfx2/source/inc/templatesearchview.hxx
+++ b/sfx2/source/inc/templatesearchview.hxx
@@ -48,7 +48,7 @@ private:
virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
- virtual bool ContextMenu(const CommandEvent& rPos) override;
+ virtual bool Command(const CommandEvent& rPos) override;
virtual bool KeyInput( const KeyEvent& rKEvt ) override;