Kaydet (Commit) 9d17e125 authored tarafından Michael Meeks's avatar Michael Meeks

Audit LoseFocus - basctl, cui, dbaccess.

Change-Id: If61b45f28f30e3ab00dbf071198233d59899d719
üst c6f0b726
...@@ -420,6 +420,11 @@ namespace svx ...@@ -420,6 +420,11 @@ namespace svx
implUpdateDisplay(); implUpdateDisplay();
} }
bool SuggestionDisplay::hasCurrentControl()
{
return m_bDisplayListBox || m_aValueSet;
}
Control& SuggestionDisplay::implGetCurrentControl() Control& SuggestionDisplay::implGetCurrentControl()
{ {
if( m_bDisplayListBox ) if( m_bDisplayListBox )
...@@ -445,11 +450,17 @@ namespace svx ...@@ -445,11 +450,17 @@ namespace svx
} }
void SuggestionDisplay::GetFocus() void SuggestionDisplay::GetFocus()
{ {
if (hasCurrentControl())
implGetCurrentControl().GetFocus(); implGetCurrentControl().GetFocus();
else
Control::LoseFocus();
} }
void SuggestionDisplay::LoseFocus() void SuggestionDisplay::LoseFocus()
{ {
if (hasCurrentControl())
implGetCurrentControl().LoseFocus(); implGetCurrentControl().LoseFocus();
else
Control::LoseFocus();
} }
void SuggestionDisplay::Command( const CommandEvent& rCEvt ) void SuggestionDisplay::Command( const CommandEvent& rCEvt )
{ {
......
...@@ -85,6 +85,7 @@ namespace svx ...@@ -85,6 +85,7 @@ namespace svx
private: private:
void implUpdateDisplay(); void implUpdateDisplay();
bool hasCurrentControl();
Control& implGetCurrentControl(); Control& implGetCurrentControl();
private: private:
......
...@@ -1594,7 +1594,6 @@ void OFieldDescControl::implFocusLost(vcl::Window* _pWhich) ...@@ -1594,7 +1594,6 @@ void OFieldDescControl::implFocusLost(vcl::Window* _pWhich)
void OFieldDescControl::LoseFocus() void OFieldDescControl::LoseFocus()
{ {
implFocusLost(NULL); implFocusLost(NULL);
TabPage::LoseFocus(); TabPage::LoseFocus();
......
...@@ -68,11 +68,16 @@ void OTableWindowTitle::GetFocus() ...@@ -68,11 +68,16 @@ void OTableWindowTitle::GetFocus()
{ {
if(m_pTabWin) if(m_pTabWin)
m_pTabWin->GetFocus(); m_pTabWin->GetFocus();
else
FixedText::GetFocus();
} }
void OTableWindowTitle::LoseFocus() void OTableWindowTitle::LoseFocus()
{ {
if (m_pTabWin)
m_pTabWin->LoseFocus(); m_pTabWin->LoseFocus();
else
FixedText::LoseFocus();
} }
void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt )
......
...@@ -106,6 +106,7 @@ void OFieldDescGenWin::GetFocus() ...@@ -106,6 +106,7 @@ void OFieldDescGenWin::GetFocus()
void OFieldDescGenWin::LoseFocus() void OFieldDescGenWin::LoseFocus()
{ {
if (m_pFieldControl)
m_pFieldControl->LoseFocus(); m_pFieldControl->LoseFocus();
TabPage::LoseFocus(); TabPage::LoseFocus();
} }
......
...@@ -2832,7 +2832,7 @@ SvTreeListEntry* SvTreeListBox::GetEntry( const Point& rPos, bool bHit ) const ...@@ -2832,7 +2832,7 @@ SvTreeListEntry* SvTreeListBox::GetEntry( const Point& rPos, bool bHit ) const
SvTreeListEntry* SvTreeListBox::GetCurEntry() const SvTreeListEntry* SvTreeListBox::GetCurEntry() const
{ {
return pImp->GetCurEntry(); return pImp ? pImp->GetCurEntry() : NULL;
} }
void SvTreeListBox::ImplInitStyle() void SvTreeListBox::ImplInitStyle()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment