summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-07-13 20:12:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-07-14 14:04:03 +0100
commit82937ce3d7bc2382c4da22365d1245c9f7db178c (patch)
treedbae8b3a02a1b0f21326ba2d5da41cf946d48962 /dbaccess
parent46894ec48eb33dc99dab807c9fcaf0caa7c6cd84 (diff)
String::SearchAndReplaceAllAscii -> OUString::replaceAll
Change-Id: I5091835c9f71c712f15996e5c6263fc5f21f6f96
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx6
-rw-r--r--dbaccess/source/ui/misc/defaultobjectnamecheck.cxx7
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;
}