diff options
-rw-r--r-- | cui/source/dialogs/hangulhanjadlg.cxx | 15 | ||||
-rw-r--r-- | cui/source/inc/hangulhanjadlg.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/control/FieldDescControl.cxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindowTitle.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 2 |
6 files changed, 23 insertions, 6 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: diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index a6fb6d753efe..3cce5975a3a1 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1594,7 +1594,6 @@ void OFieldDescControl::implFocusLost(vcl::Window* _pWhich) void OFieldDescControl::LoseFocus() { - implFocusLost(NULL); TabPage::LoseFocus(); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index a0fba532d142..f1f3149862f0 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -68,11 +68,16 @@ void OTableWindowTitle::GetFocus() { if(m_pTabWin) m_pTabWin->GetFocus(); + else + FixedText::GetFocus(); } void OTableWindowTitle::LoseFocus() { - m_pTabWin->LoseFocus(); + if (m_pTabWin) + m_pTabWin->LoseFocus(); + else + FixedText::LoseFocus(); } void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index 3252a5dd510a..7931fee33ba8 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -106,7 +106,8 @@ void OFieldDescGenWin::GetFocus() void OFieldDescGenWin::LoseFocus() { - m_pFieldControl->LoseFocus(); + if (m_pFieldControl) + m_pFieldControl->LoseFocus(); TabPage::LoseFocus(); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 9203d5656757..039b6693a11c 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -2832,7 +2832,7 @@ SvTreeListEntry* SvTreeListBox::GetEntry( const Point& rPos, bool bHit ) const SvTreeListEntry* SvTreeListBox::GetCurEntry() const { - return pImp->GetCurEntry(); + return pImp ? pImp->GetCurEntry() : NULL; } void SvTreeListBox::ImplInitStyle() |