summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/filter/exportdialog.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index 97b4bf8687fe..706715bec5b1 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -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 );
}
}