summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2024-09-11 17:17:23 +0200
committerMiklos Vajna <vmiklos@collabora.com>2024-12-04 14:20:42 +0100
commit76be2970722faceda1552681d6d2ab942d350595 (patch)
tree2bec9cde27509c7d2610dfb24e3e1c4834344491
parente90ebdde4110ea7e250f66327af1e3f4eeb8718f (diff)
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 Change-Id: Ib4944c699fa2589026e4d8ae57766c83e0439d49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177775 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx9
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx10
2 files changed, 16 insertions, 3 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 4a17fc480ca7..18b213e99abf 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2704,7 +2704,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
{
@@ -2756,10 +2756,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 436a0c91211a..12953834614c 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -4376,7 +4376,15 @@ OString SdXImpressDocument::getPresentationInfo() const
SdGenericDrawPage* pSlide(xDrawPages->getDrawPageByIndex(i));
bool bIsVisible = true; // default visible
pSlide->getPropertyValue("Visible") >>= bIsVisible;
- if (bIsVisible)
+ if (!bIsVisible)
+ {
+ auto aSlideNode = aJsonWriter.startStruct();
+ std::string sSlideHash = GetInterfaceHash(cppu::getXWeak(pSlide));
+ aJsonWriter.put("hash", sSlideHash);
+ aJsonWriter.put("index", i);
+ aJsonWriter.put("hidden", true);
+ }
+ else
{
SdrPage* pPage = pSlide->GetSdrPage();