diff options
author | Frank Schönheit <fs@openoffice.org> | 2002-09-10 13:32:09 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2002-09-10 13:32:09 +0000 |
commit | 1e06aa5272aab4312549af541a37b0f7e974b9d4 (patch) | |
tree | 8206d624dc328775f657dd14eb289cd5fd1b2a7f /svtools/source/brwbox/editbrowsebox.cxx | |
parent | e96e8dc1dbd958efe63ae06c5264be8e027fb523 (diff) |
#102119# added optional smart tab traveling (focus first/last cell when getting the focus)
Diffstat (limited to 'svtools/source/brwbox/editbrowsebox.cxx')
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index b0b759028c9c..73221caac293 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: editbrowsebox.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: oj $ $Date: 2002-08-08 11:43:35 $ + * last change: $Author: fs $ $Date: 2002-09-10 14:32:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -125,6 +125,7 @@ namespace svt // ....................................................................... namespace { + //.............................................................. sal_Bool isHiContrast(Window* _pWindow) { OSL_ENSURE(_pWindow,"Window must be not null!"); @@ -140,6 +141,18 @@ namespace svt } return pIter && pIter->GetBackground().GetColor().IsDark(); } + + //.............................................................. + sal_uInt16 getRealGetFocusFlags( Window* _pWindow ) + { + sal_uInt16 nFlags = 0; + while ( _pWindow && !nFlags ) + { + nFlags = _pWindow->GetGetFocusFlags( ); + _pWindow = _pWindow->GetParent(); + } + return nFlags; + } } using namespace drafts::com::sun::star::accessibility::AccessibleEventId; @@ -312,7 +325,7 @@ namespace svt void EditBrowseBox::LoseFocus() { BrowseBox::LoseFocus(); - DetermineFocus(); + DetermineFocus( 0 ); } //------------------------------------------------------------------------------ @@ -325,7 +338,7 @@ namespace svt if (IsEditing() && Controller()->GetWindow().IsVisible()) Controller()->GetWindow().GrabFocus(); - DetermineFocus(); + DetermineFocus( getRealGetFocusFlags( this ) ); } //------------------------------------------------------------------------------ @@ -762,8 +775,12 @@ namespace svt switch (rEvt.GetType()) { case EVENT_GETFOCUS: + DetermineFocus( getRealGetFocusFlags( this ) ); + break; + case EVENT_LOSEFOCUS: - DetermineFocus(); + DetermineFocus( 0 ); + break; } return BrowseBox::Notify(rEvt); } @@ -1501,6 +1518,9 @@ namespace svt /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.14 2002/08/08 11:43:35 oj + * #102008# only send a ACCESSIBLE_ACTIVE_DESCENDANT_EVENT event when we have the focus + * * Revision 1.13 2002/07/26 07:44:24 bm * #101228# new browser flag EBBF_HANDLE_COLUMN_TEXT for displaying text in column * 0 in the handle column (like in the normal browse-box). |