diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-13 20:12:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-14 14:04:03 +0100 |
commit | 82937ce3d7bc2382c4da22365d1245c9f7db178c (patch) | |
tree | dbae8b3a02a1b0f21326ba2d5da41cf946d48962 /dbaccess | |
parent | 46894ec48eb33dc99dab807c9fcaf0caa7c6cd84 (diff) |
String::SearchAndReplaceAllAscii -> OUString::replaceAll
Change-Id: I5091835c9f71c712f15996e5c6263fc5f21f6f96
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/opendoccontrols.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/defaultobjectnamecheck.cxx | 7 |
2 files changed, 5 insertions, 8 deletions
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; } |