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 /sd | |
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 'sd')
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/slidesorter/view/SlsFramePainter.cxx | 8 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unopage.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews3.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/frmview.cxx | 24 |
6 files changed, 28 insertions, 28 deletions
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 27265d21bb21..8e4cc6798b54 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1561,10 +1561,10 @@ void SdImportTest::testTdf103473() SdrTextObj *const pObj = dynamic_cast<SdrTextObj *const>(pPage->GetObj(0)); CPPUNIT_ASSERT(pObj); ::tools::Rectangle aRect = pObj->GetGeoRect(); - CPPUNIT_ASSERT_EQUAL(3629L, aRect.Left()); - CPPUNIT_ASSERT_EQUAL(4431L, aRect.Top()); - CPPUNIT_ASSERT_EQUAL(8353L, aRect.Right()); - CPPUNIT_ASSERT_EQUAL(9155L, aRect.Bottom()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(3629), aRect.Left()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(4431), aRect.Top()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(8353), aRect.Right()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(9155), aRect.Bottom()); xDocShRef->DoClose(); } @@ -1903,8 +1903,8 @@ bool SdImportTest::checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeN ReadDIB(aBitmap, aBitmapStream, true); } } - CPPUNIT_ASSERT_EQUAL(8L, aBitmap.GetSizePixel().Width()); - CPPUNIT_ASSERT_EQUAL(8L, aBitmap.GetSizePixel().Height()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aBitmap.GetSizePixel().Width()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aBitmap.GetSizePixel().Height()); return checkPatternValues(rExpected, aBitmap); } @@ -2341,7 +2341,7 @@ void SdImportTest::testTdf114913() CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr); const SvxNumBulletItem *pItem = pTxtObj->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET); CPPUNIT_ASSERT(pItem); - CPPUNIT_ASSERT_EQUAL(long(691), pItem->GetNumRule()->GetLevel(0).GetGraphicSize().getHeight()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(691), pItem->GetNumRule()->GetLevel(0).GetGraphicSize().getHeight()); xDocShRef->DoClose(); } diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx index 07027c1d1e18..6ad0831b7e49 100644 --- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx +++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx @@ -182,7 +182,7 @@ void FramePainter::OffsetBitmap::PaintSide ( { rDevice.DrawBitmapEx( Point(nX,nY), - Size(std::min(aBitmapSize.Width(),static_cast<long>(nRight-nX+1)),aBitmapSize.Height()), + Size(std::min(aBitmapSize.Width(),nRight-nX+1),aBitmapSize.Height()), maBitmap); } } @@ -202,7 +202,7 @@ void FramePainter::OffsetBitmap::PaintSide ( { rDevice.DrawBitmapEx( Point(nX,nY), - Size(aBitmapSize.Width(), std::min(aBitmapSize.Height(), static_cast<long>(nBottom-nY+1))), + Size(aBitmapSize.Width(), std::min(aBitmapSize.Height(), nBottom-nY+1)), maBitmap); } } @@ -223,8 +223,8 @@ void FramePainter::OffsetBitmap::PaintCenter ( rDevice.DrawBitmapEx( Point(nX,nY), Size( - ::std::min(aBitmapSize.Width(), rBox.Right()-nX+1), - std::min(aBitmapSize.Height(), rBox.Bottom()-nY+1)), + ::std::min<sal_Int32>(aBitmapSize.Width(), rBox.Right()-nX+1), + std::min<sal_Int32>(aBitmapSize.Height(), rBox.Bottom()-nY+1)), maBitmap); } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 6597616e8e21..619d84254a7d 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1034,10 +1034,10 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) aAny <<= GetPage()->GetLowerBorder(); break; case WID_PAGE_WIDTH: - aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getWidth() ); + aAny <<= GetPage()->GetSize().getWidth(); break; case WID_PAGE_HEIGHT: - aAny <<= static_cast<sal_Int32>( GetPage()->GetSize().getHeight() ); + aAny <<= GetPage()->GetSize().getHeight(); break; case WID_PAGE_ORIENT: aAny <<= view::PaperOrientation( diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 22dcf4538640..67c74771fc16 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -478,8 +478,8 @@ void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize, b aSize.AdjustHeight( -(aBorder.Top() + aBorder.Bottom()) ); Size aObjSizePixel = mpImpl->mpViewWindow->LogicToPixel(aObjSize, MapMode(MapUnit::Map100thMM)); SfxViewShell::SetZoomFactor( - Fraction( aSize.Width(), std::max( aObjSizePixel.Width(), static_cast<long int>(1) ) ), - Fraction( aSize.Height(), std::max( aObjSizePixel.Height(), static_cast<long int>(1)) ) ); + Fraction( aSize.Width(), std::max<sal_Int32>( aObjSizePixel.Width(), 1 ) ), + Fraction( aSize.Height(), std::max<sal_Int32>( aObjSizePixel.Height(), 1) ) ); } mpImpl->ResizePixel(rOrigin, rSize, false); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 14f4fac32271..af0b99c0a7f0 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -861,7 +861,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if( mpDrawView->IsTextEdit() ) { Point aPnt1 = GetActiveWindow()->GetWinViewPos(); - ::tools::Rectangle aMinMaxRect = ::tools::Rectangle( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); + ::tools::Rectangle aMinMaxRect = ::tools::Rectangle( aPnt1, Size(RECT_MAX, RECT_MAX) ); rSet.Put( SfxRectangleItem(SID_RULER_LR_MIN_MAX, aMinMaxRect) ); } else diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index decd3e3b935a..3795f9e09b4f 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -349,17 +349,17 @@ static OUString createHelpLinesString( const SdrHelpLineList& rHelpLines ) { case SdrHelpLineKind::Point: aLines.append( 'P' ); - aLines.append( static_cast<sal_Int32>(rPos.X()) ); + aLines.append( rPos.X() ); aLines.append( ',' ); - aLines.append( static_cast<sal_Int32>(rPos.Y()) ); + aLines.append( rPos.Y() ); break; case SdrHelpLineKind::Vertical: aLines.append( 'V' ); - aLines.append( static_cast<sal_Int32>(rPos.X()) ); + aLines.append( rPos.X() ); break; case SdrHelpLineKind::Horizontal: aLines.append( 'H' ); - aLines.append( static_cast<sal_Int32>(rPos.Y()) ); + aLines.append( rPos.Y() ); break; default: OSL_FAIL( "Unsupported helpline Kind!" ); @@ -427,16 +427,16 @@ void FrameView::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert { const ::tools::Rectangle aVisArea = GetVisArea(); - aUserData.addValue( sUNO_View_VisibleAreaTop, makeAny( static_cast<sal_Int32>(aVisArea.Top()) ) ); - aUserData.addValue( sUNO_View_VisibleAreaLeft, makeAny( static_cast<sal_Int32>(aVisArea.Left()) ) ); - aUserData.addValue( sUNO_View_VisibleAreaWidth, makeAny( static_cast<sal_Int32>(aVisArea.GetWidth()) ) ); - aUserData.addValue( sUNO_View_VisibleAreaHeight, makeAny( static_cast<sal_Int32>(aVisArea.GetHeight()) ) ); + aUserData.addValue( sUNO_View_VisibleAreaTop, makeAny( aVisArea.Top() ) ); + aUserData.addValue( sUNO_View_VisibleAreaLeft, makeAny( aVisArea.Left() ) ); + aUserData.addValue( sUNO_View_VisibleAreaWidth, makeAny( aVisArea.GetWidth() ) ); + aUserData.addValue( sUNO_View_VisibleAreaHeight, makeAny( aVisArea.GetHeight() ) ); } - aUserData.addValue( sUNO_View_GridCoarseWidth, makeAny( static_cast<sal_Int32>(GetGridCoarse().Width()) ) ); - aUserData.addValue( sUNO_View_GridCoarseHeight, makeAny( static_cast<sal_Int32>(GetGridCoarse().Height()) ) ); - aUserData.addValue( sUNO_View_GridFineWidth, makeAny( static_cast<sal_Int32>(GetGridFine().Width()) ) ); - aUserData.addValue( sUNO_View_GridFineHeight, makeAny( static_cast<sal_Int32>(GetGridFine().Height()) ) ); + aUserData.addValue( sUNO_View_GridCoarseWidth, makeAny( GetGridCoarse().Width() ) ); + aUserData.addValue( sUNO_View_GridCoarseHeight, makeAny( GetGridCoarse().Height() ) ); + aUserData.addValue( sUNO_View_GridFineWidth, makeAny( GetGridFine().Width() ) ); + aUserData.addValue( sUNO_View_GridFineHeight, makeAny( GetGridFine().Height() ) ); aUserData.addValue( sUNO_View_GridSnapWidthXNumerator, makeAny( GetSnapGridWidthX().GetNumerator() ) ); aUserData.addValue( sUNO_View_GridSnapWidthXDenominator, makeAny( GetSnapGridWidthX().GetDenominator() ) ); aUserData.addValue( sUNO_View_GridSnapWidthYNumerator, makeAny( GetSnapGridWidthY().GetNumerator() ) ); |