oox/source/drawingml/transform2dcontext.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
New commits: commit b3f2fd983f0728893505d7ae12e3def924ab520f Author: nd101 <f...@nd.com.cn> AuthorDate: Thu Sep 17 17:09:19 2020 +0800 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 18 19:03:44 2020 +0200 tdf#136830 Fix: positions of group shapes of PPTX For certain PPTXs, Impress fails to import the document with correct group shape positions. More specifically, chExt (Child Extents) calculation should take the values from group shape when 0 is given. Change-Id: I1f8e89dcfe61ab2071ad00850ff99aecb7218067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102895 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/oox/source/drawingml/transform2dcontext.cxx b/oox/source/drawingml/transform2dcontext.cxx index 234cf5920269..fcd7da9dec0a 100644 --- a/oox/source/drawingml/transform2dcontext.cxx +++ b/oox/source/drawingml/transform2dcontext.cxx @@ -105,7 +105,19 @@ ContextHandlerRef Transform2DContext::onCreateContext( sal_Int32 aElementToken, mrShape.setChildPosition( awt::Point( rAttribs.getString( XML_x ).get().toInt32(), rAttribs.getString( XML_y ).get().toInt32() ) ); break; case A_TOKEN( chExt ): // horz/vert size of children - mrShape.setChildSize( awt::Size( rAttribs.getString( XML_cx ).get().toInt32(), rAttribs.getString( XML_cy ).get().toInt32() ) ); + { + sal_Int32 nChExtCx = rAttribs.getString(XML_cx).get().toInt32(); + + if(nChExtCx == 0) + nChExtCx = mrShape.getSize().Width; + + sal_Int32 nChExtCy = rAttribs.getString(XML_cy).get().toInt32(); + + if(nChExtCy == 0) + nChExtCy = mrShape.getSize().Height; + + mrShape.setChildSize(awt::Size(nChExtCx, nChExtCy)); + } break; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits