sd/qa/unit/tiledrendering/tiledrendering.cxx | 9 +++++++-- sd/source/ui/unoidl/unomodel.cxx | 10 +++++++++- 2 files changed, 16 insertions(+), 3 deletions(-)
New commits: commit aede1fbb77db2463bdacaf731311cd7cbb045ed5 Author: Szymon Kłos <[email protected]> AuthorDate: Wed Sep 11 17:17:23 2024 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Wed Sep 11 19:36:56 2024 +0200 slideshow: lok: export hiden slide we need to be aware of hidden slides to make correct decision when doing "start from current slide" based on the slide number Signed-off-by: Szymon Kłos <[email protected]> Change-Id: Ib4944c699fa2589026e4d8ae57766c83e0439d49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173218 Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index f63064fdf835..42a7a2fa2aad 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -3124,7 +3124,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) CPPUNIT_ASSERT_EQUAL(15875, aTree.get_child("docWidth").get_value<int>()); CPPUNIT_ASSERT_EQUAL(8930, aTree.get_child("docHeight").get_value<int>()); - CPPUNIT_ASSERT_EQUAL(size_t(4), aTree.get_child("slides").size()); + CPPUNIT_ASSERT_EQUAL(size_t(5), aTree.get_child("slides").size()); // Slide Index 0 { @@ -3176,10 +3176,15 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) } // Slide Index 3 - Hidden + { + const boost::property_tree::ptree& rChild = child_at(aTree, "slides", 3); + CPPUNIT_ASSERT_EQUAL(3, rChild.get_child("index").get_value<int>()); + CPPUNIT_ASSERT_EQUAL(true, rChild.get_child("hidden").get_value<bool>()); + } // Slide Index 4 { - const boost::property_tree::ptree& rChild = child_at(aTree, "slides", 3); + const boost::property_tree::ptree& rChild = child_at(aTree, "slides", 4); CPPUNIT_ASSERT_EQUAL(4, rChild.get_child("index").get_value<int>()); CPPUNIT_ASSERT_EQUAL(false, rChild.get_child("empty").get_value<bool>()); // Check only that these exist diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 2fdf3ec3ab4b..6658bbbc5da0 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -4350,7 +4350,15 @@ OString SdXImpressDocument::getPresentationInfo() const { bool bIsVisible = true; // default visible xPropSet->getPropertyValue("Visible") >>= bIsVisible; - if (bIsVisible) + if (!bIsVisible) + { + ::tools::ScopedJsonWriterStruct aSlideNode = aJsonWriter.startStruct(); + std::string sSlideHash = GetInterfaceHash(xSlide); + aJsonWriter.put("hash", sSlideHash); + aJsonWriter.put("index", i); + aJsonWriter.put("hidden", true); + } + else { SdrPage* pPage = SdPage::getImplementation(xSlide);
