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 --- dbaccess/source/ui/control/opendoccontrols.cxx | 6 ++---- dbaccess/source/ui/misc/defaultobjectnamecheck.cxx | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 5723af67c355..b3136fc785d4 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -182,10 +182,8 @@ namespace dbaui m_sModule = OUString::createFromAscii( _pAsciiModuleName ); // our label should equal the UI text of the "Open" command - String sLabel( GetCommandText( ".uno:Open", m_sModule ) ); - sLabel.SearchAndReplaceAllAscii( "~", String() ); - sLabel.Insert( (sal_Unicode)' ', 0 ); - SetText( sLabel ); + OUString sLabel(GetCommandText(".uno:Open", m_sModule)); + SetText(OUString(' ') + sLabel.replaceAll("~", OUString())); // Place icon left of text and both centered in the button. SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) ); diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx index f0d03d973776..59fff79eb534 100644 --- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx +++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx @@ -72,12 +72,11 @@ namespace dbaui //==================================================================== namespace { - void lcl_fillNameExistsError( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay ) + void lcl_fillNameExistsError( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay ) { - String sErrorMessage = String( ModuleRes( STR_NAMED_OBJECT_ALREADY_EXISTS ) ); - sErrorMessage.SearchAndReplaceAllAscii( "$#$", _rObjectName ); SQLException aError; - aError.Message = sErrorMessage; + OUString sErrorMessage = ModuleRes(STR_NAMED_OBJECT_ALREADY_EXISTS).toString(); + aError.Message = sErrorMessage.replaceAll("$#$", _rObjectName); _out_rErrorToDisplay = aError; } -- cgit