summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2023-12-03 23:41:01 +0100
committerHenry Castro <hcastro@collabora.com>2023-12-19 22:46:42 +0100
commita4640043ed772b5dcc1ee9d36cfd8b0e4759f894 (patch)
treea159d8dcd60b04b9852d5ce67341fb2637d4949c /xmloff
parentee4a371e7cd6029978260b7692fe5b5db00dce8b (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> (cherry picked from commit bff76421e234df7246a7f49c71a11432f86e09d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160869 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160986
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())
{