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 --- emfio/source/reader/emfreader.cxx | 8 -------- 1 file changed, 8 deletions(-) (limited to 'emfio') diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index bc13659a2631..5164450bcece 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -750,9 +750,6 @@ namespace emfio case EMR_SETWINDOWEXTEX : { mpInputStream->ReadUInt32( nW ).ReadUInt32( nH ); - // clamp to valid range - nW = std::max(std::min(nW, RECT_MAX), RECT_MIN); - nH = std::max(std::min(nH, RECT_MAX), RECT_MIN); SetWinExt( Size( nW, nH ), true); } break; @@ -1930,11 +1927,6 @@ namespace emfio SetrclFrame(rclFrame); SetrclBounds(rclBounds); - // clamp to valid range - nPixX = std::max(std::min(nPixX, RECT_MAX), RECT_MIN); - nPixY = std::max(std::min(nPixY, RECT_MAX), RECT_MIN); - nMillX = std::max(std::min(nMillX, RECT_MAX), RECT_MIN); - nMillY = std::max(std::min(nMillY, RECT_MAX), RECT_MIN); SetRefPix(Size( nPixX, nPixY ) ); SetRefMill(Size( nMillX, nMillY ) ); -- cgit