diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-05 14:16:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-05 14:43:11 +0100 |
commit | 5509d639d0b245415f647690619de5a5163ca620 (patch) | |
tree | e0374f0997f2155249ec0c6fca60caf40077d59a /slideshow/source/engine/opengl | |
parent | ab99c08defad5431bbd0b456e3854d749ec0173e (diff) |
loplugin:flatten in slideshow
Change-Id: I826a43b36e35f9145c971b3608b6f56d27ff5f81
Reviewed-on: https://gerrit.libreoffice.org/67405
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'slideshow/source/engine/opengl')
-rw-r--r-- | slideshow/source/engine/opengl/TransitionerImpl.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx index f8af810f813b..461b00c0053f 100644 --- a/slideshow/source/engine/opengl/TransitionerImpl.cxx +++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx @@ -371,20 +371,21 @@ void OGLTransitionerImpl::setSlides( const uno::Reference< rendering::XBitmap >& //pixmap of the non-opengl parent window. If any expose events occur around the start and end of //the transition then those windows are default filled by X with the desired start/end image so there's //no visible flash - if (SystemChildWindow* pChildWindow = mpContext->getChildWindow()) + SystemChildWindow* pChildWindow = mpContext->getChildWindow(); + if (!pChildWindow) + return; + + css::uno::Reference<css::beans::XFastPropertySet> xEnteringFastPropertySet(mxEnteringBitmap, css::uno::UNO_QUERY); + css::uno::Reference<css::beans::XFastPropertySet> xLeavingFastPropertySet(mxLeavingBitmap, css::uno::UNO_QUERY); + css::uno::Sequence<css::uno::Any> aEnteringBitmap; + css::uno::Sequence<css::uno::Any> aLeavingBitmap; + if (xEnteringFastPropertySet.get() && xLeavingFastPropertySet.get()) { - css::uno::Reference<css::beans::XFastPropertySet> xEnteringFastPropertySet(mxEnteringBitmap, css::uno::UNO_QUERY); - css::uno::Reference<css::beans::XFastPropertySet> xLeavingFastPropertySet(mxLeavingBitmap, css::uno::UNO_QUERY); - css::uno::Sequence<css::uno::Any> aEnteringBitmap; - css::uno::Sequence<css::uno::Any> aLeavingBitmap; - if (xEnteringFastPropertySet.get() && xLeavingFastPropertySet.get()) - { - xEnteringFastPropertySet->getFastPropertyValue(1) >>= aEnteringBitmap; - xLeavingFastPropertySet->getFastPropertyValue(1) >>= aLeavingBitmap; - } - if (aEnteringBitmap.getLength() == 3 && aLeavingBitmap.getLength() == 3) - pChildWindow->SetLeaveEnterBackgrounds(aLeavingBitmap, aEnteringBitmap); + xEnteringFastPropertySet->getFastPropertyValue(1) >>= aEnteringBitmap; + xLeavingFastPropertySet->getFastPropertyValue(1) >>= aLeavingBitmap; } + if (aEnteringBitmap.getLength() == 3 && aLeavingBitmap.getLength() == 3) + pChildWindow->SetLeaveEnterBackgrounds(aLeavingBitmap, aEnteringBitmap); } |