summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2012-01-19 17:49:32 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2012-01-19 21:08:10 +0100
commite0d349f70bc790efa7c267107bd2fb5aec4761e5 (patch)
treece3427415294afed2d4b1ba3d8e70a6be35e6bc9 /svx/source/fmcomp
parentf727553f3b8c6632d1d374b918221649a9427eac (diff)
column position 0 is perfectly valid
On the other hand, column position 1 is not guaranteed to exist. nCurPos will be BROWSER_INVALID_ID, not 0, in case of error in setting it
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r--svx/source/fmcomp/gridctrl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 9548a81e79ef..0bfe6734fc5a 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -1612,8 +1612,8 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt
}
// Zur alten Spalte gehen
- if (!nCurPos || nCurPos >= ColCount())
- nCurPos = 1;
+ if (nCurPos == BROWSER_INVALIDID || nCurPos >= ColCount())
+ nCurPos = 0;
// there are rows so go to the selected current column
if (nRecordCount)