diff options
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 8 | ||||
-rw-r--r-- | include/formula/funcutl.hxx | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 68d1ec3b4fc4..f64b6aff9bd5 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -350,6 +350,14 @@ bool RefEdit::KeyInput(const KeyEvent& rKEvt) return false; } +void RefEdit::GrabFocus() +{ + bool bHadFocus = xEntry->has_focus(); + xEntry->grab_focus(); + if (!bHadFocus && xEntry->has_focus()) + GetFocus(*xEntry); +} + IMPL_LINK_NOARG(RefEdit, GetFocus, weld::Widget&, void) { maGetFocusHdl.Call(*this); diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 5c729da03638..915152466174 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -84,10 +84,7 @@ public: Modify(*xEntry); } - void GrabFocus() - { - xEntry->grab_focus(); - } + void GrabFocus(); void SelectAll() { |