svx/source/fmcomp/gridctrl.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit bac2e995debd58957bdca24ba29f4817a752e020
Author: Lionel Elie Mamane <lio...@mamane.lu>
Date:   Tue Jul 30 09:23:52 2013 +0200

    fdo#55955 select first column if possible
    
    Change-Id: I131cb0395c481d9cc1de210abc207221dab14bf4
    Reviewed-on: https://gerrit.libreoffice.org/5179
    Reviewed-by: Petr Mladek <pmla...@suse.cz>
    Tested-by: Petr Mladek <pmla...@suse.cz>

diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 2663b8f..e77e54c 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -1605,6 +1605,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));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to