summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-11-09 11:20:17 +0000
committerOcke Janssen <oj@openoffice.org>2001-11-09 11:20:17 +0000
commit984296f744d5849ff492f11cb175b12a589bd3f6 (patch)
treeb946bba97ce0c1cd91eea19374c5c3a09cfbf6d1 /dbaccess/source
parent6f57445afe9b392f4f3499104084a0feaf5a2d55 (diff)
#94535# fix focus handling
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/inc/TableWindow.hxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx21
-rw-r--r--dbaccess/source/ui/querydesign/TableWindowListBox.cxx13
3 files changed, 22 insertions, 18 deletions
diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx
index 8587b1331593..c97c6120f88f 100644
--- a/dbaccess/source/ui/inc/TableWindow.hxx
+++ b/dbaccess/source/ui/inc/TableWindow.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindow.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: oj $ $Date: 2001-06-28 14:26:45 $
+ * last change: $Author: oj $ $Date: 2001-11-09 12:20:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -161,6 +161,7 @@ namespace dbaui
void SetTitle( const ::rtl::OUString& rTit );
void SetBoldTitle( BOOL bBold );
+ void setActive(sal_Bool _bActive = sal_True);
void Remove();
BOOL IsActive(){ return m_bActive; }
@@ -178,7 +179,6 @@ namespace dbaui
// window override
virtual void StateChanged( StateChangedType nStateChange );
virtual void GetFocus();
- virtual void LoseFocus();
// Linien neu zeichnen
void InvalidateLines();
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index 63810fe0b9d1..cb70e40416db 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindow.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: oj $ $Date: 2001-10-26 07:49:36 $
+ * last change: $Author: oj $ $Date: 2001-11-09 12:20:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -555,17 +555,16 @@ void OTableWindow::SetBoldTitle( BOOL bBold )
void OTableWindow::GetFocus()
{
Window::GetFocus();
- SetBoldTitle( TRUE );
- m_bActive = TRUE;
+ // we have to forward the focus to our listbox to enable keystokes
+ if(m_pListBox)
+ m_pListBox->GrabFocus();
}
-
-//------------------------------------------------------------------------------
-void OTableWindow::LoseFocus()
+// -----------------------------------------------------------------------------
+void OTableWindow::setActive(sal_Bool _bActive)
{
- Window::LoseFocus();
- SetBoldTitle( FALSE );
- m_bActive = FALSE;
- if (m_pListBox && m_pListBox->GetSelectionCount() != 0)
+ SetBoldTitle( _bActive );
+ m_bActive = _bActive;
+ if (!_bActive && m_pListBox && m_pListBox->GetSelectionCount() != 0)
m_pListBox->SelectAll(FALSE);
}
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index d8bf126778c6..c0c98b0fe395 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: TableWindowListBox.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: oj $ $Date: 2001-10-26 07:49:36 $
+ * last change: $Author: oj $ $Date: 2001-11-09 12:20:16 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -391,12 +391,17 @@ sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt )
//------------------------------------------------------------------------------
void OTableWindowListBox::LoseFocus()
{
+ if(m_pTabWin)
+ m_pTabWin->setActive(sal_False);
SvTreeListBox::LoseFocus();
}
//------------------------------------------------------------------------------
void OTableWindowListBox::GetFocus()
{
+ if(m_pTabWin)
+ m_pTabWin->setActive();
+
if (GetCurEntry() != NULL)
{
if (GetSelectionCount() == 0)
@@ -406,8 +411,8 @@ void OTableWindowListBox::GetFocus()
}
SvTreeListBox::GetFocus();
- if(m_pTabWin)
- m_pTabWin->GrabFocus();
+// if(m_pTabWin)
+// m_pTabWin->GrabFocus();
}
//------------------------------------------------------------------------------