diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2013-04-11 00:21:40 -0300 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2013-04-20 11:09:54 +0000 |
commit | 0f200cc30ea75fdce59f7bb6ae87ebc85729e2a4 (patch) | |
tree | 2e2c28f9500f81825cdadcbabd131da767ddbb49 /sfx2 | |
parent | 5414a3eecdb09be928313477792acfe1d3534645 (diff) |
fdo#63154: Change Min/Max/Abs for std::min/max/abs
Now all these usages were removed from LO.
Change-Id: I8a7233db20abdcdbb18428ad4004c78cc516a0e6
Reviewed-on: https://gerrit.libreoffice.org/3326
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/bastyp/bitset.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/control/bindings.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/srchdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 2 |
6 files changed, 11 insertions, 10 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 5ccb89b35801..55ef86a3b272 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1008,7 +1008,7 @@ SearchTabPage_Impl::~SearchTabPage_Impl() nChecked = aScopeCB.IsChecked() ? 1 : 0; aUserData += OUString::number( nChecked ); aUserData += ';'; - sal_uInt16 nCount = Min( aSearchED.GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries + sal_uInt16 nCount = std::min( aSearchED.GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries for ( sal_uInt16 i = 0; i < nCount; ++i ) { @@ -2246,7 +2246,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText ) void SfxHelpTextWindow_Impl::SetOnStartupBoxPosition() { - long nX = Max( GetOutputSizePixel().Width() - aOnStartupCB.GetSizePixel().Width(), nMinPos ); + long nX = std::max( GetOutputSizePixel().Width() - aOnStartupCB.GetSizePixel().Width(), nMinPos ); Point aPos = aOnStartupCB.GetPosPixel(); aPos.X() = nX; aOnStartupCB.SetPosPixel( aPos ); diff --git a/sfx2/source/bastyp/bitset.cxx b/sfx2/source/bastyp/bitset.cxx index 1e536aa8a46c..f1798f515d81 100644 --- a/sfx2/source/bastyp/bitset.cxx +++ b/sfx2/source/bastyp/bitset.cxx @@ -23,6 +23,7 @@ #include <string.h> // memset(), memcpy() #include <limits.h> // USHRT_MAX +#include <algorithm> //==================================================================== // add nOffset to each bit-value in the set @@ -189,7 +190,7 @@ BitSet& BitSet::operator-=(sal_uInt16 nBit) BitSet& BitSet::operator|=( const BitSet& rSet ) { - sal_uInt16 nMax = Min(nBlocks, rSet.nBlocks); + sal_uInt16 nMax = std::min(nBlocks, rSet.nBlocks); // expand the bitmap if ( nBlocks < rSet.nBlocks ) diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 5df40c1ff372..722c93f17f12 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -853,7 +853,7 @@ void SfxBindings::Invalidate if ( pCache ) { pCache->Invalidate(sal_False); - pImp->nMsgPos = Min(GetSlotPos(nId), pImp->nMsgPos); + pImp->nMsgPos = std::min(GetSlotPos(nId), pImp->nMsgPos); if ( !nRegLevel ) { pImp->aTimer.Stop(); @@ -890,7 +890,7 @@ void SfxBindings::Invalidate if ( !pDispatcher || pImp->bAllDirty ) return; - pImp->nMsgPos = Min(GetSlotPos(nId), pImp->nMsgPos); + pImp->nMsgPos = std::min(GetSlotPos(nId), pImp->nMsgPos); if ( !nRegLevel ) { pImp->aTimer.Stop(); @@ -1721,7 +1721,7 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine) { SAL_INFO( "sfx2.control", - std::setw(Min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this + std::setw(std::min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this << " Level = " << nRegLevel << " SfxBindings::EnterRegistrations " << (pFile ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); @@ -1820,7 +1820,7 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int SAL_INFO( "sfx2.control", - std::setw(Min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this + std::setw(std::min(nRegLevel, sal_uInt16(8))) << ' ' << "this = " << this << " Level = " << nRegLevel << " SfxBindings::LeaveRegistrations " << (pFile ? SAL_STREAM("File: " << pFile << " Line: " << nLine) : "")); diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index b53ab74dbfa0..dedd23f6ffce 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -231,7 +231,7 @@ void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOpt pCurrentOptions->SetReduceBitmaps( m_pReduceBitmapsCB->IsChecked() ); pCurrentOptions->SetReducedBitmapMode( m_pReduceBitmapsOptimalRB->IsChecked() ? PRINTER_BITMAP_OPTIMAL : ( m_pReduceBitmapsNormalRB->IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) ); - pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ Min( (sal_uInt16) m_pReduceBitmapsResolutionLB->GetSelectEntryPos(), + pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ std::min( (sal_uInt16) m_pReduceBitmapsResolutionLB->GetSelectEntryPos(), (sal_uInt16)( (sizeof (aDPIArray) / sizeof (aDPIArray[0])) - 1 ) ) ] ); pCurrentOptions->SetReducedBitmapIncludesTransparency( m_pReduceBitmapsTransparencyCB->IsChecked() ); pCurrentOptions->SetConvertToGreyscales( m_pConvertToGreyscalesCB->IsChecked() ); diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 40e5027d7fb7..7ed252816258 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -111,7 +111,7 @@ void SearchDialog::SaveConfig() SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName ); aViewOpt.SetWindowState(OStringToOUString(m_sWinState, RTL_TEXTENCODING_ASCII_US)); String sUserData; - sal_uInt16 i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT ); + sal_uInt16 i = 0, nCount = std::min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT ); for ( ; i < nCount; ++i ) { sUserData += m_aSearchEdit.GetEntry(i); diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 6d993e8515c5..610684d1d384 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -531,7 +531,7 @@ void SfxDocTplService_Impl::readFolderList() NamePair_Impl* pPair; - sal_uInt16 nCount = (sal_uInt16)( Min( aShortNames.Count(), aLongNames.Count() ) ); + sal_uInt16 nCount = (sal_uInt16)( std::min( aShortNames.Count(), aLongNames.Count() ) ); for ( sal_uInt16 i=0; i<nCount; i++ ) { |