diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-10 20:47:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-11 11:20:43 +0200 |
commit | 2d582244680e7f6dec6e4a466e276f93ccb01dc9 (patch) | |
tree | b0e880ddfb3ce1ea2f47151b648e7fbb55132f08 /svtools/source/brwbox/editbrowsebox2.cxx | |
parent | 74012c48d99634a7556a86f77e9522024f2afdb2 (diff) |
loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source/brwbox/editbrowsebox2.cxx')
-rw-r--r-- | svtools/source/brwbox/editbrowsebox2.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx index 7c84cf5eb805..a3505877be18 100644 --- a/svtools/source/brwbox/editbrowsebox2.cxx +++ b/svtools/source/brwbox/editbrowsebox2.cxx @@ -146,25 +146,25 @@ void EditBrowseBox::DetermineFocus( const GetFocusFlags _nGetFocusFlags ) long nRows = GetRowCount(); sal_uInt16 nCols = ColCount(); - if ( ( nRows > 0 ) && ( nCols > 0 ) ) + if (( nRows <= 0 ) || ( nCols <= 0 )) + return; + + if ( _nGetFocusFlags & GetFocusFlags::Forward ) { - if ( _nGetFocusFlags & GetFocusFlags::Forward ) + if ( GetColumnId( 0 ) != HandleColumnId ) { - if ( GetColumnId( 0 ) != HandleColumnId ) - { - GoToRowColumnId( 0, GetColumnId( 0 ) ); - } - else - { // the first column is the handle column -> not focussable - if ( nCols > 1 ) - GoToRowColumnId( 0, GetColumnId( 1 ) ); - } + GoToRowColumnId( 0, GetColumnId( 0 ) ); } - else if ( _nGetFocusFlags & GetFocusFlags::Backward ) - { - GoToRowColumnId( nRows - 1, GetColumnId( nCols -1 ) ); + else + { // the first column is the handle column -> not focussable + if ( nCols > 1 ) + GoToRowColumnId( 0, GetColumnId( 1 ) ); } } + else if ( _nGetFocusFlags & GetFocusFlags::Backward ) + { + GoToRowColumnId( nRows - 1, GetColumnId( nCols -1 ) ); + } } tools::Rectangle EditBrowseBox::GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 _nIndex) |