From 82937ce3d7bc2382c4da22365d1245c9f7db178c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 13 Jul 2013 20:12:42 +0100 Subject: String::SearchAndReplaceAllAscii -> OUString::replaceAll Change-Id: I5091835c9f71c712f15996e5c6263fc5f21f6f96 --- desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'desktop/source/pkgchk') diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 430401fc3bc6..35ae4ecbc03e 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -139,16 +139,15 @@ void CommandEnvironmentImpl::printLicense( const OUString & sName, const OUString& sLicense, bool & accept, bool &decline) { ResMgr * pResMgr = DeploymentResMgr::get(); - String s1tmp(ResId(RID_STR_UNOPKG_ACCEPT_LIC_1, *pResMgr)); - s1tmp.SearchAndReplaceAllAscii( "$NAME", sName ); - OUString s1(s1tmp); - OUString s2 = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_2, *pResMgr)); - OUString s3 = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_3, *pResMgr)); - OUString s4 = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_4, *pResMgr)); - OUString sYES = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_YES, *pResMgr)); - OUString sY = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_Y, *pResMgr)); - OUString sNO = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr)); - OUString sN = String(ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr)); + OUString s1tmp(ResId(RID_STR_UNOPKG_ACCEPT_LIC_1, *pResMgr).toString()); + OUString s1(s1tmp.replaceAll("$NAME", sName)); + OUString s2 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_2, *pResMgr).toString(); + OUString s3 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_3, *pResMgr).toString(); + OUString s4 = ResId(RID_STR_UNOPKG_ACCEPT_LIC_4, *pResMgr).toString(); + OUString sYES = ResId(RID_STR_UNOPKG_ACCEPT_LIC_YES, *pResMgr).toString(); + OUString sY = ResId(RID_STR_UNOPKG_ACCEPT_LIC_Y, *pResMgr).toString(); + OUString sNO = ResId(RID_STR_UNOPKG_ACCEPT_LIC_NO, *pResMgr).toString(); + OUString sN = ResId(RID_STR_UNOPKG_ACCEPT_LIC_N, *pResMgr).toString(); OUString sNewLine("\n"); @@ -270,8 +269,8 @@ void CommandEnvironmentImpl::handle( } else if (request >>= platExc) { - String sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get())); - sMsg.SearchAndReplaceAllAscii("%Name", platExc.package->getDisplayName()); + OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get()).toString()); + sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName()); dp_misc::writeConsole(OUString("\n") + sMsg + "\n\n"); approve = true; } -- cgit