summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-09 09:22:39 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-09 09:30:35 +0000
commita403bddc0fe29f69e3fb2b0c04fd540fa2cec218 (patch)
treeac9b63806d14cceed85d4cf8afd91438c38c2c66 /sc
parentd1efbcd788bcd9e72efaaecc110bbd2d48a966eb (diff)
surely it makes no sense to ignore return of Sanitize[Col|Row]
Change-Id: I24ef940bcf4b2a7c5f40185f91ee234c844185f8 (cherry picked from commit e5c2fe0412585bc83bd6a99fc37a7c47eb8c3641)
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/address.hxx20
-rw-r--r--sc/source/core/tool/detfunc.cxx4
2 files changed, 12 insertions, 12 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);
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 7a8880b840d3..9dbc3e78308b 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -304,8 +304,8 @@ bool ScDetectiveFunc::HasError( const ScRange& rRange, ScAddress& rErrPos )
Point ScDetectiveFunc::GetDrawPos( SCCOL nCol, SCROW nRow, DrawPosMode eMode ) const
{
OSL_ENSURE( ValidColRow( nCol, nRow ), "ScDetectiveFunc::GetDrawPos - invalid cell address" );
- SanitizeCol( nCol );
- SanitizeRow( nRow );
+ nCol = SanitizeCol( nCol );
+ nRow = SanitizeRow( nRow );
Point aPos;