diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/data/column2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/chgtrack.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compare.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 10 | ||||
-rw-r--r-- | sc/source/core/tool/interpr2.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/tool/interpr8.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/tool/refupdat.cxx | 12 | ||||
-rw-r--r-- | sc/source/core/tool/token.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/impex.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabview2.cxx | 8 |
15 files changed, 31 insertions, 31 deletions
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 61a756699081..9a45e48899f6 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -3531,7 +3531,7 @@ public: const SCROW nRow1 = node.position; const SCROW nRow2 = nRow1 + 1; - if (! ((nRow2 < mnStartRow) || (nRow1 > mnEndRow))) + if ((nRow2 >= mnStartRow) && (nRow1 <= mnEndRow)) { mnCount += WeightedCounter::getWeight(node); } diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx index a6524f95da7d..2e445d0247ed 100644 --- a/sc/source/core/tool/chgtrack.cxx +++ b/sc/source/core/tool/chgtrack.cxx @@ -1003,7 +1003,7 @@ bool ScChangeActionDel::Reject( ScDocument* pDoc ) switch ( GetType() ) { case SC_CAT_DELETE_COLS : - if ( !(aRange.aStart.Col() == 0 && aRange.aEnd.Col() == pDoc->MaxCol()) ) + if ( aRange.aStart.Col() != 0 || aRange.aEnd.Col() != pDoc->MaxCol() ) { // Only if not TabDelete bOk = pDoc->CanInsertCol( aRange ) && pDoc->InsertCol( aRange ); } diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx index f1c5fa3979c8..6d7150003417 100644 --- a/sc/source/core/tool/compare.cxx +++ b/sc/source/core/tool/compare.cxx @@ -42,7 +42,7 @@ CompareOptions::CompareOptions( const ScDocument* pDoc, const ScQueryEntry& rEnt { // Wildcard and Regex search work only with equal or not equal. if (eSearchType != utl::SearchParam::SearchType::Normal && - !(aQueryEntry.eOp == SC_EQUAL || aQueryEntry.eOp == SC_NOT_EQUAL)) + aQueryEntry.eOp != SC_EQUAL && aQueryEntry.eOp != SC_NOT_EQUAL) eSearchType = utl::SearchParam::SearchType::Normal; // Interpreter functions usually are case insensitive, except the simple diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 9cdc0c8fc427..f94931dd3278 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3559,8 +3559,8 @@ bool ScCompiler::IsColRowName( const OUString& rName ) { const ScRangePair & rR = (*pRL)[iPair]; const ScRange& rNameRange = rR.GetRange(0); - if ( jThisTab && !(rNameRange.aStart.Tab() <= nThisTab && - nThisTab <= rNameRange.aEnd.Tab()) ) + if ( jThisTab && (rNameRange.aStart.Tab() > nThisTab || + nThisTab > rNameRange.aEnd.Tab()) ) continue; // for ScCellIterator aIter( pDoc, rNameRange ); for (bool bHas = aIter.first(); bHas && !bInList; bHas = aIter.next()) @@ -3645,7 +3645,7 @@ bool ScCompiler::IsColRowName( const OUString& rName ) nMax = std::max( nMyCol + std::abs( nC ), nMyRow + std::abs( nR ) ); nDistance = nD; } - else if ( !(nRow < aOne.Row() && nMyRow >= static_cast<long>(aOne.Row())) ) + else if ( nRow >= aOne.Row() || nMyRow < static_cast<long>(aOne.Row()) ) { // upper left, only if not further up than the // current entry and nMyRow is below (CellIter @@ -3709,7 +3709,7 @@ bool ScCompiler::IsColRowName( const OUString& rName ) nMax = std::max( nMyCol + std::abs( nC ), nMyRow + std::abs( nR ) ); nDistance = nD; } - else if ( !(nRow < aOne.Row() && nMyRow >= static_cast<long>(aOne.Row())) ) + else if ( nRow >= aOne.Row() || nMyRow < static_cast<long>(aOne.Row()) ) { // upper left, only if not further up than the // current entry and nMyRow is below (CellIter @@ -4621,7 +4621,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul default: break; } - if (!(eLastOp == ocOpen && eOp == ocClose) && + if ((eLastOp != ocOpen || eOp != ocClose) && (eLastOp == ocOpen || eLastOp == ocSep || eLastOp == ocArrayRowSep || diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 891fcbc7e798..de63442eaf0e 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -559,7 +559,7 @@ void ScInterpreter::ScNetWorkdays( bool bOOXML_Version ) { while ( nRef < nMax && nSortArray.at( nRef ) < nDate1 ) nRef++; - if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate1 ) ) + if ( nRef >= nMax || nSortArray.at( nRef ) != nDate1 ) nCnt++; } ++nDate1; @@ -613,7 +613,7 @@ void ScInterpreter::ScWorkday_MS() while ( nRef < nMax && nSortArray.at( nRef ) < nDate ) nRef++; - if ( !( nRef < nMax && nSortArray.at( nRef ) == nDate ) || nRef >= nMax ) + if ( nRef >= nMax || nSortArray.at( nRef ) != nDate || nRef >= nMax ) nDays--; } } diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx index 9fc1e799884a..b9e09dfef564 100644 --- a/sc/source/core/tool/interpr8.cxx +++ b/sc/source/core/tool/interpr8.cxx @@ -1241,7 +1241,7 @@ void ScInterpreter::ScForecast_Ets( ScETSType eETSType ) // required arguments double fPILevel = 0.0; - if ( nParamCount < 3 && !( nParamCount == 2 && eETSType == etsSeason ) ) + if ( nParamCount < 3 && ( nParamCount != 2 || eETSType != etsSeason ) ) { PushParameterExpected(); return; diff --git a/sc/source/core/tool/refupdat.cxx b/sc/source/core/tool/refupdat.cxx index c1c1ffa19cd5..3dfe38634478 100644 --- a/sc/source/core/tool/refupdat.cxx +++ b/sc/source/core/tool/refupdat.cxx @@ -388,7 +388,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode, { if ( nDx && (theRow1 >= nRow1) && (theRow2 <= nRow2) && (theTab1 >= nTab1) && (theTab2 <= nTab2) && - !(theCol1 == nInt32Min && theCol2 == nInt32Max) ) + (theCol1 != nInt32Min || theCol2 != nInt32Max) ) { bCut1 = lcl_MoveBig( theCol1, nCol1, nDx ); bCut2 = lcl_MoveBig( theCol2, nCol1, nDx ); @@ -399,7 +399,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode, } if ( nDy && (theCol1 >= nCol1) && (theCol2 <= nCol2) && (theTab1 >= nTab1) && (theTab2 <= nTab2) && - !(theRow1 == nInt32Min && theRow2 == nInt32Max) ) + (theRow1 != nInt32Min || theRow2 != nInt32Max) ) { bCut1 = lcl_MoveBig( theRow1, nRow1, nDy ); bCut2 = lcl_MoveBig( theRow2, nRow1, nDy ); @@ -410,7 +410,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode, } if ( nDz && (theCol1 >= nCol1) && (theCol2 <= nCol2) && (theRow1 >= nRow1) && (theRow2 <= nRow2) && - !(theTab1 == nInt32Min && theTab2 == nInt32Max) ) + (theTab1 != nInt32Min || theTab2 != nInt32Max) ) { bCut1 = lcl_MoveBig( theTab1, nTab1, nDz ); bCut2 = lcl_MoveBig( theTab2, nTab1, nDz ); @@ -424,7 +424,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode, { if ( rWhere.In( rWhat ) ) { - if ( nDx && !(theCol1 == nInt32Min && theCol2 == nInt32Max) ) + if ( nDx && (theCol1 != nInt32Min || theCol2 != nInt32Max) ) { bCut1 = lcl_MoveItCutBig( theCol1, nDx ); bCut2 = lcl_MoveItCutBig( theCol2, nDx ); @@ -433,7 +433,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode, rWhat.aStart.SetCol( theCol1 ); rWhat.aEnd.SetCol( theCol2 ); } - if ( nDy && !(theRow1 == nInt32Min && theRow2 == nInt32Max) ) + if ( nDy && (theRow1 != nInt32Min || theRow2 != nInt32Max) ) { bCut1 = lcl_MoveItCutBig( theRow1, nDy ); bCut2 = lcl_MoveItCutBig( theRow2, nDy ); @@ -442,7 +442,7 @@ ScRefUpdateRes ScRefUpdate::Update( UpdateRefMode eUpdateRefMode, rWhat.aStart.SetRow( theRow1 ); rWhat.aEnd.SetRow( theRow2 ); } - if ( nDz && !(theTab1 == nInt32Min && theTab2 == nInt32Max) ) + if ( nDz && (theTab1 != nInt32Min || theTab2 != nInt32Max) ) { bCut1 = lcl_MoveItCutBig( theTab1, nDz ); bCut2 = lcl_MoveItCutBig( theTab2, nDz ); diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index 545ddc8dce08..8f58651355ac 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2971,7 +2971,7 @@ bool expandRangeByEdge( const sc::RefUpdateContext& rCxt, ScRange& rRefRange, co // Edge-expansion is turned off. return false; - if (!(rSelectedRange.aStart.Tab() <= rRefRange.aStart.Tab() && rRefRange.aEnd.Tab() <= rSelectedRange.aEnd.Tab())) + if (rSelectedRange.aStart.Tab() > rRefRange.aStart.Tab() || rRefRange.aEnd.Tab() > rSelectedRange.aEnd.Tab()) // Sheet references not within selected range. return false; diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 96b3d6623364..f2d80f1d5bf9 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -301,7 +301,7 @@ void ScDocShell::AfterXMLLoading(bool bRet) { if ( *pNameBuffer == '\'' && *(pNameBuffer-1) != '\\' ) bQuote = false; - else if( !(*pNameBuffer == '\\' && *(pNameBuffer+1) == '\'') ) + else if( *pNameBuffer != '\\' || *(pNameBuffer+1) != '\'' ) aDocURLBuffer.append(*pNameBuffer); // If escaped quote: only quote in the name ++pNameBuffer; } diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index c61144fab693..7912d7ec389a 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1895,7 +1895,7 @@ bool ScImportExport::Sylk2Doc( SvStream& rStrm ) const sal_Unicode* q = p; while( *q && *q != ';' ) q++; - if ( !(*q == ';' && *(q+1) == 'I') && !bInvalidCol && !bInvalidRow ) + if ( (*q != ';' || *(q+1) != 'I') && !bInvalidCol && !bInvalidRow ) { // don't ignore value if( bText ) { diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 2a4153756eb1..276a2bd42dbf 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2857,8 +2857,8 @@ css::uno::Reference<css::uno::XInterface> ScModelObj::create( // #i64497# If a chart is in a temporary document during clipboard paste, // there should be no data provider, so that own data is used bool bCreate = - ! ( nType == ServiceType::CHDATAPROV && - ( pDocShell->GetCreateMode() == SfxObjectCreateMode::INTERNAL )); + ( nType != ServiceType::CHDATAPROV || + ( pDocShell->GetCreateMode() != SfxObjectCreateMode::INTERNAL )); // this should never happen, i.e. the temporary document should never be // loaded, because this unlinks the data assert(bCreate); diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index a9dfdc4db199..ff7e37538c08 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -1117,7 +1117,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) else { CommentCaptionState eState = pDoc->GetAllNoteCaptionsState( aRanges ); - bool bAllNotesInShown = !(eState == ALLHIDDEN || eState == MIXED); + bool bAllNotesInShown = (eState != ALLHIDDEN && eState != MIXED); rSet.Put( SfxBoolItem( SID_TOGGLE_NOTES, bAllNotesInShown) ); } } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 4db57dc43f26..0ee0cc1b2f9d 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1381,9 +1381,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) pOwnClip->GetDocument()->GetClipStart( nClipStartX, nClipStartY ); pOwnClip->GetDocument()->GetClipArea( nClipSizeX, nClipSizeY, true ); - if ( !( pData->GetSimpleArea( nStartX, nStartY, nStartTab, - nEndX, nEndY, nEndTab ) == SC_MARK_SIMPLE && - nStartTab == nEndTab ) ) + if ( pData->GetSimpleArea( nStartX, nStartY, nStartTab, + nEndX, nEndY, nEndTab ) != SC_MARK_SIMPLE || + nStartTab != nEndTab ) { // the destination is not a simple range, // assume the destination as the current cell diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 1de54e8f03e5..284fc13a29a8 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -6056,7 +6056,7 @@ void ScGridWindow::UpdateCursorOverlay() SCCOL nX2 = nX + rMerge.GetColMerge() - 1; SCROW nY2 = nY + rMerge.GetRowMerge() - 1; // Check if the middle or tail of the merged range is visible. - if (!(maVisibleRange.mnCol1 <= nX2 && maVisibleRange.mnRow1 <= nY2)) + if (maVisibleRange.mnCol1 > nX2 || maVisibleRange.mnRow1 > nY2) return; // no visible part } diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx index 97e5dd9babd9..bf78bc7f21ee 100644 --- a/sc/source/ui/view/tabview2.cxx +++ b/sc/source/ui/view/tabview2.cxx @@ -513,7 +513,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, SCCOL nColSpan = pMergeAttr->GetColMerge(); SCROW nRowSpan = pMergeAttr->GetRowMerge(); - if ( !( nCurX >= nBlockStartXOrig + nColSpan - 1 && nCurY >= nBlockStartYOrig + nRowSpan - 1 ) ) + if ( nCurX < nBlockStartXOrig + nColSpan - 1 || nCurY < nBlockStartYOrig + nRowSpan - 1 ) { nBlockStartX = nCurX >= nBlockStartXOrig ? nBlockStartXOrig : nBlockStartXOrig + nColSpan - 1; nBlockStartY = nCurY >= nBlockStartYOrig ? nBlockStartYOrig : nBlockStartYOrig + nRowSpan - 1; @@ -538,7 +538,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, SCCOL nColSpan = pMergeAttr->GetColMerge(); SCROW nRowSpan = pMergeAttr->GetRowMerge(); - if ( !( nBlockStartX >= nCurX + nColSpan - 1 && nBlockStartY >= nCurY + nRowSpan - 1 ) ) + if ( nBlockStartX < nCurX + nColSpan - 1 || nBlockStartY < nCurY + nRowSpan - 1 ) { if ( nBlockStartX <= nCurX + nColSpan - 1 ) { @@ -550,8 +550,8 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ, SCROW nCurYOffsetTemp = (nCurY < nCurY + nRowSpan - 1) ? nRowSpan - 1 : 0; nCurYOffset = std::max(nCurYOffset, nCurYOffsetTemp); } - if ( !( nBlockStartX <= nCurX && nBlockStartY <= nCurY ) && - !( nBlockStartX > nCurX + nColSpan - 1 && nBlockStartY > nCurY + nRowSpan - 1 ) ) + if ( ( nBlockStartX > nCurX || nBlockStartY > nCurY ) && + ( nBlockStartX <= nCurX + nColSpan - 1 || nBlockStartY <= nCurY + nRowSpan - 1 ) ) { nBlockStartXOffset = (nBlockStartX > nCurX && nBlockStartX <= nCurX + nColSpan - 1) ? nCurX - nBlockStartX : 0; nBlockStartYOffset = (nBlockStartY > nCurY && nBlockStartY <= nCurY + nRowSpan - 1) ? nCurY - nBlockStartY : 0; |