summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2023-12-03 23:41:01 +0100
committerBalazs Varga <balazs.varga.extern@allotropia.de>2023-12-18 15:10:54 +0100
commitbff76421e234df7246a7f49c71a11432f86e09d1 (patch)
tree3eae1dc2ea775e03759c2e54a6d0784559c6147f /xmloff
parent5aba83e7c1bc177270b585253ef27e6995f41f23 (diff)
tdf#157740 FILESAVE PPTX: fix explosion of the number of master slides
- Export correctly the "supported" master slides with the actual slides names. - Set SlideLayout property at ODF import as well for MasterSlides layout type. - When we copy a slide with the master slide also copy the SlideLayout property value as well. Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpbody.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index 198503eab2cd..764c011eec27 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -161,6 +161,25 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
if(xMasterPage.is())
{
+ uno::Reference< beans::XPropertySet > xPropSet(xMasterPage, uno::UNO_QUERY_THROW);
+ if (xPropSet.is())
+ {
+ OUString aPropName("SlideLayout");
+ uno::Reference< beans::XPropertySetInfo > xInfo(xPropSet->getPropertySetInfo());
+ if (xInfo.is() && xInfo->hasPropertyByName(aPropName))
+ {
+ sal_Int32 nType = -1;
+ uno::Reference< container::XNameAccess > xPageLayouts(GetSdImport().getPageLayouts());
+ if (xPageLayouts.is())
+ {
+ if (xPageLayouts->hasByName(maPageLayoutName))
+ xPageLayouts->getByName(maPageLayoutName) >>= nType;
+ }
+ if (-1 != nType)
+ xPropSet->setPropertyValue(aPropName, uno::Any(static_cast<sal_Int16>(nType)));
+ }
+ }
+
uno::Reference < container::XNamed > xMasterNamed(xMasterPage, uno::UNO_QUERY);
if(xMasterNamed.is())
{