diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-10-22 08:57:52 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-10-22 08:57:52 +0000 |
commit | 7c2496e729213313f2edd20f94d5bf6ad1a9eafd (patch) | |
tree | 7a0970fe7c9ae6d15fb68ab6b8000848a6d3bf7d /dbaccess/source | |
parent | b2dbd2375f63678b280aef2e15432b3e54825ee1 (diff) |
#93513# activatecell when changing focus
Diffstat (limited to 'dbaccess/source')
4 files changed, 42 insertions, 37 deletions
diff --git a/dbaccess/source/ui/inc/QueryDesignView.hxx b/dbaccess/source/ui/inc/QueryDesignView.hxx index 2688ebc4f713..02009ed26ce8 100644 --- a/dbaccess/source/ui/inc/QueryDesignView.hxx +++ b/dbaccess/source/ui/inc/QueryDesignView.hxx @@ -2,9 +2,9 @@ * * $RCSfile: QueryDesignView.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-10-08 07:26:30 $ + * last change: $Author: oj $ $Date: 2001-10-22 09:57:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -200,7 +200,8 @@ namespace dbaui virtual void Construct(); virtual void initialize(); // window overloads - virtual long PreNotify( NotifyEvent& rNEvt ); + virtual long PreNotify( NotifyEvent& rNEvt ); + virtual void GetFocus(); BOOL IsAddAllowed(); sal_Bool isSlotEnabled(sal_Int32 _nSlotId); diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index fe17516b6c4a..d87fe6058a5c 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -2,9 +2,9 @@ * * $RCSfile: QueryDesignView.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: oj $ $Date: 2001-10-15 09:34:22 $ + * last change: $Author: oj $ $Date: 2001-10-22 09:57:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -490,27 +490,6 @@ long OQueryDesignView::PreNotify(NotifyEvent& rNEvt) } } break; - case EVENT_GETFOCUS: - { - // set focus if no one has the focus - if (m_pTableView && !m_pTableView->HasChildPathFocus() && - m_pSelectionBox && !m_pSelectionBox->HasChildPathFocus()) - { - m_pTableView->GrabTabWinFocus(); - bHandled = TRUE; - } - - if( m_pTableView && m_pTableView->HasChildPathFocus() ) - { - if(m_pSelectionBox->IsVisible()) - m_pSelectionBox->DeactivateCell(); - m_eChildFocus = TABLEVIEW; - } - else - m_eChildFocus = SELECTION; - - } - break; } if (!bHandled) @@ -2664,7 +2643,28 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE return pParseNode; } // ----------------------------------------------------------------------------- +void OQueryDesignView::GetFocus() +{ + // set focus if no one has the focus + if (m_pTableView && !m_pTableView->HasChildPathFocus() && + m_pSelectionBox && !m_pSelectionBox->HasChildPathFocus()) + { + m_pTableView->GrabTabWinFocus(); + } + if( m_pTableView && m_pTableView->HasChildPathFocus() ) + { + if(m_pSelectionBox->IsVisible()) + m_pSelectionBox->DeactivateCell(); + m_eChildFocus = TABLEVIEW; + } + else if( m_pSelectionBox && m_pSelectionBox->HasChildPathFocus() ) + { + m_pSelectionBox->ActivateCell(m_pSelectionBox->GetCurRow(), m_pSelectionBox->GetCurColumnId()); + m_eChildFocus = SELECTION; + } +} +// ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 028f614ef239..9391981ef292 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SelectionBrowseBox.cxx,v $ * - * $Revision: 1.34 $ + * $Revision: 1.35 $ * - * last change: $Author: oj $ $Date: 2001-10-08 07:32:34 $ + * last change: $Author: oj $ $Date: 2001-10-22 09:57:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1200,11 +1200,7 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) DBG_CHKTHIS(OSelectionBrowseBox,NULL); if ( (rEvt.GetColumnId() >= 0) && (rEvt.GetRow() >= -1) -#if SUPD>627 || FS_PRIV_DEBUG && OJoinExchObj::isFormatAvailable(GetDataFlavors()) -#else - && sal_False -#endif ) return DND_ACTION_LINK; @@ -1354,7 +1350,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, long& nColId) nColId = getFields().size(); } else - nColId++; // innerhalb der vorgegebenen Liste + ++nColId; // innerhalb der vorgegebenen Liste } // in Liste der Spaltenbeschreibungen neues Element @@ -1459,7 +1455,7 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount() while (aIter != getFields().end()) { if ((*aIter).isValid() && !(*aIter)->IsEmpty()) - nCount++; + ++nCount; ++aIter; } @@ -2267,4 +2263,10 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos) return pEntry; } // ----------------------------------------------------------------------------- - +void OSelectionBrowseBox::GetFocus() +{ + if(!IsEditing()) + ActivateCell(); + EditBrowseBox::GetFocus(); +} +// ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index e29089767fdf..1c6879a74d12 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -2,9 +2,9 @@ * * $RCSfile: SelectionBrowseBox.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: oj $ $Date: 2001-10-05 06:49:18 $ + * last change: $Author: oj $ $Date: 2001-10-22 09:57:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -179,6 +179,8 @@ namespace dbaui void paste(); void copy(); + virtual void GetFocus(); + protected: virtual sal_Bool SeekRow( long nRow ); |