diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-30 09:23:52 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-07-30 09:27:22 +0200 |
commit | feb6e7097fe0eb58590c18a9a1371f67f74f121f (patch) | |
tree | 569f96e20737c111cba04597e0e83b59e0dbf303 /svx | |
parent | 04f4d4bfb708ef477618fa47d5f17779f4e4cf3c (diff) |
fdo#55955 select first column if possible
Change-Id: I131cb0395c481d9cc1de210abc207221dab14bf4
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index f713df60eded..20b707b177af 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -1604,6 +1604,12 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt if (nCurPos == BROWSER_INVALIDID || nCurPos >= ColCount()) nCurPos = 0; + // Column zero is a valid choice and guaranteed to exist, + // but invisible to the user; if we have at least one + // user-visible column, go to that one. + if (nCurPos == 0 && ColCount() > 1) + nCurPos = 1; + // there are rows so go to the selected current column if (nRecordCount) GoToRowColumnId(0, GetColumnId(nCurPos)); |