summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-12-18 16:33:21 +0100
committerEike Rathke <erack@redhat.com>2018-12-19 03:06:44 +0100
commitffa5b8a82eab18041bbee4d6914892b82c7801d3 (patch)
tree9f199ba8c7ae99742137eba7095cb8e820374d53 /sc
parent9b39fcd59c251e51c074e90f48924849b6f2f5c7 (diff)
Turn OSL_ENSURE(IsCalculated()) into assert()
That is a programming error if precondition is not fulfilled. Change-Id: I9eb04cc99d10c27f193321ecaee74cc1b41ce531 Reviewed-on: https://gerrit.libreoffice.org/65359 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dptabres.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index b0084cefbb42..c1ac4eb130d7 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -597,42 +597,42 @@ bool ScDPAggData::IsCalculated() const
double ScDPAggData::GetResult() const
{
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
return fVal; // use calculated value
}
bool ScDPAggData::HasError() const
{
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
return ( nCount == SC_DPAGG_RESULT_ERROR );
}
bool ScDPAggData::HasData() const
{
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
return ( nCount != SC_DPAGG_RESULT_EMPTY ); // values or error
}
void ScDPAggData::SetResult( double fNew )
{
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
fVal = fNew; // don't reset error flag
}
void ScDPAggData::SetError()
{
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
nCount = SC_DPAGG_RESULT_ERROR;
}
void ScDPAggData::SetEmpty( bool bSet )
{
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
if ( bSet )
nCount = SC_DPAGG_RESULT_EMPTY;
@@ -643,7 +643,7 @@ void ScDPAggData::SetEmpty( bool bSet )
double ScDPAggData::GetAuxiliary() const
{
// after Calculate, fAux is used as auxiliary value for running totals and reference values
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
return fAux;
}
@@ -651,7 +651,7 @@ double ScDPAggData::GetAuxiliary() const
void ScDPAggData::SetAuxiliary( double fNew )
{
// after Calculate, fAux is used as auxiliary value for running totals and reference values
- OSL_ENSURE( IsCalculated(), "ScDPAggData not calculated" );
+ assert( IsCalculated() && "ScDPAggData not calculated" );
fAux = fNew;
}