diff options
author | Henry Castro <hcastro@collabora.com> | 2023-10-17 07:42:52 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2023-10-31 12:01:43 +0100 |
commit | d590f094ccd28ca449eff91692c2178058d5c621 (patch) | |
tree | ca1eee5ed6b2b5cea9e3e1c692763420f06be740 /oox | |
parent | b3c12778aa908a147224cc05f3384b3f57d3b394 (diff) |
tdf#155512: sd: filter: eppt: add "SlideLayout" property to Slide Master
If it is importing all Slide Master from pptx file, unfortunately
it breaks the exporting to pptx due to save and reload unit test failures
According to the documentation
http://officeopenxml.com/prSlideLayout.php, so the file pptx has a
relationship Slide -> Slide Layout -> Slide Master
The Slide Layout is a template an unique to be reused
with Slide Master, so exporting requires to compare
the templates due to LibreOffice relation Slide -> Slide Master
Adjust unit test values:
SdOOXMLExportTest2::testTdf106867
revert adcde78935fb8ca2b93322aa3a558d0b3ccdbfad
SdOOXMLExportTest2::testTdf112280
revert adcde78935fb8ca2b93322aa3a558d0b3ccdbfad
SdOOXMLExportTest2::testThemeColors and
SdOOXMLExportTest3::testTdf114848
The file tdf84205.pptx does not contain theme2.xml,
and save and reload it does not caintain theme2.xml too
fix "An uncaught exception of type com.sun.star.container.NoSuchElementException"
Signed-off-by: Henry Castro <hcastro@collabora.com>
Change-Id: I622e9d5d68c406ff520387f3903808613d1cd3d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158084
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158676
Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/presentationfragmenthandler.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx index 8c5fbf261414..edb523161c9e 100644 --- a/oox/source/ppt/presentationfragmenthandler.cxx +++ b/oox/source/ppt/presentationfragmenthandler.cxx @@ -230,6 +230,9 @@ SlidePersistPtr PresentationFragmentHandler::importMasterSlide(const Reference<f for (const auto& rEntry : *xMasterRelations) { + if (!rEntry.second.maType.endsWith("relationships/slideLayout")) + continue; + aLayoutFragmentPath = xMasterRelations->getFragmentPathFromRelation(rEntry.second); sal_Int32 nIndex; @@ -286,6 +289,9 @@ SlidePersistPtr PresentationFragmentHandler::importMasterSlide(const Reference<f pMasterPersistPtr->createBackground( rFilter ); pMasterPersistPtr->createXShapes( rFilter ); + uno::Reference< beans::XPropertySet > xSet(pMasterPersistPtr->getPage(), uno::UNO_QUERY_THROW); + xSet->setPropertyValue("SlideLayout", Any(pMasterPersistPtr->getLayoutFromValueToken())); + oox::drawingml::ThemePtr pTheme = pMasterPersistPtr->getTheme(); if (pTheme) { |