summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Cecchetti <marco.cecchetti@collabora.com>2024-07-07 20:39:03 +0200
committerMiklos Vajna <vmiklos@collabora.com>2024-09-20 22:19:31 +0200
commit6d159f4dcf170644b98a01727d740406c7849fab (patch)
treeedffa50477b2fb2df7cde61f759b4b9ab5f60b9b
parent3b4ecb07a6f0295441317ab889796034506bc8af (diff)
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/+/173728 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--desktop/source/lib/init.cxx4
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx8
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx2
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx16
4 files changed, 20 insertions, 10 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ebd2446c3208..f35a7fdb7757 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5687,8 +5687,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 ff9208654990..e2cbd326a224 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -3048,7 +3048,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>());
@@ -3064,7 +3064,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>());
@@ -3081,7 +3081,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>());
@@ -3099,7 +3099,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 73d69c4e4791..cd33830e1c54 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -3156,7 +3156,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 ce1043719168..6bb05bb874f6 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -370,25 +370,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;