Kaydet (Commit) feb6e709 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

fdo#55955 select first column if possible

Change-Id: I131cb0395c481d9cc1de210abc207221dab14bf4
üst 04f4d4bf
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment