From 33696b2820ce3c8b21b753d2c2bf92345ecb9276 Mon Sep 17 00:00:00 2001 From: Gülşah Köse Date: Sat, 8 Aug 2020 00:34:37 +0300 Subject: tdf#133015 Inherit numCol from placeholder. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I402a40be7e8899ca017996f2bf77a2fb884b9462 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100372 Tested-by: Jenkins Reviewed-by: Gülşah Köse --- oox/source/ppt/pptshape.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'oox') diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 647435888fe3..d017b4348d93 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -229,6 +229,19 @@ void PPTShape::addShape( { if (TextBodyPtr pTextBody = getTextBody()) { + // If slide shape has not numCol but placeholder has we should inherit from placeholder. + if (pTextBody->getTextProperties().mnNumCol == 1 && + mnSubType && + getSubTypeIndex().has() && + rSlidePersist.getMasterPersist()) + { + oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( + getSubTypeIndex().get(), + rSlidePersist.getMasterPersist()->getShapes()->getChildren()); + if (pPlaceholder && pPlaceholder->getTableProperties()) + pTextBody->getTextProperties().mnNumCol = pPlaceholder->getTableProperties()->getTableGrid().size(); + } + sal_Int32 nNumCol = pTextBody->getTextProperties().mnNumCol; if (nNumCol > 1) { -- cgit