From d36f7c5bd2115fcdd26ba8ff7b6a0446dea70bd4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 7 Apr 2018 11:45:13 +0200 Subject: Revert "long->sal_Int32 in tools/gen.hxx" This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/qa/extras/htmlexport/htmlexport.cxx | 2 +- sw/qa/extras/rtfexport/rtfexport2.cxx | 4 ++-- sw/qa/extras/rtfimport/rtfimport.cxx | 4 ++-- sw/qa/extras/tiledrendering/tiledrendering.cxx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sw/qa') diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index 1ba766356cad..7f10e4befa90 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -397,7 +397,7 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOleImg, "reqif-ole-img.xhtml") Size aLogic(pDevice->PixelToLogic(aPixel, MapMode(MapUnit::Map100thMM))); awt::Size aSize = xShape->getSize(); // This was only 1247, size was not set explicitly. - CPPUNIT_ASSERT_EQUAL(aLogic.getWidth(), aSize.Width); + CPPUNIT_ASSERT_EQUAL(static_cast(aLogic.getWidth()), aSize.Width); // Check mime/media types. CPPUNIT_ASSERT_EQUAL(OUString("image/png"), getProperty(xGraphic, "MimeType")); diff --git a/sw/qa/extras/rtfexport/rtfexport2.cxx b/sw/qa/extras/rtfexport/rtfexport2.cxx index 6f2180da49ea..571c96e5d6a2 100644 --- a/sw/qa/extras/rtfexport/rtfexport2.cxx +++ b/sw/qa/extras/rtfexport/rtfexport2.cxx @@ -125,11 +125,11 @@ DECLARE_RTFEXPORT_TEST(testN192129, "n192129.rtf") awt::Size aActualSize(xShape->getSize()); if ((aExpectedSize.Width() - aActualSize.Width) / 2 != 0) { - CPPUNIT_ASSERT_EQUAL(aExpectedSize.Width(), aActualSize.Width); + CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Width()), aActualSize.Width); } if ((aExpectedSize.Height() - aActualSize.Height) / 2 != 0) { - CPPUNIT_ASSERT_EQUAL(aExpectedSize.Height(), aActualSize.Height); + CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Height()), aActualSize.Height); } } diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 4211c88429e7..54b42e9f9b59 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1372,8 +1372,8 @@ DECLARE_RTFIMPORT_TEST(testWatermark, "watermark.rtf") uno::Reference xShape(getShape(1), uno::UNO_QUERY); awt::Size aActualSize(xShape->getSize()); - CPPUNIT_ASSERT_EQUAL(aExpectedSize.Width(), aActualSize.Width); - CPPUNIT_ASSERT_EQUAL(aExpectedSize.Height(), aActualSize.Height); + CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Width()), aActualSize.Width); + CPPUNIT_ASSERT_EQUAL(sal_Int32(aExpectedSize.Height()), aActualSize.Height); } DECLARE_RTFIMPORT_TEST(testTdf104016, "tdf104016.rtf") diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 6d1dbaed5d27..df913f7f9e7f 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -525,8 +525,8 @@ void SwTiledRenderingTest::testSearchViewArea() { {"SearchItem.SearchString", uno::makeAny(OUString("Heading"))}, {"SearchItem.Backward", uno::makeAny(false)}, - {"SearchItem.SearchStartPointX", uno::makeAny(aPoint.getX())}, - {"SearchItem.SearchStartPointY", uno::makeAny(aPoint.getY())} + {"SearchItem.SearchStartPointX", uno::makeAny(static_cast(aPoint.getX()))}, + {"SearchItem.SearchStartPointY", uno::makeAny(static_cast(aPoint.getY()))} })); comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues); // This was just "Heading", i.e. SwView::SearchAndWrap() did not search from only the top of the second page. -- cgit