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
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 )
{
......
......@@ -85,6 +85,7 @@ namespace svx
private:
void implUpdateDisplay();
bool hasCurrentControl();
Control& implGetCurrentControl();
private:
......
......@@ -1594,7 +1594,6 @@ void OFieldDescControl::implFocusLost(vcl::Window* _pWhich)
void OFieldDescControl::LoseFocus()
{
implFocusLost(NULL);
TabPage::LoseFocus();
......
......@@ -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 )
......
......@@ -106,7 +106,8 @@ void OFieldDescGenWin::GetFocus()
void OFieldDescGenWin::LoseFocus()
{
m_pFieldControl->LoseFocus();
if (m_pFieldControl)
m_pFieldControl->LoseFocus();
TabPage::LoseFocus();
}
......
......@@ -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()
......
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