21#include <config_features.h>
33#include <osl/thread.hxx>
43#include <com/sun/star/beans/XPropertySet.hpp>
44#include <com/sun/star/util/XUpdatable.hpp>
45#include <com/sun/star/awt/SystemPointer.hpp>
46#include <com/sun/star/presentation/XSlideShow.hpp>
47#include <com/sun/star/presentation/XSlideShowNavigationListener.hpp>
48#include <com/sun/star/lang/NoSupportException.hpp>
49#include <com/sun/star/lang/XMultiServiceFactory.hpp>
50#include <com/sun/star/lang/XServiceInfo.hpp>
51#include <com/sun/star/drawing/PointSequenceSequence.hpp>
52#include <com/sun/star/drawing/PointSequence.hpp>
53#include <com/sun/star/drawing/XLayer.hpp>
54#include <com/sun/star/drawing/XLayerSupplier.hpp>
55#include <com/sun/star/drawing/XLayerManager.hpp>
56#include <com/sun/star/container/XNameAccess.hpp>
57#include <com/sun/star/document/XStorageBasedDocument.hpp>
59#include <com/sun/star/uno/Reference.hxx>
60#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
105class FrameSynchronization
113 explicit FrameSynchronization (
const double nFrameDuration);
118 void MarkCurrentFrame();
146 const double mnFrameDuration;
150 double mnNextFrameTargetTime;
190typedef cppu::WeakComponentImplHelper<css::lang::XServiceInfo, presentation::XSlideShow> SlideShowImplBase;
195typedef ::std::map< css::uno::Reference<
196 css::drawing::XDrawPage>,
200 public CursorManager,
201 public MediaFileManager,
202 public SlideShowImplBase
205 explicit SlideShowImpl(
206 uno::Reference<uno::XComponentContext> xContext );
225 void notifySlideTransitionEnded(
bool bPaintSlide );
239 void notifySlideAnimationsEnded();
252 void notifySlideEnded (
const bool bReverse);
257 bool notifyHyperLinkClicked( OUString
const& hyperLink );
265 virtual std::shared_ptr<avmedia::MediaTempFile> getMediaTempFile(
const OUString& aUrl)
override;
274 virtual sal_Bool SAL_CALL nextEffect()
override;
275 virtual sal_Bool SAL_CALL previousEffect()
override;
276 virtual sal_Bool SAL_CALL startShapeActivity(
277 uno::Reference<drawing::XShape>
const& xShape )
override;
278 virtual sal_Bool SAL_CALL stopShapeActivity(
279 uno::Reference<drawing::XShape>
const& xShape )
override;
281 virtual uno::Reference<drawing::XDrawPage> SAL_CALL getCurrentSlide()
override;
282 virtual void SAL_CALL displaySlide(
283 uno::Reference<drawing::XDrawPage>
const& xSlide,
284 uno::Reference<drawing::XDrawPagesSupplier>
const& xDrawPages,
285 uno::Reference<animations::XAnimationNode>
const& xRootNode,
286 uno::Sequence<beans::PropertyValue>
const& rProperties )
override;
287 virtual void SAL_CALL registerUserPaintPolygons(
const css::uno::Reference< css::lang::XMultiServiceFactory >& xDocFactory )
override;
288 virtual sal_Bool SAL_CALL setProperty(
289 beans::PropertyValue
const& rProperty )
override;
291 uno::Reference<presentation::XSlideShowView>
const& xView )
override;
292 virtual sal_Bool SAL_CALL removeView(
293 uno::Reference<presentation::XSlideShowView>
const& xView )
override;
294 virtual sal_Bool SAL_CALL
update(
double & nNextTimeout )
override;
295 virtual void SAL_CALL addSlideShowListener(
296 uno::Reference<presentation::XSlideShowListener>
const& xListener )
override;
297 virtual void SAL_CALL removeSlideShowListener(
298 uno::Reference<presentation::XSlideShowListener>
const& xListener )
override;
299 virtual void SAL_CALL addShapeEventListener(
300 uno::Reference<presentation::XShapeEventListener>
const& xListener,
301 uno::Reference<drawing::XShape>
const& xShape )
override;
302 virtual void SAL_CALL removeShapeEventListener(
303 uno::Reference<presentation::XShapeEventListener>
const& xListener,
304 uno::Reference<drawing::XShape>
const& xShape )
override;
305 virtual void SAL_CALL setShapeCursor(
306 uno::Reference<drawing::XShape>
const& xShape, sal_Int16 nPointerShape )
override;
311 virtual bool requestCursor( sal_Int16 nCursorShape )
override;
312 virtual void resetCursor()
override;
319 void redisplayCurrentSlide();
323 virtual void SAL_CALL disposing()
override;
325 bool isDisposed()
const
327 return (rBHelper.bDisposed || rBHelper.bInDispose);
331 struct SeparateListenerImpl;
friend struct SeparateListenerImpl;
332 class PrefetchPropertiesFunc;
friend class PrefetchPropertiesFunc;
338 PolygonMap::iterator findPolygons( uno::Reference<drawing::XDrawPage>
const& xDrawPage);
342 uno::Reference<drawing::XDrawPage>
const& xDrawPage,
343 uno::Reference<drawing::XDrawPagesSupplier>
const& xDrawPages,
344 uno::Reference<animations::XAnimationNode>
const& xRootNode );
349 uno::Reference<drawing::XDrawPage>
const& xSlide,
350 uno::Reference<animations::XAnimationNode>
const& xNode )
353 return (pSlide->getXDrawPage() == xSlide &&
354 pSlide->getXAnimationNode() == xNode);
356 return (!xSlide.is() && !xNode.is());
361 uno::Any const& url,
bool bLoopSound );
364 void stopSlideTransitionSound();
374 const uno::Reference< drawing::XDrawPage >& xDrawPage,
385 void requestWaitSymbol();
386 void releaseWaitSymbol();
388 class WaitSymbolLock {
public:
389 explicit WaitSymbolLock(SlideShowImpl& rSlideShowImpl) : mrSlideShowImpl(rSlideShowImpl)
390 { mrSlideShowImpl.requestWaitSymbol(); }
392 { mrSlideShowImpl.releaseWaitSymbol(); }
393 private: SlideShowImpl& mrSlideShowImpl;
397 sal_Int16 calcActiveCursor( sal_Int16 nCursorShape )
const;
402 void rewindEffectToPreviousSlide();
405 UnoViewContainer maViewContainer;
420 double maUserPaintStrokeWidth;
423 std::optional<bool> maEraseAllInk;
424 std::optional<sal_Int32> maEraseInk;
427 std::shared_ptr<canvas::tools::ElapsedTime> mpPresTimer;
428 ScreenUpdater maScreenUpdater;
429 EventQueue maEventQueue;
430 EventMultiplexer maEventMultiplexer;
431 ActivitiesQueue maActivitiesQueue;
432 UserEventQueue maUserEventQueue;
436 std::shared_ptr<SeparateListenerImpl>
mpListener;
438 std::shared_ptr<RehearseTimingsActivity> mpRehearseTimingsActivity;
439 std::shared_ptr<WaitSymbol> mpWaitSymbol;
442 std::shared_ptr<SlideOverlayButton> mpNavigationPrev;
443 std::shared_ptr<SlideOverlayButton> mpNavigationMenu;
444 std::shared_ptr<SlideOverlayButton> mpNavigationNext;
446 std::shared_ptr<PointerSymbol> mpPointerSymbol;
453 presentation::XTransitionFactory> mxOptionalTransitionFactory;
462 uno::Reference<drawing::XDrawPage> mxPrefetchSlide;
466 uno::Reference<document::XStorageBasedDocument> mxSBD;
468 uno::Reference<animations::XAnimationNode> mxPrefetchAnimationNode;
472 sal_Int32 mnWaitSymbolRequestCount;
473 bool mbAutomaticAdvancementMode;
474 bool mbImageAnimationsAllowed;
475 bool mbNoSlideTransitions;
477 bool mbForceManualAdvance;
479 bool mbSlideShowIdle;
480 bool mbDisableAnimationZOrder;
482 EffectRewinder maEffectRewinder;
483 FrameSynchronization maFrameSynchronization;
492struct SlideShowImpl::SeparateListenerImpl :
public EventHandler,
493 public ViewRepaintHandler,
494 public HyperlinkHandler,
495 public AnimationEventHandler
497 SlideShowImpl& mrShow;
498 ScreenUpdater& mrScreenUpdater;
501 SeparateListenerImpl( SlideShowImpl& rShow,
502 ScreenUpdater& rScreenUpdater,
503 EventQueue& rEventQueue ) :
505 mrScreenUpdater( rScreenUpdater ),
509 SeparateListenerImpl(
const SeparateListenerImpl& ) =
delete;
510 SeparateListenerImpl& operator=(
const SeparateListenerImpl& ) =
delete;
513 virtual bool handleEvent()
override
524 makeEvent( [
this] () { this->mrShow.notifySlideAnimationsEnded(); },
525 "SlideShowImpl::notifySlideAnimationsEnded"));
533 mrScreenUpdater.notifyUpdate(rView,
true);
537 virtual bool handleHyperlink( OUString
const& rLink )
override
539 return mrShow.notifyHyperLinkClicked(rLink);
545 return mrShow.handleAnimationEvent(rNode);
549SlideShowImpl::SlideShowImpl(
550 uno::Reference<uno::XComponentContext> xContext )
554 maShapeEventListeners(),
557 maUserPaintStrokeWidth(4.0),
559 maScreenUpdater(maViewContainer),
560 maEventQueue( mpPresTimer ),
561 maEventMultiplexer( maEventQueue,
563 maActivitiesQueue( mpPresTimer ),
564 maUserEventQueue( maEventMultiplexer,
570 mpRehearseTimingsActivity(),
573 mpCurrentSlideTransitionSound(),
575 mxOptionalTransitionFactory(),
581 mxPrefetchAnimationNode(),
583 mnWaitSymbolRequestCount(0),
584 mbAutomaticAdvancementMode(false),
585 mbImageAnimationsAllowed( true ),
586 mbNoSlideTransitions( false ),
587 mbMouseVisible( true ),
588 mbForceManualAdvance( false ),
589 mbShowPaused( false ),
590 mbSlideShowIdle( true ),
591 mbDisableAnimationZOrder( false ),
592 maEffectRewinder(maEventMultiplexer, maEventQueue, maUserEventQueue),
593 maFrameSynchronization(1.0 / FrameRate::PreferredFramesPerSecond)
599 uno::Reference<lang::XMultiComponentFactory>
xFactory(
607 mxOptionalTransitionFactory.set(
608 xFactory->createInstanceWithContext(
609 "com.sun.star.presentation.TransitionFactory",
610 mxComponentContext ),
613 catch (loader::CannotActivateFactoryException
const&)
618 mpListener = std::make_shared<SeparateListenerImpl>(
622 maEventMultiplexer.addSlideAnimationsEndHandler(
mpListener );
623 maEventMultiplexer.addViewRepaintHandler(
mpListener );
624 maEventMultiplexer.addHyperlinkHandler(
mpListener, 0.0 );
625 maEventMultiplexer.addAnimationStartHandler(
mpListener );
626 maEventMultiplexer.addAnimationEndHandler(
mpListener );
630void SlideShowImpl::disposing()
632 osl::MutexGuard
const guard( m_aMutex );
634 maEffectRewinder.dispose();
637 stopSlideTransitionSound();
641 if( mpCurrentSlideTransitionSound )
643 mpCurrentSlideTransitionSound->dispose();
644 mpCurrentSlideTransitionSound.reset();
647 mpWaitSymbol.reset();
648 mpPointerSymbol.reset();
650 if( mpRehearseTimingsActivity )
652 mpRehearseTimingsActivity->dispose();
653 mpRehearseTimingsActivity.reset();
658 maEventMultiplexer.removeSlideAnimationsEndHandler(
mpListener);
659 maEventMultiplexer.removeViewRepaintHandler(
mpListener);
660 maEventMultiplexer.removeHyperlinkHandler(
mpListener);
661 maEventMultiplexer.removeAnimationStartHandler(
mpListener );
662 maEventMultiplexer.removeAnimationEndHandler(
mpListener );
667 maUserEventQueue.clear();
668 maActivitiesQueue.clear();
669 maEventMultiplexer.clear();
670 maEventQueue.clear();
672 maShapeCursors.clear();
673 maShapeEventListeners.clear();
676 maListenerContainer.disposeAndClear(
677 lang::EventObject( getXWeak() ) );
679 maViewContainer.dispose();
682 mxPrefetchAnimationNode.clear();
683 mxPrefetchSlide.clear();
684 mpPrefetchSlide.reset();
685 mpCurrentSlide.reset();
686 mpPreviousSlide.reset();
689uno::Sequence< OUString > SAL_CALL SlideShowImpl::getSupportedServiceNames()
691 return {
"com.sun.star.presentation.SlideShow" };
694OUString SAL_CALL SlideShowImpl::getImplementationName()
696 return "com.sun.star.comp.presentation.SlideShow";
699sal_Bool SAL_CALL SlideShowImpl::supportsService(
const OUString& aServiceName)
705void SlideShowImpl::stopSlideTransitionSound()
707 if (mpCurrentSlideTransitionSound)
709 mpCurrentSlideTransitionSound->stopPlayback();
710 mpCurrentSlideTransitionSound->dispose();
711 mpCurrentSlideTransitionSound.reset();
717 bool bStopSound =
false;
720 if( !(rSound >>= bStopSound) )
724 if( !bStopSound && url.isEmpty() )
727 stopSlideTransitionSound();
733 mpCurrentSlideTransitionSound = SoundPlayer::create(
734 maEventMultiplexer, url, mxComponentContext, *
this);
735 mpCurrentSlideTransitionSound->setPlaybackLoop( bLoopSound );
737 catch (lang::NoSupportException
const&)
745 return mpCurrentSlideTransitionSound;
749 const uno::Reference< drawing::XDrawPage >& xDrawPage,
755 "createSlideTransition(): No views" );
757 "createSlideTransition(): No entering slide" );
761 if (mbNoSlideTransitions)
765 uno::Reference< beans::XPropertySet > xPropSet( xDrawPage,
770 SAL_INFO(
"slideshow",
"createSlideTransition(): "
771 "Slide has no PropertySet - assuming no transition" );
775 sal_Int16 nTransitionType(0);
780 SAL_INFO(
"slideshow",
"createSlideTransition(): "
781 "Could not extract slide transition type from XDrawPage - assuming no transition" );
785 sal_Int16 nTransitionSubType(0);
788 "TransitionSubtype") )
790 SAL_INFO(
"slideshow",
"createSlideTransition(): "
791 "Could not extract slide transition subtype from XDrawPage - assuming no transition" );
795 bool bTransitionDirection(
false);
798 "TransitionDirection") )
800 SAL_INFO(
"slideshow",
"createSlideTransition(): "
801 "Could not extract slide transition direction from XDrawPage - assuming default direction" );
804 sal_Int32 aUnoColor(0);
807 "TransitionFadeColor") )
809 SAL_INFO(
"slideshow",
"createSlideTransition(): "
810 "Could not extract slide transition fade color from XDrawPage - assuming black" );
816 bool bLoopSound =
false;
819 SAL_INFO(
"slideshow",
"createSlideTransition(): Could not determine transition sound effect URL from XDrawPage - using no sound" );
822 SAL_INFO(
"slideshow",
"createSlideTransition(): Could not get slide property 'LoopSound' - using no sound" );
831 mxOptionalTransitionFactory,
834 bTransitionDirection,
835 aTransitionFadeColor,
836 resetSlideTransitionSound( aSound, bLoopSound ) ));
844 double nTransitionDuration(0.0);
847 "TransitionDuration") )
849 SAL_INFO(
"slideshow",
"createSlideTransition(): "
850 "Could not extract slide transition duration from XDrawPage - assuming no transition" );
854 sal_Int32 nMinFrames(5);
857 "MinimalFrameNumber") )
859 SAL_INFO(
"slideshow",
"createSlideTransition(): "
860 "No minimal number of frames given - assuming 5" );
866 maEventQueue.addEvent(
868 pTransition->prefetch(); },
869 "Animation::prefetch"));
873 ActivitiesFactory::CommonParameters(
880 std::optional<double>(1.0),
884 basegfx::B2DVector(rEnteringSlide->getSlideSize().getWidth(), rEnteringSlide->getSlideSize().getHeight()) ),
889PolygonMap::iterator SlideShowImpl::findPolygons( uno::Reference<drawing::XDrawPage>
const& xDrawPage)
896 uno::Reference<drawing::XDrawPage>
const& xDrawPage,
897 uno::Reference<drawing::XDrawPagesSupplier>
const& xDrawPages,
898 uno::Reference<animations::XAnimationNode>
const& xRootNode )
900 if( !xDrawPage.is() )
904 PolygonMap::iterator aIter = findPolygons(xDrawPage);
918 maShapeEventListeners,
922 maUserPaintStrokeWidth,
924 mbImageAnimationsAllowed,
925 mbDisableAnimationZOrder) );
934void SlideShowImpl::requestWaitSymbol()
936 ++mnWaitSymbolRequestCount;
937 OSL_ASSERT(mnWaitSymbolRequestCount>0);
939 if (mnWaitSymbolRequestCount == 1)
947 mpWaitSymbol->show();
951void SlideShowImpl::releaseWaitSymbol()
953 --mnWaitSymbolRequestCount;
954 OSL_ASSERT(mnWaitSymbolRequestCount>=0);
956 if (mnWaitSymbolRequestCount == 0)
964 mpWaitSymbol->hide();
968sal_Int16 SlideShowImpl::calcActiveCursor( sal_Int16 nCursorShape )
const
970 if( mnWaitSymbolRequestCount>0 && !mpWaitSymbol )
971 nCursorShape = awt::SystemPointer::WAIT;
972 else if( !mbMouseVisible )
973 nCursorShape = awt::SystemPointer::INVISIBLE;
975 nCursorShape == awt::SystemPointer::ARROW )
976 nCursorShape = awt::SystemPointer::PEN;
981void SlideShowImpl::stopShow()
987 mpCurrentSlide->hide();
989 if(findPolygons(mpCurrentSlide->getXDrawPage()) !=
maPolygons.end())
990 maPolygons.erase(mpCurrentSlide->getXDrawPage());
992 maPolygons.insert(make_pair(mpCurrentSlide->getXDrawPage(),mpCurrentSlide->getPolygons()));
996 maEventQueue.clear();
997 maActivitiesQueue.clear();
1006 maUserEventQueue.clear();
1011 if (mbAutomaticAdvancementMode)
1015 maEventMultiplexer.setAutomaticMode(
false );
1016 maEventMultiplexer.setAutomaticMode(
true );
1020class SlideShowImpl::PrefetchPropertiesFunc
1023 PrefetchPropertiesFunc( SlideShowImpl * that_,
1024 bool& rbSkipAllMainSequenceEffects,
1025 bool& rbSkipSlideTransition)
1026 : mpSlideShowImpl(that_),
1027 mrbSkipAllMainSequenceEffects(rbSkipAllMainSequenceEffects),
1028 mrbSkipSlideTransition(rbSkipSlideTransition)
1031 void operator()( beans::PropertyValue
const& rProperty )
const {
1032 if (rProperty.Name ==
"Prefetch" )
1034 uno::Sequence<uno::Any> seq;
1035 if ((rProperty.Value >>= seq) && seq.getLength() == 2)
1037 seq[0] >>= mpSlideShowImpl->mxPrefetchSlide;
1038 seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode;
1041 else if ( rProperty.Name ==
"SkipAllMainSequenceEffects" )
1043 rProperty.Value >>= mrbSkipAllMainSequenceEffects;
1045 else if ( rProperty.Name ==
"SkipSlideTransition" )
1047 rProperty.Value >>= mrbSkipSlideTransition;
1051 SAL_WARN(
"slideshow", rProperty.Name );
1055 SlideShowImpl *
const mpSlideShowImpl;
1056 bool& mrbSkipAllMainSequenceEffects;
1057 bool& mrbSkipSlideTransition;
1060void SlideShowImpl::displaySlide(
1061 uno::Reference<drawing::XDrawPage>
const& xSlide,
1062 uno::Reference<drawing::XDrawPagesSupplier>
const& xDrawPages,
1063 uno::Reference<animations::XAnimationNode>
const& xRootNode,
1064 uno::Sequence<beans::PropertyValue>
const& rProperties )
1066 osl::MutexGuard
const guard( m_aMutex );
1071 maEffectRewinder.setRootAnimationNode(xRootNode);
1072 maEffectRewinder.setCurrentSlide(xSlide);
1078 mxSBD = uno::Reference<document::XStorageBasedDocument>(
mxDrawPagesSupplier, uno::UNO_QUERY);
1089 bool bSkipAllMainSequenceEffects (
false);
1090 bool bSkipSlideTransition (
false);
1091 std::for_each( rProperties.begin(),
1093 PrefetchPropertiesFunc(
this, bSkipAllMainSequenceEffects, bSkipSlideTransition) );
1095 OSL_ENSURE( !maViewContainer.empty(),
"### no views!" );
1096 if (maViewContainer.empty())
1101 WaitSymbolLock aLock (*
this);
1103 mpPreviousSlide = mpCurrentSlide;
1104 mpCurrentSlide.reset();
1106 if (matches( mpPrefetchSlide, xSlide, xRootNode ))
1109 mpCurrentSlide = mpPrefetchSlide;
1112 mpCurrentSlide = makeSlide( xSlide, xDrawPages, xRootNode );
1114 OSL_ASSERT( mpCurrentSlide );
1118 if( mpPreviousSlide )
1124 if( !mpPreviousSlide || oldSlideSize != slideSize )
1126 for(
const auto& pView : maViewContainer )
1127 pView->setViewSize( slideSize );
1133 maEventMultiplexer.notifyViewsChanged();
1141 mpCurrentSlide->getXDrawPage(),
1145 [
this] () { this->notifySlideTransitionEnded(
false); },
1146 "SlideShowImpl::notifySlideTransitionEnded")));
1148 if (bSkipSlideTransition)
1154 pSlideChangeActivity.reset();
1157 if (pSlideChangeActivity)
1160 maActivitiesQueue.addActivity( pSlideChangeActivity );
1166 maEventQueue.addEvent(
1168 [
this] () { this->notifySlideTransitionEnded(
true); },
1169 "SlideShowImpl::notifySlideTransitionEnded"));
1174 maListenerContainer.forEach(
1175 [](uno::Reference<presentation::XSlideShowListener>
const& xListener)
1177 xListener->slideTransitionStarted();
1183 if (bSkipAllMainSequenceEffects)
1184 maEffectRewinder.skipAllMainSequenceEffects();
1187void SlideShowImpl::redisplayCurrentSlide()
1189 osl::MutexGuard
const guard( m_aMutex );
1198 OSL_ENSURE( !maViewContainer.empty(),
"### no views!" );
1199 if (maViewContainer.empty())
1204 maEventQueue.addEvent(
1205 makeEvent( [
this] () { this->notifySlideTransitionEnded(
true); },
1206 "SlideShowImpl::notifySlideTransitionEnded"));
1208 maListenerContainer.forEach(
1209 [](uno::Reference<presentation::XSlideShowListener>
const& xListener)
1211 xListener->slideTransitionStarted();
1215sal_Bool SlideShowImpl::nextEffect()
1217 osl::MutexGuard
const guard( m_aMutex );
1228 return maEventMultiplexer.notifyNextEffect();
1231sal_Bool SlideShowImpl::previousEffect()
1233 osl::MutexGuard
const guard( m_aMutex );
1245 return maEffectRewinder.rewind(
1246 maScreenUpdater.createLock(),
1247 [
this]() { return this->redisplayCurrentSlide(); },
1248 [
this]() { return this->rewindEffectToPreviousSlide(); } );
1252void SlideShowImpl::rewindEffectToPreviousSlide()
1256 WaitSymbolLock aLock (*
this);
1261 notifySlideEnded(
true);
1266 maEventQueue.forceEmpty();
1271 maScreenUpdater.commitUpdates();
1274sal_Bool SlideShowImpl::startShapeActivity(
1275 uno::Reference<drawing::XShape>
const& )
1281 OSL_FAIL(
"not yet implemented!" );
1285sal_Bool SlideShowImpl::stopShapeActivity(
1286 uno::Reference<drawing::XShape>
const& )
1292 OSL_FAIL(
"not yet implemented!" );
1298 osl::MutexGuard
const guard( m_aMutex );
1307 mpPresTimer->pauseTimer();
1309 mpPresTimer->continueTimer();
1311 maEventMultiplexer.notifyPauseMode(bPauseShow);
1313 mbShowPaused = bPauseShow;
1317uno::Reference<drawing::XDrawPage> SlideShowImpl::getCurrentSlide()
1319 osl::MutexGuard
const guard( m_aMutex );
1322 return uno::Reference<drawing::XDrawPage>();
1328 return mpCurrentSlide->getXDrawPage();
1330 return uno::Reference<drawing::XDrawPage>();
1334 uno::Reference<presentation::XSlideShowView>
const& xView )
1336 osl::MutexGuard
const guard( m_aMutex );
1347 "addView(): View does not provide a valid canvas" );
1352 maEventMultiplexer ));
1353 if (!maViewContainer.addView( pView ))
1371 maEventMultiplexer.notifyViewAdded( pView );
1380 uno::Reference<presentation::XSlideShowView>
const& xView )
1382 osl::MutexGuard
const guard( m_aMutex );
1394 maEventMultiplexer.notifyViewRemoved( pView );
1401void SlideShowImpl::registerUserPaintPolygons(
const uno::Reference< lang::XMultiServiceFactory >& xDocFactory )
1406 if(findPolygons(mpCurrentSlide->getXDrawPage()) !=
maPolygons.end())
1407 maPolygons.erase(mpCurrentSlide->getXDrawPage());
1409 maPolygons.insert(make_pair(mpCurrentSlide->getXDrawPage(),mpCurrentSlide->getPolygons()));
1414 uno::Reference< drawing::XLayerSupplier > xLayerSupplier(xDocFactory, uno::UNO_QUERY);
1415 uno::Reference< container::XNameAccess > xNameAccess = xLayerSupplier->getLayerManager();
1416 uno::Reference< drawing::XLayerManager > xLayerManager(xNameAccess, uno::UNO_QUERY);
1419 uno::Reference< drawing::XLayer > xDrawnInSlideshow;
1421 OUString sLayerName =
"DrawnInSlideshow";
1422 if (xNameAccess->hasByName(sLayerName))
1424 xNameAccess->getByName(sLayerName) >>= xDrawnInSlideshow;
1428 xDrawnInSlideshow = xLayerManager->insertNewByIndex(xLayerManager->getCount());
1429 aPropLayer <<= sLayerName;
1430 xDrawnInSlideshow->setPropertyValue(
"Name", aPropLayer);
1435 aPropLayer <<=
true;
1436 xDrawnInSlideshow->setPropertyValue(
"IsVisible", aPropLayer);
1437 xDrawnInSlideshow->setPropertyValue(
"IsPrintable", aPropLayer);
1438 aPropLayer <<=
false;
1439 xDrawnInSlideshow->setPropertyValue(
"IsLocked", aPropLayer);
1446 css::uno::Reference< css::drawing::XShapes > Shapes = rPoly.first;
1448 for(
const auto& pPolyPoly : aPolygons )
1450 ::basegfx::B2DPolyPolygon b2DPolyPoly = ::basegfx::unotools::b2DPolyPolygonFromXPolyPolygon2D(pPolyPoly->getUNOPolyPolygon());
1453 for(sal_uInt32 i=0;
i< b2DPolyPoly.
count();
i++)
1455 const ::basegfx::B2DPolygon& aPoly = b2DPolyPoly.
getB2DPolygon(i);
1456 sal_uInt32 nPoints = aPoly.
count();
1461 uno::Reference< uno::XInterface > polyshape(xDocFactory->createInstance(
1462 "com.sun.star.drawing.PolyLineShape" ) );
1463 uno::Reference< drawing::XShape > rPolyShape(polyshape, uno::UNO_QUERY);
1466 Shapes->add(rPolyShape);
1469 uno::Reference< beans::XPropertySet > aXPropSet( rPolyShape, uno::UNO_QUERY );
1471 drawing::PointSequenceSequence aRetval;
1473 aRetval.realloc( 1 );
1475 drawing::PointSequence* pOuterSequence = aRetval.getArray();
1477 pOuterSequence->realloc(nPoints);
1479 awt::Point* pInnerSequence = pOuterSequence->getArray();
1480 for( sal_uInt32 n = 0;
n < nPoints;
n++ )
1483 *pInnerSequence++ = awt::Point(
1492 aXPropSet->setPropertyValue(
"PolyPolygon", aParam );
1495 drawing::LineStyle eLS;
1496 eLS = drawing::LineStyle_SOLID;
1497 aXPropSet->setPropertyValue(
"LineStyle",
uno::Any(eLS) );
1500 sal_uInt32 nLineColor;
1501 nLineColor = pPolyPoly->getRGBALineColor();
1507 fLineWidth = pPolyPoly->getStrokeWidth();
1508 aXPropSet->setPropertyValue(
"LineWidth",
uno::Any(
static_cast<sal_Int32
>(fLineWidth)) );
1511 xLayerManager->attachShapeToLayer(rPolyShape, xDrawnInSlideshow);
1518sal_Bool SlideShowImpl::setProperty( beans::PropertyValue
const& rProperty )
1520 osl::MutexGuard
const guard( m_aMutex );
1528 if ( rProperty.Name ==
"AutomaticAdvancement" )
1530 double nTimeout(0.0);
1531 mbAutomaticAdvancementMode = (rProperty.Value >>= nTimeout);
1532 if (mbAutomaticAdvancementMode)
1534 maEventMultiplexer.setAutomaticTimeout( nTimeout );
1536 maEventMultiplexer.setAutomaticMode( mbAutomaticAdvancementMode );
1540 if ( rProperty.Name ==
"UserPaintColor" )
1542 sal_Int32 nColor(0);
1543 if (rProperty.Value >>= nColor)
1545 OSL_ENSURE( mbMouseVisible,
1546 "setProperty(): User paint overrides invisible mouse" );
1550 if( mpCurrentSlide && !mpCurrentSlide->isPaintOverlayActive() )
1551 mpCurrentSlide->enablePaintOverlay();
1559 maEventMultiplexer.notifyUserPaintDisabled();
1568 if ( rProperty.Name ==
"EraseAllInk" )
1570 bool bEraseAllInk(
false);
1571 if (rProperty.Value >>= bEraseAllInk)
1573 OSL_ENSURE( mbMouseVisible,
1574 "setProperty(): User paint overrides invisible mouse" );
1577 maEraseAllInk = bEraseAllInk;
1578 maEventMultiplexer.notifyEraseAllInk( *maEraseAllInk );
1584 if ( rProperty.Name ==
"SwitchPenMode" )
1586 bool bSwitchPenMode(
false);
1587 if (rProperty.Value >>= bSwitchPenMode)
1589 OSL_ENSURE( mbMouseVisible,
1590 "setProperty(): User paint overrides invisible mouse" );
1594 maEventMultiplexer.notifySwitchPenMode();
1600 if ( rProperty.Name ==
"SwitchEraserMode" )
1602 bool bSwitchEraserMode(
false);
1603 if (rProperty.Value >>= bSwitchEraserMode)
1605 OSL_ENSURE( mbMouseVisible,
1606 "setProperty(): User paint overrides invisible mouse" );
1607 if(bSwitchEraserMode){
1609 maEventMultiplexer.notifySwitchEraserMode();
1616 if ( rProperty.Name ==
"EraseInk" )
1618 sal_Int32 nEraseInk(100);
1619 if (rProperty.Value >>= nEraseInk)
1621 OSL_ENSURE( mbMouseVisible,
1622 "setProperty(): User paint overrides invisible mouse" );
1625 maEraseInk = nEraseInk;
1626 maEventMultiplexer.notifyEraseInkWidth( *maEraseInk );
1633 if ( rProperty.Name ==
"UserPaintStrokeWidth" )
1636 if (rProperty.Value >>= nWidth)
1638 OSL_ENSURE( mbMouseVisible,
"setProperty(): User paint overrides invisible mouse" );
1640 maUserPaintStrokeWidth = nWidth;
1641 maEventMultiplexer.notifyUserPaintStrokeWidth( maUserPaintStrokeWidth );
1647 if ( rProperty.Name ==
"AdvanceOnClick" )
1649 bool bAdvanceOnClick =
false;
1650 if (! (rProperty.Value >>= bAdvanceOnClick))
1652 maUserEventQueue.setAdvanceOnClick( bAdvanceOnClick );
1656 if ( rProperty.Name ==
"DisableAnimationZOrder" )
1658 bool bDisableAnimationZOrder =
false;
1659 if (! (rProperty.Value >>= bDisableAnimationZOrder))
1661 mbDisableAnimationZOrder = bDisableAnimationZOrder;
1665 if ( rProperty.Name ==
"ImageAnimationsAllowed" )
1667 if (! (rProperty.Value >>= mbImageAnimationsAllowed))
1674 if ( rProperty.Name ==
"MouseVisible" )
1676 if (! (rProperty.Value >>= mbMouseVisible))
1684 if ( rProperty.Name ==
"ForceManualAdvance" )
1686 return (rProperty.Value >>= mbForceManualAdvance);
1689 if ( rProperty.Name ==
"RehearseTimings" )
1691 bool bRehearseTimings =
false;
1692 if (! (rProperty.Value >>= bRehearseTimings))
1695 if (bRehearseTimings)
1698 mpRehearseTimingsActivity = RehearseTimingsActivity::create(
1710 mpBox2DDummyPtr ) );
1712 else if (mpRehearseTimingsActivity)
1715 mpRehearseTimingsActivity->dispose();
1716 mpRehearseTimingsActivity.reset();
1721 if ( rProperty.Name ==
"WaitSymbolBitmap" )
1723 uno::Reference<rendering::XBitmap> xBitmap;
1724 if (! (rProperty.Value >>= xBitmap))
1727 mpWaitSymbol = WaitSymbol::create( xBitmap,
1735 if (rProperty.Name ==
"NavigationSlidePrev")
1737 uno::Reference<rendering::XBitmap> xBitmap;
1738 if (!(rProperty.Value >>= xBitmap))
1741 mpNavigationPrev = SlideOverlayButton::create(
1743 maScreenUpdater, maEventMultiplexer, maViewContainer);
1748 if (rProperty.Name ==
"NavigationSlideMenu")
1750 uno::Reference<rendering::XBitmap> xBitmap;
1751 if (!(rProperty.Value >>= xBitmap))
1754 mpNavigationMenu = SlideOverlayButton::create(
1755 xBitmap, { 80, 10 },
1757 maListenerContainer.forEach(
1758 [pos](
const uno::Reference<presentation::XSlideShowListener>& xListener) {
1759 uno::Reference<presentation::XSlideShowNavigationListener> xNavListener(
1760 xListener, uno::UNO_QUERY);
1761 if (xNavListener.is())
1762 xNavListener->contextMenuShow(
1763 css::awt::Point(
static_cast<sal_Int32
>(floor(
pos.getX())),
1764 static_cast<sal_Int32
>(floor(
pos.getY()))));
1767 maScreenUpdater, maEventMultiplexer, maViewContainer);
1772 if (rProperty.Name ==
"NavigationSlideNext")
1774 uno::Reference<rendering::XBitmap> xBitmap;
1775 if (!(rProperty.Value >>= xBitmap))
1778 mpNavigationNext = SlideOverlayButton::create(
1780 maScreenUpdater, maEventMultiplexer, maViewContainer);
1785 if ( rProperty.Name ==
"PointerSymbolBitmap" )
1787 uno::Reference<rendering::XBitmap> xBitmap;
1788 if (! (rProperty.Value >>= xBitmap))
1791 mpPointerSymbol = PointerSymbol::create( xBitmap,
1799 if ( rProperty.Name ==
"PointerVisible" )
1802 if (!(rProperty.Value >>= visible))
1806 mpPointerSymbol->setVisible(visible);
1811 if ( rProperty.Name ==
"PointerPosition")
1813 css::geometry::RealPoint2D
pos;
1814 if (! (rProperty.Value >>= pos))
1818 mpPointerSymbol->viewsChanged(pos);
1823 if (rProperty.Name ==
"NoSlideTransitions" )
1825 return (rProperty.Value >>= mbNoSlideTransitions);
1828 if ( rProperty.Name ==
"IsSoundEnabled" )
1830 uno::Sequence<uno::Any> aValues;
1831 uno::Reference<presentation::XSlideShowView> xView;
1832 bool bValue (
false);
1833 if ((rProperty.Value >>= aValues)
1834 && aValues.getLength()==2
1835 && (aValues[0] >>= xView)
1836 && (aValues[1] >>= bValue))
1839 auto iView = std::find_if(maViewContainer.begin(), maViewContainer.end(),
1840 [&xView](
const UnoViewSharedPtr& rxView) { return rxView && rxView->getUnoView() == xView; });
1841 if (iView != maViewContainer.end())
1845 (*iView)->setIsSoundEnabled(bValue);
1854void SlideShowImpl::addSlideShowListener(
1855 uno::Reference<presentation::XSlideShowListener>
const& xListener )
1857 osl::MutexGuard
const guard( m_aMutex );
1863 maListenerContainer.addInterface(xListener);
1866void SlideShowImpl::removeSlideShowListener(
1867 uno::Reference<presentation::XSlideShowListener>
const& xListener )
1869 osl::MutexGuard
const guard( m_aMutex );
1872 maListenerContainer.removeInterface(xListener);
1875void SlideShowImpl::addShapeEventListener(
1876 uno::Reference<presentation::XShapeEventListener>
const& xListener,
1877 uno::Reference<drawing::XShape>
const& xShape )
1879 osl::MutexGuard
const guard( m_aMutex );
1887 ShapeEventListenerMap::iterator aIter;
1888 if( (aIter=maShapeEventListeners.find( xShape )) ==
1889 maShapeEventListeners.end() )
1892 aIter = maShapeEventListeners.emplace(
1900 aIter->second->addInterface( xListener );
1902 maEventMultiplexer.notifyShapeListenerAdded(xShape);
1905void SlideShowImpl::removeShapeEventListener(
1906 uno::Reference<presentation::XShapeEventListener>
const& xListener,
1907 uno::Reference<drawing::XShape>
const& xShape )
1909 osl::MutexGuard
const guard( m_aMutex );
1914 ShapeEventListenerMap::iterator aIter;
1915 if( (aIter = maShapeEventListeners.find( xShape )) !=
1916 maShapeEventListeners.end() )
1922 "SlideShowImpl::removeShapeEventListener(): "
1923 "listener map contains NULL broadcast helper" );
1925 aIter->second->removeInterface( xListener );
1928 maEventMultiplexer.notifyShapeListenerRemoved(xShape);
1931void SlideShowImpl::setShapeCursor(
1932 uno::Reference<drawing::XShape>
const& xShape, sal_Int16 nPointerShape )
1934 osl::MutexGuard
const guard( m_aMutex );
1942 ShapeCursorMap::iterator aIter;
1943 if( (aIter=maShapeCursors.find( xShape )) == maShapeCursors.end() )
1946 if( nPointerShape != awt::SystemPointer::ARROW )
1951 maShapeCursors.emplace(xShape, nPointerShape);
1954 else if( nPointerShape == awt::SystemPointer::ARROW )
1958 maShapeCursors.erase( xShape );
1963 aIter->second = nPointerShape;
1967bool SlideShowImpl::requestCursor( sal_Int16 nCursorShape )
1974 for(
const auto& pView : maViewContainer )
1975 pView->setCursorShape( nActualCursor );
1977 return nActualCursor==nCursorShape;
1980void SlideShowImpl::resetCursor()
1986 for(
const auto& pView : maViewContainer )
1987 pView->setCursorShape( nActualCursor );
1990sal_Bool SlideShowImpl::update(
double & nNextTimeout )
1992 osl::MutexGuard
const guard( m_aMutex );
2004 maScreenUpdater.commitUpdates();
2023 std::shared_ptr<canvas::tools::ElapsedTime> xTimer(mpPresTimer);
2025 [&xTimer]() {
return xTimer->releaseTimer(); } );
2026 xTimer->holdTimer();
2029 maEventQueue.process();
2042 maActivitiesQueue.process();
2045 maFrameSynchronization.Synchronize();
2046 maScreenUpdater.commitUpdates();
2071 maActivitiesQueue.processDequeued();
2074 maScreenUpdater.commitUpdates();
2078 const bool bActivitiesLeft = ! maActivitiesQueue.isEmpty();
2079 const bool bTimerEventsLeft = ! maEventQueue.isEmpty();
2080 const bool bRet = (bActivitiesLeft || bTimerEventsLeft);
2085 if (bActivitiesLeft)
2095 maFrameSynchronization.Activate();
2108 nNextTimeout = std::max( 0.0, maEventQueue.nextTimeout() );
2112 maFrameSynchronization.Deactivate();
2115 mbSlideShowIdle =
false;
2118#if defined(DBG_UTIL)
2123 if( !mbSlideShowIdle &&
2125 nNextTimeout > 1.0) )
2127 for(
const auto& pView : maViewContainer )
2131 uno::Reference< presentation::XSlideShowView > xView( pView->getUnoView(),
2132 uno::UNO_SET_THROW );
2133 uno::Reference<util::XUpdatable>
const xUpdatable(
2134 xView->getCanvas(), uno::UNO_QUERY);
2135 if (xUpdatable.is())
2137 xUpdatable->update();
2140 catch( uno::RuntimeException& )
2144 catch( uno::Exception& )
2150 mbSlideShowIdle =
true;
2158void SlideShowImpl::notifySlideTransitionEnded(
bool bPaintSlide )
2160 osl::MutexGuard
const guard( m_aMutex );
2162 OSL_ENSURE( !isDisposed(),
"### already disposed!" );
2163 OSL_ENSURE( mpCurrentSlide,
2164 "notifySlideTransitionEnded(): Invalid current slide" );
2171 const bool bBackgroundLayerRendered( !bPaintSlide );
2172 mpCurrentSlide->show( bBackgroundLayerRendered );
2173 maEventMultiplexer.notifySlideStartEvent();
2177void queryAutomaticSlideTransition( uno::Reference<drawing::XDrawPage>
const& xDrawPage,
2178 double& nAutomaticNextSlideTimeout,
2179 bool& bHasAutomaticNextSlide )
2184 uno::Reference< beans::XPropertySet > xPropSet( xDrawPage,
2187 sal_Int32 nChange(0);
2188 if( !xPropSet.is() ||
2194 "queryAutomaticSlideTransition(): "
2195 "Could not extract slide change mode from XDrawPage - assuming <none>" );
2198 bHasAutomaticNextSlide = nChange == 1;
2200 if( !xPropSet.is() ||
2203 "HighResDuration") )
2206 "queryAutomaticSlideTransition(): "
2207 "Could not extract slide transition timeout from "
2208 "XDrawPage - assuming 1 sec" );
2212void SlideShowImpl::notifySlideAnimationsEnded()
2214 osl::MutexGuard
const guard( m_aMutex );
2217 mpCurrentSlide->drawPolygons();
2219 OSL_ENSURE( !isDisposed(),
"### already disposed!" );
2223 InterruptableEventPair aNotificationEvents;
2225 if( maEventMultiplexer.getAutomaticMode() )
2227 OSL_ENSURE( ! mpRehearseTimingsActivity,
2228 "unexpected: RehearseTimings mode!" );
2233 [
this]() {
return this->notifySlideEnded(
false ); },
2234 maEventMultiplexer.getAutomaticTimeout() );
2238 OSL_ENSURE( mpCurrentSlide,
2239 "notifySlideAnimationsEnded(): Invalid current slide!" );
2241 bool bHasAutomaticNextSlide=
false;
2242 double nAutomaticNextSlideTimeout=0.0;
2243 queryAutomaticSlideTransition(mpCurrentSlide->getXDrawPage(),
2244 nAutomaticNextSlideTimeout,
2245 bHasAutomaticNextSlide);
2253 if( !mbForceManualAdvance &&
2254 !mpRehearseTimingsActivity &&
2255 bHasAutomaticNextSlide )
2258 [
this]() {
return this->notifySlideEnded(
false ); },
2259 nAutomaticNextSlideTimeout);
2266 if (mpRehearseTimingsActivity)
2267 mpRehearseTimingsActivity->start();
2274 makeEvent( [
this] () { this->notifySlideEnded(
false); },
2275 "SlideShowImpl::notifySlideEnded");
2284 maUserEventQueue.registerNextEffectEvent(
2285 aNotificationEvents.mpImmediateEvent );
2287 if( aNotificationEvents.mpTimeoutEvent )
2288 maEventQueue.addEvent( aNotificationEvents.mpTimeoutEvent );
2296 WaitSymbolLock aLock (*
this);
2298 if (! matches( mpPrefetchSlide,
2299 mxPrefetchSlide, mxPrefetchAnimationNode ))
2302 mxPrefetchAnimationNode );
2304 if (mpPrefetchSlide)
2310 mpPrefetchSlide->getCurrentSlideBitmap( *maViewContainer.begin() );
2314 maListenerContainer.forEach(
2315 [](uno::Reference<presentation::XSlideShowListener>
const& xListener)
2317 xListener->slideAnimationsEnded();
2321void SlideShowImpl::notifySlideEnded (
const bool bReverse)
2323 osl::MutexGuard
const guard( m_aMutex );
2325 OSL_ENSURE( !isDisposed(),
"### already disposed!" );
2327 if (mpRehearseTimingsActivity && !bReverse)
2329 const double time = mpRehearseTimingsActivity->stop();
2330 if (mpRehearseTimingsActivity->hasBeenClicked())
2333 uno::Reference<beans::XPropertySet> xPropSet(
2334 mpCurrentSlide->getXDrawPage(), uno::UNO_QUERY );
2335 OSL_ASSERT( xPropSet.is() );
2338 xPropSet->setPropertyValue(
2340 uno::Any(
static_cast<sal_Int32
>(1) ) );
2341 xPropSet->setPropertyValue(
2343 uno::Any(
static_cast<sal_Int32
>(time) ) );
2349 maEventMultiplexer.notifySlideEndEvent();
2360 maListenerContainer.forEach(
2361 [&bReverse](
const uno::Reference< presentation::XSlideShowListener >& xListener )
2362 {
return xListener->slideEnded( bReverse ); } );
2365bool SlideShowImpl::notifyHyperLinkClicked( OUString
const& hyperLink )
2367 osl::MutexGuard
const guard( m_aMutex );
2369 maListenerContainer.forEach(
2370 [&hyperLink](
const uno::Reference< presentation::XSlideShowListener >& xListener )
2371 {
return xListener->hyperLinkClicked( hyperLink ); } );
2380 osl::MutexGuard
const guard( m_aMutex );
2382 uno::Reference<animations::XAnimationNode> xNode( rNode->getXAnimationNode() );
2384 switch( rNode->getState() )
2386 case AnimationNode::ACTIVE:
2387 maListenerContainer.forEach(
2388 [&xNode](
const uno::Reference< animations::XAnimationListener >& xListener )
2389 {
return xListener->beginEvent( xNode ); } );
2392 case AnimationNode::FROZEN:
2393 case AnimationNode::ENDED:
2394 maListenerContainer.forEach(
2395 [&xNode](
const uno::Reference< animations::XAnimationListener >& xListener )
2396 {
return xListener->endEvent( xNode ); } );
2397 if(mpCurrentSlide->isPaintOverlayActive())
2398 mpCurrentSlide->drawPolygons();
2407std::shared_ptr<avmedia::MediaTempFile> SlideShowImpl::getMediaTempFile(
const OUString& aUrl)
2409 std::shared_ptr<avmedia::MediaTempFile> aRet;
2411#if !HAVE_FEATURE_AVMEDIA
2418 uno::Reference<io::XStream>
xStream =
2420 css::embed::ElementModes::READ, aProxy);
2422 uno::Reference<io::XInputStream> xInStream =
xStream->getInputStream();
2425 sal_Int32 nLastDot = aUrl.lastIndexOf(
'.');
2426 sal_Int32 nLastSlash = aUrl.lastIndexOf(
'/');
2427 OUString sDesiredExtension;
2428 if (nLastDot > nLastSlash && nLastDot+1 < aUrl.getLength())
2429 sDesiredExtension = aUrl.copy(nLastDot);
2432 if (::avmedia::CreateMediaTempFile(xInStream, sTempUrl, sDesiredExtension))
2433 aRet = std::make_shared<avmedia::MediaTempFile>(sTempUrl);
2435 xInStream->closeInput();
2444FrameSynchronization::FrameSynchronization (
const double nFrameDuration)
2446 mnFrameDuration(nFrameDuration),
2447 mnNextFrameTargetTime(0),
2453void FrameSynchronization::MarkCurrentFrame()
2455 mnNextFrameTargetTime = maTimer.getElapsedTime() + mnFrameDuration;
2458void FrameSynchronization::Synchronize()
2465 double remainingTime = mnNextFrameTargetTime - maTimer.getElapsedTime();
2466 if(remainingTime <= 0)
2469 int remainingMilliseconds = remainingTime * 1000;
2470 if(remainingMilliseconds > 2)
2471 std::this_thread::sleep_for(std::chrono::milliseconds(remainingMilliseconds - 2));
2478void FrameSynchronization::Activate()
2483void FrameSynchronization::Deactivate()
2490extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
2492 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any>
const&)
2494 return cppu::acquire(
new SlideShowImpl(context));
css::uno::Reference< css::uno::XComponentContext > mxComponentContext
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
static css::uno::Reference< css::io::XStream > GetStreamAtPackageURL(const css::uno::Reference< css::embed::XStorage > &xStorage, const OUString &rURL, sal_uInt32 const nOpenMode, LifecycleProxy const &rNastiness)
#define DBG_TESTSOLARMUTEX()
#define TOOLS_WARN_EXCEPTION(area, stream)
#define ENSURE_OR_RETURN_FALSE(c, m)
#define ENSURE_OR_THROW(c, m)
Reference< XSingleServiceFactory > xFactory
IntrinsicAnimationEventHandlerSharedPtr mpListener
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
B2IRange fround(const B2DRange &rRange)
::std::shared_ptr< box2DWorld > Box2DWorldSharedPtr
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::shared_ptr< T > make_shared(Args &&... args)
AnimationActivitySharedPtr createSimpleActivity(const CommonParameters &rParms, const NumberAnimationSharedPtr &rAnimator, bool bDirectionForward)
Create a simple activity for the given animator.
NumberAnimationSharedPtr createSlideTransition(const SlideSharedPtr &rLeavingSlide, const SlideSharedPtr &rEnteringSlide, const UnoViewContainer &rViewContainer, ScreenUpdater &rScreenUpdater, EventMultiplexer &rEventMultiplexer, const css::uno::Reference< css::presentation::XTransitionFactory > &xOptionalFactory, sal_Int16 nTransitionType, sal_Int16 nTransitionSubType, bool bTransitionDirection, const RGBColor &rTransitionFadeColor, const SoundPlayerSharedPtr &rSoundPlayer)
Create a transition effect for slides.
::std::shared_ptr< NumberAnimation > NumberAnimationSharedPtr
sal_Int32 RGBAColor2UnoColor(::cppcanvas::IntSRGBA aColor)
::std::shared_ptr< SoundPlayer > SoundPlayerSharedPtr
::std::vector< ::cppcanvas::PolyPolygonSharedPtr > PolyPolygonVector
::std::shared_ptr< SubsettableShapeManager > SubsettableShapeManagerSharedPtr
bool getPropertyValue(ValueType &rValue, css::uno::Reference< css::beans::XPropertySet > const &xPropSet, OUString const &propName)
::std::shared_ptr< Activity > ActivitySharedPtr
::std::map< css::uno::Reference< css::drawing::XShape >, sal_Int16 > ShapeCursorMap
Maps XShape to mouse cursor.
UnoViewSharedPtr createSlideView(uno::Reference< presentation::XSlideShowView > const &xView, EventQueue &rEventQueue, EventMultiplexer &rEventMultiplexer)
::std::map< css::uno::Reference< css::drawing::XShape >, std::shared_ptr< ::comphelper::OInterfaceContainerHelper3< css::presentation::XShapeEventListener > > > ShapeEventListenerMap
Maps XShape to shape listener.
RGBColor unoColor2RGBColor(sal_Int32)
Convert a plain UNO API 32 bit int to RGBColor.
::std::shared_ptr< AnimationNode > AnimationNodeSharedPtr
::std::shared_ptr< Event > EventSharedPtr
SlideSharedPtr createSlide(const uno::Reference< drawing::XDrawPage > &xDrawPage, const uno::Reference< drawing::XDrawPagesSupplier > &xDrawPages, const uno::Reference< animations::XAnimationNode > &xRootNode, EventQueue &rEventQueue, EventMultiplexer &rEventMultiplexer, ScreenUpdater &rScreenUpdater, ActivitiesQueue &rActivitiesQueue, UserEventQueue &rUserEventQueue, CursorManager &rCursorManager, MediaFileManager &rMediaFileManager, const UnoViewContainer &rViewContainer, const uno::Reference< uno::XComponentContext > &xComponentContext, const ShapeEventListenerMap &rShapeListenerMap, const ShapeCursorMap &rShapeCursorMap, PolyPolygonVector &&rPolyPolygonVector, RGBColor const &rUserPaintColor, double dUserPaintStrokeWidth, bool bUserPaintEnabled, bool bIntrinsicAnimationsAllowed, bool bDisableAnimationZOrder)
::std::shared_ptr< Slide > SlideSharedPtr
InterruptableEventPair makeInterruptableDelay(const Functor &rFunctor, double nTimeout)
Generate an interruptable delay event.
::std::shared_ptr< Shape > ShapeSharedPtr
std::shared_ptr< UnoView > UnoViewSharedPtr
sal_Int16 mnCurrentCursor
RGBColor maUserPaintColor
PolyPolygonVector maPolygons
uno::Reference< drawing::XDrawPagesSupplier > mxDrawPagesSupplier
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * slideshow_SlideShowImpl_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
EventQueue & mrEventQueue
EventSharedPtr mpImmediateEvent
This member contains a pointer to the interruption event.