From 7587a74f285a12180a3e99d870003958f9b14c2b Mon Sep 17 00:00:00 2001 From: Sébastien Le Ray Date: Thu, 10 Feb 2011 18:54:59 +0100 Subject: [PATCH] Fixes bug fdo#31252 - Overwrite dialog improvment. --- fpicker/source/office/iodlg.cxx | 7 ++++++- fpicker/source/office/iodlg.src | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 7db9889..699081a 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1247,7 +1247,12 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) { if ( ::utl::UCBContentHelper::Exists( aFileObj.GetMainURL( INetURLObject::NO_DECODE ) ) ) { - QueryBox aBox( pThis, WB_YES_NO, SvtResId( STR_SVT_ALREADYEXISTOVERWRITE ) ); + String aMsg = SvtResId( STR_SVT_ALREADYEXISTOVERWRITE ); + aMsg.SearchAndReplace( + String( RTL_CONSTASCII_USTRINGPARAM( "$filename$" ) ), + aFileObj.getName(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET) + ); + QueryBox aBox( pThis, WB_YES_NO, aMsg ); if ( aBox.Execute() != RET_YES ) return 0; } diff --git a/fpicker/source/office/iodlg.src b/fpicker/source/office/iodlg.src index af24bd0..08ad36f 100644 --- a/fpicker/source/office/iodlg.src +++ b/fpicker/source/office/iodlg.src @@ -280,7 +280,7 @@ String STR_FILTERNAME_ALL String STR_SVT_ALREADYEXISTOVERWRITE { - Text [ en-US ] = "The file already exists. Overwrite?" ; + Text [ en-US ] = "A file named \"$filename$\" already exists.\n\nDo you want to replace it?" ; }; String STR_SVT_NEW_FOLDER -- 1.7.2.3