sd/source/filter/eppt/pptx-epptbase.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 7f5c359ab120ec89af04e2f9cbaee387c30662fb
Author:     Mohit Marathe <[email protected]>
AuthorDate: Tue Nov 25 15:52:53 2025 +0530
Commit:     Michael Stahl <[email protected]>
CommitDate: Wed Nov 26 10:46:00 2025 +0100

    sd: do not export canvas slide to pptx
    
    by decreasing the page count by 1. As the canvas page and its notes page
    is always at the end, `PPTWriterBase::CreateSlide` and 
`PPTWriterBase::CreateNotes`
    won't be called for them.
    
    The same cannot be done for the master canvas page as its not
    necessarily the last master page. Since that master page will be unused,
    it is safe to export that.
    
    Signed-off-by: Mohit Marathe <[email protected]>
    Change-Id: Ie24f594d45c08a99548363cc1e20cfff977ce519
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194521
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    Code-Style: Michael Stahl <[email protected]>

diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx 
b/sd/source/filter/eppt/pptx-epptbase.cxx
index c548ff09f1d9..6b65f886f07c 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -17,9 +17,12 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <comphelper/servicehelper.hxx>
+#include <drawdoc.hxx>
 #include "epptbase.hxx"
 #include "epptdef.hxx"
 #include "../ppt/pptanimations.hxx"
+#include <unomodel.hxx>
 
 #include <o3tl/any.hxx>
 #include <vcl/outdev.hxx>
@@ -238,6 +241,13 @@ bool PPTWriterBase::InitSOIface()
         if ( !GetPageByIndex( 0, NORMAL ) )
             break;
 
+        SdXImpressDocument* pModel = 
comphelper::getFromUnoTunnel<SdXImpressDocument>(mXModel);
+        if (pModel)
+        {
+            SdDrawDocument* pDoc = pModel->GetDoc();
+            if (pDoc && pDoc->HasCanvasPage())
+                mnPages--;
+        }
         return true;
     }
     return false;

Reply via email to