Kaydet (Commit) fce56635 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1403661 try to silence 'Mixing enum types'

and

coverity#1403660 Mixing enum types

Change-Id: I5b47384747e24139ac0531e5e373c4f88f30ea81
üst b6a927b9
......@@ -1560,7 +1560,10 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const OUString& aPropertyName
ScGeneralFunction nVal = getFunction();
if (nVal == ScGeneralFunction::MEDIAN)
nVal = ScGeneralFunction::NONE;
aRet <<= (sheet::GeneralFunction)nVal;
const int nValAsInt = static_cast<int>(nVal);
assert(nValAsInt >= (int)css::sheet::GeneralFunction_NONE &&
nValAsInt <= (int)css::sheet::GeneralFunction_VARP);
aRet <<= (sheet::GeneralFunction)nValAsInt;
}
else if ( aPropertyName == SC_UNO_DP_FUNCTION2 )
{
......
......@@ -1832,7 +1832,8 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
std::vector< ScGeneralFunction > aSubTotals(aSeq.getLength());
for (sal_Int32 nIndex = 0; nIndex < aSeq.getLength(); nIndex++)
{
aSubTotals[nIndex] = static_cast<ScGeneralFunction>(aSeq[nIndex]);
const int nValAsInt = static_cast<int>(aSeq[nIndex]);
aSubTotals[nIndex] = static_cast<ScGeneralFunction>(nValAsInt);
}
setSubtotals( aSubTotals );
}
......
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