diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-25 12:36:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-25 12:38:35 +0200 |
commit | 68c09b05f00a224872b8ce962f144bf6d8ccbe78 (patch) | |
tree | 8b775293bb0cdee4859808e4a7265aa50e3bf413 /dbaccess | |
parent | 90dfd9d87ad93525dd815e1e5d047045fd7628b0 (diff) |
loplugin:stringconstant: Flag more inefficiencies
Change-Id: Ifd804fb45fb032dddbf2ba3643ec0964e0e24724
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/opendoccontrols.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 6be7270d80ab..a2bae5997b01 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -449,7 +449,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnRealName_throw(const Referenc ) { OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_UNKNOWN_PROP)); - SQLException aErr(sError.replaceAll("%value", OUString(PROPERTY_NAME)),*this,SQLSTATE_GENERAL,1000,Any() ); + SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() ); throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) ); } @@ -519,7 +519,7 @@ OUString OSingleSelectQueryComposer::impl_getColumnName_throw(const Reference< X ) { OUString sError(DBACORE_RESSTRING(RID_STR_COLUMN_UNKNOWN_PROP)); - SQLException aErr(sError.replaceAll("%value", OUString(PROPERTY_NAME)),*this,SQLSTATE_GENERAL,1000,Any() ); + SQLException aErr(sError.replaceAll("%value", PROPERTY_NAME),*this,SQLSTATE_GENERAL,1000,Any() ); throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,makeAny(aErr) ); } diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index c07b651e13cf..50731edd846f 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -2160,7 +2160,7 @@ void OApplicationController::renameEntry() { OUString sStatus("S1000"); OUString sMsg = OUString( ModuleRes( STR_NAME_ALREADY_EXISTS ) ); - showError(SQLExceptionInfo(SQLException(sMsg.replaceAll(OUString('#'), e.Message), e.Context, sStatus, 0, Any()))); + showError(SQLExceptionInfo(SQLException(sMsg.replaceAll("#", e.Message), e.Context, sStatus, 0, Any()))); } catch(const Exception& ) { diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 9d34932ec1f8..e593add1f0b3 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1805,7 +1805,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const xProp->getPropertyValue(PROPERTY_COMMAND) >>= aName; OUString sObject(aName); - aReturn.sTitle = sTitle.replaceFirst(OUString('#'), sObject); + aReturn.sTitle = sTitle.replaceFirst("#", sObject); aReturn.bEnabled = true; } break; @@ -2672,7 +2672,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) OUString sFilter = " WHERE "; sFilter = sFilter + xAnalyzer->getFilter(); OUString sReplace(sSql); - sReplace = sReplace.replaceFirst(sFilter,OUString()); + sReplace = sReplace.replaceFirst(sFilter, ""); xAnalyzer->setQuery(sReplace); Reference<XSingleSelectQueryComposer> xComposer(xAnalyzer,UNO_QUERY); xComposer->setFilter(OUString("0=1")); diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index 7eb8ef00ac22..05d94804aa4c 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -171,7 +171,7 @@ namespace dbaui // our label should equal the UI text of the "Open" command OUString sLabel(GetCommandText(".uno:Open", m_sModule)); - SetText(" " + sLabel.replaceAll("~", OUString())); + SetText(" " + sLabel.replaceAll("~", "")); // Place icon left of text and both centered in the button. SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) ); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index c4de3e552703..ece6bea52cfd 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -256,9 +256,9 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal sLoginRequest = sLoginRequest.replaceAll("$name$", sName); else { - sLoginRequest = sLoginRequest.replaceAll("\"$name$\"", OUString()); + sLoginRequest = sLoginRequest.replaceAll("\"$name$\"", ""); // ensure that in other languages the string will be deleted - sLoginRequest = sLoginRequest.replaceAll("$name$", OUString()); + sLoginRequest = sLoginRequest.replaceAll("$name$", ""); } // the request |