summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authornd101 <Fong@nd.com.cn>2020-09-17 17:09:19 +0800
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-18 19:03:44 +0200
commitb3f2fd983f0728893505d7ae12e3def924ab520f (patch)
treef9fcd2656ff2e581fa7f595fcd47446d153d3da4 /oox
parenttdf#136247 OOXML export data label background color. (diff)
downloadcore-b3f2fd983f0728893505d7ae12e3def924ab520f.tar.gz
core-b3f2fd983f0728893505d7ae12e3def924ab520f.zip
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/transform2dcontext.cxx14
1 files changed, 13 insertions, 1 deletions
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;
}