sd/source/filter/eppt/pptx-epptooxml.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit c57e447e8a27add4f5cfcb514896a5d8e11579be
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Dec 3 14:00:08 2025 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Dec 9 12:57:36 2025 +0100

    mso-test: clamp page size to supported range
    
    found by converting ooo127565-1.odp to pptx and running officeotron on the 
output
    
    INFO - Validating part "/ppt/presentation.xml" using schema 
"29500T/pml.xsd" ...
    ERROR      - (ppt/presentation.xml:2 col:610) cvc-minInclusive-valid:
    Value '360363' is not facet-valid with respect to minInclusive '914400'
       for type 'ST_SlideSizeCoordinate'.
    ERROR      - (ppt/presentation.xml:2 col:610) cvc-attribute.3:
       The value '360363' of attribute 'cy' on element 'p:sldSz' is not valid
       with respect to its type, 'ST_SlideSizeCoordinate'.
    
    Change-Id: I461b9d07af7f3cda85d57c871a0d88fce977bf9f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194957
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 7c92bd105adff1297d632b5f27b4a690e430356c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195012
    Tested-by: Jenkins
    (cherry picked from commit 782d44442f95fb61e05e78e79a788b9da4de67fb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195247
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 133909760d21..c11a03bf73bb 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -491,9 +491,12 @@ bool PowerPointExport::exportDocument()
 
     exportPPT(aProperties);
 
+    // clamp to minimum values supported by PPTX
+    sal_Int64 nDestPageWidth = std::max(sal_Int64(914400), 
PPTtoEMU(maDestPageSize.Width));
+    sal_Int64 nDestPageHeight = std::max(sal_Int64(914400), 
PPTtoEMU(maDestPageSize.Height));
     mPresentationFS->singleElementNS(XML_p, XML_sldSz,
-                                     XML_cx, 
OString::number(PPTtoEMU(maDestPageSize.Width)),
-                                     XML_cy, 
OString::number(PPTtoEMU(maDestPageSize.Height)));
+                                     XML_cx, OString::number(nDestPageWidth),
+                                     XML_cy, OString::number(nDestPageHeight));
     // for some reason if added before slides list it will not load the slides 
(alas with error reports) in mso
     mPresentationFS->singleElementNS(XML_p, XML_notesSz,
                                      XML_cx, 
OString::number(PPTtoEMU(maNotesPageSize.Width)),

Reply via email to