summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-01 14:34:23 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-02 00:49:58 +0200
commit9d17e1250acb7c5c60cdf8d71476c5873b8b4a9b (patch)
tree12275c42a88e9299398fe9b465660212ac91cdbe /cui
parentc6f0b726e605df49074e2ddc668fa4c6f070c170 (diff)
Audit LoseFocus - basctl, cui, dbaccess.
Change-Id: If61b45f28f30e3ab00dbf071198233d59899d719
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx15
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx1
2 files changed, 14 insertions, 2 deletions
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 8e55edafedc5..8fbb2439ec28 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -420,6 +420,11 @@ namespace svx
implUpdateDisplay();
}
+ bool SuggestionDisplay::hasCurrentControl()
+ {
+ return m_bDisplayListBox || m_aValueSet;
+ }
+
Control& SuggestionDisplay::implGetCurrentControl()
{
if( m_bDisplayListBox )
@@ -445,11 +450,17 @@ namespace svx
}
void SuggestionDisplay::GetFocus()
{
- implGetCurrentControl().GetFocus();
+ if (hasCurrentControl())
+ implGetCurrentControl().GetFocus();
+ else
+ Control::LoseFocus();
}
void SuggestionDisplay::LoseFocus()
{
- implGetCurrentControl().LoseFocus();
+ if (hasCurrentControl())
+ implGetCurrentControl().LoseFocus();
+ else
+ Control::LoseFocus();
}
void SuggestionDisplay::Command( const CommandEvent& rCEvt )
{
diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx
index 3e7f38339cc9..3b88a7bd0b75 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -85,6 +85,7 @@ namespace svx
private:
void implUpdateDisplay();
+ bool hasCurrentControl();
Control& implGetCurrentControl();
private: