desktop/source/lib/init.cxx | 4 ++-- sd/qa/unit/tiledrendering/tiledrendering.cxx | 8 ++++---- sd/source/ui/unoidl/unomodel.cxx | 2 +- slideshow/source/engine/slide/slideimpl.cxx | 16 +++++++++++++--- 4 files changed, 20 insertions(+), 10 deletions(-)
New commits: commit 01593fc7c0a15a612bc76acaf14c72ea3b695bee Author: Marco Cecchetti <marco.cecche...@collabora.com> AuthorDate: Sun Jul 7 20:39:03 2024 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Wed Jul 17 12:47:52 2024 +0200 lok: sd: slideshow render: some bug fixes The suggested canvas size need to be passed to createSlideRenderer. masterPageObjectsVisible -> masterPageObjectsVisibility as on client. Last json message should be reset on each call to renderNextLayer. In order to avoid to send empty layer check if the json message has been set. After rendering the background layer we need to return or the layer is never received. Change-Id: I9a83895d4f3895f3363c1b6a86fac9bd22c9fe87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170157 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index cb542191befa..54ff08f36c07 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -5700,8 +5700,8 @@ static bool doc_createSlideRenderer( return false; } - sal_Int32 nViewWidth = 0; - sal_Int32 nViewHeight = 0; + sal_Int32 nViewWidth = *pViewWidth; + sal_Int32 nViewHeight = *pViewHeight; bool bReturn = pDoc->createSlideRenderer( nSlideNumber, nViewWidth, nViewHeight, bRenderBackground, bRenderMasterPage); diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index a088baf8c776..aa415db60cb1 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -3072,7 +3072,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) // Check only that these exist CPPUNIT_ASSERT(has_child(rChild, "hash")); CPPUNIT_ASSERT(has_child(rChild, "masterPage")); - CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisible")); + CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisibility")); // Transitions CPPUNIT_ASSERT_EQUAL(std::string("BarWipe"), rChild.get_child("transitionType").get_value<std::string>()); @@ -3088,7 +3088,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) // Check only that these exist CPPUNIT_ASSERT(has_child(rChild, "hash")); CPPUNIT_ASSERT(has_child(rChild, "masterPage")); - CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisible")); + CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisibility")); // Transitions CPPUNIT_ASSERT_EQUAL(std::string("FanWipe"), rChild.get_child("transitionType").get_value<std::string>()); @@ -3105,7 +3105,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) // Check only that these exist CPPUNIT_ASSERT(has_child(rChild, "hash")); CPPUNIT_ASSERT(has_child(rChild, "masterPage")); - CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisible")); + CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisibility")); // Transitions CPPUNIT_ASSERT_EQUAL(std::string("BlindWipe"), rChild.get_child("transitionType").get_value<std::string>()); @@ -3123,7 +3123,7 @@ CPPUNIT_TEST_FIXTURE(SdTiledRenderingTest, testPresentationInfo) // Check only that these exist CPPUNIT_ASSERT(has_child(rChild, "hash")); CPPUNIT_ASSERT(has_child(rChild, "masterPage")); - CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisible")); + CPPUNIT_ASSERT(has_child(rChild, "masterPageObjectsVisibility")); // Transitions CPPUNIT_ASSERT_EQUAL(std::string("Fade"), rChild.get_child("transitionType").get_value<std::string>()); diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 775513415bc3..47b5f6a97cb4 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -3112,7 +3112,7 @@ OString SdXImpressDocument::getPresentationInfo() const bool bBackgroundObjectsVisibility = true; // default visible xPropSet->getPropertyValue("IsBackgroundObjectsVisible") >>= bBackgroundObjectsVisibility; - aJsonWriter.put("masterPageObjectsVisible", bBackgroundObjectsVisibility); + aJsonWriter.put("masterPageObjectsVisibility", bBackgroundObjectsVisibility); } } diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index e8df227e7fa2..2c9b922ee07f 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -369,25 +369,35 @@ void LOKSlideRenderer::renderNextLayer(unsigned char* pBuffer) { OSL_ASSERT(pBuffer); + msLastJsonMessage = ""_ostr; + mbIsBitmapLayer = false; + if (mbRenderBackground && !isBackgroundRenderingDone()) + { renderBackground(pBuffer); + if (!msLastJsonMessage.isEmpty()) + return; + } if (!isTextFieldsRenderingDone()) { renderTextFields(pBuffer); - return; + if (!msLastJsonMessage.isEmpty()) + return; } if (mbRenderMasterPageObjects && !isMasterPageRenderingDone()) { renderMasterPage(pBuffer); - return; + if (!msLastJsonMessage.isEmpty()) + return; } if (!isDrawPageRenderingDone()) { renderDrawPage(pBuffer); - return; + if (!msLastJsonMessage.isEmpty()) + return; } mbSlideRenderingDone = true;