diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-13 08:20:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-13 14:46:37 +0200 |
commit | fd6d01c95594746602090972d5edabe1b9f281c3 (patch) | |
tree | 9032926a32661fb69424efc5ea798c984e07051c /dbaccess/source/ui | |
parent | aac4f0660f9599bbf5f74c7ce683d7147b5bd1e7 (diff) |
loplugin:sequentialassign in dbaccess..desktop
Change-Id: I3f3108daf208fa8c6be90b28da5503846c27732e
Reviewed-on: https://gerrit.libreoffice.org/70698
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailPageHelper.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppSwapWindow.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppView.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/directsql.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 6 |
11 files changed, 20 insertions, 41 deletions
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 7689022016fa..9b36567c2d9c 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -168,8 +168,7 @@ namespace { //FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); @@ -1214,8 +1213,7 @@ void OAppDetailPageHelper::ImplInitSettings() { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); m_aTBPreview->SetPointFont(*m_aTBPreview, aFont); @@ -1305,8 +1303,7 @@ void OPreviewWindow::ImplInitSettings() { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index e4c30fe5629e..5ca68ed90dc7 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -392,8 +392,7 @@ void OTasksWindow::ImplInitSettings() { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); @@ -572,8 +571,7 @@ void OApplicationDetailView::ImplInitSettings() { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index bdcb7e108140..964baa269c7f 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -77,8 +77,7 @@ void OApplicationSwapWindow::ImplInitSettings() { // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index 139b01a8533f..d6d121ba4909 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -148,8 +148,7 @@ void OTitleWindow::ImplInitSettings() SetSettings(aAllSettings); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); @@ -169,8 +168,7 @@ void OTitleWindow::ApplySettings(vcl::RenderContext& rRenderContext) rRenderContext.SetSettings(aAllSettings); const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor(rStyleSettings.GetWindowTextColor()); SetPointFont(*this, aFont); diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index a7b94f87aa69..011547a5d3ef 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -145,8 +145,7 @@ void OAppBorderWindow::ImplInitSettings() // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); @@ -528,8 +527,7 @@ void OApplicationView::ImplInitSettings() // FIXME RenderContext const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - vcl::Font aFont; - aFont = rStyleSettings.GetFieldFont(); + vcl::Font aFont = rStyleSettings.GetFieldFont(); aFont.SetColor( rStyleSettings.GetWindowTextColor() ); SetPointFont(*this, aFont); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 31251082622e..beaeea3c7d06 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2617,10 +2617,8 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) Reference<XParametersSupplier> xParSup(xAnalyzer,UNO_QUERY); if ( xParSup->getParameters()->getCount() > 0 ) { - OUString sFilter = " WHERE "; - sFilter = sFilter + xAnalyzer->getFilter(); - OUString sReplace(sSql); - sReplace = sReplace.replaceFirst(sFilter, ""); + OUString sFilter = " WHERE " + xAnalyzer->getFilter(); + OUString sReplace = sSql.replaceFirst(sFilter, ""); xAnalyzer->setQuery(sReplace); Reference<XSingleSelectQueryComposer> xComposer(xAnalyzer,UNO_QUERY); xComposer->setFilter("0=1"); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index d3e65ff8fc69..24a3660eaa3c 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -427,8 +427,7 @@ namespace dbaui if ( m_pCollection->isFileSystemBased( m_eType ) ) { // get the two parts: prefix and file URL - OUString sFileURLDecoded; - sFileURLDecoded = sURL; + OUString sFileURLDecoded = sURL; sURL = OUString(); if ( !sFileURLDecoded.isEmpty() ) @@ -661,10 +660,8 @@ namespace dbaui bool OConnectionHelper::commitURL() { - OUString sURL; - OUString sOldPath; - sOldPath = m_xConnectionURL->GetSavedValueNoPrefix(); - sURL = m_xConnectionURL->GetTextNoPrefix(); + OUString sOldPath = m_xConnectionURL->GetSavedValueNoPrefix(); + OUString sURL = m_xConnectionURL->GetTextNoPrefix(); if ( m_pCollection->isFileSystemBased(m_eType) ) { diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 87f4d956ae63..6b050b044478 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -150,8 +150,7 @@ namespace dbaui m_aStatementHistory.push_back(_rStatement); // normalize the statement, and remember the normalized form, too - OUString sNormalized(_rStatement); - sNormalized = sNormalized.replaceAll("\n", " "); + OUString sNormalized = _rStatement.replaceAll("\n", " "); m_aNormalizedHistory.push_back(sNormalized); // add the normalized version to the list box diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 0f28db2f1f6d..91e8e1870531 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -169,9 +169,7 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _ if ( !sFilter.isEmpty() ) { sStatement.append(aPropertie.second); - OUString sReplace = sFilter; - sReplace = sReplace.replaceFirst(sSourceName,sTargetNameTemp); - sFilter = sReplace; + sFilter = sFilter.replaceFirst(sSourceName,sTargetNameTemp); _rxObject->setPropertyValue( aPropertie.first, makeAny(sFilter) ); sStatement.append(sFilter); } diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index 107525100687..423928905075 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -285,8 +285,7 @@ bool ORelationTableConnectionData::Update() { if(!(elem->GetSourceFieldName().isEmpty() || elem->GetDestFieldName().isEmpty())) { - Reference<XPropertySet> xColumn; - xColumn = xColumnFactory->createDataDescriptor(); + Reference<XPropertySet> xColumn = xColumnFactory->createDataDescriptor(); if ( xColumn.is() ) { xColumn->setPropertyValue(PROPERTY_NAME,makeAny(elem->GetSourceFieldName())); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index e8335fbce67e..023b48e115bf 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -1030,8 +1030,7 @@ void OTableController::alterColumns() bAutoIncrement != pField->IsAutoIncrement())&& xColumnFactory.is()) { - Reference<XPropertySet> xNewColumn; - xNewColumn = xColumnFactory->createDataDescriptor(); + Reference<XPropertySet> xNewColumn = xColumnFactory->createDataDescriptor(); ::dbaui::setColumnProperties(xNewColumn,pField); // first try to alter the column bool bNotOk = false; @@ -1082,8 +1081,7 @@ void OTableController::alterColumns() { // we can't find the column so we could try it with the index before we drop and append a new column try { - Reference<XPropertySet> xNewColumn; - xNewColumn = xColumnFactory->createDataDescriptor(); + Reference<XPropertySet> xNewColumn = xColumnFactory->createDataDescriptor(); ::dbaui::setColumnProperties(xNewColumn,pField); xAlter->alterColumnByIndex(nPos,xNewColumn); if(xColumns->hasByName(pField->GetName())) |