[Libreoffice-commits] core.git: formula/source
Eike Rathke
erack at redhat.com
Wed Nov 15 16:42:39 UTC 2017
formula/source/core/api/token.cxx | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
New commits:
commit 48dcf7837e0ac32c939a499c59aba82f97b4a612
Author: Eike Rathke <erack at redhat.com>
Date: Wed Nov 15 17:41:05 2017 +0100
Assert all FormulaToken::Set...() virtual dummy methods
Attempting to set on a wrong token type can never be right.
Change-Id: I788221505a628f40dfbb9c2ee7c92ac789529303
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 4a4126904691..04c4a203284d 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -181,7 +181,7 @@ sal_uInt8 FormulaToken::GetByte() const
void FormulaToken::SetByte( sal_uInt8 )
{
- SAL_WARN( "formula.core", "FormulaToken::SetByte: virtual dummy called" );
+ assert( !"virtual dummy called" );
}
ParamClass FormulaToken::GetInForceArray() const
@@ -192,19 +192,20 @@ ParamClass FormulaToken::GetInForceArray() const
void FormulaToken::SetInForceArray( ParamClass )
{
- SAL_WARN( "formula.core", "FormulaToken::SetInForceArray: virtual dummy called" );
+ assert( !"virtual dummy called" );
}
double FormulaToken::GetDouble() const
{
- // This one is worth an assert.
- assert( !"FormulaToken::GetDouble: virtual dummy called" );
+ // This Get is worth an assert.
+ assert( !"virtual dummy called" );
return 0.0;
}
double & FormulaToken::GetDoubleAsReference()
{
- SAL_WARN( "formula.core", "FormulaToken::GetDouble: virtual dummy called" );
+ // This Get is worth an assert.
+ assert( !"virtual dummy called" );
static double fVal = 0.0;
return fVal;
}
@@ -223,7 +224,7 @@ svl::SharedString FormulaToken::GetString() const
void FormulaToken::SetString( const svl::SharedString& )
{
- SAL_WARN( "formula.core", "FormulaToken::SetString: virtual dummy called" );
+ assert( !"virtual dummy called" );
}
sal_uInt16 FormulaToken::GetIndex() const
@@ -234,7 +235,7 @@ sal_uInt16 FormulaToken::GetIndex() const
void FormulaToken::SetIndex( sal_uInt16 )
{
- SAL_WARN( "formula.core", "FormulaToken::SetIndex: virtual dummy called" );
+ assert( !"virtual dummy called" );
}
sal_Int16 FormulaToken::GetSheet() const
@@ -245,7 +246,7 @@ sal_Int16 FormulaToken::GetSheet() const
void FormulaToken::SetSheet( sal_Int16 )
{
- SAL_WARN( "formula.core", "FormulaToken::SetSheet: virtual dummy called" );
+ assert( !"virtual dummy called" );
}
short* FormulaToken::GetJump() const
@@ -276,7 +277,7 @@ FormulaError FormulaToken::GetError() const
void FormulaToken::SetError( FormulaError )
{
- SAL_WARN( "formula.core", "FormulaToken::SetError: virtual dummy called" );
+ assert( !"virtual dummy called" );
}
const ScSingleRefData* FormulaToken::GetSingleRef() const
More information about the Libreoffice-commits
mailing list