diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-12-09 09:22:39 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-12-09 09:30:00 +0000 |
commit | e5c2fe0412585bc83bd6a99fc37a7c47eb8c3641 (patch) | |
tree | 320cdfcbfafb1123f2b86965f8d001cdf144728c /sc/inc | |
parent | 7e12a6cccb42711c0399bbcd0e7cc3008f56cd2f (diff) |
surely it makes no sense to ignore return of Sanitize[Col|Row]
Change-Id: I24ef940bcf4b2a7c5f40185f91ee234c844185f8
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/address.hxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index a7e1a073f2cd..06c450b8eb27 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -108,52 +108,52 @@ const SCROW W16MAXROW = W16MAXROWCOUNT - 1; #endif // old stuff defines end -inline bool ValidCol( SCCOL nCol ) +SAL_WARN_UNUSED_RESULT inline bool ValidCol( SCCOL nCol ) { return nCol >= static_cast<SCCOL>(0) && nCol <= MAXCOL; } -inline bool ValidRow( SCROW nRow ) +SAL_WARN_UNUSED_RESULT inline bool ValidRow( SCROW nRow ) { return nRow >= static_cast<SCROW>(0) && nRow <= MAXROW; } -inline bool ValidTab( SCTAB nTab ) +SAL_WARN_UNUSED_RESULT inline bool ValidTab( SCTAB nTab ) { return nTab >= static_cast<SCTAB>(0) && nTab <= MAXTAB; } -inline bool ValidTab( SCTAB nTab, SCTAB nMaxTab ) +SAL_WARN_UNUSED_RESULT inline bool ValidTab( SCTAB nTab, SCTAB nMaxTab ) { return nTab >= static_cast<SCTAB>(0) && nTab <= nMaxTab; } -inline bool ValidColRow( SCCOL nCol, SCROW nRow ) +SAL_WARN_UNUSED_RESULT inline bool ValidColRow( SCCOL nCol, SCROW nRow ) { return ValidCol( nCol) && ValidRow( nRow); } -inline bool ValidColRowTab( SCCOL nCol, SCROW nRow, SCTAB nTab ) +SAL_WARN_UNUSED_RESULT inline bool ValidColRowTab( SCCOL nCol, SCROW nRow, SCTAB nTab ) { return ValidCol( nCol) && ValidRow( nRow) && ValidTab( nTab); } -inline SCCOL SanitizeCol( SCCOL nCol ) +SAL_WARN_UNUSED_RESULT inline SCCOL SanitizeCol( SCCOL nCol ) { return nCol < 0 ? 0 : (nCol > MAXCOL ? MAXCOL : nCol); } -inline SCROW SanitizeRow( SCROW nRow ) +SAL_WARN_UNUSED_RESULT inline SCROW SanitizeRow( SCROW nRow ) { return nRow < 0 ? 0 : (nRow > MAXROW ? MAXROW : nRow); } -inline SCTAB SanitizeTab( SCTAB nTab ) +SAL_WARN_UNUSED_RESULT inline SCTAB SanitizeTab( SCTAB nTab ) { return nTab < 0 ? 0 : (nTab > MAXTAB ? MAXTAB : nTab); } -inline SCTAB SanitizeTab( SCTAB nTab, SCTAB nMaxTab ) +SAL_WARN_UNUSED_RESULT inline SCTAB SanitizeTab( SCTAB nTab, SCTAB nMaxTab ) { return nTab < 0 ? 0 : (nTab > nMaxTab ? nMaxTab : nTab); } |