summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2011-09-12 16:37:50 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2011-09-12 16:40:51 +0200
commitf7ed67f2cf79fd067c1634e8f7c3f8a17792f2e5 (patch)
treed6eee550bdaed7ce0f3f137dadf0dbbbb484c976 /dbaccess
parentfea84e0041f0dc6c87fc5e2d9c7ff2e70a7dada2 (diff)
cleanup BrowseBox, DbGridControl & friends handle & invalid column handling
- BrowseBox: Check Handle column-related invariants when adding a column: # only one handle column # it is the first - BrowseBox: Check column id-related invariants when adding a column: # Id is not the special "handle column" value # Id is not the special "invalid ID" value # unicity of the ID among columns - GetColumnId: return BROWSER_INVALIDID, not 0 (== id of handle column) for an invalid column; adapt code calling GetColumnId to this change. - Use the correct const or #define'd symbol instead of magic constants; introduce such a symbol if needed - General other miscellaneous cleanups: # Translation of comments # typo/spelling in comments, error messages and the like # parenthesise #define'd value # use SAL_MAX_UINT16 instead of USHRT_MAX where a sal_uInt16 is expected # BrowseBox::SetColumnTitle: nItemId is checked to be non-zero, so don't test if for zeroness again.
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index a796778822da..901d2a38824d 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1415,7 +1415,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
if (IsCurrentAppending())
--nCorrectRowCount; // the current data record doesn't really exist, we are appending a new one
- if ((nCol == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount) || GetColumnId(nCol) == 0 )
+ if ((nCol == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount) || GetColumnId(nCol) == 0 || GetColumnId(nCol) == BROWSER_INVALID_ID )
// no valid cell under the mouse cursor
break;