From 954442e8258f09751bd89f3399489a8b073e4be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sun, 27 Sep 2026 11:35:07 +0000 Subject: [PATCH] ofz#566458134 Integer-overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vcl/source/outdev/ImplMapRes.cxx:190:23: runtime error: signed integer overflow: 0 - -9223372036854775808 cannot be represented in type 'tools::Long' (aka 'long') #0 0x5afc86b89af9 in AbsoluteToLocalX vcl/source/outdev/ImplMapRes.cxx:190:23 #1 0x5afc86b89af9 in ImplMapRes::TransformPointX(long, ImplMapRes const&) const vcl/source/outdev/ImplMapRes.cxx:214:21 #2 0x5afc862abe28 in OutputDevice::LogicToLogic(Point const&, MapMode const*, MapMode const*) const vcl/source/outdev/map.cxx:991:32 #3 0x5afc862ab0eb in OutputDevice::SetRelativeMapMode(MapMode const&) vcl/source/outdev/map.cxx:417:16 #4 0x5afc85733670 in (anonymous namespace)::GraphicExporter::GetGraphic((anonymous namespace)::ExportSettings const&, Graphic&, bool) svx/source/unodraw/UnoGraphicExporter.cxx:909:19 when none of the shapes rendered for a SmartArt fallback has any content the bound stays empty, and the metafile origin taken from the minimum of that empty range rounds to LONG_MIN so start an empty bound at 0,0 Signed-off-by: Caolán McNamara Change-Id: I7f35f6280a882cd5c49de3e411bc0d006cdf9725 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13623 Tested-by: Jenkins CPCI Reviewed-by: Noel Grandin (cherry picked from commit 47dca3b9edf464297b1cef08a6223885d12efebf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211528 Reviewed-by: Xisco Fauli Tested-by: Jenkins --- svx/source/unodraw/UnoGraphicExporter.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 9dd8da5d0170..c1a3ca350876 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -882,6 +882,10 @@ bool GraphicExporter::GetGraphic( ExportSettings const & rSettings, Graphic& aGr } } + // Shapes with no visible content anchor at 0,0 + if (aBound.isEmpty()) + aBound.expand(basegfx::B2DTuple(0, 0)); + aOut->EnableOutput( false ); aOut->SetMapMode( aMap ); if( rSettings.mbUseHighContrast )