summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/charwin.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/sfx2/source/control/charwin.cxx b/sfx2/source/control/charwin.cxx
index f80bd30b684d..b94d2bcd1e82 100644
--- a/sfx2/source/control/charwin.cxx
+++ b/sfx2/source/control/charwin.cxx
@@ -19,6 +19,7 @@
#include <vcl/settings.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weldutils.hxx>
@@ -65,16 +66,10 @@ bool SvxCharView::MouseButtonDown(const MouseEvent& rMEvt)
}
maMouseClickHdl.Call(this);
+ return true;
}
- if (rMEvt.IsRight())
- {
- GrabFocus();
- Invalidate();
- createContextMenu(rMEvt.GetPosPixel());
- }
-
- return true;
+ return CustomWidgetController::MouseButtonDown(rMEvt);
}
bool SvxCharView::KeyInput(const KeyEvent& rKEvt)
@@ -92,6 +87,19 @@ bool SvxCharView::KeyInput(const KeyEvent& rKEvt)
return bRet;
}
+bool SvxCharView::Command(const CommandEvent& rCommandEvent)
+{
+ if (rCommandEvent.GetCommand() == CommandEventId::ContextMenu)
+ {
+ GrabFocus();
+ Invalidate();
+ createContextMenu(rCommandEvent.GetMousePosPixel());
+ return true;
+ }
+
+ return weld::CustomWidgetController::Command(rCommandEvent);
+}
+
void SvxCharView::InsertCharToDoc()
{
if (GetText().isEmpty())