xmloff/source/draw/ximpstyl.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 2d82d56d3f536ba2bbe0496c4f6488e61a2247cb Author: Noel Grandin <[email protected]> AuthorDate: Thu Nov 27 14:18:10 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Fri Nov 28 08:26:25 2025 +0100 mso-test: element p:sldSz has invalid cx and cy attribute found by converting tdf43054--1.odp to pptx and running officeotron on the output Validating part "/ppt/presentation.xml" using schema "29500T/pml.xsd" ... - (ppt/presentation.xml:2 col:1,116) cvc-minInclusive-valid: Value '900113' is not facet-valid with respect to minInclusive '914400' for type 'ST_SlideSizeCoordinate'. We get the slide size from the master page, and this page appears not to have any width or height values at all, so use a useful value in that case. Change-Id: I3624b4ba79ec4919655995c20d729b22ff443641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194701 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 28beb4dff118..f5ca1cfcb305 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -27,6 +27,7 @@ #include <xmloff/xmluconv.hxx> #include "ximpnote.hxx" #include <xmlsdtypes.hxx> +#include <tools/gen.hxx> #include <tools/debug.hxx> #include <sal/log.hxx> #include <comphelper/diagnose_ex.hxx> @@ -359,6 +360,12 @@ SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext( XMLOFF_WARN_UNKNOWN("xmloff", aIter); } } + // Set size to useful default value, same as in SdDrawDocument::CreateFirstPages + // except we cannot call SvxPaperInfo::GetDefaultPaperSize from here. + if (mnWidth == 0) + mnWidth = 21000; + if (mnHeight == 0) + mnHeight = 29700; } SdXMLPageMasterStyleContext::~SdXMLPageMasterStyleContext()
