diff options
author | Eike Rathke <erack@redhat.com> | 2017-11-15 17:41:05 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-11-15 17:41:58 +0100 |
commit | 48dcf7837e0ac32c939a499c59aba82f97b4a612 (patch) | |
tree | fe37cd73b87a94a7c91442bb15a8d908db53cd6d | |
parent | deea8e0de97f0e0636b944863290423cc2db8591 (diff) |
Assert all FormulaToken::Set...() virtual dummy methods
Attempting to set on a wrong token type can never be right.
Change-Id: I788221505a628f40dfbb9c2ee7c92ac789529303
-rw-r--r-- | formula/source/core/api/token.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
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 |