sd/qa/unit/data/odp/canvas-slide.odp |binary
 sd/qa/unit/export-tests-ooxml4.cxx   |   22 ++++++++++++++++++++++
 sd/source/ui/func/fusel.cxx          |   21 +++++++++++++++++++++
 3 files changed, 43 insertions(+)

New commits:
commit 7f660cc7544889a3171e29a6d5c9100ed7f41448
Author:     Mohit Marathe <[email protected]>
AuthorDate: Tue Dec 16 20:39:19 2025 +0530
Commit:     Mohit Marathe <[email protected]>
CommitDate: Tue Jan 13 16:28:31 2026 +0100

    sd: lok: send ReshufflePagePopup command on selecting a preview
    
    inside canvas page
    
    Signed-off-by: Mohit Marathe <[email protected]>
    Change-Id: Iad9f8b1465ba424acbbcc822209687a2bc013412
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195734
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Michael Stahl <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196826
    Tested-by: Jenkins

diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index deeb3e56889a..50811e0b98f8 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -446,6 +446,27 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
                             pHdl=mpView->PickHandle(aMDPos);
                             if ( ! rMEvt.IsRight())
                                 mpView->BegDragObj(aMDPos, nullptr, pHdl, 
nDrgLog);
+
+                            if (comphelper::LibreOfficeKit::isActive())
+                            {
+                                if (pObj->GetObjIdentifier() == 
SdrObjKind::Page)
+                                {
+                                    SdPage* pPage = 
mrViewShell.GetActualPage();
+                                    if (pPage->IsCanvasPage())
+                                    {
+                                        ::tools::JsonWriter jsonWriter;
+                                        jsonWriter.put("commandName", 
"ReshufflePagePopup");
+                                        {
+                                            auto jsonState = 
jsonWriter.startNode("state");
+                                        }
+
+                                        OString aPayload = 
jsonWriter.finishAndGetAsOString();
+                                        if (pViewShell)
+                                            
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, aPayload);
+
+                                    }
+                                }
+                            }
                         }
                         else
                         {
commit 2a10b4e8529ebd6dcc9761a22988d2462145cb5c
Author:     Mohit Marathe <[email protected]>
AuthorDate: Mon Dec 15 16:58:22 2025 +0530
Commit:     Mohit Marathe <[email protected]>
CommitDate: Tue Jan 13 16:28:21 2026 +0100

    sd: add testOmitCanvasSlideExport
    
    This unit test verifies if canvas page is omitted while exporting
    to pptx
    
    Signed-off-by: Mohit Marathe <[email protected]>
    Change-Id: I3a269499772306c33998b33524376aa329c15273
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195658
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196824
    Tested-by: Jenkins

diff --git a/sd/qa/unit/data/odp/canvas-slide.odp 
b/sd/qa/unit/data/odp/canvas-slide.odp
new file mode 100644
index 000000000000..f73114937e6f
Binary files /dev/null and b/sd/qa/unit/data/odp/canvas-slide.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx 
b/sd/qa/unit/export-tests-ooxml4.cxx
index 60dea01f1b72..d0eeb69b323b 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -1951,6 +1951,28 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, 
testFooterIdxConsistency)
     // - In <>, attribute 'idx' of '//p:sp/p:nvSpPr/p:nvPr/p:ph' incorrect 
value.
 }
 
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testOmitCanvasSlideExport)
+{
+    createSdImpressDoc("odp/canvas-slide.odp");
+
+    SdXImpressDocument* pXImpressDocument = 
dynamic_cast<SdXImpressDocument*>(mxComponent.get());
+    CPPUNIT_ASSERT(pXImpressDocument);
+    SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
+    CPPUNIT_ASSERT_MESSAGE("no document", pDoc != nullptr);
+
+    // the document has 2 pages - one canvas page, and one normal page
+    CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), 
pDoc->GetSdPageCount(PageKind::Standard));
+    CPPUNIT_ASSERT(pDoc->HasCanvasPage());
+
+    save(TestFilter::PPTX);
+
+    // Verify that the canvas slide was omitted from the export
+    // It should have one master slide, and one slide
+    xmlDocUniquePtr pXmlDocContent = parseExport(u"ppt/presentation.xml"_ustr);
+    assertXPath(pXmlDocContent, 
"/p:presentation/p:sldMasterIdLst/p:sldMasterId", 1);
+    assertXPath(pXmlDocContent, "/p:presentation/p:sldIdLst/p:sldId", 1);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Reply via email to