summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2013-04-11 00:21:40 -0300
committerDavid Tardon <dtardon@redhat.com>2013-04-20 11:09:54 +0000
commit0f200cc30ea75fdce59f7bb6ae87ebc85729e2a4 (patch)
tree2e2c28f9500f81825cdadcbabd131da767ddbb49 /sc/source/core
parent5414a3eecdb09be928313477792acfe1d3534645 (diff)
fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO. Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6 Reviewed-on: https://gerrit.libreoffice.org/3326 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/attarray.cxx40
-rw-r--r--sc/source/core/data/column.cxx8
-rw-r--r--sc/source/core/data/column3.cxx2
-rw-r--r--sc/source/core/data/dociter.cxx2
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/documen4.cxx14
-rw-r--r--sc/source/core/data/document.cxx10
-rw-r--r--sc/source/core/data/dptabsrc.cxx2
-rw-r--r--sc/source/core/data/drwlayer.cxx4
-rw-r--r--sc/source/core/data/funcdesc.cxx2
-rw-r--r--sc/source/core/data/olinetab.cxx2
-rw-r--r--sc/source/core/data/table1.cxx2
-rw-r--r--sc/source/core/data/table2.cxx4
-rw-r--r--sc/source/core/data/table3.cxx4
-rw-r--r--sc/source/core/data/table4.cxx8
-rw-r--r--sc/source/core/data/table6.cxx4
-rw-r--r--sc/source/core/tool/address.cxx6
-rw-r--r--sc/source/core/tool/compiler.cxx13
-rw-r--r--sc/source/core/tool/consoli.cxx6
-rw-r--r--sc/source/core/tool/interpr1.cxx4
-rw-r--r--sc/source/core/tool/interpr2.cxx2
21 files changed, 71 insertions, 70 deletions
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index fbb74439c89c..7ef31030722d 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -431,8 +431,8 @@ void ScAttrArray::SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPattern
if ( ScGlobal::CheckWidthInvalidate( bNumFormatChanged,
rNewSet, rOldSet ) )
{
- aAdrStart.SetRow( Max(nStartRow,ns) );
- aAdrEnd .SetRow( Min(nEndRow,pData[nx].nRow) );
+ aAdrStart.SetRow( std::max(nStartRow,ns) );
+ aAdrEnd .SetRow( std::min(nEndRow,pData[nx].nRow) );
pDocument->InvalidateTextWidth( &aAdrStart, &aAdrEnd, bNumFormatChanged );
}
ns = pData[nx].nRow + 1;
@@ -1077,7 +1077,7 @@ void ScAttrArray::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLine
{
pPattern = (ScPatternAttr*) pData[i].pPattern;
lcl_MergeToFrame( pLineOuter, pLineInner, rFlags, pPattern, bLeft, nDistRight, false,
- nEndRow - Min( pData[i].nRow, (SCROW)(nEndRow-1) ) );
+ nEndRow - std::min( pData[i].nRow, (SCROW)(nEndRow-1) ) );
// nDistBottom here always > 0
}
@@ -1185,7 +1185,7 @@ void ScAttrArray::ApplyBlockFrame( const SvxBoxItem* pLineOuter, const SvxBoxInf
SCROW nTmpEnd;
for (SCSIZE i=nStartIndex; i<=nEndIndex;)
{
- nTmpEnd = Min( (SCROW)(nEndRow-1), (SCROW)(pData[i].nRow) );
+ nTmpEnd = std::min( (SCROW)(nEndRow-1), (SCROW)(pData[i].nRow) );
bool bChanged = ApplyFrame( pLineOuter, pLineInner, nTmpStart, nTmpEnd,
bLeft, nDistRight, false, nEndRow-nTmpEnd );
nTmpStart = nTmpEnd+1;
@@ -1496,7 +1496,7 @@ void ScAttrArray::SetPatternAreaSafe( SCROW nStartRow, SCROW nEndRow,
{
if (nThisRow < nStartRow) nThisRow = nStartRow;
nRow = pData[nIndex].nRow;
- SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
+ SCROW nAttrRow = std::min( (SCROW)nRow, (SCROW)nEndRow );
pItem = (const ScMergeFlagAttr*) &pOldPattern->GetItem( ATTR_MERGE_FLAG );
if (pItem->IsOverlapped() || pItem->HasAutoFilter())
@@ -1554,7 +1554,7 @@ bool ScAttrArray::ApplyFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags )
if ( (nOldValue | nFlags) != nOldValue )
{
nRow = pData[nIndex].nRow;
- SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
+ SCROW nAttrRow = std::min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue | nFlags ) );
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
@@ -1591,7 +1591,7 @@ bool ScAttrArray::RemoveFlags( SCROW nStartRow, SCROW nEndRow, sal_Int16 nFlags
if ( (nOldValue & ~nFlags) != nOldValue )
{
nRow = pData[nIndex].nRow;
- SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
+ SCROW nAttrRow = std::min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( ScMergeFlagAttr( nOldValue & ~nFlags ) );
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
@@ -1628,7 +1628,7 @@ void ScAttrArray::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16*
aNewPattern.ClearItems( pWhich );
nRow = pData[nIndex].nRow;
- SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
+ SCROW nAttrRow = std::min( (SCROW)nRow, (SCROW)nEndRow );
SetPatternArea( nThisRow, nAttrRow, &aNewPattern, true );
Search( nThisRow, nIndex ); // data changed
}
@@ -1678,7 +1678,7 @@ void ScAttrArray::ChangeIndent( SCROW nStartRow, SCROW nEndRow, bool bIncrement
if ( bNeedJust || nNewValue != nOldValue )
{
SCROW nThisEnd = pData[nIndex].nRow;
- SCROW nAttrRow = Min( nThisEnd, nEndRow );
+ SCROW nAttrRow = std::min( nThisEnd, nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
aNewPattern.GetItemSet().Put( SfxUInt16Item( ATTR_INDENT, nNewValue ) );
if ( bNeedJust )
@@ -2179,7 +2179,7 @@ void ScAttrArray::DeleteHardAttr(SCROW nStartRow, SCROW nEndRow)
if ( pOldPattern->GetItemSet().Count() ) // hard attributes ?
{
nRow = pData[nIndex].nRow;
- SCROW nAttrRow = Min( (SCROW)nRow, (SCROW)nEndRow );
+ SCROW nAttrRow = std::min( (SCROW)nRow, (SCROW)nEndRow );
ScPatternAttr aNewPattern(*pOldPattern);
SfxItemSet& rSet = aNewPattern.GetItemSet();
@@ -2211,10 +2211,10 @@ void ScAttrArray::MoveTo(SCROW nStartRow, SCROW nEndRow, ScAttrArray& rAttrArray
if ((pData[i].nRow >= nStartRow) && ((i==0) ? true : pData[i-1].nRow < nEndRow))
{
// copy (bPutToPool=TRUE)
- rAttrArray.SetPatternArea( nStart, Min( (SCROW)pData[i].nRow, (SCROW)nEndRow ),
+ rAttrArray.SetPatternArea( nStart, std::min( (SCROW)pData[i].nRow, (SCROW)nEndRow ),
pData[i].pPattern, true );
}
- nStart = Max( (SCROW)nStart, (SCROW)(pData[i].nRow + 1) );
+ nStart = std::max( (SCROW)nStart, (SCROW)(pData[i].nRow + 1) );
}
DeleteArea(nStartRow, nEndRow);
}
@@ -2228,8 +2228,8 @@ void ScAttrArray::CopyArea(
nStartRow -= nDy; // Source
nEndRow -= nDy;
- SCROW nDestStart = Max((long)((long)nStartRow + nDy), (long) 0);
- SCROW nDestEnd = Min((long)((long)nEndRow + nDy), (long) MAXROW);
+ SCROW nDestStart = std::max((long)((long)nStartRow + nDy), (long) 0);
+ SCROW nDestEnd = std::min((long)((long)nEndRow + nDy), (long) MAXROW);
ScDocumentPool* pSourceDocPool = pDocument->GetPool();
ScDocumentPool* pDestDocPool = rAttrArray.pDocument->GetPool();
@@ -2277,12 +2277,12 @@ void ScAttrArray::CopyArea(
}
rAttrArray.SetPatternArea(nDestStart,
- Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern);
+ std::min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern);
}
// when pasting from clipboard and skipping filtered rows, the adjusted
// end position can be negative
- nDestStart = Max((long)nDestStart, (long)(pData[i].nRow + nDy + 1));
+ nDestStart = std::max((long)nDestStart, (long)(pData[i].nRow + nDy + 1));
}
}
@@ -2295,8 +2295,8 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
nStartRow -= nDy; // Source
nEndRow -= nDy;
- SCROW nDestStart = Max((long)((long)nStartRow + nDy), (long) 0);
- SCROW nDestEnd = Min((long)((long)nEndRow + nDy), (long) MAXROW);
+ SCROW nDestStart = std::max((long)((long)nStartRow + nDy), (long) 0);
+ SCROW nDestEnd = std::min((long)((long)nEndRow + nDy), (long) MAXROW);
if ( !rAttrArray.HasAttrib( nDestStart, nDestEnd, HASATTR_OVERLAPPED ) )
{
@@ -2321,12 +2321,12 @@ void ScAttrArray::CopyAreaSafe( SCROW nStartRow, SCROW nEndRow, long nDy, ScAttr
pNewPattern = pOldPattern->PutInPool( rAttrArray.pDocument, pDocument );
rAttrArray.SetPatternAreaSafe(nDestStart,
- Min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, false);
+ std::min((SCROW)(pData[i].nRow + nDy), nDestEnd), pNewPattern, false);
}
// when pasting from clipboard and skipping filtered rows, the adjusted
// end position can be negative
- nDestStart = Max((long)nDestStart, (long)(pData[i].nRow + nDy + 1));
+ nDestStart = std::max((long)nDestStart, (long)(pData[i].nRow + nDy + 1));
}
}
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 90b0927d78ec..8ecb82e212f0 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -501,8 +501,8 @@ void ScColumn::ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
nRow = nRow2;
else
{
- SCROW nNewRow1 = Max( nRow1, nRow );
- SCROW nNewRow2 = Min( nRow2, nEndRow );
+ SCROW nNewRow1 = std::max( nRow1, nRow );
+ SCROW nNewRow2 = std::min( nRow2, nEndRow );
pAttrArray->ApplyCacheArea( nNewRow1, nNewRow2, &aCache );
nRow = nNewRow2;
}
@@ -731,7 +731,7 @@ bool ScColumn::Search( SCROW nRow, SCSIZE& nIndex ) const
long nOldLo, nOldHi;
long nLo = nOldLo = 0;
- long nHi = nOldHi = Min(static_cast<long>(maItems.size())-1, static_cast<long>(nRow) );
+ long nHi = nOldHi = std::min(static_cast<long>(maItems.size())-1, static_cast<long>(nRow) );
long i = 0;
bool bFound = false;
// quite continuous distribution? => interpolating search
@@ -1450,7 +1450,7 @@ void ScColumn::CopyToColumn(
while ( aIter.Next( nStart, nEnd ) && nStart <= nRow2 )
{
if ( nEnd >= nRow1 )
- CopyToColumn( Max(nRow1,nStart), Min(nRow2,nEnd),
+ CopyToColumn( std::max(nRow1,nStart), std::min(nRow2,nEnd),
nFlags, false, rColumn, pMarkData, bAsLink );
}
}
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index abbcd99701e3..60e4b6423f8c 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -952,7 +952,7 @@ void ScColumn::MixData( SCROW nRow1, SCROW nRow2,
while ( nNextThis <= nRow2 || nNextSrc <= nRow2 )
{
- SCROW nRow = Min( nNextThis, nNextSrc );
+ SCROW nRow = std::min( nNextThis, nNextSrc );
ScBaseCell* pSrc = NULL;
ScBaseCell* pDest = NULL;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 5228bc1d45f9..173905ae51ea 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -140,7 +140,7 @@ bool ScDocumentIterator::GetThisCol()
}
else
{
- nRow = Min( (SCROW)nColRow, (SCROW)(nAttrEnd+1) );
+ nRow = std::min( (SCROW)nColRow, (SCROW)(nAttrEnd+1) );
}
}
while (!bFound && nRow <= MAXROW);
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 66a3e82ff429..5a45fda988f7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -961,7 +961,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
{
NumFmtMergeHandler aNumFmtMergeHdl(this, pSrcDoc);
- nDestPos = Min(nDestPos, (SCTAB)(GetTableCount() - 1));
+ nDestPos = std::min(nDestPos, (SCTAB)(GetTableCount() - 1));
{ // scope for bulk broadcast
ScBulkBroadcast aBulkBroadcast( pBASM);
pSrcDoc->maTabs[nSrcPos]->CopyToTable(0, 0, MAXCOL, MAXROW,
diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx
index f19cd8cc5272..37e4be0db04e 100644
--- a/sc/source/core/data/documen4.cxx
+++ b/sc/source/core/data/documen4.cxx
@@ -242,7 +242,7 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
aRef.Set( nCol1, nRow1, nTab1, false, true, true );
aForString.append(aRef.GetRefString(this, nTab1));
nCol1++;
- nCol2 = Min( nCol2, (SCCOL)(rParam.aRefFormulaEnd.Col() -
+ nCol2 = std::min( nCol2, (SCCOL)(rParam.aRefFormulaEnd.Col() -
rParam.aRefFormulaCell.Col() + nCol1 + 1));
}
else if (rParam.nMode == 1) // nur zeilenweise
@@ -255,7 +255,7 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera
aRef.Set( nCol1, nRow1, nTab1, true, false, true );
aForString.append(aRef.GetRefString(this, nTab1));
nRow1++;
- nRow2 = Min( nRow2, (SCROW)(rParam.aRefFormulaEnd.Row() -
+ nRow2 = std::min( nRow2, (SCROW)(rParam.aRefFormulaEnd.Row() -
rParam.aRefFormulaCell.Row() + nRow1 + 1));
}
else // beides
@@ -892,7 +892,7 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
SCCOLROW nTempOther = nOtherRow;
bool bFound = false;
sal_uInt16 nBest = SC_DOCCOMP_MAXDIFF;
- SCCOLROW nMax = Min( nOtherEndRow, static_cast<SCCOLROW>(( nTempOther + nMaxCont + nUnknown )) );
+ SCCOLROW nMax = std::min( nOtherEndRow, static_cast<SCCOLROW>(( nTempOther + nMaxCont + nUnknown )) );
for (SCCOLROW i=nTempOther; i<=nMax && nBest>0; i++) // bei 0 abbrechen
{
if (bColumns)
@@ -942,7 +942,7 @@ void ScDocument::FindOrder( SCCOLROW* pOtherRows, SCCOLROW nThisEndRow, SCCOLROW
{
SCROW nDiff1 = nThisOther - nFillStart;
SCROW nDiff2 = nThisRow - nFillPos;
- SCROW nMinDiff = Min(nDiff1, nDiff2);
+ SCROW nMinDiff = std::min(nDiff1, nDiff2);
for (SCROW i=0; i<nMinDiff; i++)
pOtherRows[nFillPos+i] = nFillStart+i;
}
@@ -1001,7 +1001,7 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
{
SCTAB nDiff1 = nThisOther - nFillStart;
SCTAB nDiff2 = nThisTab - nFillPos;
- SCTAB nMinDiff = Min(nDiff1, nDiff2);
+ SCTAB nMinDiff = std::min(nDiff1, nDiff2);
for (SCTAB i=0; i<nMinDiff; i++)
if ( !IsScenario(nFillPos+i) && !rOtherDoc.IsScenario(nFillStart+i) )
pOtherTabs[nFillPos+i] = nFillStart+i;
@@ -1031,8 +1031,8 @@ void ScDocument::CompareDocument( ScDocument& rOtherDoc )
SCROW nOtherEndRow = 0;
GetCellArea( nThisTab, nThisEndCol, nThisEndRow );
rOtherDoc.GetCellArea( nOtherTab, nOtherEndCol, nOtherEndRow );
- SCCOL nEndCol = Max(nThisEndCol, nOtherEndCol);
- SCROW nEndRow = Max(nThisEndRow, nOtherEndRow);
+ SCCOL nEndCol = std::max(nThisEndCol, nOtherEndCol);
+ SCROW nEndRow = std::max(nThisEndRow, nOtherEndRow);
SCCOL nThisCol;
SCROW nThisRow;
sal_uLong n1,n2; // fuer AppendDeleteRange
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index fe6d921236df..9d86d45b05f7 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1630,8 +1630,8 @@ void ScDocument::FitBlock( const ScRange& rOld, const ScRange& rNew, bool bClear
if ( bInsCol || bInsRow )
{
ScRange aGrowSource = rOld;
- aGrowSource.aEnd.SetCol(Min( rOld.aEnd.Col(), rNew.aEnd.Col() ));
- aGrowSource.aEnd.SetRow(Min( rOld.aEnd.Row(), rNew.aEnd.Row() ));
+ aGrowSource.aEnd.SetCol(std::min( rOld.aEnd.Col(), rNew.aEnd.Col() ));
+ aGrowSource.aEnd.SetRow(std::min( rOld.aEnd.Row(), rNew.aEnd.Row() ));
SCCOL nGrowX = bInsCol ? ( rNew.aEnd.Col() - rOld.aEnd.Col() ) : 0;
SCROW nGrowY = bInsRow ? ( rNew.aEnd.Row() - rOld.aEnd.Row() ) : 0;
UpdateGrow( aGrowSource, nGrowX, nGrowY );
@@ -2522,7 +2522,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
nDx, nDy, &aCBFCP, nClipStartRow );
}
nC1 = nC2 + 1;
- nC2 = Min((SCCOL)(nC1 + nXw), nCol2);
+ nC2 = std::min((SCCOL)(nC1 + nXw), nCol2);
} while (nC1 <= nCol2);
if (nClipStartRow > nClipEndRow)
nClipStartRow = aClipRange.aStart.Row();
@@ -2531,7 +2531,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar
if (nC2 > nCol2)
nC2 = nCol2;
nR1 = nR2 + 1;
- nR2 = Min((SCROW)(nR1 + nYw), nRow2);
+ nR2 = std::min((SCROW)(nR1 + nYw), nRow2);
} while (nR1 <= nRow2);
}
@@ -5059,7 +5059,7 @@ bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow,
if (((ScMergeFlagAttr&)pAttrArray->pData[nIndex].pPattern->
GetItem(ATTR_MERGE_FLAG)).IsHorOverlapped())
{
- SCROW nLoopEndRow = Min( nEndRow, pAttrArray->pData[nIndex].nRow );
+ SCROW nLoopEndRow = std::min( nEndRow, pAttrArray->pData[nIndex].nRow );
for (SCROW nAttrRow = nAttrPos; nAttrRow <= nLoopEndRow; nAttrRow++)
{
SCCOL nTempCol = nOldCol;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 6f83b9e1fa29..c38ee38dba5a 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1241,7 +1241,7 @@ void ScDPDimensions::CountChanged()
if ( ppDims )
{
long i;
- long nCopy = Min( nNewCount, nDimCount );
+ long nCopy = std::min( nNewCount, nDimCount );
ScDPDimension** ppNew = new ScDPDimension*[nNewCount];
for (i=0; i<nCopy; i++) // copy existing dims
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 97dea58f6725..fccbbdabaa19 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -1442,12 +1442,12 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
sal_Bool bResize = false;
// sizes can differ by 1 from twips->1/100mm conversion for equal cell sizes,
// don't resize to empty size when pasting into hidden columns or rows
- if ( Abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 )
+ if ( std::abs(nWidthDiff) > 1 && nDestWidth > 1 && nSourceWidth > 1 )
{
aHorFract = Fraction( nDestWidth, nSourceWidth );
bResize = sal_True;
}
- if ( Abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 )
+ if ( std::abs(nHeightDiff) > 1 && nDestHeight > 1 && nSourceHeight > 1 )
{
aVerFract = Fraction( nDestHeight, nSourceHeight );
bResize = sal_True;
diff --git a/sc/source/core/data/funcdesc.cxx b/sc/source/core/data/funcdesc.cxx
index 44f9e65bb06e..b6691c650da0 100644
--- a/sc/source/core/data/funcdesc.cxx
+++ b/sc/source/core/data/funcdesc.cxx
@@ -792,7 +792,7 @@ const formula::IFunctionDescription* ScFunctionMgr::getFunctionByName(const OUSt
void ScFunctionMgr::fillLastRecentlyUsedFunctions(::std::vector< const formula::IFunctionDescription*>& _rLastRUFunctions) const
{
const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
- sal_uInt16 nLRUFuncCount = Min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX );
+ sal_uInt16 nLRUFuncCount = std::min( rAppOpt.GetLRUFuncListCount(), (sal_uInt16)LRU_MAX );
sal_uInt16* pLRUListIds = rAppOpt.GetLRUFuncList();
if ( pLRUListIds )
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index 307aba11973a..4357cd89525c 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -216,7 +216,7 @@ bool ScOutlineArray::Insert(
sal_uInt16 nFindMax;
FindEntry( nStartCol, nStartLevel, nStartIndex ); // nLevel = neuer Level (alter+1) !!!
FindEntry( nEndCol, nEndLevel, nEndIndex );
- nFindMax = Max(nStartLevel,nEndLevel);
+ nFindMax = std::max(nStartLevel,nEndLevel);
do
{
bCont = false;
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index 06a3e3969ac2..9c52585df5d2 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -993,7 +993,7 @@ SCSIZE ScTable::GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
{
nCount = static_cast<SCSIZE>(nEndRow - nStartRow);
for (nCol = nStartCol; nCol <= nEndCol; nCol++)
- nCount = Min(nCount, aCol[nCol].GetEmptyLinesInBlock(nStartRow, nEndRow, eDir));
+ nCount = std::min(nCount, aCol[nCol].GetEmptyLinesInBlock(nStartRow, nEndRow, eDir));
}
else if (eDir == DIR_RIGHT)
{
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index fd0db12f4d72..5b024fd53ea8 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -945,10 +945,10 @@ void ScTable::TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
const ScMergeAttr& rOldMerge = (const ScMergeAttr&)rSet.Get(ATTR_MERGE);
if (rOldMerge.IsMerged())
- rNewSet.Put( ScMergeAttr( Min(
+ rNewSet.Put( ScMergeAttr( std::min(
static_cast<SCsCOL>(rOldMerge.GetRowMerge()),
static_cast<SCsCOL>(MAXCOL+1 - (nAttrRow2-nRow1))),
- Min(
+ std::min(
static_cast<SCsROW>(rOldMerge.GetColMerge()),
static_cast<SCsROW>(MAXROW+1 - (nCol-nCol1)))));
const ScMergeFlagAttr& rOldFlag = (const ScMergeFlagAttr&)rSet.Get(ATTR_MERGE_FLAG);
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 0a1e4b087e4f..ec4e67bb4912 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -749,8 +749,8 @@ void ScTable::Sort(const ScSortParam& rSortParam, bool bKeepQuery, ScProgress* p
{
SCROW nLastRow = 0;
for (SCCOL nCol = aSortParam.nCol1; nCol <= aSortParam.nCol2; nCol++)
- nLastRow = Max(nLastRow, aCol[nCol].GetLastDataPos());
- nLastRow = Min(nLastRow, aSortParam.nRow2);
+ nLastRow = std::max(nLastRow, aCol[nCol].GetLastDataPos());
+ nLastRow = std::min(nLastRow, aSortParam.nRow2);
SCROW nRow1 = (rSortParam.bHasHeader ?
aSortParam.nRow1 + 1 : aSortParam.nRow1);
if (!IsSorted(nRow1, nLastRow))
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index e4d89f04e90e..8b8b67ba5020 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -132,7 +132,7 @@ static OUString lcl_ValueString( sal_Int32 nValue, sal_uInt16 nMinDigits )
return OUString::number( nValue ); // simple case...
else
{
- OUString aStr = OUString::number( Abs( nValue ) );
+ OUString aStr = OUString::number( std::abs( nValue ) );
if ( aStr.getLength() < nMinDigits )
{
OUStringBuffer aZero;
@@ -604,8 +604,8 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (pNewPattern || pSrcPattern != pDocument->GetDefPattern())
{
// Default is already present (DeleteArea)
- SCROW nY1 = static_cast<SCROW>(Min( nIStart, nIEnd ));
- SCROW nY2 = static_cast<SCROW>(Max( nIStart, nIEnd ));
+ SCROW nY1 = static_cast<SCROW>(std::min( nIStart, nIEnd ));
+ SCROW nY2 = static_cast<SCROW>(std::max( nIStart, nIEnd ));
if ( pStyleSheet )
aCol[nCol].ApplyStyleArea( nY1, nY2, *pStyleSheet );
if ( pNewPattern )
@@ -1253,7 +1253,7 @@ void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillD
aDate.SetMonth((sal_uInt16) nMonth);
aDate.SetYear((sal_uInt16) nYear);
if ( nDayOfMonth > 28 )
- aDate.SetDay( Min( aDate.GetDaysInMonth(), nDayOfMonth ) );
+ aDate.SetDay( std::min( aDate.GetDaysInMonth(), nDayOfMonth ) );
}
}
break;
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index e9c916a64914..729f91254663 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -287,8 +287,8 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
if (!bAll && rSearchItem.GetBackward())
{
SCROW nLastNonFilteredRow = MAXROW + 1;
- nCol = Min(nCol, (SCCOL)(nLastCol + 1));
- nRow = Min(nRow, (SCROW)(nLastRow + 1));
+ nCol = std::min(nCol, (SCCOL)(nLastCol + 1));
+ nRow = std::min(nRow, (SCROW)(nLastRow + 1));
if (rSearchItem.GetRowDirection())
{
nCol--;
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index cdc13803a4cf..e21aa1917b59 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -1331,9 +1331,9 @@ sal_uInt16 ScAddress::Parse( const String& r, ScDocument* pDoc,
bool ScRange::Intersects( const ScRange& r ) const
{
return !(
- Min( aEnd.Col(), r.aEnd.Col() ) < Max( aStart.Col(), r.aStart.Col() )
- || Min( aEnd.Row(), r.aEnd.Row() ) < Max( aStart.Row(), r.aStart.Row() )
- || Min( aEnd.Tab(), r.aEnd.Tab() ) < Max( aStart.Tab(), r.aStart.Tab() )
+ std::min( aEnd.Col(), r.aEnd.Col() ) < std::max( aStart.Col(), r.aStart.Col() )
+ || std::min( aEnd.Row(), r.aEnd.Row() ) < std::max( aStart.Row(), r.aStart.Row() )
+ || std::min( aEnd.Tab(), r.aEnd.Tab() ) < std::max( aStart.Tab(), r.aStart.Tab() )
);
}
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 1e099602e1a7..afd50e1c8f57 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3110,7 +3110,7 @@ bool ScCompiler::IsColRowName( const String& rName )
{ // right or below
bTwo = true;
aTwo.Set( nCol, nRow, aAddress.Tab() );
- nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
+ nMax = std::max( nMyCol + std::abs( nC ), nMyRow + std::abs( nR ) );
nDistance = nD;
}
else if ( !(nRow < aOne.Row() && nMyRow >= (long)aOne.Row()) )
@@ -3120,7 +3120,7 @@ bool ScCompiler::IsColRowName( const String& rName )
// runs column-wise)
bTwo = false;
aOne.Set( nCol, nRow, aAddress.Tab() );
- nMax = Max( nMyCol + nC, nMyRow + nR );
+ nMax = std::max( nMyCol + nC, nMyRow + nR );
nDistance = nD;
}
}
@@ -3129,7 +3129,8 @@ bool ScCompiler::IsColRowName( const String& rName )
{
aOne.Set( nCol, nRow, aAddress.Tab() );
nDistance = nC * nC + nR * nR;
- nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
+ nMax = std::max( nMyCol + std::abs( nC ), nMyRow + std::abs( nR ) );
+
}
bFound = true;
}
@@ -3173,7 +3174,7 @@ bool ScCompiler::IsColRowName( const String& rName )
{ // right or below
bTwo = true;
aTwo.Set( nCol, nRow, aIter.GetPos().Tab() );
- nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
+ nMax = std::max( nMyCol + std::abs( nC ), nMyRow + std::abs( nR ) );
nDistance = nD;
}
else if ( !(nRow < aOne.Row() && nMyRow >= (long)aOne.Row()) )
@@ -3183,7 +3184,7 @@ bool ScCompiler::IsColRowName( const String& rName )
// runs column-wise)
bTwo = false;
aOne.Set( nCol, nRow, aIter.GetPos().Tab() );
- nMax = Max( nMyCol + nC, nMyRow + nR );
+ nMax = std::max( nMyCol + nC, nMyRow + nR );
nDistance = nD;
}
}
@@ -3192,7 +3193,7 @@ bool ScCompiler::IsColRowName( const String& rName )
{
aOne.Set( nCol, nRow, aIter.GetPos().Tab() );
nDistance = nC * nC + nR * nR;
- nMax = Max( nMyCol + Abs( nC ), nMyRow + Abs( nR ) );
+ nMax = std::max( nMyCol + std::abs( nC ), nMyRow + std::abs( nR ) );
}
bFound = true;
}
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 1d7309aec4f9..286261e28978 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -311,7 +311,7 @@ void ScConsData::AddName( const String& rName )
SCSIZE nMax = 0;
for (nArrX=0; nArrX<nColCount; nArrX++)
if (ppUsed[nArrX][nArrY])
- nMax = Max( nMax, ppRefs[nArrX][nArrY].GetCount() );
+ nMax = std::max( nMax, ppRefs[nArrX][nArrY].GetCount() );
for (nArrX=0; nArrX<nColCount; nArrX++)
{
@@ -642,7 +642,7 @@ SCROW ScConsData::GetInsertCount() const
SCSIZE nNeeded = 0;
for (nArrX=0; nArrX<nColCount; nArrX++)
if (ppUsed[nArrX][nArrY])
- nNeeded = Max( nNeeded, ppRefs[nArrX][nArrY].GetCount() );
+ nNeeded = std::max( nNeeded, ppRefs[nArrX][nArrY].GetCount() );
nInsert += nNeeded;
}
@@ -721,7 +721,7 @@ void ScConsData::OutputToDocument( ScDocument* pDestDoc, SCCOL nCol, SCROW nRow,
SCSIZE nNeeded = 0;
for (nArrX=0; nArrX<nColCount; nArrX++)
if (ppUsed[nArrX][nArrY])
- nNeeded = Max( nNeeded, ppRefs[nArrX][nArrY].GetCount() );
+ nNeeded = std::max( nNeeded, ppRefs[nArrX][nArrY].GetCount() );
if (nNeeded)
{
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 54277e05a59d..0c16240afa24 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1155,8 +1155,8 @@ ScMatrixRef ScInterpreter::CompareMat( ScCompareOptions* pOptions )
SCSIZE nR0, nR1;
pMat[0]->GetDimensions( nC0, nR0 );
pMat[1]->GetDimensions( nC1, nR1 );
- SCSIZE nC = Max( nC0, nC1 );
- SCSIZE nR = Max( nR0, nR1 );
+ SCSIZE nC = std::max( nC0, nC1 );
+ SCSIZE nR = std::max( nR0, nR1 );
pResMat = GetNewMat( nC, nR);
if ( !pResMat )
return NULL;
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 7a2df402ee8a..4e0cde4fc896 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2382,7 +2382,7 @@ void ScInterpreter::ScBase()
{
const xub_StrLen nConstBuf = 128;
sal_Unicode aBuf[nConstBuf];
- xub_StrLen nBuf = Max( (xub_StrLen) fChars, (xub_StrLen) (nMinLen+1) );
+ xub_StrLen nBuf = std::max( (xub_StrLen) fChars, (xub_StrLen) (nMinLen+1) );
sal_Unicode* pBuf = (nBuf <= nConstBuf ? aBuf : new sal_Unicode[nBuf]);
for ( xub_StrLen j = 0; j < nBuf; ++j )
{