summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-26 09:50:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 10:37:51 +0200
commit8bc951daf79decbd8a599a409c6d33c5456710e0 (patch)
tree61d220d83e90a176fbcbe667827eee4b9631a4ca /svx
parent10eefdfa6c0250c6069e641e404f34e5a91fe993 (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 'svx')
-rw-r--r--svx/source/dialog/pagectrl.cxx2
-rw-r--r--svx/source/dialog/swframeexample.cxx4
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx4
-rw-r--r--svx/source/fmcomp/fmgridif.cxx2
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/sidebar/PanelLayout.cxx4
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx2
7 files changed, 11 insertions, 11 deletions
diff --git a/svx/source/dialog/pagectrl.cxx b/svx/source/dialog/pagectrl.cxx
index eb2fc6ef92fd..e141a664f48f 100644
--- a/svx/source/dialog/pagectrl.cxx
+++ b/svx/source/dialog/pagectrl.cxx
@@ -91,7 +91,7 @@ VCL_BUILDER_FACTORY(SvxPageWindow)
void SvxPageWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
Fraction aXScale(aWinSize.Width(), std::max(long(aSize.Width() * 2 + aSize.Width() / 8), 1L));
- Fraction aYScale(aWinSize.Height(), std::max(aSize.Height(), 1L));
+ Fraction aYScale(aWinSize.Height(), std::max<sal_Int32>(aSize.Height(), 1));
MapMode aMapMode(rRenderContext.GetMapMode());
if(aYScale < aXScale)
diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx
index ceacc555d0e6..e7e3e157a5bb 100644
--- a/svx/source/dialog/swframeexample.cxx
+++ b/svx/source/dialog/swframeexample.cxx
@@ -216,8 +216,8 @@ void SvxSwFrameExample::InitAllRects_Impl(vcl::RenderContext& rRenderContext)
aFrmSize = Size(nLBorder - 3, (aTextLine.GetHeight() + 2) * 3);
break;
}
- aFrmSize.setWidth( std::max(5L, aFrmSize.Width()) );
- aFrmSize.setHeight( std::max(5L, aFrmSize.Height()) );
+ aFrmSize.setWidth( std::max<sal_Int32>(5, aFrmSize.Width()) );
+ aFrmSize.setHeight( std::max<sal_Int32>(5, aFrmSize.Height()) );
}
else
{
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 83e507a54eb2..b36fa382badb 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1494,7 +1494,7 @@ void FmGridControl::RowHeightChanged()
try
{
sal_Int32 nUnzoomedPixelHeight = CalcReverseZoom( GetDataRowHeight() );
- Any aProperty = makeAny( static_cast<sal_Int32>(PixelToLogic( Point(0, nUnzoomedPixelHeight), MapMode(MapUnit::Map10thMM)).Y()) );
+ Any aProperty = makeAny( PixelToLogic( Point(0, nUnzoomedPixelHeight), MapMode(MapUnit::Map10thMM)).Y() );
xModel->setPropertyValue( FM_PROP_ROWHEIGHT, aProperty );
}
catch( const Exception& )
@@ -1517,7 +1517,7 @@ void FmGridControl::ColumnResized(sal_uInt16 nId)
sal_Int32 nColumnWidth = GetColumnWidth(nId);
nColumnWidth = CalcReverseZoom(nColumnWidth);
// convert to 10THMM
- aWidth <<= static_cast<sal_Int32>(PixelToLogic(Point(nColumnWidth, 0), MapMode(MapUnit::Map10thMM)).X());
+ aWidth <<= PixelToLogic(Point(nColumnWidth, 0), MapMode(MapUnit::Map10thMM)).X();
xColModel->setPropertyValue(FM_PROP_WIDTH, aWidth);
}
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 32bdc76ab2c9..5611196b2000 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2049,7 +2049,7 @@ Any FmXGridPeer::getProperty( const OUString& _rPropertyName )
sal_Int32 nPixelHeight = pGrid->GetDataRowHeight();
// take the zoom factor into account
nPixelHeight = pGrid->CalcReverseZoom(nPixelHeight);
- aProp <<= static_cast<sal_Int32>(pGrid->PixelToLogic(Point(0, nPixelHeight), MapMode(MapUnit::Map10thMM)).Y());
+ aProp <<= pGrid->PixelToLogic(Point(0, nPixelHeight), MapMode(MapUnit::Map10thMM)).Y();
}
else if ( _rPropertyName == FM_PROP_HASNAVIGATION )
{
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index 32fee03bee82..8ff45be133d5 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -959,8 +959,8 @@ sal_uInt32 GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point&
}
}
- rSelPos.setX( std::max( std::min( rSelPos.X(), aOutputSizePixel.Width() - 1 ), 0L ) );
- rSelPos.setY( std::max( std::min( rSelPos.Y(), aOutputSizePixel.Height() - 1 ), 0L ) );
+ rSelPos.setX( std::max<sal_Int32>( std::min<sal_Int32>( rSelPos.X(), aOutputSizePixel.Width() - 1 ), 0 ) );
+ rSelPos.setY( std::max<sal_Int32>( std::min<sal_Int32>( rSelPos.Y(), aOutputSizePixel.Height() - 1 ), 0 ) );
if( nRet && ( !mpCurTheme || ( nRet > mpCurTheme->GetObjectCount() ) ) )
{
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 90bbd328da8b..91d5e588e805 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -94,9 +94,9 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, P
Size aSize(GetOptimalSize());
if (!bCanHandleSmallerWidth)
- nWidth = std::max(nWidth,aSize.Width());
+ nWidth = std::max<sal_Int32>(nWidth,aSize.Width());
if (!bCanHandleSmallerHeight)
- nHeight = std::max(nHeight,aSize.Height());
+ nHeight = std::max<sal_Int32>(nHeight,aSize.Height());
Control::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 45e01138f885..18fb1e52544e 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -677,7 +677,7 @@ void SdrTextObj::impDecomposePathTextPrimitive(
SdrOutliner& rOutliner = ImpGetDrawOutliner();
rOutliner.SetUpdateMode(true);
rOutliner.Clear();
- rOutliner.SetPaperSize(Size(LONG_MAX,LONG_MAX));
+ rOutliner.SetPaperSize(Size(RECT_MAX,RECT_MAX));
rOutliner.SetText(rSdrPathTextPrimitive.getOutlinerParaObject());
// set visualizing page at Outliner; needed e.g. for PageNumberField decomposition