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

CID#1078684 ensure no -1 uses in replaceAt

Change-Id: Ic3a652aa38efe1bfaba81ba7d9103f40f093ed6a
üst cadc3c17
......@@ -948,12 +948,14 @@ void ExportDialog::updateControls()
OUString aEst( nRealFileSize ? msEstimatedSizePix2 : msEstimatedSizePix1 );
sal_Int64 nRawFileSize( GetRawFileSize() );
sal_Int32 nInd = aEst.indexOf( "%" );
aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRawFileSize ) );
if (nInd != -1)
aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRawFileSize ) );
if ( nRealFileSize )
{
nInd = aEst.indexOf( "%", nInd );
aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
if (nInd != -1)
aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
}
mpFtEstimatedSize->SetText( aEst );
}
......@@ -963,7 +965,8 @@ void ExportDialog::updateControls()
{
OUString aEst( msEstimatedSizeVec );
sal_Int32 nInd = aEst.indexOf( "%" );
aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
if (nInd != -1)
aEst = aEst.replaceAt( nInd, 2, ImpValueOfInKB( nRealFileSize ) );
mpFtEstimatedSize->SetText( aEst );
}
}
......
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