can replace all PLACEHOLDER_PATH tokens

This commit is contained in:
Caolán McNamara 2012-01-22 13:13:30 +00:00
parent eb8e39f2a4
commit 3e41fd0781

View file

@ -81,9 +81,9 @@
#include <comphelper/configurationhelper.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
#include <unotools/pathoptions.hxx>
#include <tools/string.hxx>
#include <tools/diagnose_ex.h>
#include <unotools/tempfile.hxx>
#include <ucbhelper/content.hxx>
@ -3486,7 +3486,7 @@ void AutoRecovery::impl_showFullDiscError()
rtl::OUString PLACEHOLDER_PATH(RTL_CONSTASCII_USTRINGPARAM("%PATH"));
rtl::OUString sBtn(ResId::toString(FwkResId(STR_FULL_DISC_RETRY_BUTTON)));
String sMsg(ResId::toString(FwkResId(STR_FULL_DISC_MSG)));
rtl::OUString sMsg(ResId::toString(FwkResId(STR_FULL_DISC_MSG)));
rtl::OUString sBackupURL(SvtPathOptions().GetBackupPath());
INetURLObject aConverter(sBackupURL);
@ -3494,9 +3494,8 @@ void AutoRecovery::impl_showFullDiscError()
rtl::OUString sBackupPath = aConverter.getFSysPath(INetURLObject::FSYS_DETECT, &aDelimiter);
if (sBackupPath.getLength() < 1)
sBackupPath = sBackupURL;
sMsg.SearchAndReplace(PLACEHOLDER_PATH, sBackupPath);
ErrorBox dlgError(0, WB_OK, sMsg);
ErrorBox dlgError(0, WB_OK, comphelper::string::replace(sMsg, PLACEHOLDER_PATH, sBackupPath));
dlgError.SetButtonText(dlgError.GetButtonId(0), sBtn);
dlgError.Execute();
}