diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-26 09:50:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-03 10:37:51 +0200 |
commit | 8bc951daf79decbd8a599a409c6d33c5456710e0 (patch) | |
tree | 61d220d83e90a176fbcbe667827eee4b9631a4ca /svtools | |
parent | 10eefdfa6c0250c6069e641e404f34e5a91fe993 (diff) |
long->sal_Int32 in tools/gen.hxx
which triggered a lot of changes in sw/
Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6
Reviewed-on: https://gerrit.libreoffice.org/48806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/brwbox1.cxx | 4 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox2.cxx | 8 | ||||
-rw-r--r-- | svtools/source/brwbox/brwbox3.cxx | 2 | ||||
-rw-r--r-- | svtools/source/brwbox/datwin.cxx | 2 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 10 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 2 | ||||
-rw-r--r-- | svtools/source/control/scriptedtext.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 6 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/imap2.cxx | 8 | ||||
-rw-r--r-- | svtools/source/svhtml/htmlout.cxx | 20 |
14 files changed, 39 insertions, 39 deletions
diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index ee4326154038..3f3f1d600c85 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -2034,8 +2034,8 @@ tools::Rectangle BrowseBox::ImplFieldRectPixel( long nRow, sal_uInt16 nColumnId // assemble the Rectangle relative to DataWin return tools::Rectangle( Point( nColX + MIN_COLUMNWIDTH, nRowY ), - Size( (pCols[nCol]->Width() == LONG_MAX - ? LONG_MAX - (nColX + MIN_COLUMNWIDTH) : pCols[ nCol ]->Width() - 2*MIN_COLUMNWIDTH), + Size( (pCols[nCol]->Width() == RECT_MAX + ? RECT_MAX - (nColX + MIN_COLUMNWIDTH) : pCols[ nCol ]->Width() - 2*MIN_COLUMNWIDTH), GetDataRowHeight() - 1 ) ); } diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 89c3babea3c7..a26159073aac 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -941,7 +941,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec if (nY <= aOverallAreaBRPos.Y()) _rOut.DrawLine( Point( nHLineX, nY ), Point( bVLines - ? std::min(long(aPos.X() - 1), aOverallAreaBRPos.X()) + ? std::min<sal_Int32>(aPos.X() - 1, aOverallAreaBRPos.X()) : aOverallAreaBRPos.X(), nY ) ); _rOut.Pop(); @@ -1357,7 +1357,7 @@ void BrowseBox::MouseButtonDown( const MouseEvent& rEvt ) // event occurred out of data area if ( rEvt.IsRight() ) pDataWin->Command( - CommandEvent( Point( 1, LONG_MAX ), CommandEventId::ContextMenu, true ) ); + CommandEvent( Point( 1, RECT_MAX ), CommandEventId::ContextMenu, true ) ); else SetNoSelection(); } @@ -1392,7 +1392,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt ) pDataWin->HideTracking() ; // check allowed width and new delta - nDragX = std::max( rEvt.GetPosPixel().X(), nMinResizeX ); + nDragX = std::max<sal_Int32>( rEvt.GetPosPixel().X(), nMinResizeX ); long nDeltaX = nDragX - nResizeX; sal_uInt16 nId = GetColumnId(nResizeCol); sal_uLong nOldWidth = GetColumnWidth(nId); @@ -1422,7 +1422,7 @@ void BrowseBox::MouseButtonUp( const MouseEvent & rEvt ) pDataWin->HideTracking(); // width changed? - nDragX = std::max( rEvt.GetPosPixel().X(), nMinResizeX ); + nDragX = std::max<sal_Int32>( rEvt.GetPosPixel().X(), nMinResizeX ); if ( (nDragX - nResizeX) != static_cast<long>(pCols[ nResizeCol ]->Width()) ) { // resize column diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index e43f634e36bd..12a4772af1cf 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -507,7 +507,7 @@ void BrowseBox::GetAllSelectedColumns( css::uno::Sequence< sal_Int32 >& _rColumn { const Range& rRange = pColumnSel->GetRange( nRange ); // loop has to include aRange.Max() - for( sal_Int32 nCol = rRange.Min(); nCol <= static_cast<sal_Int32>(rRange.Max()); ++nCol ) + for( sal_Int32 nCol = rRange.Min(); nCol <= rRange.Max(); ++nCol ) { DBG_ASSERT( nIndex < nCount, "GetAllSelectedColumns - range overflow" ); diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 881396dfa853..4598b9f8af3c 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -153,7 +153,7 @@ void BrowserColumn::Draw( BrowseBox const & rBox, OutputDevice& rDev, const Poin else { // paint data column - long nWidth = Width() == LONG_MAX ? rBox.GetDataWindow().GetSizePixel().Width() : Width(); + long nWidth = Width() == RECT_MAX ? rBox.GetDataWindow().GetSizePixel().Width() : Width(); rBox.DoPaintField( rDev, tools::Rectangle( diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index 12e574e345f9..df71c7bcabad 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -386,10 +386,10 @@ public: const tools::Rectangle& GetEntryBoundRect( SvxIconChoiceCtrlEntry* ); void InvalidateBoundingRect( tools::Rectangle& rRect ) { - rRect.SetRight(LONG_MAX); + rRect.SetRight(RECT_MAX); bBoundRectsDirty = true; } - static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } + static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != RECT_MAX ); } void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected, bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 48c65c97deb6..059948681d62 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -289,7 +289,7 @@ void SvxIconChoiceCtrl_Impl::InsertEntry( SvxIconChoiceCtrlEntry* pEntry, size_t // If the UpdateMode is true, don't set all bounding rectangles to // 'to be checked', but only the bounding rectangle of the new entry. // Thus, don't call InvalidateBoundingRect! - pEntry->aRect.SetRight( LONG_MAX ); + pEntry->aRect.SetRight( RECT_MAX ); if( bUpdateMode ) { FindBoundingRect( pEntry ); @@ -1859,7 +1859,7 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingWidth() const switch( nWinBits & VIEWMODE_MASK ) { case WB_ICON: - nWidth = std::max( nStringWidth, aImageSize.Width() ); + nWidth = std::max<sal_Int32>( nStringWidth, aImageSize.Width() ); break; case WB_SMALLICON: @@ -1887,7 +1887,7 @@ long SvxIconChoiceCtrl_Impl::CalcBoundingHeight() const case WB_SMALLICON: case WB_DETAILS: - nHeight = std::max( aImageSize.Height(), nStringHeight ); + nHeight = std::max<sal_Int32>( aImageSize.Height(), nStringHeight ); break; } if( nHeight > nMaxBoundHeight ) @@ -2349,7 +2349,7 @@ tools::Rectangle SvxIconChoiceCtrl_Impl::CalcMaxTextRect( const SvxIconChoiceCtr if( aBoundRect.Left() > aBoundRect.Right()) aBoundRect.SetLeft( aBoundRect.Right() ); if( pEntry->GetTextMode() == SvxIconChoiceCtrlTextMode::Full ) - aBoundRect.SetBottom( LONG_MAX ); + aBoundRect.SetBottom( RECT_MAX ); } else { @@ -3267,7 +3267,7 @@ bool SvxIconChoiceCtrl_Impl::RequestHelp( const HelpEvent& rHEvt ) return false; tools::Rectangle aOptTextRect( aTextRect ); - aOptTextRect.SetBottom( LONG_MAX ); + aOptTextRect.SetBottom( RECT_MAX ); DrawTextFlags nNewFlags = nCurTextDrawFlags; nNewFlags &= ~DrawTextFlags( DrawTextFlags::Clip | DrawTextFlags::EndEllipsis ); aOptTextRect = pView->GetTextRect( aOptTextRect, aEntryText, nNewFlags ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 49ac834eecac..c8771a383b25 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3159,7 +3159,7 @@ Size SvTreeListBox::GetOptimalSize() const aRet.AdjustHeight(rStyleSettings.GetBorderSize() * 2 ); } long nMinWidth = nMinWidthInChars * approximate_char_width(); - aRet.setWidth( std::max(aRet.Width(), nMinWidth) ); + aRet.setWidth( std::max<sal_Int32>(aRet.Width(), nMinWidth) ); return aRet; } diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 82cd893e9710..918b6984845e 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -415,7 +415,7 @@ void LineListBox::ImpGetLine( long nLine1, long nLine2, long nDistance, //line within that long nMinWidth = GetTextWidth("----------"); Size aSize = CalcSubEditSize(); - aSize.setWidth( std::max(nMinWidth, aSize.Width()) ); + aSize.setWidth( std::max<sal_Int32>(nMinWidth, aSize.Width()) ); aSize.AdjustWidth( -(aTxtSize.Width()) ); aSize.AdjustWidth( -6 ); aSize.setHeight( aTxtSize.Height() ); diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 16b90aedd764..9b3eb3e95749 100644 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -138,11 +138,11 @@ void SvtScriptedTextHelper_Impl::CalculateSizes() // calculate maximum font height SetOutDevFont( i18n::ScriptType::LATIN ); - maTextSize.setHeight( std::max( maTextSize.Height(), mrOutDevice.GetTextHeight() ) ); + maTextSize.setHeight( std::max<sal_Int32>( maTextSize.Height(), mrOutDevice.GetTextHeight() ) ); SetOutDevFont( i18n::ScriptType::ASIAN ); - maTextSize.setHeight( std::max( maTextSize.Height(), mrOutDevice.GetTextHeight() ) ); + maTextSize.setHeight( std::max<sal_Int32>( maTextSize.Height(), mrOutDevice.GetTextHeight() ) ); SetOutDevFont( i18n::ScriptType::COMPLEX ); - maTextSize.setHeight( std::max( maTextSize.Height(), mrOutDevice.GetTextHeight() ) ); + maTextSize.setHeight( std::max<sal_Int32>( maTextSize.Height(), mrOutDevice.GetTextHeight() ) ); mrOutDevice.Pop(); } diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index dd94ed5fd8f3..048208233b97 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -541,7 +541,7 @@ static long ImplGetNativeCheckAndRadioSize(vcl::RenderContext const & rRenderCon ) { rRadioHeight = aNativeBounds.GetHeight(); - rMaxWidth = std::max (rMaxWidth, aNativeContent.GetWidth()); + rMaxWidth = std::max<sal_Int32>(rMaxWidth, aNativeContent.GetWidth()); } } return std::max(rCheckHeight, rRadioHeight); @@ -570,7 +570,7 @@ Size ToolbarMenu::implCalcSize() if( pEntry && pEntry->mbHasImage ) { Size aImgSz( pEntry->maImage.GetSizePixel() ); - nMinMenuItemHeight = std::max( nMinMenuItemHeight, aImgSz.Height() + 6 ); + nMinMenuItemHeight = std::max<sal_Int32>( nMinMenuItemHeight, aImgSz.Height() + 6 ); aMaxImgSz.setWidth( std::max( aMaxImgSz.Width(), aImgSz.Width() ) ); } } @@ -604,7 +604,7 @@ Size ToolbarMenu::implCalcSize() { Size aControlSize( pEntry->mpControl->GetOutputSizePixel() ); - nMaxTextWidth = std::max( aControlSize.Width(), nMaxTextWidth ); + nMaxTextWidth = std::max<sal_Int32>( aControlSize.Width(), nMaxTextWidth ); pEntry->maSize.setHeight( aControlSize.Height() + 1 ); } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 54d7e3bbbf02..85823fd25e5b 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -2244,7 +2244,7 @@ Size ValueSet::GetLargestItemSize() { aSize.AdjustHeight(3 * NAME_LINE_HEIGHT + maVirDev->GetTextHeight() ); - aSize.setWidth( std::max(aSize.Width(), + aSize.setWidth( std::max<sal_Int32>(aSize.Width(), maVirDev->GetTextWidth(pItem->maText) + NAME_OFFSET) ); } diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 2ea05073f492..a576181f1f12 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -566,7 +566,7 @@ void AssignmentPersistentData::ImplCommit() long nListBoxWidth = m_pImpl->pFields[0]->approximate_char_width() * 20; for (auto const& fieldLabel : m_pImpl->aFieldLabels) { - nLabelWidth = std::max(nLabelWidth, FixedText::getTextDimensions(m_pImpl->pFieldLabels[0], fieldLabel, 0x7FFFFFFF).Width()); + nLabelWidth = std::max<sal_Int32>(nLabelWidth, FixedText::getTextDimensions(m_pImpl->pFieldLabels[0], fieldLabel, 0x7FFFFFFF).Width()); } for (sal_Int32 row=0; row<FIELD_PAIRS_VISIBLE; ++row) { diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx index e1424f5d47b4..d8a6f5a9e312 100644 --- a/svtools/source/misc/imap2.cxx +++ b/svtools/source/misc/imap2.cxx @@ -42,9 +42,9 @@ void IMapObject::AppendCERNCoords(OStringBuffer& rBuf, const Point& rPoint100) const Point aPixPt( Application::GetDefaultDevice()->LogicToPixel( rPoint100, MapMode( MapUnit::Map100thMM ) ) ); rBuf.append('('); - rBuf.append(static_cast<sal_Int32>(aPixPt.X())); + rBuf.append(aPixPt.X()); rBuf.append(','); - rBuf.append(static_cast<sal_Int32>(aPixPt.Y())); + rBuf.append(aPixPt.Y()); rBuf.append(") "); } @@ -52,9 +52,9 @@ void IMapObject::AppendNCSACoords(OStringBuffer& rBuf, const Point& rPoint100) { const Point aPixPt( Application::GetDefaultDevice()->LogicToPixel( rPoint100, MapMode( MapUnit::Map100thMM ) ) ); - rBuf.append(static_cast<sal_Int32>(aPixPt.X())); + rBuf.append(aPixPt.X()); rBuf.append(','); - rBuf.append(static_cast<sal_Int32>(aPixPt.Y())); + rBuf.append(aPixPt.Y()); rBuf.append(' '); } diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 8ee63d19b757..8253334243c9 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -647,13 +647,13 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, tools::Rectangle aRect( pRectObj->GetRectangle() ); aCoords = OStringBuffer() - .append(static_cast<sal_Int32>(aRect.Left())) + .append(aRect.Left()) .append(',') - .append(static_cast<sal_Int32>(aRect.Top())) + .append(aRect.Top()) .append(',') - .append(static_cast<sal_Int32>(aRect.Right())) + .append(aRect.Right()) .append(',') - .append(static_cast<sal_Int32>(aRect.Bottom())) + .append(aRect.Bottom()) .makeStringAndClear(); } break; @@ -666,9 +666,9 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, long nOff = pCirc->GetRadius(); aCoords = OStringBuffer() - .append(static_cast<sal_Int32>(aCenter.X())) + .append(aCenter.X()) .append(',') - .append(static_cast<sal_Int32>(aCenter.Y())) + .append(aCenter.Y()) .append(',') .append(static_cast<sal_Int32>(nOff)) .makeStringAndClear(); @@ -685,17 +685,17 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, if( nCount>0 ) { const Point& rPoint = aPoly[0]; - aTmpBuf.append(static_cast<sal_Int32>(rPoint.X())) + aTmpBuf.append(rPoint.X()) .append(',') - .append(static_cast<sal_Int32>(rPoint.Y())); + .append(rPoint.Y()); } for( sal_uInt16 j=1; j<nCount; j++ ) { const Point& rPoint = aPoly[j]; aTmpBuf.append(',') - .append(static_cast<sal_Int32>(rPoint.X())) + .append(rPoint.X()) .append(',') - .append(static_cast<sal_Int32>(rPoint.Y())); + .append(rPoint.Y()); } aCoords = aTmpBuf.makeStringAndClear(); } |