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

coverity#1427629 Unchecked return value

Change-Id: If12d57826817d5ca866ecc14d81b21f494ff4487
üst 64b0c436
......@@ -145,11 +145,17 @@ void SwXMLImport::SetStatistics(
// use #pages*10, or guesstimate 250 paragraphs. Additionally
// guesstimate PROGRESS_BAR_STEPS each for meta+settings, styles,
// and autostyles.
sal_Int32 nProgressReference = 250;
if( nTokens & XML_TOK_META_STAT_PARA )
bool bSetFallback = true;
sal_Int32 nProgressReference;
if (nTokens & XML_TOK_META_STAT_PARA)
{
nProgressReference = static_cast<sal_Int32>(aDocStat.nPara);
else if ( nTokens & XML_TOK_META_STAT_PAGE )
o3tl::checked_multiply<sal_Int32>(aDocStat.nPage, 10, nProgressReference);
bSetFallback = false;
}
else if (nTokens & XML_TOK_META_STAT_PAGE)
bSetFallback = o3tl::checked_multiply<sal_Int32>(aDocStat.nPage, 10, nProgressReference);
if (bSetFallback)
nProgressReference = 250;
ProgressBarHelper* pProgress = GetProgressBarHelper();
pProgress->SetReference( nProgressReference + 3*PROGRESS_BAR_STEP );
pProgress->SetValue( 0 );
......
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