summaryrefslogtreecommitdiff
path: root/svx/inc/svx/gridctrl.hxx
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 /svx/inc/svx/gridctrl.hxx
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 'svx/inc/svx/gridctrl.hxx')
-rw-r--r--svx/inc/svx/gridctrl.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/inc/svx/gridctrl.hxx b/svx/inc/svx/gridctrl.hxx
index e27fa3e6d4d8..2641f16eb124 100644
--- a/svx/inc/svx/gridctrl.hxx
+++ b/svx/inc/svx/gridctrl.hxx
@@ -412,7 +412,7 @@ public:
void InsertHandleColumn();
// which position does the column with the id in the ::com::sun::star::sdbcx::View have, the handle column doesn't count
- sal_uInt16 GetViewColumnPos( sal_uInt16 nId ) const { sal_uInt16 nPos = GetColumnPos(nId); return (nPos==(sal_uInt16)-1) ? GRID_COLUMN_NOT_FOUND : nPos-1; }
+ sal_uInt16 GetViewColumnPos( sal_uInt16 nId ) const { sal_uInt16 nPos = GetColumnPos(nId); return (nPos==BROWSER_INVALIDID) ? GRID_COLUMN_NOT_FOUND : nPos-1; }
// which position does the column with the id in m_aColumns have, that means the ::com::sun::star::sdbcx::Container
// returned from the GetColumns (may be different from the position returned by GetViewColumnPos