diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-05 08:32:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-05 11:08:48 +0200 |
commit | 4b2262ab5b10f334f1984fec84d2978db81c58f1 (patch) | |
tree | de56663eba6ed2edf7a26127339dd8563fdf47be /dbaccess | |
parent | ec1de6895d84fbe4f2d5fb7135a59a918138d970 (diff) |
new loplugin unnecessaryparen
Change-Id: Ic883a07b30069ca6342d7521c8ad890f4326f0ec
Reviewed-on: https://gerrit.libreoffice.org/39549
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSetCache.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/View.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/column.cxx | 9 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/control/RelationControl.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/querycontroller.cxx | 2 |
9 files changed, 17 insertions, 12 deletions
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index e29cf1f4e4f2..e51d87ac2458 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1287,7 +1287,7 @@ bool ORowSetCache::insertRow(std::vector< Any >& o_aBookmarks) { moveToBookmark(aBookmark); // update the cached values - ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get(); + ORowSetValueVector::Vector& rCurrentRow = (*m_aMatrixIter)->get(); ORowSetMatrix::const_iterator aIter = m_pMatrix->begin(); for(;aIter != m_pMatrix->end();++aIter) { @@ -1343,7 +1343,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,std::vector< if ( moveToBookmark(aBookmark) ) { // update the cached values - ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get(); + ORowSetValueVector::Vector& rCurrentRow = (*m_aMatrixIter)->get(); ORowSetMatrix::const_iterator aIter = m_pMatrix->begin(); for(;aIter != m_pMatrix->end();++aIter) { diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx index 443fd1d6e320..883346bb2693 100644 --- a/dbaccess/source/core/api/View.cxx +++ b/dbaccess/source/core/api/View.cxx @@ -93,7 +93,7 @@ namespace dbaccess const Type* pEnd = pIter + aTypes.getLength(); for(;pIter != pEnd ;++pIter) { - if( (*pIter != aAlterType || m_xViewAccess.is()) ) + if( *pIter != aAlterType || m_xViewAccess.is() ) aOwnTypes.push_back(*pIter); } diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index b46b5858dbc9..1c431420a34e 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -320,9 +320,12 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) } else { - nSize = ((m_pTable && m_pTable->isNew()) ? 0 : - ((m_bDropColumn ? - (m_bAddColumn ? 0 : 1) : (m_bAddColumn ? 1 : 2)))); + if (m_pTable && m_pTable->isNew()) + nSize = 0; + else if (m_bDropColumn) + nSize = m_bAddColumn ? 0 : 1; + else + nSize = m_bAddColumn ? 1 : 2; bDropFound = (m_pTable && m_pTable->isNew()) || m_bDropColumn; bAppendFound = (m_pTable && m_pTable->isNew()) || m_bAddColumn; } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 2c641e67abab..f40850961bef 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1028,7 +1028,7 @@ void SbaXDataBrowserController::disposing(const EventObject& Source) removeModelListeners(getControlModel()); // the form's model ? - if ((getRowSet() == Source.Source)) + if (getRowSet() == Source.Source) disposingFormModel(Source); // from a single column model ? diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 782bfdbea876..5df2a564d76c 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1755,7 +1755,9 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const if (xDataSource.is()) { sal_Int32 nType = ::comphelper::getINT32(xDataSource->getPropertyValue(PROPERTY_COMMAND_TYPE)); - aReturn.bEnabled = aReturn.bEnabled && ((::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) || (nType == css::sdb::CommandType::QUERY))); + aReturn.bEnabled = aReturn.bEnabled && + ( ::comphelper::getBOOL(xDataSource->getPropertyValue(PROPERTY_ESCAPE_PROCESSING)) || + (nType == css::sdb::CommandType::QUERY) ); } } catch(DisposedException&) diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 0a6ce4981b70..0874d383086c 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -214,7 +214,7 @@ namespace dbaui long nRow = GetCurRow(); sal_uInt16 nCol = GetCurColumnId(); - bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1))) + bool bRet = !( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)) || (!bForward && (nCol == SOURCE_COLUMN) && (nRow == 0))); return bRet && EditBrowseBox::IsTabAllowed(bForward); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 9e09847c7572..5eb1e3694875 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1678,7 +1678,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo ) if (aIter == rFields.end()) { OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); - if ( (pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy()) ) // the GroupBy is inherited from rInfo + if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // the GroupBy is inherited from rInfo pTmp->SetGroupBy(false); } } diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx index 9ae3c5fdd89c..4ad0049a1eef 100644 --- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx +++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx @@ -152,7 +152,7 @@ void SAL_CALL LimitBoxController::statusChanged( { m_pLimitBox->Enable(); sal_Int64 nLimit = 0; - if ( (rEvent.State >>= nLimit) ) + if ( rEvent.State >>= nLimit ) { m_pLimitBox->SetValue( nLimit ); } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 118dd30d837e..91aae8d61b3c 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1613,7 +1613,7 @@ static std::vector< CommentStrip > getComment( const OUString& rQuery ) { if ((pCopy[i]=='-' && pCopy[i+1]=='-') || (pCopy[i]=='/' && pCopy[i+1]=='/')) bComment = true; - else if ((pCopy[i]=='/' && pCopy[i+1]=='*')) + else if (pCopy[i]=='/' && pCopy[i+1]=='*') bComment2 = true; } } |