summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-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
-rw-r--r--sc/source/filter/excel/excdoc.cxx2
-rw-r--r--sc/source/filter/excel/excform8.cxx2
-rw-r--r--sc/source/filter/excel/excrecds.cxx2
-rw-r--r--sc/source/filter/excel/xetable.cxx2
-rw-r--r--sc/source/filter/excel/xlpage.cxx4
-rw-r--r--sc/source/filter/html/htmlexp.cxx4
-rw-r--r--sc/source/filter/html/htmlpars.cxx2
-rw-r--r--sc/source/filter/starcalc/scflt.cxx10
-rw-r--r--sc/source/filter/xml/XMLCellRangeSourceContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLConsolidationContext.cxx2
-rw-r--r--sc/source/filter/xml/XMLTableSourceContext.cxx2
-rw-r--r--sc/source/filter/xml/xmldrani.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx6
-rw-r--r--sc/source/ui/app/scmod.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx2
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx6
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx36
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx18
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx12
-rw-r--r--sc/source/ui/docshell/arealink.cxx8
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx6
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/docsh5.cxx4
-rw-r--r--sc/source/ui/docshell/docsh6.cxx6
-rw-r--r--sc/source/ui/drawfunc/fuconstr.cxx4
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx8
-rw-r--r--sc/source/ui/drawfunc/futext.cxx4
-rw-r--r--sc/source/ui/inc/csvtablebox.hxx4
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx4
-rw-r--r--sc/source/ui/navipi/navipi.cxx8
-rw-r--r--sc/source/ui/undo/undoblk.cxx4
-rw-r--r--sc/source/ui/undo/undoblk3.cxx6
-rw-r--r--sc/source/ui/unoobj/appluno.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx12
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx12
-rw-r--r--sc/source/ui/view/cellsh3.cxx4
-rw-r--r--sc/source/ui/view/gridwin4.cxx4
-rw-r--r--sc/source/ui/view/hdrcont.cxx6
-rw-r--r--sc/source/ui/view/hintwin.cxx2
-rw-r--r--sc/source/ui/view/olinewin.cxx2
-rw-r--r--sc/source/ui/view/output.cxx10
-rw-r--r--sc/source/ui/view/output2.cxx4
-rw-r--r--sc/source/ui/view/prevwsh.cxx4
-rw-r--r--sc/source/ui/view/printfun.cxx22
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx4
-rw-r--r--sc/source/ui/view/tabview4.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx2
-rw-r--r--sc/source/ui/view/viewutil.cxx24
71 files changed, 224 insertions, 223 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 )
{
diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx
index a6571ab729a5..b95b66035a8f 100644
--- a/sc/source/filter/excel/excdoc.cxx
+++ b/sc/source/filter/excel/excdoc.cxx
@@ -220,7 +220,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList )
{
Add( new XclExpBoolRecord( EXC_ID_DSF, false ) );
Add( new XclExpEmptyRecord( EXC_ID_XL9FILE ) );
- rR.pTabId = new XclExpChTrTabId( Max( nExcTabCount, nCodenames ) );
+ rR.pTabId = new XclExpChTrTabId( std::max( nExcTabCount, nCodenames ) );
Add( rR.pTabId );
if( HasVbaStorage() )
{
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index e288d8326b43..34bda87e8c60 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -1446,7 +1446,7 @@ void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData
rSRD.nRelRow = static_cast<SCsROW>(static_cast<sal_Int16>(nRow));
else
// abs Row
- rSRD.nRow = Min( static_cast<SCROW>(nRow), MAXROW);
+ rSRD.nRow = std::min( static_cast<SCROW>(nRow), MAXROW);
// T A B
// abs needed if rel in shared formula for ScCompiler UpdateNameReference
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 91a5bc10cdc4..fc8be48a3e57 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -408,7 +408,7 @@ void ExcBundlesheet::SaveCont( XclExpStream& rStrm )
sal_Size ExcBundlesheet::GetLen() const
{
- return 7 + Min( aName.getLength(), (sal_Int32) 255 );
+ return 7 + std::min( aName.getLength(), (sal_Int32) 255 );
}
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 0c85a4d9ddcd..4851f2069810 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -1467,7 +1467,7 @@ bool XclExpDefcolwidth::IsDefWidth( sal_uInt16 nXclColWidth ) const
{
double fNewColWidth = lclGetCorrectedColWidth( GetRoot(), nXclColWidth );
// exactly matched, if difference is less than 1/16 of a character to the left or to the right
- return Abs( static_cast< long >( GetValue() * 256.0 - fNewColWidth + 0.5 ) ) < 16;
+ return std::abs( static_cast< long >( GetValue() * 256.0 - fNewColWidth + 0.5 ) ) < 16;
}
void XclExpDefcolwidth::SetDefWidth( sal_uInt16 nXclColWidth )
diff --git a/sc/source/filter/excel/xlpage.cxx b/sc/source/filter/excel/xlpage.cxx
index 14a590d93592..70cac7caf478 100644
--- a/sc/source/filter/excel/xlpage.cxx
+++ b/sc/source/filter/excel/xlpage.cxx
@@ -242,8 +242,8 @@ void XclPageData::SetScPaperSize( const Size& rSize, bool bPortrait, bool bStric
for( const XclPaperSize* pEntry = pPaperSizeTable; pEntry != STATIC_ARRAY_END( pPaperSizeTable ); ++pEntry )
{
- long nWDiff = Abs( pEntry->mnWidth - nWidth );
- long nHDiff = Abs( pEntry->mnHeight - nHeight );
+ long nWDiff = std::abs( pEntry->mnWidth - nWidth );
+ long nHDiff = std::abs( pEntry->mnHeight - nHeight );
if( ((nWDiff <= nMaxWDiff) && (nHDiff < nMaxHDiff)) ||
((nWDiff < nMaxWDiff) && (nHDiff <= nMaxHDiff)) )
{
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index d7dd473e23ea..1517c8109084 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -920,7 +920,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
SCROW nR;
sal_uLong v;
if ( pGraphEntry )
- nC = Max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1),
+ nC = std::max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1),
SCCOL(rMergeAttr.GetColMerge()) );
else
nC = rMergeAttr.GetColMerge();
@@ -934,7 +934,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
}
if ( pGraphEntry )
- nR = Max( SCROW(pGraphEntry->aRange.aEnd.Row() - nRow + 1),
+ nR = std::max( SCROW(pGraphEntry->aRange.aEnd.Row() - nRow + 1),
SCROW(rMergeAttr.GetRowMerge()) );
else
nR = rMergeAttr.GetRowMerge();
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 94bd17dc1e4f..0a6a89cca1f2 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -736,7 +736,7 @@ void ScHTMLLayoutParser::SetWidths()
sal_uInt16 nTotal = 0;
bool bFound = false;
SCCOL nHere = 0;
- SCCOL nStop = Min( static_cast<SCCOL>(nCol + pE->nColOverlap), nColsPerRow );
+ SCCOL nStop = std::min( static_cast<SCCOL>(nCol + pE->nColOverlap), nColsPerRow );
for ( ; nCol < nStop; nCol++ )
{
if ( pWidths[nCol] )
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index b7c514b9e023..64287b9c7530 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -743,7 +743,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc )
SC10TOSTRING( pHeadFootLine->LogFont.lfFaceName ), EMPTY_STRING,
PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, EE_CHAR_FONTINFO ),
EE_CHAR_FONTINFO );
- aEditAttribs.Put( SvxFontHeightItem( Abs( pHeadFootLine->LogFont.lfHeight ), 100, EE_CHAR_FONTHEIGHT ),
+ aEditAttribs.Put( SvxFontHeightItem( std::abs( pHeadFootLine->LogFont.lfHeight ), 100, EE_CHAR_FONTHEIGHT ),
EE_CHAR_FONTHEIGHT);
Sc10Color nColor = pHeadFootLine->TextColor;
@@ -1184,7 +1184,7 @@ void Sc10Import::LoadPatternCollection()
}
rItemSet.Put( SvxFontItem( eFam, SC10TOSTRING( pPattern->LogFont.lfFaceName ), EMPTY_STRING,
PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) );
- rItemSet.Put( SvxFontHeightItem( Abs( pPattern->LogFont.lfHeight ), 100, ATTR_FONT_HEIGHT ) );
+ rItemSet.Put( SvxFontHeightItem( std::abs( pPattern->LogFont.lfHeight ), 100, ATTR_FONT_HEIGHT ) );
Color TextColor( COL_BLACK );
lcl_ChangeColor( ( pPattern->nColor & 0x000F ), TextColor );
rItemSet.Put( SvxColorItem( TextColor, ATTR_FONT_COLOR ) );
@@ -1239,7 +1239,7 @@ void Sc10Import::LoadPatternCollection()
else if( ( OJustify & ojTopBottom ) == ojTopBottom )
rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) );
- sal_Int16 Margin = Max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) );
+ sal_Int16 Margin = std::max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) );
if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) )
rItemSet.Put( SvxMarginItem( 20, Margin, 20, Margin, ATTR_MARGIN ) );
else
@@ -1760,7 +1760,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
ScPatternAttr aScPattern(pDoc->GetPool());
aScPattern.GetItemSet().Put(SvxFontItem(eFam, SC10TOSTRING( pFont->FaceName ), EMPTY_STRING,
PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ));
- aScPattern.GetItemSet().Put(SvxFontHeightItem(Abs(pFont->Height), 100, ATTR_FONT_HEIGHT ));
+ aScPattern.GetItemSet().Put(SvxFontHeightItem(std::abs(pFont->Height), 100, ATTR_FONT_HEIGHT ));
pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern);
}
}
@@ -1861,7 +1861,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab)
else if (OJustify & ojTopBottom)
aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,27000));
- sal_Int16 Margin = Max((sal_uInt16)20, (sal_uInt16)(EJustify * 20));
+ sal_Int16 Margin = std::max((sal_uInt16)20, (sal_uInt16)(EJustify * 20));
if (OJustify & ojBottomTop)
aScPattern.GetItemSet().Put(SvxMarginItem(20, Margin, 20, Margin, ATTR_MARGIN));
else
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
index b13efc2d5309..9696efc91968 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx
@@ -99,7 +99,7 @@ ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext(
{
double fTime;
if (::sax::Converter::convertDuration( fTime, sValue ))
- pCellRangeSource->nRefresh = Max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 );
+ pCellRangeSource->nRefresh = std::max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 );
}
break;
}
diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx
index 3cf06b1f063c..245e2cbdc2eb 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.cxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.cxx
@@ -105,7 +105,7 @@ void ScXMLConsolidationContext::EndElement()
aConsParam.nTab = aTargetAddr.Tab();
aConsParam.eFunction = eFunction;
- sal_uInt16 nCount = (sal_uInt16) Min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF );
+ sal_uInt16 nCount = (sal_uInt16) std::min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF );
ScArea** ppAreas = nCount ? new ScArea*[ nCount ] : NULL;
if( ppAreas )
{
diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx
index ea854786b64c..9116ff86973b 100644
--- a/sc/source/filter/xml/XMLTableSourceContext.cxx
+++ b/sc/source/filter/xml/XMLTableSourceContext.cxx
@@ -76,7 +76,7 @@ ScXMLTableSourceContext::ScXMLTableSourceContext( ScXMLImport& rImport,
{
double fTime;
if (::sax::Converter::convertDuration( fTime, sValue ))
- nRefresh = Max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 );
+ nRefresh = std::max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 );
}
}
}
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index cd34058438eb..85f451bb7fc6 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -203,7 +203,7 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport,
{
double fTime;
if (::sax::Converter::convertDuration( fTime, sValue ))
- nRefresh = Max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 );
+ nRefresh = std::max( (sal_Int32)(fTime * 86400.0), (sal_Int32)0 );
}
break;
}
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index aa069dbf7659..311fab420650 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -568,7 +568,7 @@ void ScInputWindow::Resize()
long nLeft = aTextWindow.GetPosPixel().X();
Size aSize = aTextWindow.GetSizePixel();
- aSize.Width() = Max( ((long)(nWidth - nLeft - 5)), (long)0 );
+ aSize.Width() = std::max( ((long)(nWidth - nLeft - 5)), (long)0 );
aTextWindow.SetSizePixel( aSize );
aTextWindow.Invalidate();
@@ -951,7 +951,7 @@ void ScInputBarGroup::Resize()
long nLeft = GetPosPixel().X();
Size aSize = GetSizePixel();
- aSize.Width() = Max( ((long)(nWidth - nLeft - LEFT_OFFSET)), (long)0 );
+ aSize.Width() = std::max( ((long)(nWidth - nLeft - LEFT_OFFSET)), (long)0 );
aScrollBar.SetPosPixel(Point( aSize.Width() - aButton.GetSizePixel().Width(), aButton.GetSizePixel().Height() ) );
@@ -1889,7 +1889,7 @@ void ScTextWnd::SetTextString( const String& rNewString )
long nSize1 = GetTextWidth(aString);
long nSize2 = GetTextWidth(rNewString);
if ( nSize1>0 && nSize2>0 )
- nTextSize = Max( nSize1, nSize2 );
+ nTextSize = std::max( nSize1, nSize2 );
else
nTextSize = GetOutputSize().Width(); // Ueberlauf
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 63ab473ea7a9..ac3daadc55fa 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -765,7 +765,7 @@ void ScModule::InsertEntryToLRUList(sal_uInt16 nFIndex)
if(nFIndex != 0)
{
const ScAppOptions& rAppOpt = 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();
sal_uInt16 aIdxList[LRU_MAX];
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 9dbab51bbff3..62552c29fa4b 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -168,7 +168,7 @@ sal_uInt16 ScZoomSliderWnd::Offset2Zoom( long nOffset ) const
++aSnappingPointIter )
{
const long nCurrent = *aSnappingPointIter;
- if ( Abs(nCurrent - nOffset) < nSnappingEpsilon )
+ if ( std::abs(nCurrent - nOffset) < nSnappingEpsilon )
{
nOffset = nCurrent;
nRet = mpImpl->maSnappingPointZooms[ nCount ];
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 343788198772..9b05b8b7b329 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -182,7 +182,7 @@ sal_Int32 ScCsvControl::GetVisPosCount() const
sal_Int32 ScCsvControl::GetMaxPosOffset() const
{
- return Max( GetPosCount() - GetVisPosCount() + 2L, 0L );
+ return std::max( GetPosCount() - GetVisPosCount() + 2L, 0L );
}
bool ScCsvControl::IsValidSplitPos( sal_Int32 nPos ) const
@@ -227,12 +227,12 @@ sal_Int32 ScCsvControl::GetVisLineCount() const
sal_Int32 ScCsvControl::GetLastVisLine() const
{
- return Min( GetFirstVisLine() + GetVisLineCount(), GetLineCount() ) - 1;
+ return std::min( GetFirstVisLine() + GetVisLineCount(), GetLineCount() ) - 1;
}
sal_Int32 ScCsvControl::GetMaxLineOffset() const
{
- return Max( GetLineCount() - GetVisLineCount() + 1L, 0L );
+ return std::max( GetLineCount() - GetVisLineCount() + 1L, 0L );
}
bool ScCsvControl::IsValidLine( sal_Int32 nLine ) const
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 4b0dd47a9035..e1595b12c821 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -122,7 +122,7 @@ void ScCsvGrid::UpdateOffsetX()
sal_Int32 nLastLine = GetLastVisLine() + 1;
sal_Int32 nDigits = 2;
while( nLastLine /= 10 ) ++nDigits;
- nDigits = Max( nDigits, sal_Int32( 3 ) );
+ nDigits = std::max( nDigits, sal_Int32( 3 ) );
Execute( CSVCMD_SETHDRWIDTH, GetTextWidth( OUString( '0' ) ) * nDigits );
}
@@ -398,7 +398,7 @@ sal_uInt32 ScCsvGrid::GetFirstVisColumn() const
sal_uInt32 ScCsvGrid::GetLastVisColumn() const
{
- return GetColumnFromPos( Min( GetLastVisPos(), GetPosCount() ) - 1 );
+ return GetColumnFromPos( std::min( GetLastVisPos(), GetPosCount() ) - 1 );
}
bool ScCsvGrid::IsValidColumn( sal_uInt32 nColIndex ) const
@@ -533,7 +533,7 @@ void ScCsvGrid::FillColumnDataSep( ScAsciiOptions& rOptions ) const
void ScCsvGrid::FillColumnDataFix( ScAsciiOptions& rOptions ) const
{
- sal_uInt32 nCount = Min( GetColumnCount(), static_cast<sal_uInt32>(MAXCOLCOUNT) );
+ sal_uInt32 nCount = std::min( GetColumnCount(), static_cast<sal_uInt32>(MAXCOLCOUNT) );
ScCsvExpDataVec aDataVec( nCount + 1 );
for( sal_uInt32 nColIx = 0; nColIx < nCount; ++nColIx )
@@ -653,8 +653,8 @@ void ScCsvGrid::MoveCursor( sal_uInt32 nColIndex )
{
sal_Int32 nPosBeg = GetColumnPos( nColIndex );
sal_Int32 nPosEnd = GetColumnPos( nColIndex + 1 );
- sal_Int32 nMinPos = Max( nPosBeg - CSV_SCROLL_DIST, sal_Int32( 0 ) );
- sal_Int32 nMaxPos = Min( nPosEnd - GetVisPosCount() + CSV_SCROLL_DIST + sal_Int32( 1 ), nMinPos );
+ sal_Int32 nMinPos = std::max( nPosBeg - CSV_SCROLL_DIST, sal_Int32( 0 ) );
+ sal_Int32 nMaxPos = std::min( nPosEnd - GetVisPosCount() + CSV_SCROLL_DIST + sal_Int32( 1 ), nMinPos );
if( nPosBeg - CSV_SCROLL_DIST + 1 <= GetFirstVisPos() )
Execute( CSVCMD_SETPOSOFFSET, nMinPos );
else if( nPosEnd + CSV_SCROLL_DIST >= GetLastVisPos() )
@@ -744,7 +744,7 @@ void ScCsvGrid::ImplSetTextLineSep(
/* TODO: signal overflow somewhere in UI */
// update column width
- sal_Int32 nWidth = Max( CSV_MINCOLWIDTH, aCellText.Len() + sal_Int32( 1 ) );
+ sal_Int32 nWidth = std::max( CSV_MINCOLWIDTH, aCellText.Len() + sal_Int32( 1 ) );
if( IsValidColumn( nColIx ) )
{
// expand existing column
@@ -876,7 +876,7 @@ void ScCsvGrid::Tracking( const TrackingEvent& rTEvt )
sal_Int32 nPos = (rMEvt.GetPosPixel().X() - GetFirstX()) / GetCharWidth() + GetFirstVisPos();
// on mouse tracking: keep position valid
- nPos = Max( Min( nPos, GetPosCount() - sal_Int32( 1 ) ), sal_Int32( 0 ) );
+ nPos = std::max( std::min( nPos, GetPosCount() - sal_Int32( 1 ) ), sal_Int32( 0 ) );
Execute( CSVCMD_MAKEPOSVISIBLE, nPos );
sal_uInt32 nColIx = GetColumnFromPos( nPos );
@@ -965,8 +965,8 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt )
sal_uInt32 nColIx = GetFocusColumn();
if( !IsSelected( nColIx ) )
Select( nColIx );
- sal_Int32 nX1 = Max( GetColumnX( nColIx ), GetFirstX() );
- sal_Int32 nX2 = Min( GetColumnX( nColIx + 1 ), GetWidth() );
+ sal_Int32 nX1 = std::max( GetColumnX( nColIx ), GetFirstX() );
+ sal_Int32 nX2 = std::min( GetColumnX( nColIx + 1 ), GetWidth() );
ExecutePopup( Point( (nX1 + nX2) / 2, GetHeight() / 2 ) );
}
}
@@ -1037,8 +1037,8 @@ EditEngine* ScCsvGrid::GetEditEngine()
void ScCsvGrid::ImplSetColumnClipRegion( OutputDevice& rOutDev, sal_uInt32 nColIndex )
{
rOutDev.SetClipRegion( Region( Rectangle(
- Max( GetColumnX( nColIndex ), GetFirstX() ) + 1, 0,
- Min( GetColumnX( nColIndex + 1 ), GetLastX() ), GetHeight() - 1 ) ) );
+ std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1, 0,
+ std::min( GetColumnX( nColIndex + 1 ), GetLastX() ), GetHeight() - 1 ) ) );
}
void ScCsvGrid::ImplDrawColumnHeader( OutputDevice& rOutDev, sal_uInt32 nColIndex, Color aFillColor )
@@ -1119,7 +1119,7 @@ void ScCsvGrid::ImplDrawFirstLineSep( bool bSet )
if( IsVisibleLine( mnFirstImpLine ) && (mnFirstImpLine != GetFirstVisLine() ) )
{
sal_Int32 nY = GetY( mnFirstImpLine );
- sal_Int32 nX = Min( GetColumnX( GetLastVisColumn() + 1 ), GetLastX() );
+ sal_Int32 nX = std::min( GetColumnX( GetLastVisColumn() + 1 ), GetLastX() );
maBackgrDev.SetLineColor( bSet ? maGridPBColor : maGridColor );
maBackgrDev.DrawLine( Point( GetFirstX() + 1, nY ), Point( nX, nY ) );
}
@@ -1278,7 +1278,7 @@ void ScCsvGrid::ImplDrawHorzScrolled( sal_Int32 nOldPos )
sal_Int32 nPos = GetFirstVisPos();
if( !IsValidGfx() || (nPos == nOldPos) )
return;
- if( Abs( nPos - nOldPos ) > GetVisPosCount() / 2 )
+ if( std::abs( nPos - nOldPos ) > GetVisPosCount() / 2 )
{
ImplDrawBackgrDev();
ImplDrawGridDev();
@@ -1298,8 +1298,8 @@ void ScCsvGrid::ImplDrawHorzScrolled( sal_Int32 nOldPos )
{
aSrc = Point( GetFirstX() + GetCharWidth() * (nPos - nOldPos) + 1, 0 );
aDest = Point( GetFirstX() + 1, 0 );
- nFirstColIx = GetColumnFromPos( Min( nOldPos + GetVisPosCount(), GetPosCount() ) - 1 );
- nLastColIx = GetColumnFromPos( Min( nPos + GetVisPosCount(), GetPosCount() ) - 1 );
+ nFirstColIx = GetColumnFromPos( std::min( nOldPos + GetVisPosCount(), GetPosCount() ) - 1 );
+ nLastColIx = GetColumnFromPos( std::min( nPos + GetVisPosCount(), GetPosCount() ) - 1 );
}
ImplInvertCursor( GetRulerCursorPos() + (nPos - nOldPos) );
@@ -1346,9 +1346,9 @@ void ScCsvGrid::ImplDrawTrackingRect( sal_uInt32 nColIndex )
{
if( HasFocus() && IsVisibleColumn( nColIndex ) )
{
- sal_Int32 nX1 = Max( GetColumnX( nColIndex ), GetFirstX() ) + 1;
- sal_Int32 nX2 = Min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() );
- sal_Int32 nY2 = Min( GetY( GetLastVisLine() + 1 ), GetHeight() ) - 1;
+ sal_Int32 nX1 = std::max( GetColumnX( nColIndex ), GetFirstX() ) + 1;
+ sal_Int32 nX2 = std::min( GetColumnX( nColIndex + 1 ) - sal_Int32( 1 ), GetLastX() );
+ sal_Int32 nY2 = std::min( GetY( GetLastVisLine() + 1 ), GetHeight() ) - 1;
InvertTracking( Rectangle( nX1, 0, nX2, nY2 ), SHOWTRACK_SMALL | SHOWTRACK_WINDOW );
}
}
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index d790c6c54c2d..974225d4bf91 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -161,7 +161,7 @@ void ScCsvRuler::InitSizeData()
mnSplitSize = (GetCharWidth() * 3 / 5) | 1; // make an odd number
- sal_Int32 nActiveWidth = Min( GetWidth() - GetHdrWidth(), GetPosCount() * GetCharWidth() );
+ sal_Int32 nActiveWidth = std::min( GetWidth() - GetHdrWidth(), GetPosCount() * GetCharWidth() );
sal_Int32 nActiveHeight = GetTextHeight();
maActiveRect.SetPos( Point( GetFirstX(), (GetHeight() - nActiveHeight - 1) / 2 ) );
@@ -261,12 +261,12 @@ sal_Int32 ScCsvRuler::GetNoScrollPos( sal_Int32 nPos ) const
if( nNewPos < GetFirstVisPos() + CSV_SCROLL_DIST )
{
sal_Int32 nScroll = (GetFirstVisPos() > 0) ? CSV_SCROLL_DIST : 0;
- nNewPos = Max( nPos, GetFirstVisPos() + nScroll );
+ nNewPos = std::max( nPos, GetFirstVisPos() + nScroll );
}
else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1L )
{
sal_Int32 nScroll = (GetFirstVisPos() < GetMaxPosOffset()) ? CSV_SCROLL_DIST : 0;
- nNewPos = Min( nNewPos, GetLastVisPos() - nScroll - sal_Int32( 1 ) );
+ nNewPos = std::min( nNewPos, GetLastVisPos() - nScroll - sal_Int32( 1 ) );
}
}
return nNewPos;
@@ -316,10 +316,10 @@ sal_Int32 ScCsvRuler::FindEmptyPos( sal_Int32 nPos, ScMoveMode eDir ) const
switch( eDir )
{
case MOVE_FIRST:
- nNewPos = Min( nPos, FindEmptyPos( 0, MOVE_NEXT ) );
+ nNewPos = std::min( nPos, FindEmptyPos( 0, MOVE_NEXT ) );
break;
case MOVE_LAST:
- nNewPos = Max( nPos, FindEmptyPos( GetPosCount(), MOVE_PREV ) );
+ nNewPos = std::max( nPos, FindEmptyPos( GetPosCount(), MOVE_PREV ) );
break;
case MOVE_PREV:
while( HasSplit( --nNewPos ) ) ;
@@ -413,7 +413,7 @@ void ScCsvRuler::MouseMove( const MouseEvent& rMEvt )
if( IsTracking() )
{
// on mouse tracking: keep position valid
- nPos = Max( Min( nPos, GetPosCount() - sal_Int32( 1 ) ), sal_Int32( 1 ) );
+ nPos = std::max( std::min( nPos, GetPosCount() - sal_Int32( 1 ) ), sal_Int32( 1 ) );
MoveMouseTracking( nPos );
}
else
@@ -551,8 +551,8 @@ void ScCsvRuler::ImplDrawArea( sal_Int32 nPosX, sal_Int32 nWidth )
maBackgrDev.DrawRect( aRect );
aRect = maActiveRect;
- aRect.Left() = Max( GetFirstX(), nPosX );
- aRect.Right() = Min( Min( GetX( GetPosCount() ), GetLastX() ), nPosX + nWidth - sal_Int32( 1 ) );
+ aRect.Left() = std::max( GetFirstX(), nPosX );
+ aRect.Right() = std::min( std::min( GetX( GetPosCount() ), GetLastX() ), nPosX + nWidth - sal_Int32( 1 ) );
if( aRect.Left() <= aRect.Right() )
{
maBackgrDev.SetFillColor( maActiveColor );
@@ -573,7 +573,7 @@ void ScCsvRuler::ImplDrawBackgrDev()
maBackgrDev.SetFillColor();
sal_Int32 nPos;
- sal_Int32 nFirstPos = Max( GetPosFromX( 0 ) - (sal_Int32)(1L), (sal_Int32)(0L) );
+ sal_Int32 nFirstPos = std::max( GetPosFromX( 0 ) - (sal_Int32)(1L), (sal_Int32)(0L) );
sal_Int32 nLastPos = GetPosFromX( GetWidth() );
sal_Int32 nY = (maActiveRect.Top() + maActiveRect.Bottom()) / 2;
for( nPos = nFirstPos; nPos <= nLastPos; ++nPos )
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index b0c2e3bb1ea8..d02a32032bbf 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -333,33 +333,33 @@ IMPL_LINK( ScCsvTableBox, CsvCmdHdl, ScCsvControl*, pCtrl )
switch( eType )
{
case CSVCMD_SETPOSCOUNT:
- maData.mnPosCount = Max( nParam1, sal_Int32( 1 ) );
+ maData.mnPosCount = std::max( nParam1, sal_Int32( 1 ) );
ImplSetPosOffset( GetFirstVisPos() );
break;
case CSVCMD_SETPOSOFFSET:
ImplSetPosOffset( nParam1 );
break;
case CSVCMD_SETHDRWIDTH:
- maData.mnHdrWidth = Max( nParam1, sal_Int32( 0 ) );
+ maData.mnHdrWidth = std::max( nParam1, sal_Int32( 0 ) );
ImplSetPosOffset( GetFirstVisPos() );
break;
case CSVCMD_SETCHARWIDTH:
- maData.mnCharWidth = Max( nParam1, sal_Int32( 1 ) );
+ maData.mnCharWidth = std::max( nParam1, sal_Int32( 1 ) );
ImplSetPosOffset( GetFirstVisPos() );
break;
case CSVCMD_SETLINECOUNT:
- maData.mnLineCount = Max( nParam1, sal_Int32( 1 ) );
+ maData.mnLineCount = std::max( nParam1, sal_Int32( 1 ) );
ImplSetLineOffset( GetFirstVisLine() );
break;
case CSVCMD_SETLINEOFFSET:
ImplSetLineOffset( nParam1 );
break;
case CSVCMD_SETHDRHEIGHT:
- maData.mnHdrHeight = Max( nParam1, sal_Int32( 0 ) );
+ maData.mnHdrHeight = std::max( nParam1, sal_Int32( 0 ) );
ImplSetLineOffset( GetFirstVisLine() );
break;
case CSVCMD_SETLINEHEIGHT:
- maData.mnLineHeight = Max( nParam1, sal_Int32( 1 ) );
+ maData.mnLineHeight = std::max( nParam1, sal_Int32( 1 ) );
ImplSetLineOffset( GetFirstVisLine() );
break;
case CSVCMD_MOVERULERCURSOR:
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index df3c944d2314..5c5e725184aa 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -288,7 +288,7 @@ sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if( FindExtRange( aTokenRange, pSrcDoc, aToken ) )
{
// columns: find maximum
- nWidth = Max( nWidth, (SCCOL)(aTokenRange.aEnd.Col() - aTokenRange.aStart.Col() + 1) );
+ nWidth = std::max( nWidth, (SCCOL)(aTokenRange.aEnd.Col() - aTokenRange.aStart.Col() + 1) );
// rows: add row range + 1 empty row
nHeight += aTokenRange.aEnd.Row() - aTokenRange.aStart.Row() + 2;
}
@@ -321,7 +321,7 @@ sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
SCCOL nNewEndX = aNewRange.aEnd.Col();
SCROW nNewEndY = aNewRange.aEnd.Row();
ScRange aMaxRange( aDestPos,
- ScAddress(Max(nOldEndX,nNewEndX), Max(nOldEndY,nNewEndY), nDestTab) );
+ ScAddress(std::max(nOldEndX,nNewEndX), std::max(nOldEndY,nNewEndY), nDestTab) );
// Undo initialisieren
@@ -438,8 +438,8 @@ sal_Bool ScAreaLink::Refresh( const String& rNewFile, const String& rNewFilter,
if ( nNewRefresh != GetRefreshDelay() )
SetRefreshDelay( nNewRefresh );
- SCCOL nPaintEndX = Max( aOldRange.aEnd.Col(), aNewRange.aEnd.Col() );
- SCROW nPaintEndY = Max( aOldRange.aEnd.Row(), aNewRange.aEnd.Row() );
+ SCCOL nPaintEndX = std::max( aOldRange.aEnd.Col(), aNewRange.aEnd.Col() );
+ SCROW nPaintEndY = std::max( aOldRange.aEnd.Row(), aNewRange.aEnd.Row() );
if ( aOldRange.aEnd.Col() != aNewRange.aEnd.Col() )
nPaintEndX = MAXCOL;
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 0730d04ba080..a54b1f0b232d 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -463,7 +463,7 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// keep formatting of title and first data row from the document
// CopyToDocument also copies styles, Apply... needs separate calls
- SCCOL nMinEndCol = Min( rParam.nCol2, nEndCol ); // not too much
+ SCCOL nMinEndCol = std::min( rParam.nCol2, nEndCol ); // not too much
nMinEndCol = sal::static_int_cast<SCCOL>( nMinEndCol + nFormulaCols ); // only if column count unchanged
pImportDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, nTab, IDF_ATTRIB );
pDoc->CopyToDocument( rParam.nCol1, rParam.nRow1, nTab,
@@ -496,8 +496,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
// copy old data for undo
//
- SCCOL nUndoEndCol = Max( nEndCol, rParam.nCol2 ); // rParam = old end
- SCROW nUndoEndRow = Max( nEndRow, rParam.nRow2 );
+ SCCOL nUndoEndCol = std::max( nEndCol, rParam.nCol2 ); // rParam = old end
+ SCROW nUndoEndRow = std::max( nEndRow, rParam.nRow2 );
ScDocument* pUndoDoc = NULL;
ScDBData* pUndoDBData = NULL;
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 663a6b7a5d9e..9bc4a40bb639 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1458,7 +1458,7 @@ bool ScDocShell::AdjustPrintZoom( const ScRange& rRange )
if ( nBlkTwipsY == 0 )
nBlkTwipsY = 1;
- long nNeeded = Min( aPhysPage.Width() * 100 / nBlkTwipsX,
+ long nNeeded = std::min( aPhysPage.Width() * 100 / nBlkTwipsX,
aPhysPage.Height() * 100 / nBlkTwipsY );
if ( nNeeded < ZOOM_MIN )
nNeeded = ZOOM_MIN; // Begrenzung
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index e40ae12de3c1..2a18ea8fb652 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -477,8 +477,8 @@ void ScDocShell::DoConsolidate( const ScConsolidateParam& rParam, sal_Bool bReco
for (nPos=0; nPos<rParam.nDataAreaCount; nPos++)
{
ScArea* pArea = rParam.ppDataAreas[nPos];
- nColSize = Max( nColSize, SCCOL( pArea->nColEnd - pArea->nColStart + 1 ) );
- nRowSize = Max( nRowSize, SCROW( pArea->nRowEnd - pArea->nRowStart + 1 ) );
+ nColSize = std::max( nColSize, SCCOL( pArea->nColEnd - pArea->nColStart + 1 ) );
+ nRowSize = std::max( nRowSize, SCROW( pArea->nRowEnd - pArea->nRowStart + 1 ) );
// Test, ob Quelldaten verschoben wuerden
if (rParam.bReferenceData)
diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index 6c158ca0bcb3..283fe42e48ad 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -104,15 +104,15 @@ void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea, sal_Bool bModifySt
// Move the VisArea, otherwise only the upper left position would
// be changed in SnapVisArea, and the size would be wrong.
- Point aNewPos( 0, Max( aArea.Top(), (long) 0 ) );
+ Point aNewPos( 0, std::max( aArea.Top(), (long) 0 ) );
if ( bNegativePage )
{
- aNewPos.X() = Min( aArea.Right(), (long) 0 );
+ aNewPos.X() = std::min( aArea.Right(), (long) 0 );
lcl_SetTopRight( aArea, aNewPos );
}
else
{
- aNewPos.X() = Max( aArea.Left(), (long) 0 );
+ aNewPos.X() = std::max( aArea.Left(), (long) 0 );
aArea.SetPos( aNewPos );
}
}
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx b/sc/source/ui/drawfunc/fuconstr.cxx
index c566dfb4dd4e..5d8f2706e714 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -162,8 +162,8 @@ sal_Bool FuConstruct::MouseMove(const MouseEvent& rMEvt)
{
Point aOldPixel = pWindow->LogicToPixel( aMDPos );
Point aNewPixel = rMEvt.GetPosPixel();
- if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
- Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
+ if ( std::abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
+ std::abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
aDragTimer.Stop();
}
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index ece660700fa3..e2265717498e 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -342,8 +342,8 @@ sal_Bool FuSelection::MouseMove(const MouseEvent& rMEvt)
{
Point aOldPixel = pWindow->LogicToPixel( aMDPos );
Point aNewPixel = rMEvt.GetPosPixel();
- if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
- Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
+ if ( std::abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
+ std::abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
aDragTimer.Stop();
}
@@ -432,8 +432,8 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
}
if (!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() &&
- Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
- Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
+ std::abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
+ std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
{
/*************************************************************
* If a user wants to click on an object in front of a marked
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 75ec4bca1f45..5b6e0b124b7c 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -385,8 +385,8 @@ sal_Bool FuText::MouseMove(const MouseEvent& rMEvt)
{
Point aOldPixel = pWindow->LogicToPixel( aMDPos );
Point aNewPixel = rMEvt.GetPosPixel();
- if ( Abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
- Abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
+ if ( std::abs( aOldPixel.X() - aNewPixel.X() ) > SC_MAXDRAGMOVE ||
+ std::abs( aOldPixel.Y() - aNewPixel.Y() ) > SC_MAXDRAGMOVE )
aDragTimer.Stop();
}
diff --git a/sc/source/ui/inc/csvtablebox.hxx b/sc/source/ui/inc/csvtablebox.hxx
index 3caa4bf73b94..b23c3a03f021 100644
--- a/sc/source/ui/inc/csvtablebox.hxx
+++ b/sc/source/ui/inc/csvtablebox.hxx
@@ -88,10 +88,10 @@ private:
/** Calculates and sets valid position offset nearest to nPos. */
SC_DLLPRIVATE inline void ImplSetPosOffset( sal_Int32 nPos )
- { maData.mnPosOffset = Max( Min( nPos, GetMaxPosOffset() ), sal_Int32( 0 ) ); }
+ { maData.mnPosOffset = std::max( std::min( nPos, GetMaxPosOffset() ), sal_Int32( 0 ) ); }
/** Calculates and sets valid line offset nearest to nLine. */
SC_DLLPRIVATE inline void ImplSetLineOffset( sal_Int32 nLine )
- { maData.mnLineOffset = Max( Min( nLine, GetMaxLineOffset() ), sal_Int32( 0 ) ); }
+ { maData.mnLineOffset = std::max( std::min( nLine, GetMaxLineOffset() ), sal_Int32( 0 ) ); }
/** Moves controls (not cursors!) so that nPos becomes visible. */
SC_DLLPRIVATE void MakePosVisible( sal_Int32 nPos );
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 0ac4aaf6d46c..e692f3db7979 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -1083,7 +1083,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, ColClickHdl)
aEdAssign.SetText( aStr );
}
ScRange aRange( theCurData );
- aRange.aStart.SetRow( Min( (long)(theCurArea.aEnd.Row() + 1), (long)MAXROW ) );
+ aRange.aStart.SetRow( std::min( (long)(theCurArea.aEnd.Row() + 1), (long)MAXROW ) );
aRange.aEnd.SetRow( MAXROW );
AdjustColRowData( aRange );
}
@@ -1121,7 +1121,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RowClickHdl)
aEdAssign.SetText( aStr );
}
ScRange aRange( theCurData );
- aRange.aStart.SetCol( static_cast<SCCOL>(Min( (long)(theCurArea.aEnd.Col() + 1), (long)MAXCOL )) );
+ aRange.aStart.SetCol( static_cast<SCCOL>(std::min( (long)(theCurArea.aEnd.Col() + 1), (long)MAXCOL )) );
aRange.aEnd.SetCol( MAXCOL );
AdjustColRowData( aRange );
}
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index d92222ceba6d..5d32ee48dbf7 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -556,9 +556,9 @@ ScNavigatorDialogWrapper::ScNavigatorDialogWrapper(
Size aInfoSize = pParent->GetOutputSizePixel(); // von aussen vorgegebene Groesse
Size aNavSize = pNavigator->GetOutputSizePixel(); // Default-Groesse
- aNavSize.Width() = Max( aInfoSize.Width(), aNavSize.Width() );
- aNavSize.Height() = Max( aInfoSize.Height(), aNavSize.Height() );
- pNavigator->nListModeHeight = Max( aNavSize.Height(), pNavigator->nListModeHeight );
+ aNavSize.Width() = std::max( aInfoSize.Width(), aNavSize.Width() );
+ aNavSize.Height() = std::max( aInfoSize.Height(), aNavSize.Height() );
+ pNavigator->nListModeHeight = std::max( aNavSize.Height(), pNavigator->nListModeHeight );
// Die Groesse kann in einem anderen Modul geaendert worden sein,
// deshalb muessen in Abhaengigkeit von der momentanen Groesse die
@@ -661,7 +661,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
aTitleBase = GetText();
long nListboxYPos =
- Max( aTbxCmd.GetPosPixel().Y() + aTbxCmd.GetSizePixel().Height(),
+ std::max( aTbxCmd.GetPosPixel().Y() + aTbxCmd.GetSizePixel().Height(),
aEdRow.GetPosPixel().Y() + aEdRow.GetSizePixel().Height() ) + 4;
aLbEntries.setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y);
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index afe6f72286fe..a6049f1dba78 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1236,8 +1236,8 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) const
if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) )
pDoc->ExtendMerge( aRange, sal_True );
- aPaintRange.aEnd.SetCol( Max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) );
- aPaintRange.aEnd.SetRow( Max( aPaintRange.aEnd.Row(), aRange.aEnd.Row() ) );
+ aPaintRange.aEnd.SetCol( std::max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) );
+ aPaintRange.aEnd.SetRow( std::max( aPaintRange.aEnd.Row(), aRange.aEnd.Row() ) );
pDocShell->UpdatePaintExt( nExtFlags, aPaintRange );
PaintArea( aPaintRange, nExtFlags );
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 3c9b86a0eebb..6066984a2f55 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -1653,9 +1653,9 @@ void ScUndoUpdateAreaLink::DoChange( const sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
- SCCOL nEndX = Max( aOldRange.aEnd.Col(), aNewRange.aEnd.Col() );
- SCROW nEndY = Max( aOldRange.aEnd.Row(), aNewRange.aEnd.Row() );
- SCTAB nEndZ = Max( aOldRange.aEnd.Tab(), aNewRange.aEnd.Tab() ); //?
+ SCCOL nEndX = std::max( aOldRange.aEnd.Col(), aNewRange.aEnd.Col() );
+ SCROW nEndY = std::max( aOldRange.aEnd.Row(), aNewRange.aEnd.Row() );
+ SCTAB nEndZ = std::max( aOldRange.aEnd.Tab(), aNewRange.aEnd.Tab() ); //?
if ( bUndo )
{
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 41fc7ae9663b..3135e9599fd2 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -665,7 +665,7 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
throw(uno::RuntimeException)
{
SolarMutexGuard aGuard;
- sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX );
+ sal_uInt16 nCount = (sal_uInt16) std::min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX );
const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
sal_uInt16* pFuncs = nCount ? new sal_uInt16[nCount] : NULL;
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 067e3f4b50cd..600618194116 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -3827,12 +3827,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersec
{
ScRange aTemp( *aRanges[ i ] );
if ( aTemp.Intersects( aMask ) )
- aNew.Join( ScRange( Max( aTemp.aStart.Col(), aMask.aStart.Col() ),
- Max( aTemp.aStart.Row(), aMask.aStart.Row() ),
- Max( aTemp.aStart.Tab(), aMask.aStart.Tab() ),
- Min( aTemp.aEnd.Col(), aMask.aEnd.Col() ),
- Min( aTemp.aEnd.Row(), aMask.aEnd.Row() ),
- Min( aTemp.aEnd.Tab(), aMask.aEnd.Tab() ) ) );
+ aNew.Join( ScRange( std::max( aTemp.aStart.Col(), aMask.aStart.Col() ),
+ std::max( aTemp.aStart.Row(), aMask.aStart.Row() ),
+ std::max( aTemp.aStart.Tab(), aMask.aStart.Tab() ),
+ std::min( aTemp.aEnd.Col(), aMask.aEnd.Col() ),
+ std::min( aTemp.aEnd.Row(), aMask.aEnd.Row() ),
+ std::min( aTemp.aEnd.Tab(), aMask.aEnd.Tab() ) ) );
}
return new ScCellRangesObj( pDocShell, aNew ); // kann leer sein
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 8ef65b3fb935..5410437a5f5c 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1022,12 +1022,12 @@ void lclIntersectRanges( ListOfScRange& rList, const uno::Any& rArg )
if( aOuterIt->Intersects( *aInnerIt ) )
{
ScRange aIsectRange(
- Max( aOuterIt->aStart.Col(), aInnerIt->aStart.Col() ),
- Max( aOuterIt->aStart.Row(), aInnerIt->aStart.Row() ),
- Max( aOuterIt->aStart.Tab(), aInnerIt->aStart.Tab() ),
- Min( aOuterIt->aEnd.Col(), aInnerIt->aEnd.Col() ),
- Min( aOuterIt->aEnd.Row(), aInnerIt->aEnd.Row() ),
- Min( aOuterIt->aEnd.Tab(), aInnerIt->aEnd.Tab() ) );
+ std::max( aOuterIt->aStart.Col(), aInnerIt->aStart.Col() ),
+ std::max( aOuterIt->aStart.Row(), aInnerIt->aStart.Row() ),
+ std::max( aOuterIt->aStart.Tab(), aInnerIt->aStart.Tab() ),
+ std::min( aOuterIt->aEnd.Col(), aInnerIt->aEnd.Col() ),
+ std::min( aOuterIt->aEnd.Row(), aInnerIt->aEnd.Row() ),
+ std::min( aOuterIt->aEnd.Tab(), aInnerIt->aEnd.Tab() ) );
rList.push_back( aIsectRange );
}
}
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index cd829dca0680..cf82d0eb70f9 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -805,8 +805,8 @@ void ScCellShell::Execute( SfxRequest& rReq )
GetViewData()->GetSimpleArea( nStartCol,nStartRow,nStartTab,
nEndCol,nEndRow,nEndTab );
- if ( ( Abs((SCsCOL)nEndCol-(SCsCOL)nStartCol) > 1 )
- && ( Abs((SCsROW)nEndRow-(SCsROW)nStartRow) > 1 ) )
+ if ( ( std::abs((SCsCOL)nEndCol-(SCsCOL)nStartCol) > 1 )
+ && ( std::abs((SCsROW)nEndRow-(SCsROW)nStartRow) > 1 ) )
{
if ( pReqArgs )
{
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index bf6124787b84..b5c76fdf4b17 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1066,7 +1066,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
// 40% of width or 60% of height
long nSizeX = 40 * ( aPageEnd.X() - aPageStart.X() ) / aSize100.Width();
long nSizeY = 60 * ( aPageEnd.Y() - aPageStart.Y() ) / aSize100.Height();
- nHeight = Min(nSizeX,nSizeY);
+ nHeight = std::min(nSizeX,nSizeY);
pEditEng->SetDefaultItem( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT ) );
pEditEng->SetDefaultItem( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CJK ) );
pEditEng->SetDefaultItem( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) );
@@ -1087,7 +1087,7 @@ void ScGridWindow::DrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
// 40% of width or 60% of height
long nSizeX = 40 * ( aPageEnd.X() - aPageStart.X() ) / aSize100.Width();
long nSizeY = 60 * ( aPageEnd.Y() - aPageStart.Y() ) / aSize100.Height();
- aFont.SetSize( Size( 0,Min(nSizeX,nSizeY) ) );
+ aFont.SetSize( Size( 0,std::min(nSizeX,nSizeY) ) );
pContentDev->SetFont( aFont );
// centered output with DrawText
diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx
index aceb806b888e..4acfe81231cd 100644
--- a/sc/source/ui/view/hdrcont.cxx
+++ b/sc/source/ui/view/hdrcont.cxx
@@ -149,11 +149,11 @@ void ScHeaderControl::SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nN
if ( nNewStart == nOldStart )
{
if ( nNewEnd != nOldEnd )
- DoPaint( Min( nNewEnd, nOldEnd ) + 1, Max( nNewEnd, nOldEnd ) );
+ DoPaint( std::min( nNewEnd, nOldEnd ) + 1, std::max( nNewEnd, nOldEnd ) );
// sonst nix
}
else if ( nNewEnd == nOldEnd )
- DoPaint( Min( nNewStart, nOldStart ), Max( nNewStart, nOldStart ) - 1 );
+ DoPaint( std::min( nNewStart, nOldStart ), std::max( nNewStart, nOldStart ) - 1 );
else if ( nNewStart > nOldEnd || nNewEnd < nOldStart )
{
// zwei Bereiche...
@@ -161,7 +161,7 @@ void ScHeaderControl::SetMark( sal_Bool bNewSet, SCCOLROW nNewStart, SCCOLROW nN
DoPaint( nNewStart, nNewEnd );
}
else // irgendwie ueberlappend... (kommt eh nicht oft vor)
- DoPaint( Min( nNewStart, nOldStart ), Max( nNewEnd, nOldEnd ) );
+ DoPaint( std::min( nNewStart, nOldStart ), std::max( nNewEnd, nOldEnd ) );
}
else
DoPaint( nNewStart, nNewEnd ); // komplett neu
diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx
index 47aeac7ef63a..ab53ab7b38be 100644
--- a/sc/source/ui/view/hintwin.cxx
+++ b/sc/source/ui/view/hintwin.cxx
@@ -61,7 +61,7 @@ ScHintWindow::ScHintWindow( Window* pParent, const String& rTit, const String& r
aTextStart = Point( HINT_MARGIN + HINT_INDENT,
aHeadSize.Height() + HINT_MARGIN + HINT_LINESPACE );
- Size aWinSize( Max( aHeadSize.Width(), aTextSize.Width() ) + 2 * HINT_MARGIN + 1,
+ Size aWinSize( std::max( aHeadSize.Width(), aTextSize.Width() ) + 2 * HINT_MARGIN + 1,
aHeadSize.Height() + aTextSize.Height() + HINT_LINESPACE + 2 * HINT_MARGIN + 1 );
SetOutputSizePixel( aWinSize );
}
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index aa2efe27b841..a6de25b34dff 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -291,7 +291,7 @@ bool ScOutlineWindow::GetEntryPos(
rnStartPos + nEntriesSign;
long nCenter = (rnStartPos + rnEndPos - SC_OL_BITMAPSIZE * nEntriesSign +
( mbMirrorEntries ? 1 : 0 )) / 2L;
- rnImagePos = mbMirrorEntries ? Max( rnImagePos, nCenter ) : Min( rnImagePos, nCenter );
+ rnImagePos = mbMirrorEntries ? std::max( rnImagePos, nCenter ) : std::min( rnImagePos, nCenter );
// --- refinements ---
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1eef35b0f5a7..5826efde66dc 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -586,10 +586,10 @@ void ScOutputData::SetPagebreakMode( ScPageBreakData* pPageData )
{
ScRange aRange = pPageData->GetData( nPos ).GetPrintRange();
- SCCOL nStartX = Max( aRange.aStart.Col(), nX1 );
- SCCOL nEndX = Min( aRange.aEnd.Col(), nX2 );
- SCROW nStartY = Max( aRange.aStart.Row(), nY1 );
- SCROW nEndY = Min( aRange.aEnd.Row(), nY2 );
+ SCCOL nStartX = std::max( aRange.aStart.Col(), nX1 );
+ SCCOL nEndX = std::min( aRange.aEnd.Col(), nX2 );
+ SCROW nStartY = std::max( aRange.aStart.Row(), nY1 );
+ SCROW nEndY = std::min( aRange.aEnd.Row(), nY2 );
for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
{
@@ -1395,7 +1395,7 @@ void ScOutputData::DrawFrame()
size_t nCol = lclGetArrayColFromCellInfoX( nInfoIdx, nX1, nX2, bLayoutRTL );
long nNewPosX = nOldPosX + pRowInfo[ 0 ].pCellInfo[ nInfoIdx ].nWidth * nLayoutSign;
long nNewSnapX = lclGetSnappedX( *mpDev, nNewPosX, bSnapPixel );
- rArray.SetColWidth( nCol, Abs( nNewSnapX - nOldSnapX ) );
+ rArray.SetColWidth( nCol, std::abs( nNewSnapX - nOldSnapX ) );
nOldPosX = nNewPosX;
nOldSnapX = nNewSnapX;
}
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 4713a2ac4954..d4fb35f8f48f 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -1894,7 +1894,7 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
long nBot = (long)( aVars.GetMargin()->GetBottomMargin() * mnPPTY );
nJustPosY += ( nOutHeight + nTop -
aVars.GetTextSize().Height() - nBot ) / 2;
- nTestClipHeight += Abs( nTop - nBot );
+ nTestClipHeight += std::abs( nTop - nBot );
}
break;
default:
@@ -5124,7 +5124,7 @@ void ScOutputData::DrawRotated(sal_Bool bPixelToLogic)
if ( eRotMode != SVX_ROTATE_MODE_STANDARD )
{
nGridWidth = aCellSize.Width() +
- Abs((long) ( aCellSize.Height() * nCos / nSin ));
+ std::abs((long) ( aCellSize.Height() * nCos / nSin ));
bNegative = ( pInfo->nRotateDir == SC_ROTDIR_LEFT );
if ( bLayoutRTL )
bNegative = !bNegative;
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 1ad8f0f06259..710fe9f23e2d 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -498,9 +498,9 @@ sal_Bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
long nOld = pPreview->GetZoom();
long nNew = nOld;
if ( pData->GetDelta() < 0 )
- nNew = Max( (long) MINZOOM, basegfx::zoomtools::zoomOut( nOld ));
+ nNew = std::max( (long) MINZOOM, basegfx::zoomtools::zoomOut( nOld ));
else
- nNew = Min( (long) MAXZOOM, basegfx::zoomtools::zoomIn( nOld ));
+ nNew = std::min( (long) MAXZOOM, basegfx::zoomtools::zoomIn( nOld ));
if ( nNew != nOld )
{
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 15fea31959dc..9ac82304976b 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -465,8 +465,8 @@ void ScPrintFunc::DrawToDev( ScDocument* pDoc, OutputDevice* pDev, double /* nPr
// if no lines, still space for the outline frame (20 Twips = 1pt)
// (HasLines initalizes aLines to 0,0,0,0)
- nTwipsSizeX += aLines.Left() + Max( aLines.Right(), 20L );
- nTwipsSizeY += aLines.Top() + Max( aLines.Bottom(), 20L );
+ nTwipsSizeX += aLines.Left() + std::max( aLines.Right(), 20L );
+ nTwipsSizeY += aLines.Top() + std::max( aLines.Bottom(), 20L );
double nScaleX = (double) nDevSizeX / nTwipsSizeX;
double nScaleY = (double) nDevSizeY / nTwipsSizeY;
@@ -753,15 +753,15 @@ void ScPrintFunc::UpdateHFHeight( ScPrintHFParam& rParam )
long nMaxHeight = 0;
if ( rParam.pLeft )
{
- nMaxHeight = Max( nMaxHeight, TextHeight( rParam.pLeft->GetLeftArea() ) );
- nMaxHeight = Max( nMaxHeight, TextHeight( rParam.pLeft->GetCenterArea() ) );
- nMaxHeight = Max( nMaxHeight, TextHeight( rParam.pLeft->GetRightArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.pLeft->GetLeftArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.pLeft->GetCenterArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.pLeft->GetRightArea() ) );
}
if ( rParam.pRight )
{
- nMaxHeight = Max( nMaxHeight, TextHeight( rParam.pRight->GetLeftArea() ) );
- nMaxHeight = Max( nMaxHeight, TextHeight( rParam.pRight->GetCenterArea() ) );
- nMaxHeight = Max( nMaxHeight, TextHeight( rParam.pRight->GetRightArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.pRight->GetLeftArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.pRight->GetCenterArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( rParam.pRight->GetRightArea() ) );
}
rParam.nHeight = nMaxHeight + rParam.nDistance;
@@ -1744,9 +1744,9 @@ void ScPrintFunc::PrintHF( long nPageNo, sal_Bool bHeader, long nStartY,
// and probably other breaks by variable (page number etc.)
long nMaxHeight = 0;
- nMaxHeight = Max( nMaxHeight, TextHeight( pHFItem->GetLeftArea() ) );
- nMaxHeight = Max( nMaxHeight, TextHeight( pHFItem->GetCenterArea() ) );
- nMaxHeight = Max( nMaxHeight, TextHeight( pHFItem->GetRightArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( pHFItem->GetLeftArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( pHFItem->GetCenterArea() ) );
+ nMaxHeight = std::max( nMaxHeight, TextHeight( pHFItem->GetRightArea() ) );
if (rParam.pBorder)
nMaxHeight += lcl_LineTotal( rParam.pBorder->GetTop() ) +
lcl_LineTotal( rParam.pBorder->GetBottom() ) +
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index a0394a4169b0..4fce1138d80d 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -300,7 +300,7 @@ void ScTabControl::UpdateStatus()
SCTAB nCount = pDoc->GetTableCount();
SCTAB i;
OUString aString;
- SCTAB nMaxCnt = Max( nCount, static_cast<SCTAB>(GetMaxId()) );
+ SCTAB nMaxCnt = std::max( nCount, static_cast<SCTAB>(GetMaxId()) );
Color aTabBgColor;
sal_Bool bModified = false; // Tabellen-Namen
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 0f94f9bed8bd..d96a06e35887 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -980,9 +980,9 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
} else
{
if ( pData->GetDelta() < 0 )
- nNew = Max( (long) MINZOOM, basegfx::zoomtools::zoomOut( nOld ));
+ nNew = std::max( (long) MINZOOM, basegfx::zoomtools::zoomOut( nOld ));
else
- nNew = Min( (long) MAXZOOM, basegfx::zoomtools::zoomIn( nOld ));
+ nNew = std::min( (long) MAXZOOM, basegfx::zoomtools::zoomIn( nOld ));
}
if ( nNew != nOld )
{
diff --git a/sc/source/ui/view/tabview4.cxx b/sc/source/ui/view/tabview4.cxx
index 33d7cec19bb4..227d3d55bdb9 100644
--- a/sc/source/ui/view/tabview4.cxx
+++ b/sc/source/ui/view/tabview4.cxx
@@ -352,7 +352,7 @@ static long lcl_GetScrollRange( SCCOLROW nDocEnd, SCCOLROW nPos, SCCOLROW nVis,
++nVis;
++nMax; // for partially visible cells
- SCCOLROW nEnd = Max(nDocEnd, (SCCOLROW)(nPos+nVis)) + nVis;
+ SCCOLROW nEnd = std::max(nDocEnd, (SCCOLROW)(nPos+nVis)) + nVis;
if (nEnd > nMax)
nEnd = nMax;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 0068209e7a46..7a4863bbbd36 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -992,7 +992,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
//! should be limited to whole cells in both directions
long nLeft = aPixRect.Left();
long nRight = pView->GetGridWidth(eHWhich) - aPixRect.Right();
- nSizeXPix = aPixRect.GetWidth() + 2 * Min( nLeft, nRight );
+ nSizeXPix = aPixRect.GetWidth() + 2 * std::min( nLeft, nRight );
}
else if ( bGrowToLeft )
nSizeXPix = aPixRect.Right(); // space that's available in the window when growing to the left
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index b17bf6d0f830..9c7ca49fb994 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -312,7 +312,7 @@ static sal_Bool lcl_AddFunction( ScAppOptions& rAppOpt, sal_uInt16 nOpCode )
if ( !lcl_FunctionKnown( nOpCode ) )
return false; // not in function list -> no change
- sal_uInt16 nNewCount = Min( (sal_uInt16)(nOldCount + 1), (sal_uInt16)LRU_MAX );
+ sal_uInt16 nNewCount = std::min( (sal_uInt16)(nOldCount + 1), (sal_uInt16)LRU_MAX );
sal_uInt16 nNewList[LRU_MAX];
nNewList[0] = nOpCode;
for (nPos=1; nPos<nNewCount; nPos++)
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index 4fb088c1fb13..35458d3b5e26 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -424,35 +424,35 @@ sal_Bool ScUpdateRect::GetDiff( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 )
return false;
}
- rX1 = Min(nNewStartX,nOldStartX);
- rY1 = Min(nNewStartY,nOldStartY);
- rX2 = Max(nNewEndX,nOldEndX);
- rY2 = Max(nNewEndY,nOldEndY);
+ rX1 = std::min(nNewStartX,nOldStartX);
+ rY1 = std::min(nNewStartY,nOldStartY);
+ rX2 = std::max(nNewEndX,nOldEndX);
+ rY2 = std::max(nNewEndY,nOldEndY);
if ( nNewStartX == nOldStartX && nNewEndX == nOldEndX )
{
if ( nNewStartY == nOldStartY )
{
- rY1 = Min( nNewEndY, nOldEndY );
- rY2 = Max( nNewEndY, nOldEndY );
+ rY1 = std::min( nNewEndY, nOldEndY );
+ rY2 = std::max( nNewEndY, nOldEndY );
}
else if ( nNewEndY == nOldEndY )
{
- rY1 = Min( nNewStartY, nOldStartY );
- rY2 = Max( nNewStartY, nOldStartY );
+ rY1 = std::min( nNewStartY, nOldStartY );
+ rY2 = std::max( nNewStartY, nOldStartY );
}
}
else if ( nNewStartY == nOldStartY && nNewEndY == nOldEndY )
{
if ( nNewStartX == nOldStartX )
{
- rX1 = Min( nNewEndX, nOldEndX );
- rX2 = Max( nNewEndX, nOldEndX );
+ rX1 = std::min( nNewEndX, nOldEndX );
+ rX2 = std::max( nNewEndX, nOldEndX );
}
else if ( nNewEndX == nOldEndX )
{
- rX1 = Min( nNewStartX, nOldStartX );
- rX2 = Max( nNewStartX, nOldStartX );
+ rX1 = std::min( nNewStartX, nOldStartX );
+ rX2 = std::max( nNewStartX, nOldStartX );
}
}