From 98befbb26217b0bf3f35354e418a355280c52cfc Mon Sep 17 00:00:00 2001 From: Grzegorz Araminowicz Date: Wed, 28 Jun 2017 18:38:17 +0200 Subject: [PATCH] SmartArt: undo diagram elements' size change it should fix integer overflow in fdo79822.docx until we have proper layout algorithm implemented Change-Id: I7645ff0844ac47a004a309d1a9d3b19eeb3708dc Reviewed-on: https://gerrit.libreoffice.org/39371 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- oox/source/drawingml/diagram/diagramlayoutatoms.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx index 9b0896249485..d32e2f963b59 100644 --- a/oox/source/drawingml/diagram/diagramlayoutatoms.cxx +++ b/oox/source/drawingml/diagram/diagramlayoutatoms.cxx @@ -300,8 +300,8 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, aCurrPos.Y + sz.Height); // HACK: the spacing is arbitrary - aCurrPos.X += nIncX*(sz.Width+50); - aCurrPos.Y += nIncY*(sz.Height+50); + aCurrPos.X += nIncX*(sz.Width+5); + aCurrPos.Y += nIncY*(sz.Height+5); ++aCurrShape; } @@ -330,8 +330,8 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, // HACK - count chars & paragraphs to come up with *some* // notion of necessary size - const sal_Int32 nHackyFontHeight=500; - const sal_Int32 nHackyFontWidth=400; + const sal_Int32 nHackyFontHeight=50; + const sal_Int32 nHackyFontWidth=20; awt::Size aTotalSize; for( size_t nPara=0; nParagetParagraphs().size(); ++nPara ) {