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>
This commit is contained in:
Marcos Paulo de Souza
2013-04-20 11:09:54 +00:00
committed by David Tardon
parent 5414a3eecd
commit 0f200cc30e
337 changed files with 1211 additions and 1224 deletions
@@ -754,14 +754,14 @@ void ProgressMonitor::impl_recalcLayout ()
// But "Width" is oriented on left column below progressbar to!!! "max(...)"
nX_Topic_Top = PROGRESSMONITOR_FREEBORDER ;
nY_Topic_Top = PROGRESSMONITOR_FREEBORDER ;
nWidth_Topic_Top = Max ( aTopicSize_Top.Width, aTopicSize_Bottom.Width ) ;
nWidth_Topic_Top = std::max( aTopicSize_Top.Width, aTopicSize_Bottom.Width ) ;
nHeight_Topic_Top = aTopicSize_Top.Height ;
// Right column before progressbar has relativ position to left column ...
// ... and a size as rest of dialog size!
nX_Text_Top = nX_Topic_Top+nWidth_Topic_Top+PROGRESSMONITOR_FREEBORDER;
nY_Text_Top = nY_Topic_Top ;
nWidth_Text_Top = Max ( aTextSize_Top.Width, aTextSize_Bottom.Width ) ;
nWidth_Text_Top = std::max ( aTextSize_Top.Width, aTextSize_Bottom.Width ) ;
// Fix size of this column to minimum!
sal_Int32 nSummaryWidth = nWidth_Text_Top+nWidth_Topic_Top+(3*PROGRESSMONITOR_FREEBORDER) ;
if ( nSummaryWidth < PROGRESSMONITOR_DEFAULT_WIDTH )
@@ -543,8 +543,8 @@ void VCLXAccessibleList::UpdateEntryRange_Impl()
if ( nTop != m_nLastTopEntry )
{
UpdateVisibleLineCount();
sal_Int32 nBegin = Min( m_nLastTopEntry, nTop );
sal_Int32 nEnd = Max( m_nLastTopEntry + m_nVisibleLineCount, nTop + m_nVisibleLineCount );
sal_Int32 nBegin = std::min( m_nLastTopEntry, nTop );
sal_Int32 nEnd = std::max( m_nLastTopEntry + m_nVisibleLineCount, nTop + m_nVisibleLineCount );
for (sal_uInt16 i = static_cast<sal_uInt16>(nBegin); (i <= static_cast<sal_uInt16>(nEnd)); ++i)
{
sal_Bool bVisible = ( i >= nTop && i < ( nTop + m_nVisibleLineCount ) );
+1 -1
View File
@@ -787,7 +787,7 @@ void ModulWindow::EditMacro( const OUString& rMacroName )
long nMaxY = pView->GetTextEngine()->GetTextHeight() - nVisHeight;
long nOldStartY = pView->GetStartDocPos().Y();
long nNewStartY = nStart * pView->GetTextEngine()->GetCharHeight();
nNewStartY = Min( nNewStartY, nMaxY );
nNewStartY = std::min( nNewStartY, nMaxY );
pView->Scroll( 0, -(nNewStartY-nOldStartY) );
pView->ShowCursor( false, true );
GetEditVScrollBar().SetThumbPos( pView->GetStartDocPos().Y() );
+1 -1
View File
@@ -3459,7 +3459,7 @@ RTLFUNC(Shell)
{
sal_Int32 iFoundSpacePos = aCmdLine.indexOf( ' ', i );
sal_Int32 iFoundTabPos = aCmdLine.indexOf( '\t', i );
sal_Int32 iFoundPos = iFoundSpacePos >= 0 ? iFoundTabPos >= 0 ? Min( iFoundSpacePos, iFoundTabPos ) : iFoundSpacePos : -1;
sal_Int32 iFoundPos = iFoundSpacePos >= 0 ? iFoundTabPos >= 0 ? std::min( iFoundSpacePos, iFoundTabPos ) : iFoundSpacePos : -1;
if( iFoundPos < 0 )
{
+1 -1
View File
@@ -235,7 +235,7 @@ void addPolygon( drawing::PolyPolygonShape3D& rRet, const drawing::PolyPolygonSh
void appendPoly( drawing::PolyPolygonShape3D& rRet, const drawing::PolyPolygonShape3D& rAdd )
{
sal_Int32 nOuterCount = Max( rRet.SequenceX.getLength(), rAdd.SequenceX.getLength() );
sal_Int32 nOuterCount = std::max( rRet.SequenceX.getLength(), rAdd.SequenceX.getLength() );
rRet.SequenceX.realloc(nOuterCount);
rRet.SequenceY.realloc(nOuterCount);
rRet.SequenceZ.realloc(nOuterCount);
+1 -1
View File
@@ -1314,7 +1314,7 @@ sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMe
{
throwInvalidColumnType(STR_INVALID_COLUMN_PRECISION, aName);
}
(*m_pFileStream) << (sal_uInt8) Min((unsigned)nPrecision, 255U); // field length
(*m_pFileStream) << (sal_uInt8) std::min((unsigned)nPrecision, 255U); // field length
nRecLength = nRecLength + (sal_uInt16)::std::min((sal_uInt16)nPrecision, (sal_uInt16)255UL);
(*m_pFileStream) << (sal_uInt8)0; // decimals
break;
@@ -92,7 +92,7 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector<
OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" );
sal_uInt32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue());
sal_uInt32 nBookmarkValue = std::abs((sal_Int32)(_rRow->get())[0]->getValue());
OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue);
@@ -986,7 +986,7 @@ again:
}
else if (m_pFileSet.is())
{
sal_uInt32 nBookmarkValue = Abs((sal_Int32)(m_aEvaluateRow->get())[0]->getValue());
sal_uInt32 nBookmarkValue = std::abs((sal_Int32)(m_aEvaluateRow->get())[0]->getValue());
m_pFileSet->get().push_back(nBookmarkValue);
}
}
+1 -1
View File
@@ -3124,7 +3124,7 @@ SvxToolbarConfigPage::SvxToolbarConfigPage(
long nCtrlW = aTopLevelLabel.GetSizePixel().Width();
if ( nTxtW >= nCtrlW )
{
long nDelta = Max( (long)10, nTxtW - nCtrlW );
long nDelta = std::max( (long)10, nTxtW - nCtrlW );
Size aNewSz = aTopLevelLabel.GetSizePixel();
aNewSz.Width() += nDelta;
aTopLevelLabel.SetSizePixel( aNewSz );
+2 -2
View File
@@ -210,8 +210,8 @@ Graphic GraphicFilterMosaic::GetFilteredGraphic( const Graphic& rGraphic,
double fScaleX, double fScaleY )
{
Graphic aRet;
const Size aSize( Max( FRound( GetTileWidth() * fScaleX ), 1L ),
Max( FRound( GetTileHeight() * fScaleY ), 1L ) );
const Size aSize( std::max( FRound( GetTileWidth() * fScaleX ), 1L ),
std::max( FRound( GetTileHeight() * fScaleY ), 1L ) );
BmpFilterParam aParam( aSize );
if( rGraphic.IsAnimated() )
+2 -2
View File
@@ -395,9 +395,9 @@ void SvxFontSubstCheckListBox::setColSizes()
return;
long nW1 = rBar.GetTextWidth(rBar.GetItemText(3));
long nW2 = rBar.GetTextWidth(rBar.GetItemText(4));
long nMax = Max( nW1, nW2 ) + 6; // width of the longest header + a little offset
long nMax = std::max( nW1, nW2 ) + 6; // width of the longest header + a little offset
long nMin = rBar.LogicToPixel(Size(10, 0), MAP_APPFONT).Width();
nMax = Max( nMax, nMin );
nMax = std::max( nMax, nMin );
const long nDoubleMax = 2*nMax;
const long nRest = GetSizePixel().Width() - nDoubleMax;
long aStaticTabs[] = { 4, 0, 0, 0, 0 };
+4 -4
View File
@@ -130,8 +130,8 @@ sal_Bool IsEqualSize_Impl( const SvxSizeItem* pSize, const Size& rSize )
if ( pSize )
{
Size aSize = pSize->GetSize();
long nDiffW = Abs( rSize.Width () - aSize.Width () );
long nDiffH = Abs( rSize.Height() - aSize.Height() );
long nDiffW = std::abs( rSize.Width () - aSize.Width () );
long nDiffH = std::abs( rSize.Height() - aSize.Height() );
return ( nDiffW < 10 && nDiffH < 10 );
}
else
@@ -1446,8 +1446,8 @@ IMPL_LINK_NOARG(SvxPageDescPage, RangeHdl_Impl)
long nFHeight = m_pBspWin->GetFtHeight();
long nFDist = m_pBspWin->GetFtDist();
long nHFLeft = Max( m_pBspWin->GetHdLeft(), m_pBspWin->GetFtLeft() );
long nHFRight = Max( m_pBspWin->GetHdRight(), m_pBspWin->GetFtRight() );
long nHFLeft = std::max( m_pBspWin->GetHdLeft(), m_pBspWin->GetFtLeft() );
long nHFRight = std::max( m_pBspWin->GetHdRight(), m_pBspWin->GetFtRight() );
// current values for page margins
long nBT = static_cast<long>(m_pTopMarginEdit->Denormalize(m_pTopMarginEdit->GetValue(FUNIT_TWIP)));
+2 -2
View File
@@ -901,12 +901,12 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet)
}
pItem = GetItem( rSet, SID_ATTR_TRANSFORM_WIDTH );
sal_Int32 nWidth = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 );
sal_Int32 nWidth = std::max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 );
m_aWidthMF.SetValue(m_aWidthMF.Normalize(nWidth), FUNIT_TWIP);
pItem = GetItem( rSet, SID_ATTR_TRANSFORM_HEIGHT );
sal_Int32 nHeight = Max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 );
sal_Int32 nHeight = std::max( pItem ? ( static_cast<const SfxUInt32Item*>(pItem)->GetValue()) : 0, (sal_uInt32)1 );
m_aHeightMF.SetValue(m_aHeightMF.Normalize(nHeight), FUNIT_TWIP);
m_fWidthHeightRatio = nHeight ? double(nWidth) / double(nHeight) : 1.0;
+1 -1
View File
@@ -1073,7 +1073,7 @@ void SvxColorTabPage::RgbToCmyk_Impl( Color& rColor, sal_uInt16& rK )
sal_uInt16 const nColor2 = 255 - rColor.GetGreen();
sal_uInt16 const nColor3 = 255 - rColor.GetBlue();
rK = Min( Min( nColor1, nColor2 ), nColor3 );
rK = std::min( std::min( nColor1, nColor2 ), nColor3 );
rColor.SetRed( sal::static_int_cast< sal_uInt8 >( nColor1 - rK ) );
rColor.SetGreen( sal::static_int_cast< sal_uInt8 >( nColor2 - rK ) );
@@ -197,7 +197,7 @@ Rectangle OConnectionLine::GetBoundingRect()
const OTableWindow* pDestWin = m_pTabConn->GetDestWin();
//////////////////////////////////////////////////////////////////////
// line proceeds in in z-Form
if( pSourceWin == pDestWin || Abs(m_aSourceConnPos.X() - m_aDestConnPos.X()) > Abs(m_aSourceDescrLinePos.X() - m_aDestDescrLinePos.X()) )
if( pSourceWin == pDestWin || std::abs(m_aSourceConnPos.X() - m_aDestConnPos.X()) > std::abs(m_aSourceDescrLinePos.X() - m_aDestDescrLinePos.X()) )
{
aTopLeft.X() -= DESCRIPT_LINE_WIDTH;
aBottomRight.X() += DESCRIPT_LINE_WIDTH;
+2 -2
View File
@@ -577,7 +577,7 @@ void ParaPortion::MarkInvalid( sal_uInt16 nStart, short nDiff )
{
// nInvalidPosEnd = pNode->Len();
DBG_ASSERT( ( nDiff >= 0 ) || ( (nStart+nDiff) >= 0 ), "MarkInvalid: Diff out of Range" );
nInvalidPosStart = Min( nInvalidPosStart, (sal_uInt16) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
nInvalidPosStart = std::min( nInvalidPosStart, (sal_uInt16) ( nDiff < 0 ? nStart+nDiff : nDiff ) );
nInvalidDiff = 0;
bSimple = sal_False;
}
@@ -596,7 +596,7 @@ void ParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /* nEnd */
}
else
{
nInvalidPosStart = Min( nInvalidPosStart, nStart );
nInvalidPosStart = std::min( nInvalidPosStart, nStart );
// nInvalidPosEnd = pNode->Len();
}
nInvalidDiff = 0;
+6 -6
View File
@@ -257,8 +257,8 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, Region* pRegion, OutputD
long nX1 = pEditEngine->GetXPos(pTmpPortion, pLine, nTmpStartIndex, true);
long nX2 = pEditEngine->GetXPos(pTmpPortion, pLine, nTmpEndIndex);
Point aPt1( Min( nX1, nX2 ), aTopLeft.Y() );
Point aPt2( Max( nX1, nX2 ), aBottomRight.Y() );
Point aPt1( std::min( nX1, nX2 ), aTopLeft.Y() );
Point aPt2( std::max( nX1, nX2 ), aBottomRight.Y() );
ImplDrawHighlightRect( pTarget, aPt1, aPt2, pPolyPoly );
@@ -765,10 +765,10 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa
long nDiffY = !IsVertical() ? nDocDiffY : nDocDiffX;
// Negative: Back to the top or left edge
if ( ( Abs( nDiffY ) > pEditEngine->GetOnePixelInRef() ) && DoBigScroll() )
if ( ( std::abs( nDiffY ) > pEditEngine->GetOnePixelInRef() ) && DoBigScroll() )
{
long nH = aOutArea.GetHeight() / 4;
if ( ( nH > aEditCursor.GetHeight() ) && ( Abs( nDiffY ) < nH ) )
if ( ( nH > aEditCursor.GetHeight() ) && ( std::abs( nDiffY ) < nH ) )
{
if ( nDiffY < 0 )
nDiffY -= nH;
@@ -777,10 +777,10 @@ void ImpEditView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa
}
}
if ( ( Abs( nDiffX ) > pEditEngine->GetOnePixelInRef() ) && DoBigScroll() )
if ( ( std::abs( nDiffX ) > pEditEngine->GetOnePixelInRef() ) && DoBigScroll() )
{
long nW = aOutArea.GetWidth() / 4;
if ( Abs( nDiffX ) < nW )
if ( std::abs( nDiffX ) < nW )
{
if ( nDiffY < 0 )
nDiffY -= nW;
+2 -2
View File
@@ -3709,7 +3709,7 @@ sal_uInt16 ImpEditEngine::GetChar(
pParaPortion->GetNode()->GetString(), nRight, aLocale, ::com::sun::star::i18n::CharacterIteratorMode::SKIPCELL, nCount, nCount );
if ( ( nLeft != nChar ) && ( nRight != nChar ) )
{
nChar = ( Abs( nRight - nChar ) < Abs( nLeft - nChar ) ) ? nRight : nLeft;
nChar = ( std::abs( nRight - nChar ) < std::abs( nLeft - nChar ) ) ? nRight : nLeft;
}
}
}
@@ -4145,7 +4145,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_uInt16 nIndex
if ( nFlags & GETCRSR_TXTONLY )
aEditCursor.Top() = aEditCursor.Bottom() - pLine->GetTxtHeight() + 1;
else
aEditCursor.Top() = aEditCursor.Bottom() - Min( pLine->GetTxtHeight(), pLine->GetHeight() ) + 1;
aEditCursor.Top() = aEditCursor.Bottom() - std::min( pLine->GetTxtHeight(), pLine->GetHeight() ) + 1;
return aEditCursor;
}
+7 -7
View File
@@ -415,7 +415,7 @@ void ImpEditEngine::FormatDoc()
if ( aInvalidRect.IsEmpty() )
{
// For Paperwidth 0 (AutoPageSize) it would otherwise be Empty()...
long nWidth = Max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) );
long nWidth = std::max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) );
Range aInvRange( GetInvalidYOffsets( pParaPortion ) );
aInvalidRect = Rectangle( Point( 0, nY+aInvRange.Min() ),
Size( nWidth, aInvRange.Len() ) );
@@ -442,7 +442,7 @@ void ImpEditEngine::FormatDoc()
aStatus.GetStatusWord() |= !IsVertical() ? EE_STAT_TEXTHEIGHTCHANGED : EE_STAT_TEXTWIDTHCHANGED;
if ( nNewHeight < nCurTextHeight )
{
aInvalidRect.Bottom() = (long)Max( nNewHeight, nCurTextHeight );
aInvalidRect.Bottom() = (long)std::max( nNewHeight, nCurTextHeight );
if ( aInvalidRect.IsEmpty() )
{
aInvalidRect.Top() = 0;
@@ -632,7 +632,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
const short nInvalidDiff = pParaPortion->GetInvalidDiff();
const sal_uInt16 nInvalidStart = pParaPortion->GetInvalidPosStart();
const sal_uInt16 nInvalidEnd = nInvalidStart + Abs( nInvalidDiff );
const sal_uInt16 nInvalidEnd = nInvalidStart + std::abs( nInvalidDiff );
sal_Bool bQuickFormat = sal_False;
if ( !bEmptyNodeWithPolygon && !HasScriptType( nPara, i18n::ScriptType::COMPLEX ) )
@@ -864,7 +864,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
{
// Try further down in the polygon.
// Below the polygon use the Paper Width.
nTextExtraYOffset += Max( (long)(nTextLineHeight / 10), (long)1 );
nTextExtraYOffset += std::max( (long)(nTextLineHeight / 10), (long)1 );
if ( ( nTextY + nTextExtraYOffset ) > GetTextRanger()->GetBoundRect().Bottom() )
{
nXWidth = !IsVertical() ? GetPaperSize().Width() : GetPaperSize().Height();
@@ -3956,8 +3956,8 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNe
{
// in this case one can redraw directly without invalidating the
// Portions
sal_uInt16 nFirstPortion = Min( (sal_uInt16)aOldPositions.Min(), nNewPos );
sal_uInt16 nLastPortion = Max( (sal_uInt16)aOldPositions.Max(), nNewPos );
sal_uInt16 nFirstPortion = std::min( (sal_uInt16)aOldPositions.Min(), nNewPos );
sal_uInt16 nLastPortion = std::max( (sal_uInt16)aOldPositions.Max(), nNewPos );
ParaPortion* pUpperPortion = GetParaPortions().SafeGetObject( nFirstPortion );
ParaPortion* pLowerPortion = GetParaPortions().SafeGetObject( nLastPortion );
@@ -3973,7 +3973,7 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_uInt16 nNe
else
{
// redraw from the upper invalid position
sal_uInt16 nFirstInvPara = Min( (sal_uInt16)aOldPositions.Min(), nNewPos );
sal_uInt16 nFirstInvPara = std::min( (sal_uInt16)aOldPositions.Min(), nNewPos );
InvalidateFromParagraph( nFirstInvPara );
}
return aSel;
+1 -1
View File
@@ -988,7 +988,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& rItem, SvStream& rOutput,
rOutput << "{\\*\\updnprop" << OString::valueOf(
static_cast<sal_Int32>(nProp100)).getStr() << '}';
}
long nUpDown = nFontHeight * Abs( nEsc ) / 100;
long nUpDown = nFontHeight * std::abs( nEsc ) / 100;
OString aUpDown = OString::valueOf(
static_cast<sal_Int32>(nUpDown));
if ( nEsc < 0 )
+1 -1
View File
@@ -209,7 +209,7 @@ void SvxFont::DoOnCapitals(SvxDoCapitals &rDo, const xub_StrLen nPartLen) const
const xub_StrLen nLen = STRING_LEN == nPartLen ? rDo.GetLen() : nPartLen;
const XubString aTxt( CalcCaseMap( rTxt ) );
const sal_uInt16 nTxtLen = Min( rTxt.Len(), nLen );
const sal_uInt16 nTxtLen = std::min( rTxt.Len(), nLen );
sal_uInt16 nPos = 0;
sal_uInt16 nOldPos = nPos;
+1 -1
View File
@@ -2491,7 +2491,7 @@ bool SvxEscapementItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
case MID_ESC:
{
sal_Int16 nVal = sal_Int16();
if( (rVal >>= nVal) && (Abs(nVal) <= 101))
if( (rVal >>= nVal) && (std::abs(nVal) <= 101))
nEsc = nVal;
else
return sal_False;
+3 -3
View File
@@ -240,7 +240,7 @@ void Outliner::SetMaxDepth( sal_Int16 nDepth, sal_Bool bCheckParagraphs )
{
if( nMaxDepth != nDepth )
{
nMaxDepth = Min( nDepth, (sal_Int16)(SVX_MAX_NUM-1) );
nMaxDepth = std::min( nDepth, (sal_Int16)(SVX_MAX_NUM-1) );
if( bCheckParagraphs )
{
@@ -1580,7 +1580,7 @@ Rectangle Outliner::ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_B
const SvxLRSpaceItem& rLR = (const SvxLRSpaceItem&) pEditEngine->GetParaAttrib( nPara, bOutlineMode ? EE_PARA_OUTLLRSPACE : EE_PARA_LRSPACE );
aTopLeft.X() = rLR.GetTxtLeft() + rLR.GetTxtFirstLineOfst() + nSpaceBefore;
long nBulletWidth = Max( (long) -rLR.GetTxtFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
long nBulletWidth = std::max( (long) -rLR.GetTxtFirstLineOfst(), (long) ((-pFmt->GetFirstLineOffset()) + pFmt->GetCharTextDistance()) );
if ( nBulletWidth < aBulletSize.Width() ) // The Bullet creates its space
nBulletWidth = aBulletSize.Width();
@@ -1839,7 +1839,7 @@ IMPL_LINK( Outliner, EndMovingParagraphsHdl, MoveParagraphsInfo*, pInfos )
DBG_CHKTHIS(Outliner,0);
pParaList->MoveParagraphs( pInfos->nStartPara, pInfos->nDestPara, pInfos->nEndPara - pInfos->nStartPara + 1 );
sal_uInt16 nChangesStart = Min( pInfos->nStartPara, pInfos->nDestPara );
sal_uInt16 nChangesStart = std::min( pInfos->nStartPara, pInfos->nDestPara );
sal_uInt16 nParas = (sal_uInt16)pParaList->GetParagraphCount();
for ( sal_uInt16 n = nChangesStart; n < nParas; n++ )
ImplCalcBulletText( n, sal_False, sal_False );
+1 -1
View File
@@ -694,7 +694,7 @@ void Writer::Impl_writeText( const Point& rPos, const String& rText, const sal_I
if( ( aOldFont.GetStrikeout() != STRIKEOUT_NONE ) || ( aOldFont.GetUnderline() != UNDERLINE_NONE ) )
{
Polygon aPoly( 4 );
const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
const long nLineHeight = std::max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
if( aOldFont.GetStrikeout() != STRIKEOUT_NONE )
{
+9 -9
View File
@@ -854,11 +854,11 @@ sal_Bool TIFFReader::ConvertScanline( sal_uLong nY )
}
}
nBlack = nSamp[ 3 ];
nRed = (sal_uInt8) Max( 0L, 255L - ( ( (long) nSamp[ 0 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
nRed = (sal_uInt8) std::max( 0L, 255L - ( ( (long) nSamp[ 0 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
255L/(long)(nMaxSampleValue-nMinSampleValue) ) );
nGreen = (sal_uInt8) Max( 0L, 255L - ( ( (long) nSamp[ 1 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
nGreen = (sal_uInt8) std::max( 0L, 255L - ( ( (long) nSamp[ 1 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
255L/(long)(nMaxSampleValue-nMinSampleValue) ) );
nBlue = (sal_uInt8) Max( 0L, 255L - ( ( (long) nSamp[ 2 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
nBlue = (sal_uInt8) std::max( 0L, 255L - ( ( (long) nSamp[ 2 ] + nBlack - ( ( (long) nMinSampleValue ) << 1 ) ) *
255L/(long)(nMaxSampleValue-nMinSampleValue) ) );
pAcc->SetPixel( nY, nx, Color ( (sal_uInt8)nRed, (sal_uInt8)nGreen, (sal_uInt8)nBlue ) );
}
@@ -1156,7 +1156,7 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
pTIFF->ResetError();
break;
};
nMaxPos = Max( pTIFF->Tell(), nMaxPos );
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
*pTIFF >> nNumTags;
@@ -1166,15 +1166,15 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
*pTIFF >> nTagType >> nDataType >> nDataLen >> nOffset;
if( DataTypeSize() * nDataLen > 4 )
nMaxPos = Max( nOrigPos + nOffset + DataTypeSize() * nDataLen, nMaxPos );
nMaxPos = std::max( nOrigPos + nOffset + DataTypeSize() * nDataLen, nMaxPos );
}
*pTIFF >> nOffset;
if ( pTIFF->IsEof() )
nOffset = 0;
nMaxPos = Max( pTIFF->Tell(), nMaxPos );
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
if ( !nOffset )
nMaxPos = Max( pTIFF->Tell(), nMaxPos );
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
}
while( nOffset );
@@ -1301,9 +1301,9 @@ sal_Bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
if ( bStatus && ReadMap( 10, 60 ) )
{
nMaxPos = Max( pTIFF->Tell(), nMaxPos );
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
MakePalCol();
nMaxPos = Max( pTIFF->Tell(), nMaxPos );
nMaxPos = std::max( pTIFF->Tell(), nMaxPos );
}
else
bStatus = sal_False;
+1 -1
View File
@@ -2706,7 +2706,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText,
if( rFont.GetStrikeout() != STRIKEOUT_NONE || rFont.GetUnderline() != UNDERLINE_NONE )
{
Polygon aPoly( 4 );
const long nLineHeight = Max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
const long nLineHeight = std::max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
if( rFont.GetStrikeout() )
{
+1 -1
View File
@@ -119,7 +119,7 @@ OGroupComp::OGroupComp(const Reference<XPropertySet>& rxSet, sal_Int32 nInsertPo
{
if (hasProperty( PROPERTY_TABINDEX, m_xComponent ) )
// Indices kleiner 0 werden wie 0 behandelt
m_nTabIndex = Max(getINT16(m_xComponent->getPropertyValue( PROPERTY_TABINDEX )) , sal_Int16(0));
m_nTabIndex = std::max(getINT16(m_xComponent->getPropertyValue( PROPERTY_TABINDEX )) , sal_Int16(0));
}
}
+1 -1
View File
@@ -2537,7 +2537,7 @@ sal_Bool SvtFileDialog::IsolateFilterFromPath_Impl( String& rPath, String& rFilt
if ( INET_PROT_NOT_VALID != eProt && INET_PROT_FILE != eProt )
nQuestionMarkPos = STRING_NOTFOUND;
}
sal_uInt16 nWildCardPos = Min( rPath.Search( FILEDIALOG_DEF_WILDCARD ), nQuestionMarkPos );
sal_uInt16 nWildCardPos = std::min( rPath.Search( FILEDIALOG_DEF_WILDCARD ), nQuestionMarkPos );
rFilter = aEmpty;
if ( nWildCardPos != STRING_NOTFOUND )
+1 -1
View File
@@ -698,7 +698,7 @@ sal_Bool DictionaryNeo::addEntry_Impl(const uno::Reference< XDictionaryEntry > x
DBG_ASSERT(!bNeedEntries, "lng : entries still not loaded");
if (nCount >= aEntries.getLength())
aEntries.realloc( Max(2 * nCount, nCount + 32) );
aEntries.realloc( std::max(2 * nCount, nCount + 32) );
uno::Reference< XDictionaryEntry > *pEntry = aEntries.getArray();
// shift old entries right
+1 -1
View File
@@ -152,7 +152,7 @@ Sequence< OUString > MergeProposalSeqs(
sal_Int32 nAltCount2 = rAlt2.getLength();
const OUString *pAlt2 = rAlt2.getConstArray();
sal_Int32 nCountNew = Min( nAltCount1 + nAltCount2, (sal_Int32) MAX_PROPOSALS );
sal_Int32 nCountNew = std::min( nAltCount1 + nAltCount2, (sal_Int32) MAX_PROPOSALS );
aMerged.realloc( nCountNew );
OUString *pMerged = aMerged.getArray();
+2 -2
View File
@@ -758,8 +758,8 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
checkMovementAllowed(rMEvt);
if ( !m_rView.AreObjectsMarked() &&
Abs(m_aMDPos.X() - aPos.X()) < nHitLog &&
Abs(m_aMDPos.Y() - aPos.Y()) < nHitLog &&
std::abs(m_aMDPos.X() - aPos.X()) < nHitLog &&
std::abs(m_aMDPos.Y() - aPos.Y()) < nHitLog &&
!rMEvt.IsShift() && !rMEvt.IsMod2() )
{
SdrPageView* pPV = m_rView.GetSdrPageView();
+1 -1
View File
@@ -225,7 +225,7 @@ inline const ScPatternAttr* ScAttrIterator::Next( SCROW& rTop, SCROW& rBottom )
if ( nPos < pArray->nCount && nRow <= nEndRow )
{
rTop = nRow;
rBottom = Min( pArray->pData[nPos].nRow, nEndRow );
rBottom = std::min( pArray->pData[nPos].nRow, nEndRow );
pRet = pArray->pData[nPos].pPattern;
nRow = rBottom + 1;
++nPos;
+3 -3
View File
@@ -222,9 +222,9 @@ inline sal_Bool ScBigRange::In( const ScBigRange& r ) const
inline sal_Bool ScBigRange::Intersects( const ScBigRange& 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() )
);
}
+20 -20
View File
@@ -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));
}
}
+4 -4
View File
@@ -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 );
}
}
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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,
+7 -7
View File
@@ -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
+5 -5
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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 )
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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)
{
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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))
+4 -4
View File
@@ -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;
+2 -2
View File
@@ -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--;
+3 -3
View File
@@ -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() )
);
}
+7 -6
View File
@@ -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;
}
+3 -3
View File
@@ -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)
{
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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 )
{
+1 -1
View File
@@ -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() )
{
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 );
}
+1 -1
View File
@@ -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 )
+2 -2
View File
@@ -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)) )
{
+2 -2
View File
@@ -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();
+1 -1
View File
@@ -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] )
+5 -5
View File
@@ -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
@@ -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;
}
@@ -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 )
{
@@ -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 );
}
}
}
+1 -1
View File
@@ -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;
}
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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];
+1 -1
View File
@@ -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 ];
+3 -3
View File
@@ -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
+18 -18
View File
@@ -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 );
}
}
+9 -9
View File
@@ -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 )
+6 -6
View File
@@ -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:
+4 -4
View File
@@ -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;
+3 -3
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+3 -3
View File
@@ -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 );
}
}
+2 -2
View File
@@ -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();
}
+4 -4
View File
@@ -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
+2 -2
View File
@@ -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();
}
+2 -2
View File
@@ -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 );
+2 -2
View File
@@ -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 );
}
+4 -4
View File
@@ -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);
+2 -2
View File
@@ -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 );
+3 -3
View File
@@ -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 )
{
+1 -1
View File
@@ -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;
+6 -6
View File
@@ -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
+6 -6
View File
@@ -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 );
}
}
+2 -2
View File
@@ -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 )
{
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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 );
}
+1 -1
View File
@@ -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 ---
+5 -5
View File
@@ -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;
}
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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 )
{
+11 -11
View File
@@ -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() ) +
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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 )
{

Some files were not shown because too many files have changed in this diff Show More