From b7b2c95fbc376ecea60b91e3e04fd52428258137 Mon Sep 17 00:00:00 2001 From: Jochen Nitschke Date: Sat, 1 Apr 2017 10:05:30 +0200 Subject: remove hack for non DBG_UTIL builds always use a 8bit enum for StackVar correct StackVar types for opcode opSep and opClose in unit test and test them. Change-Id: I89fac97d791eb12667ce5218ff31e798c8711e10 Reviewed-on: https://gerrit.libreoffice.org/36000 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sc/source/core/tool/interpr4.cxx | 5 ++--- sc/source/filter/excel/xeformula.cxx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'sc/source') diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 1c64a8556ffb..c044db1120cc 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -2716,7 +2716,7 @@ void ScInterpreter::ScExternal() continue; // while } - sal_uInt8 nStackType = sal::static_int_cast( GetStackType() ); + StackVar nStackType = GetStackType(); ScAddInArgumentType eType = aCall.GetArgType( nPar ); switch (eType) { @@ -3204,8 +3204,7 @@ void ScInterpreter::ScMacro() for( short i = nParamCount; i && bOk ; i-- ) { SbxVariable* pPar = refPar->Get( (sal_uInt16) i ); - sal_uInt8 nStackType = sal::static_int_cast( GetStackType() ); - switch( nStackType ) + switch( GetStackType() ) { case svDouble: pPar->PutDouble( GetDouble() ); diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 97e1907df15b..1fa791647a30 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -59,7 +59,7 @@ struct XclExpScToken explicit XclExpScToken() : mpScToken( nullptr ), mnSpaces( 0 ) {} bool Is() const { return mpScToken != nullptr; } - StackVar GetType() const { return mpScToken ? mpScToken->GetType() : static_cast< StackVar >( svUnknown ); } + StackVar GetType() const { return mpScToken ? mpScToken->GetType() : svUnknown; } OpCode GetOpCode() const { return mpScToken ? mpScToken->GetOpCode() : ocNone; } }; -- cgit