Kaydet (Commit) 2a339a2f authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

coverity#1103748 coverity#708009 coverity#708011-12

Change-Id: I8855114b3cd6cf073af182b5730c3fc9e08a56df
üst 33c387d2
......@@ -75,8 +75,6 @@ private:
OUString aErrorTitle;
OUString aErrorMessage;
bool bIsUsed; // temporary during saving
bool DoMacro( const ScAddress& rPos, const OUString& rInput,
ScFormulaCell* pCell, Window* pParent ) const;
......@@ -145,9 +143,6 @@ public:
sal_uInt32 GetKey() const { return nKey; }
void SetKey(sal_uInt32 nNew) { nKey = nNew; } // only if not inserted!
void SetUsed(bool bSet) { bIsUsed = bSet; }
bool IsUsed() const { return bIsUsed; }
bool EqualEntries( const ScValidationData& r ) const; // for undo
// sort (using std::set) by index
......
......@@ -57,59 +57,63 @@ using namespace formula;
//
ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
const OUString& rExpr1, const OUString& rExpr2,
ScDocument* pDocument, const ScAddress& rPos,
const OUString& rExprNmsp1, const OUString& rExprNmsp2,
FormulaGrammar::Grammar eGrammar1, FormulaGrammar::Grammar eGrammar2 ) :
ScConditionEntry( eOper, rExpr1, rExpr2, pDocument, rPos, rExprNmsp1, rExprNmsp2, eGrammar1, eGrammar2 ),
nKey( 0 ),
eDataMode( eMode ),
eErrorStyle( SC_VALERR_STOP ),
mnListType( ValidListType::UNSORTED )
const OUString& rExpr1, const OUString& rExpr2,
ScDocument* pDocument, const ScAddress& rPos,
const OUString& rExprNmsp1, const OUString& rExprNmsp2,
FormulaGrammar::Grammar eGrammar1,
FormulaGrammar::Grammar eGrammar2 )
: ScConditionEntry( eOper, rExpr1, rExpr2, pDocument, rPos, rExprNmsp1,
rExprNmsp2, eGrammar1, eGrammar2 )
, nKey( 0 )
, eDataMode( eMode )
, bShowInput(false)
, bShowError(false)
, eErrorStyle( SC_VALERR_STOP )
, mnListType( ValidListType::UNSORTED )
{
bShowInput = bShowError = false;
}
ScValidationData::ScValidationData( ScValidationMode eMode, ScConditionMode eOper,
const ScTokenArray* pArr1, const ScTokenArray* pArr2,
ScDocument* pDocument, const ScAddress& rPos ) :
ScConditionEntry( eOper, pArr1, pArr2, pDocument, rPos ),
nKey( 0 ),
eDataMode( eMode ),
eErrorStyle( SC_VALERR_STOP ),
mnListType( ValidListType::UNSORTED )
{
bShowInput = bShowError = false;
}
ScValidationData::ScValidationData( const ScValidationData& r ) :
ScConditionEntry( r ),
nKey( r.nKey ),
eDataMode( r.eDataMode ),
bShowInput( r.bShowInput ),
bShowError( r.bShowError ),
eErrorStyle( r.eErrorStyle ),
mnListType( r.mnListType ),
aInputTitle( r.aInputTitle ),
aInputMessage( r.aInputMessage ),
aErrorTitle( r.aErrorTitle ),
aErrorMessage( r.aErrorMessage )
const ScTokenArray* pArr1, const ScTokenArray* pArr2,
ScDocument* pDocument, const ScAddress& rPos )
: ScConditionEntry( eOper, pArr1, pArr2, pDocument, rPos )
, nKey( 0 )
, eDataMode( eMode )
, bShowInput(false)
, bShowError(false)
, eErrorStyle( SC_VALERR_STOP )
, mnListType( ValidListType::UNSORTED )
{
}
ScValidationData::ScValidationData( const ScValidationData& r )
: ScConditionEntry( r )
, nKey( r.nKey )
, eDataMode( r.eDataMode )
, bShowInput( r.bShowInput )
, bShowError( r.bShowError )
, eErrorStyle( r.eErrorStyle )
, mnListType( r.mnListType )
, aInputTitle( r.aInputTitle )
, aInputMessage( r.aInputMessage )
, aErrorTitle( r.aErrorTitle )
, aErrorMessage( r.aErrorMessage )
{
// Formeln per RefCount kopiert
}
ScValidationData::ScValidationData( ScDocument* pDocument, const ScValidationData& r ) :
ScConditionEntry( pDocument, r ),
nKey( r.nKey ),
eDataMode( r.eDataMode ),
bShowInput( r.bShowInput ),
bShowError( r.bShowError ),
eErrorStyle( r.eErrorStyle ),
mnListType( r.mnListType ),
aInputTitle( r.aInputTitle ),
aInputMessage( r.aInputMessage ),
aErrorTitle( r.aErrorTitle ),
aErrorMessage( r.aErrorMessage )
ScValidationData::ScValidationData( ScDocument* pDocument, const ScValidationData& r )
: ScConditionEntry( pDocument, r )
, nKey( r.nKey )
, eDataMode( r.eDataMode )
, bShowInput( r.bShowInput )
, bShowError( r.bShowError )
, eErrorStyle( r.eErrorStyle )
, mnListType( r.mnListType )
, aInputTitle( r.aInputTitle )
, aInputMessage( r.aInputMessage )
, aErrorTitle( r.aErrorTitle )
, aErrorMessage( r.aErrorMessage )
{
// Formeln wirklich kopiert
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment