LibreOffice Module sd (master) 1
slideshow.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <com/sun/star/beans/PropertyAttribute.hpp>
21#include <com/sun/star/drawing/framework/XControllerManager.hpp>
22#include <com/sun/star/frame/XDispatchProvider.hpp>
23#include <com/sun/star/util/URL.hpp>
24
27
28#include <sal/log.hxx>
29#include <vcl/svapp.hxx>
30#include <vcl/wrkwin.hxx>
31#include <svx/svdpool.hxx>
32#include <svx/svdlayer.hxx>
33#include <svl/itemprop.hxx>
34
35#include <sfx2/bindings.hxx>
36#include <sfx2/viewfrm.hxx>
37#include <sfx2/sfxsids.hrc>
38
41
42#include <FrameView.hxx>
44#include <unomodel.hxx>
45#include <slideshow.hxx>
46#include "slideshowimpl.hxx"
47#include <sdattr.hrc>
48#include <sdmod.hxx>
49#include <FactoryIds.hxx>
50#include <DrawDocShell.hxx>
51#include <ViewShell.hxx>
52#include <ViewShellBase.hxx>
54#include <DrawController.hxx>
56#include <customshowlist.hxx>
57#include <unopage.hxx>
58#include <sdpage.hxx>
59#include <cusshow.hxx>
60#include <optsitem.hxx>
61#include <strings.hrc>
62#include <sdresid.hxx>
63
64using ::com::sun::star::presentation::XSlideShowController;
65using ::sd::framework::FrameworkHelper;
66using ::com::sun::star::awt::XWindow;
67using namespace ::sd;
68using namespace ::cppu;
69using namespace ::com::sun::star;
70using namespace ::com::sun::star::uno;
71using namespace ::com::sun::star::drawing;
72using namespace ::com::sun::star::beans;
73using namespace ::com::sun::star::lang;
74using namespace ::com::sun::star::animations;
76
77namespace {
81 class FullScreenWorkWindow : public WorkWindow
82 {
83 public:
84 FullScreenWorkWindow (
85 const ::rtl::Reference<SlideShow>& rpSlideShow,
86 ViewShellBase* pViewShellBase)
88 mpRestarter(std::make_shared<SlideShowRestarter>(rpSlideShow, pViewShellBase))
89 {}
90
91 void Restart(bool bForce)
92 {
93 mpRestarter->Restart(bForce);
94 }
95
96 virtual void DataChanged (const DataChangedEvent& rEvent) override
97 {
98 if (rEvent.GetType() == DataChangedEventType::DISPLAY)
99 Restart(false);
100 }
101
102 private:
103 ::std::shared_ptr<SlideShowRestarter> mpRestarter;
104 };
105}
106
108{
109 // NOTE: First member must be sorted
110 static const SfxItemPropertyMapEntry aPresentationPropertyMap_Impl[] =
111 {
112 { u"AllowAnimations", ATTR_PRESENT_ANIMATION_ALLOWED, cppu::UnoType<bool>::get(), 0, 0 },
113 { u"CustomShow", ATTR_PRESENT_CUSTOMSHOW, ::cppu::UnoType<OUString>::get(), 0, 0 },
114 { u"Display", ATTR_PRESENT_DISPLAY, ::cppu::UnoType<sal_Int32>::get(), 0, 0 },
115 { u"FirstPage", ATTR_PRESENT_DIANAME, ::cppu::UnoType<OUString>::get(), 0, 0 },
116 { u"IsAlwaysOnTop", ATTR_PRESENT_ALWAYS_ON_TOP, cppu::UnoType<bool>::get(), 0, 0 },
117 { u"IsShowNavigationButtons", ATTR_PRESENT_SHOW_NAVIGATION_BUTTONS, cppu::UnoType<bool>::get(), 0, 0 },
118 { u"IsAutomatic", ATTR_PRESENT_MANUEL, cppu::UnoType<bool>::get(), 0, 0 },
119 { u"IsEndless", ATTR_PRESENT_ENDLESS, cppu::UnoType<bool>::get(), 0, 0 },
120 { u"IsFullScreen", ATTR_PRESENT_FULLSCREEN, cppu::UnoType<bool>::get(), 0, 0 },
121 { u"IsShowAll", ATTR_PRESENT_ALL, cppu::UnoType<bool>::get(), 0, 0 },
122 { u"IsMouseVisible", ATTR_PRESENT_MOUSE, cppu::UnoType<bool>::get(), 0, 0 },
123 { u"IsShowLogo", ATTR_PRESENT_SHOW_PAUSELOGO, cppu::UnoType<bool>::get(), 0, 0 },
124 { u"IsTransitionOnClick", ATTR_PRESENT_CHANGE_PAGE, cppu::UnoType<bool>::get(), 0, 0 },
125 { u"Pause", ATTR_PRESENT_PAUSE_TIMEOUT, ::cppu::UnoType<sal_Int32>::get(), 0, 0 },
126 { u"StartWithNavigator", ATTR_PRESENT_NAVIGATOR, cppu::UnoType<bool>::get(), 0, 0 },
127 { u"UsePen", ATTR_PRESENT_PEN, cppu::UnoType<bool>::get(), 0, 0 },
128 };
129
130 return aPresentationPropertyMap_Impl;
131}
132
133
134SlideShow::SlideShow( SdDrawDocument* pDoc )
135: maPropSet(ImplGetPresentationPropertyMap(), SdrObject::GetGlobalDrawObjectItemPool())
136, mbIsInStartup(false)
137, mpDoc( pDoc )
138, mpCurrentViewShellBase( nullptr )
139, mpFullScreenViewShellBase( nullptr )
140, mpFullScreenFrameView( nullptr )
141, mnInPlaceConfigEvent( nullptr )
142{
143}
144
146{
147 if( mpDoc == nullptr )
148 throw DisposedException();
149}
150
153{
154 return new SlideShow( pDoc );
155}
156
158{
160
161 if( pDocument )
162 xRet = GetSlideShow( *pDocument );
163
164 return xRet;
165}
166
168{
170 dynamic_cast< SlideShow* >( rDocument.getPresentation().get() ) );
171}
172
174{
175 return GetSlideShow( rBase.GetDocument() );
176}
177
178css::uno::Reference< css::presentation::XSlideShowController > SlideShow::GetSlideShowController(ViewShellBase const & rBase )
179{
180 rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) );
181
182 Reference< XSlideShowController > xRet;
183 if( xSlideShow.is() )
184 xRet = xSlideShow->getController();
185
186 return xRet;
187}
188
190 const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
191 const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode )
192{
193 rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) );
194 if( !xSlideShow.is() )
195 return false;
196
197 xSlideShow->startPreview( xDrawPage, xAnimationNode );
198 return true;
199}
200
201void SlideShow::Stop( ViewShellBase const & rBase )
202{
203 rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) );
204 if( xSlideShow.is() )
205 xSlideShow->end();
206}
207
209{
210 rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rBase ) );
211 return xSlideShow.is() && xSlideShow->isRunning();
212}
213
214bool SlideShow::IsRunning( const ViewShell& rViewShell )
215{
216 rtl::Reference< SlideShow > xSlideShow( GetSlideShow( rViewShell.GetViewShellBase() ) );
217 return xSlideShow.is() && xSlideShow->isRunning() && (xSlideShow->mxController->getViewShell() == &rViewShell);
218}
219
220void SlideShow::CreateController( ViewShell* pViewSh, ::sd::View* pView, vcl::Window* pParentWindow )
221{
222 SAL_INFO_IF( !mxController.is(), "sd.slideshow", "sd::SlideShow::CreateController(), clean up old controller first!" );
223
224 Reference< XPresentation2 > xThis( this );
225
227 new SlideshowImpl(xThis, pViewSh, pView, mpDoc, pParentWindow));
228
229 // Reset mbIsInStartup. From here mxController.is() is used to prevent
230 // multiple slide show instances for one document.
232 mbIsInStartup = false;
233
234}
235
236// XServiceInfo
238{
239 return "com.sun.star.comp.sd.SlideShow";
240}
241
242sal_Bool SAL_CALL SlideShow::supportsService( const OUString& ServiceName )
243{
244 return cppu::supportsService( this, ServiceName );
245}
246
247Sequence< OUString > SAL_CALL SlideShow::getSupportedServiceNames( )
248{
249 return { "com.sun.star.presentation.Presentation" };
250}
251
252// XPropertySet
253Reference< XPropertySetInfo > SAL_CALL SlideShow::getPropertySetInfo()
254{
255 SolarMutexGuard aGuard;
256 static Reference< XPropertySetInfo > xInfo = maPropSet.getPropertySetInfo();
257 return xInfo;
258 }
259
260void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
261{
262 SolarMutexGuard aGuard;
264
266
267 const SfxItemPropertyMapEntry* pEntry = maPropSet.getPropertyMapEntry(aPropertyName);
268
269 if( pEntry && ((pEntry->nFlags & PropertyAttribute::READONLY) != 0) )
270 throw PropertyVetoException();
271
272 bool bValuesChanged = false;
273 bool bIllegalArgument = true;
274
275 switch( pEntry ? pEntry->nWID : -1 )
276 {
277 case ATTR_PRESENT_ALL:
278 {
279 bool bVal = false;
280
281 if( aValue >>= bVal )
282 {
283 bIllegalArgument = false;
284
285 if( rPresSettings.mbAll != bVal )
286 {
287 rPresSettings.mbAll = bVal;
288 bValuesChanged = true;
289 if( bVal )
290 rPresSettings.mbCustomShow = false;
291 }
292 }
293 break;
294 }
295 case ATTR_PRESENT_CHANGE_PAGE:
296 {
297 bool bVal = false;
298
299 if( aValue >>= bVal )
300 {
301 bIllegalArgument = false;
302
303 if( bVal == rPresSettings.mbLockedPages )
304 {
305 bValuesChanged = true;
306 rPresSettings.mbLockedPages = !bVal;
307 }
308 }
309 break;
310 }
311
312 case ATTR_PRESENT_ANIMATION_ALLOWED:
313 {
314 bool bVal = false;
315
316 if( aValue >>= bVal )
317 {
318 bIllegalArgument = false;
319
320 if(rPresSettings.mbAnimationAllowed != bVal)
321 {
322 bValuesChanged = true;
323 rPresSettings.mbAnimationAllowed = bVal;
324 }
325 }
326 break;
327 }
328 case ATTR_PRESENT_CUSTOMSHOW:
329 {
330 OUString aShowName;
331 if( aValue >>= aShowName )
332 {
333 bIllegalArgument = false;
334
335 SdCustomShowList* pCustomShowList = mpDoc->GetCustomShowList();
336 if(pCustomShowList)
337 {
338 SdCustomShow* pCustomShow;
339 for( pCustomShow = pCustomShowList->First(); pCustomShow != nullptr; pCustomShow = pCustomShowList->Next() )
340 {
341 if( pCustomShow->GetName() == aShowName )
342 break;
343 }
344
345 rPresSettings.mbCustomShow = true;
346 bValuesChanged = true;
347 }
348 }
349 break;
350 }
351 case ATTR_PRESENT_ENDLESS:
352 {
353 bool bVal = false;
354
355 if( aValue >>= bVal )
356 {
357 bIllegalArgument = false;
358
359 if( rPresSettings.mbEndless != bVal)
360 {
361 bValuesChanged = true;
362 rPresSettings.mbEndless = bVal;
363 }
364 }
365 break;
366 }
367 case ATTR_PRESENT_FULLSCREEN:
368 {
369 bool bVal = false;
370
371 if( aValue >>= bVal )
372 {
373 bIllegalArgument = false;
374 if( rPresSettings.mbFullScreen != bVal)
375 {
376 bValuesChanged = true;
377 rPresSettings.mbFullScreen = bVal;
378 }
379 }
380 break;
381 }
382 case ATTR_PRESENT_DIANAME:
383 {
384 OUString aPresPage;
385 aValue >>= aPresPage;
386 bIllegalArgument = false;
387 if( (rPresSettings.maPresPage != aPresPage) || !rPresSettings.mbCustomShow || !rPresSettings.mbAll )
388 {
389 bValuesChanged = true;
390 rPresSettings.maPresPage = getUiNameFromPageApiNameImpl(aPresPage);
391 rPresSettings.mbCustomShow = false;
392 rPresSettings.mbAll = false;
393 }
394 break;
395 }
396 case ATTR_PRESENT_MANUEL:
397 {
398 bool bVal = false;
399
400 if( aValue >>= bVal )
401 {
402 bIllegalArgument = false;
403
404 if( rPresSettings.mbManual != bVal)
405 {
406 bValuesChanged = true;
407 rPresSettings.mbManual = bVal;
408 }
409 }
410 break;
411 }
412 case ATTR_PRESENT_MOUSE:
413 {
414 bool bVal = false;
415
416 if( aValue >>= bVal )
417 {
418 bIllegalArgument = false;
419 if( rPresSettings.mbMouseVisible != bVal)
420 {
421 bValuesChanged = true;
422 rPresSettings.mbMouseVisible = bVal;
423 }
424 }
425 break;
426 }
427 case ATTR_PRESENT_ALWAYS_ON_TOP:
428 {
429 bool bVal = false;
430
431 if( aValue >>= bVal )
432 {
433 bIllegalArgument = false;
434
435 if( rPresSettings.mbAlwaysOnTop != bVal)
436 {
437 bValuesChanged = true;
438 rPresSettings.mbAlwaysOnTop = bVal;
439 }
440 }
441 break;
442 }
443 case ATTR_PRESENT_SHOW_NAVIGATION_BUTTONS:
444 {
445 bool bVal = false;
446
447 if (aValue >>= bVal)
448 {
449 bIllegalArgument = false;
450
451 if (rPresSettings.mbUseNavigation != bVal)
452 {
453 bValuesChanged = true;
454 rPresSettings.mbUseNavigation = bVal;
455 }
456 }
457 break;
458 }
459 case ATTR_PRESENT_NAVIGATOR:
460 bIllegalArgument = false;
461 //ignored, but exists in some older documents
462 break;
463 case ATTR_PRESENT_PEN:
464 {
465 bool bVal = false;
466
467 if( aValue >>= bVal )
468 {
469 bIllegalArgument = false;
470
471 if(rPresSettings.mbMouseAsPen != bVal)
472 {
473 bValuesChanged = true;
474 rPresSettings.mbMouseAsPen = bVal;
475 }
476 }
477 break;
478 }
479 case ATTR_PRESENT_PAUSE_TIMEOUT:
480 {
481 sal_Int32 nValue = 0;
482 if( (aValue >>= nValue) && (nValue >= 0) )
483 {
484 bIllegalArgument = false;
485 if( rPresSettings.mnPauseTimeout != nValue )
486 {
487 bValuesChanged = true;
488 rPresSettings.mnPauseTimeout = nValue;
489 }
490 }
491 break;
492 }
493 case ATTR_PRESENT_SHOW_PAUSELOGO:
494 {
495 bool bVal = false;
496
497 if( aValue >>= bVal )
498 {
499 bIllegalArgument = false;
500
501 if( rPresSettings.mbShowPauseLogo != bVal )
502 {
503 bValuesChanged = true;
504 rPresSettings.mbShowPauseLogo = bVal;
505 }
506 }
507 break;
508 }
509 case ATTR_PRESENT_DISPLAY:
510 {
511 sal_Int32 nDisplay = 0;
512 if( aValue >>= nDisplay )
513 {
514 bIllegalArgument = false;
515
516 SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress);
517 pOptions->SetDisplay( nDisplay );
518
519 FullScreenWorkWindow *pWin = dynamic_cast<FullScreenWorkWindow *>(GetWorkWindow());
520 if( !pWin )
521 return;
522 pWin->Restart(true);
523 }
524 break;
525 }
526
527 default:
528 throw UnknownPropertyException( OUString::number(pEntry ? pEntry->nWID : -1), static_cast<cppu::OWeakObject*>(this));
529 }
530
531 if( bIllegalArgument )
532 throw IllegalArgumentException();
533
534 if( bValuesChanged )
535 mpDoc->SetChanged();
536}
537
538Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName )
539{
540 SolarMutexGuard aGuard;
542
544
545 const SfxItemPropertyMapEntry* pEntry = maPropSet.getPropertyMapEntry(PropertyName);
546
547 switch( pEntry ? pEntry->nWID : -1 )
548 {
549 case ATTR_PRESENT_ALL:
550 return Any( !rPresSettings.mbCustomShow && rPresSettings.mbAll );
551 case ATTR_PRESENT_CHANGE_PAGE:
552 return Any( !rPresSettings.mbLockedPages );
553 case ATTR_PRESENT_ANIMATION_ALLOWED:
554 return Any( rPresSettings.mbAnimationAllowed );
555 case ATTR_PRESENT_CUSTOMSHOW:
556 {
558 SdCustomShow* pShow = (pList && rPresSettings.mbCustomShow) ? pList->GetCurObject() : nullptr;
559 OUString aShowName;
560
561 if(pShow)
562 aShowName = pShow->GetName();
563
564 return Any( aShowName );
565 }
566 case ATTR_PRESENT_ENDLESS:
567 return Any( rPresSettings.mbEndless );
568 case ATTR_PRESENT_FULLSCREEN:
569 return Any( rPresSettings.mbFullScreen );
570 case ATTR_PRESENT_DIANAME:
571 {
572 OUString aSlideName;
573
574 if( !rPresSettings.mbCustomShow && !rPresSettings.mbAll )
575 aSlideName = getPageApiNameFromUiName( rPresSettings.maPresPage );
576
577 return Any( aSlideName );
578 }
579 case ATTR_PRESENT_MANUEL:
580 return Any( rPresSettings.mbManual );
581 case ATTR_PRESENT_MOUSE:
582 return Any( rPresSettings.mbMouseVisible );
583 case ATTR_PRESENT_ALWAYS_ON_TOP:
584 return Any( rPresSettings.mbAlwaysOnTop );
585 case ATTR_PRESENT_SHOW_NAVIGATION_BUTTONS:
586 return Any(rPresSettings.mbUseNavigation);
587 case ATTR_PRESENT_NAVIGATOR:
588 return Any( false );
589 case ATTR_PRESENT_PEN:
590 return Any( rPresSettings.mbMouseAsPen );
591 case ATTR_PRESENT_PAUSE_TIMEOUT:
592 return Any( rPresSettings.mnPauseTimeout );
593 case ATTR_PRESENT_SHOW_PAUSELOGO:
594 return Any( rPresSettings.mbShowPauseLogo );
595 case ATTR_PRESENT_DISPLAY:
596 {
597 SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress);
598 return Any(pOptions->GetDisplay());
599 }
600
601 default:
602 throw UnknownPropertyException( OUString::number(pEntry ? pEntry->nWID : -1), static_cast<cppu::OWeakObject*>(this));
603 }
604}
605
606void SAL_CALL SlideShow::addPropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& )
607{
608}
609
610void SAL_CALL SlideShow::removePropertyChangeListener( const OUString& , const Reference< XPropertyChangeListener >& )
611{
612}
613
614void SAL_CALL SlideShow::addVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& )
615{
616}
617
618void SAL_CALL SlideShow::removeVetoableChangeListener( const OUString& , const Reference< XVetoableChangeListener >& )
619{
620}
621
622// XPresentation
623
624void SAL_CALL SlideShow::start()
625{
626 const Sequence< PropertyValue > aArguments;
628}
629
631{
633 return nullptr;
634
636
637 if( !pShell || !pShell->GetViewFrame() )
638 return nullptr;
639
640 return dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetFrame().GetWindow().GetParent());
641}
642
644{
645 SolarMutexGuard aGuard;
648}
649
651{
652 SolarMutexGuard aGuard;
655}
656
657void SAL_CALL SlideShow::end()
658{
659 SolarMutexGuard aGuard;
660
661 // The mbIsInStartup flag should have been reset during the start of the
662 // slide show. Reset it here just in case that something has horribly
663 // gone wrong.
664 assert(!mbIsInStartup);
665
667 if( !xController.is() )
668 return;
669
670 mxController.clear();
671
673 {
675 mpFullScreenFrameView = nullptr;
676 }
677
678 ViewShellBase* pFullScreenViewShellBase = mpFullScreenViewShellBase;
680
681 // dispose before fullscreen window changes screens
682 // (potentially). If this needs to be moved behind
683 // pWorkWindow->StartPresentationMode() again, read issue
684 // pWorkWindow->i94007 & implement the solution outlined
685 // there.
686 xController->dispose();
687
688 if( pFullScreenViewShellBase )
689 {
690 PresentationViewShell* pShell = dynamic_cast<PresentationViewShell*>(pFullScreenViewShellBase->GetMainViewShell().get());
691
692 if( pShell && pShell->GetViewFrame() )
693 {
694 WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetFrame().GetWindow().GetParent());
695 if( pWorkWindow )
696 {
697 pWorkWindow->StartPresentationMode( (mxController.is() && mxController->maPresSettings.mbAlwaysOnTop)
698 ? PresentationFlags::HideAllApps : PresentationFlags::NONE );
699 }
700 }
701 }
702
703 if( pFullScreenViewShellBase )
704 {
705 PresentationViewShell* pShell = nullptr;
706 {
707 // Get the shell pointer in its own scope to be sure that
708 // the shared_ptr to the shell is released before DoClose()
709 // is called.
710 ::std::shared_ptr<ViewShell> pSharedView (pFullScreenViewShellBase->GetMainViewShell());
711 pShell = dynamic_cast<PresentationViewShell*>(pSharedView.get());
712 }
713 if( pShell && pShell->GetViewFrame() )
714 pShell->GetViewFrame()->DoClose();
715 }
716 else if( mpCurrentViewShellBase )
717 {
719
720 if( pViewShell )
721 {
722 FrameView* pFrameView = pViewShell->GetFrameView();
723
724 if( pFrameView && (pFrameView->GetPresentationViewShellId() != SID_VIEWSHELL0) )
725 {
726 ViewShell::ShellType ePreviousType (pFrameView->GetPreviousViewShellType());
728
729 pFrameView->SetPresentationViewShellId(SID_VIEWSHELL0);
730 pFrameView->SetPreviousViewShellType(pViewShell->GetShellType());
731
732 framework::FrameworkHelper::Instance(*mpCurrentViewShellBase)->RequestView(
735
736 pViewShell->GetViewFrame()->GetBindings().InvalidateAll( true );
737 }
738 }
739 }
740
742 {
743 if (ViewShell* const pViewShell = mpCurrentViewShellBase->GetMainViewShell().get())
744 {
745 // invalidate the view shell so the presentation slot will be re-enabled
746 // and the rehearsing will be updated
747 pViewShell->Invalidate();
748
749 if( xController->meAnimationMode ==ANIMATIONMODE_SHOW )
750 {
751 // switch to the previously visible Slide
752 DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>( pViewShell );
753 if( pDrawViewShell )
754 pDrawViewShell->SwitchPage( static_cast<sal_uInt16>(xController->getRestoreSlide()) );
755 else
756 {
757 DrawController& rDrawController =
759 rDrawController.setCurrentPage(
760 Reference<XDrawPage>(
762 UNO_QUERY));
763 }
764 }
765
766 if( pViewShell->GetDoc()->IsExitAfterPresenting() )
767 {
768 pViewShell->GetDoc()->SetExitAfterPresenting( false );
769
770 Reference<frame::XDispatchProvider> xProvider(pViewShell->GetViewShellBase().GetController()->getFrame(),
771 UNO_QUERY);
772 if( xProvider.is() )
773 {
774 util::URL aURL;
775 aURL.Complete = ".uno:CloseFrame";
776
777 uno::Reference< frame::XDispatch > xDispatch(
778 xProvider->queryDispatch(
779 aURL, OUString(), 0));
780 if( xDispatch.is() )
781 {
782 xDispatch->dispatch(aURL,
783 uno::Sequence< beans::PropertyValue >());
784 }
785 }
786 }
787
788 // In case mbMouseAsPen was set, a new layer DrawnInSlideshow might have been generated
789 // during slideshow, which is not known to FrameView yet.
790 if (any2bool(getPropertyValue("UsePen"))
791 && pViewShell->GetDoc()->GetLayerAdmin().GetLayer("DrawnInSlideshow"))
792 {
793 SdrLayerIDSet aDocLayerIDSet;
794 pViewShell->GetDoc()->GetLayerAdmin().getVisibleLayersODF(aDocLayerIDSet);
795 if (pViewShell->GetFrameView()->GetVisibleLayers() != aDocLayerIDSet)
796 {
797 pViewShell->GetFrameView()->SetVisibleLayers(aDocLayerIDSet);
798 }
799 pViewShell->GetDoc()->GetLayerAdmin().getPrintableLayersODF(aDocLayerIDSet);
800 if (pViewShell->GetFrameView()->GetPrintableLayers() != aDocLayerIDSet)
801 {
802 pViewShell->GetFrameView()->SetPrintableLayers(aDocLayerIDSet);
803 }
804 pViewShell->GetDoc()->GetLayerAdmin().getLockedLayersODF(aDocLayerIDSet);
805 if (pViewShell->GetFrameView()->GetLockedLayers() != aDocLayerIDSet)
806 {
807 pViewShell->GetFrameView()->SetLockedLayers(aDocLayerIDSet);
808 }
809 pViewShell->InvalidateWindows();
810 }
811
812 // Fire the acc focus event when focus is switched back. The above method
813 // mpCurrentViewShellBase->GetWindow()->GrabFocus() will set focus to WorkWindow
814 // instead of the sd::window, so here call Shell's method to fire the focus event
815 pViewShell->SwitchActiveViewFireFocus();
816 }
817 }
818 mpCurrentViewShellBase = nullptr;
819}
820
822{
823 Sequence< PropertyValue > aArguments{ comphelper::makePropertyValue("RehearseTimings", true) };
825}
826
827// XPresentation2
828
829void SAL_CALL SlideShow::startWithArguments(const Sequence< PropertyValue >& rArguments)
830{
831 SolarMutexGuard aGuard;
833
834 // Stop a running show before starting a new one.
835 if( mxController.is() )
836 {
837 assert(!mbIsInStartup);
838 end();
839 }
840 else if (mbIsInStartup)
841 {
842 // We are already somewhere in process of starting a slide show but
843 // have not yet got to the point where mxController is set. There
844 // is not yet a slide show to end so return silently.
845 return;
846 }
847
848 // Prevent multiple instance of the SlideShow class for one document.
849 mbIsInStartup = true;
850
851 mxCurrentSettings = std::make_shared<PresentationSettingsEx>( mpDoc->getPresentationSettings() );
852 mxCurrentSettings->SetArguments( rArguments );
853
854 // if there is no view shell base set, use the current one or the first using this document
855 if( mpCurrentViewShellBase == nullptr )
856 {
857 // first check current
859 if( pBase && pBase->GetDocument() == mpDoc )
860 {
862 }
863 else
864 {
865 // current is not ours, so get first from ours
867 }
868 }
869
870 // #i118456# make sure TextEdit changes get pushed to model.
871 // mpDrawView is tested against NULL above already.
873 {
875
876 if(pViewShell && pViewShell->GetView())
877 {
878 pViewShell->GetView()->SdrEndTextEdit();
879 }
880 }
881
882 // Start either a full-screen or an in-place show.
883 if(mxCurrentSettings->mbFullScreen && !mxCurrentSettings->mbPreview)
885 else
887
888}
889
891{
892 SolarMutexGuard aGuard;
893 return mxController.is() && mxController->isRunning();
894}
895
896Reference< XSlideShowController > SAL_CALL SlideShow::getController( )
897{
899
900 return mxController;
901}
902
903// XComponent
904
905void SlideShow::disposing(std::unique_lock<std::mutex>&)
906{
907 SolarMutexGuard aGuard;
908
910 {
912 mnInPlaceConfigEvent = nullptr;
913 }
914
915 if( mxController.is() )
916 {
917 mxController->dispose();
918 mxController.clear();
919 }
920
921 mpCurrentViewShellBase = nullptr;
923 mpDoc = nullptr;
924}
925
926void SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Reference< XAnimationNode >& xAnimationNode )
927{
928 Sequence< PropertyValue > aArguments{
929 comphelper::makePropertyValue("Preview", true),
930 comphelper::makePropertyValue("FirstPage", xDrawPage),
931 comphelper::makePropertyValue("AnimationNode", xAnimationNode),
932 comphelper::makePropertyValue("ParentWindow", Reference< XWindow >()),
933 };
934
936}
937
939{
940 return mxController.is() ? mxController->mpShowWindow->GetOutDev() : nullptr;
941}
942
944{
945 return mxController.is() ? mxController->meAnimationMode : ANIMATIONMODE_SHOW;
946}
947
948void SlideShow::jumpToPageIndex( sal_Int32 nPageIndex )
949{
950 if( mxController.is() )
951 mxController->displaySlideIndex( nPageIndex );
952}
953
954void SlideShow::jumpToPageNumber( sal_Int32 nPageNumber )
955{
956 if( mxController.is() )
957 mxController->displaySlideNumber( nPageNumber );
958}
959
961{
962 return mxController.is() ? mxController->getCurrentSlideNumber() : 0;
963}
964
965void SlideShow::jumpToBookmark( const OUString& sBookmark )
966{
967 if( mxController.is() )
968 mxController->jumpToBookmark( sBookmark );
969}
970
972{
973 return mxController.is() && mxController->maPresSettings.mbFullScreen;
974}
975
976void SlideShow::resize( const Size &rSize )
977{
978 if( mxController.is() )
979 mxController->resize( rSize );
980}
981
983{
984 if( (mpFullScreenViewShellBase == &rBase) && !mxController.is() )
985 {
986 ::std::shared_ptr<PresentationViewShell> pShell = std::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell());
987 if (pShell != nullptr)
988 {
989 pShell->FinishInitialization( mpFullScreenFrameView );
990 mpFullScreenFrameView = nullptr;
991
992 CreateController( pShell.get(), pShell->GetView(), rBase.GetViewWindow() );
993
994 if (!mxController->startShow(mxCurrentSettings.get()))
995 return false;
996
997 pShell->Resize();
998 // Defer the sd::ShowWindow's GrabFocus to here. so that the accessible event can be fired correctly.
999 pShell->GetActiveWindow()->GrabFocus();
1000 }
1001 }
1002
1003 if( mxController.is() )
1004 mxController->activate();
1005
1006 return true;
1007}
1008
1010{
1011 mxController->deactivate();
1012}
1013
1015{
1016 return mxController.is() && mxController->keyInput(rKEvt);
1017}
1018
1020{
1021 if( mxController.is() )
1022 mxController->paint();
1023}
1024
1025void SlideShow::pause( bool bPause )
1026{
1027 if( mxController.is() )
1028 {
1029 if( bPause )
1030 mxController->pause();
1031 else
1032 mxController->resume();
1033 }
1034}
1035
1037{
1038 return mxController.is() && mxController->swipe(rSwipeData);
1039}
1040
1042{
1043 return mxController.is() && mxController->longpress(rLongPressData);
1044}
1045
1047{
1048 if( mnInPlaceConfigEvent != nullptr )
1050
1051 mnInPlaceConfigEvent = Application::PostUserEvent( LINK( this, SlideShow, StartInPlacePresentationConfigurationHdl ) );
1052}
1053
1054IMPL_LINK_NOARG(SlideShow, StartInPlacePresentationConfigurationHdl, void*, void)
1055{
1056 mnInPlaceConfigEvent = nullptr;
1057 StartInPlacePresentation();
1058}
1059
1061{
1063 {
1064 // Save the current view shell type so that it can be restored after the
1065 // show has ended. If there already is a saved shell type then that is
1066 // not overwritten.
1067
1069
1070 ::std::shared_ptr<FrameworkHelper> pHelper(FrameworkHelper::Instance(*mpCurrentViewShellBase));
1071 ::std::shared_ptr<ViewShell> pMainViewShell(pHelper->GetViewShell(FrameworkHelper::msCenterPaneURL));
1072
1073 if( pMainViewShell )
1074 eShell = pMainViewShell->GetShellType();
1075
1076 if( eShell != ViewShell::ST_IMPRESS )
1077 {
1078 // Switch temporary to a DrawViewShell which supports the in-place presentation.
1079
1080 if( pMainViewShell )
1081 {
1082 FrameView* pFrameView = pMainViewShell->GetFrameView();
1083 pFrameView->SetPresentationViewShellId(SID_VIEWSHELL1);
1084 pFrameView->SetPreviousViewShellType (pMainViewShell->GetShellType());
1085 pFrameView->SetPageKind (PageKind::Standard);
1086 }
1087
1088 pHelper->RequestView( FrameworkHelper::msImpressViewURL, FrameworkHelper::msCenterPaneURL );
1089 pHelper->RunOnConfigurationEvent(
1090 FrameworkHelper::msConfigurationUpdateEndEvent,
1091 [this] (bool const) { return this->StartInPlacePresentationConfigurationCallback(); } );
1092 return;
1093 }
1094 else
1095 {
1096 vcl::Window* pParentWindow = mxCurrentSettings->mpParentWindow;
1097 if( pParentWindow == nullptr )
1098 pParentWindow = mpCurrentViewShellBase->GetViewWindow();
1099
1100 CreateController( pMainViewShell.get(), pMainViewShell->GetView(), pParentWindow );
1101 }
1102 }
1103 else if( mxCurrentSettings->mpParentWindow )
1104 {
1105 // no current view shell, but parent window
1106 CreateController( nullptr, nullptr, mxCurrentSettings->mpParentWindow );
1107 }
1108
1109 if( !mxController.is() )
1110 return;
1111
1112 bool bSuccess = false;
1113 if( mxCurrentSettings && mxCurrentSettings->mbPreview )
1114 {
1115 bSuccess = mxController->startPreview(mxCurrentSettings->mxStartPage, mxCurrentSettings->mxAnimationNode, mxCurrentSettings->mpParentWindow );
1116 }
1117 else
1118 {
1119 bSuccess = mxController->startShow(mxCurrentSettings.get());
1120 }
1121
1122 if( !bSuccess )
1123 end();
1124 else
1125 {
1128 }
1129}
1130
1132{
1133 // Create the top level window in which the PresentationViewShell(Base)
1134 // will be created. This is done here explicitly so that we can make it
1135 // fullscreen.
1136 const sal_Int32 nDisplay (GetDisplay());
1138 pWorkWindow->SetBackground(Wallpaper(COL_BLACK));
1139 OUString Title(SdResId(STR_FULLSCREEN_SLIDESHOW));
1140 Title = Title.replaceFirst("%s",
1142 pWorkWindow->SetText(Title);
1143 pWorkWindow->StartPresentationMode( true, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PresentationFlags::HideAllApps : PresentationFlags::NONE, nDisplay);
1144 // pWorkWindow->ShowFullScreenMode(sal_False, nDisplay);
1145
1146 if (!pWorkWindow->IsVisible())
1147 return;
1148
1149 // Initialize the new presentation view shell with a copy of the
1150 // frame view of the current view shell. This avoids that
1151 // changes made by the presentation have an effect on the other
1152 // view shells.
1153 FrameView* pOriginalFrameView = nullptr;
1154 ::std::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell());
1155 if (xShell)
1156 pOriginalFrameView = xShell->GetFrameView();
1157
1158 delete mpFullScreenFrameView;
1159 mpFullScreenFrameView = new FrameView(mpDoc, pOriginalFrameView);
1160
1161 // The new frame is created hidden. To make it visible and activate the
1162 // new view shell--a prerequisite to process slot calls and initialize
1163 // its panes--a GrabFocus() has to be called later on.
1164 SfxFrame* pNewFrame = SfxFrame::CreateHidden( *mpDoc->GetDocSh(), *pWorkWindow, PRESENTATION_FACTORY_ID );
1165 pNewFrame->SetPresentationMode(true);
1166
1168 if(mpFullScreenViewShellBase != nullptr)
1169 {
1170 // The following GrabFocus() is responsible for activating the
1171 // new view shell. Without it the screen remains blank (under
1172 // Windows and some Linux variants.)
1174 }
1175}
1176
1179{
1180 sal_Int32 nDisplay = 0;
1181
1182 SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress);
1183 if( pOptions )
1184 nDisplay = pOptions->GetDisplay();
1185
1186 if( nDisplay < 0 )
1187 nDisplay = -1;
1188 else if( nDisplay == 0)
1189 nDisplay = static_cast<sal_Int32>(Application::GetDisplayExternalScreen());
1190 else
1191 nDisplay--;
1192
1193 SAL_INFO("sd", "Presenting on real screen " << nDisplay);
1194
1195 return nDisplay;
1196}
1197
1198bool SlideShow::dependsOn( ViewShellBase const * pViewShellBase )
1199{
1200 return mxController.is() && (pViewShellBase == mpCurrentViewShellBase) && mpFullScreenViewShellBase;
1201}
1202
1203Reference< presentation::XPresentation2 > CreatePresentation( const SdDrawDocument& rDocument )
1204{
1205 return Reference< presentation::XPresentation2 >( SlideShow::Create( const_cast< SdDrawDocument* >( &rDocument ) ) );
1206}
1207
1208/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
static unsigned int GetDisplayExternalScreen()
DataChangedEventType GetType() const
SdCustomShow * Next()
SdCustomShow * GetCurObject()
SdCustomShow * First()
const OUString & GetName() const
Definition: cusshow.hxx:60
SAL_DLLPRIVATE const css::uno::Reference< css::presentation::XPresentation2 > & getPresentation() const
SAL_DLLPRIVATE const sd::PresentationSettings & getPresentationSettings() const
Definition: drawdoc.hxx:400
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
Definition: drawdoc2.cxx:207
SAL_DLLPRIVATE bool IsExitAfterPresenting() const
Definition: drawdoc.hxx:290
SAL_DLLPRIVATE void SetExitAfterPresenting(bool bExitAfterPresenting)
Definition: drawdoc.cxx:1064
SdCustomShowList * GetCustomShowList(bool bCreate=false)
Definition: drawdoc3.cxx:1161
virtual SAL_DLLPRIVATE void SetChanged(bool bFlag=true) override
Definition: drawdoc.cxx:658
SAL_DLLPRIVATE::sd::DrawDocShell * GetDocSh() const
Definition: drawdoc.hxx:242
void SetDisplay(sal_Int32 nDisplay)
Definition: optsitem.cxx:1433
sal_Int32 GetDisplay() const
Definition: optsitem.cxx:1427
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
void InvalidateAll(bool bWithMsg)
void SetPresentationMode(bool bSet)
static SfxFrame * CreateHidden(SfxObjectShell const &rDoc, vcl::Window &rWindow, SfxInterfaceId nViewId)
vcl::Window & GetWindow() const
SAL_WARN_UNUSED_RESULT SfxViewFrame * GetCurrentViewFrame() const
OUString GetTitle(sal_uInt16 nMaxLen=0) const
SfxViewShell * GetViewShell() const
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
bool DoClose()
SfxBindings & GetBindings()
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
SfxFrame & GetFrame() const
vcl::Window * GetWindow() const
css::uno::Reference< css::beans::XPropertySetInfo > const & getPropertySetInfo() const
const SfxItemPropertyMapEntry * getPropertyMapEntry(std::u16string_view rName) const
static VclPtr< reference_type > Create(Arg &&... arg)
void StartPresentationMode(bool bPresentation, PresentationFlags nFlags, sal_Int32 nDisplayScreen)
css::uno::Type const & get()
The DrawController is the UNO controller for Impress and Draw.
virtual void SAL_CALL setCurrentPage(const css::uno::Reference< css::drawing::XDrawPage > &xPage) override
Base class of the stacked shells that provide graphical views to Draw and Impress documents and editi...
bool SwitchPage(sal_uInt16 nPage, bool bAllowChangeFocus=true)
Switch to desired page.
Definition: drviews1.cxx:831
View for MDIFrame.
Definition: FrameView.hxx:36
sal_uInt16 GetPresentationViewShellId() const
Definition: FrameView.hxx:154
ViewShell::ShellType GetPreviousViewShellType() const
Return the type of the view shell previously associated with this frame view.
Definition: FrameView.hxx:143
void SetPresentationViewShellId(sal_uInt16 nId)
Definition: FrameView.hxx:152
void SetPreviousViewShellType(ViewShell::ShellType eType)
Remember the type of the view shell that was (or soon will be) previously associated with this frame ...
Definition: frmview.cxx:897
void SetPageKind(PageKind eKind)
Definition: FrameView.hxx:85
This view shell is responsible for showing the presentation of an Impress document.
virtual void disposing(std::unique_lock< std::mutex > &) override
Definition: slideshow.cxx:905
void SetExitAfterPresenting(bool bExit)
Definition: slideshow.cxx:650
static rtl::Reference< SlideShow > Create(SdDrawDocument *pDoc)
used by the model to create a slideshow for it
Definition: slideshow.cxx:152
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: slideshow.cxx:538
bool mbIsInStartup
This flag is used together with mxController.is() to prevent multiple instances of the slide show for...
Definition: slideshow.hxx:198
void jumpToBookmark(const OUString &sBookmark)
Definition: slideshow.cxx:965
ImplSVEvent * mnInPlaceConfigEvent
Definition: slideshow.hxx:206
void deactivate()
Definition: slideshow.cxx:1009
virtual sal_Bool SAL_CALL isRunning() override
Definition: slideshow.cxx:890
bool isFullScreen() const
Definition: slideshow.cxx:971
virtual void SAL_CALL start() override
Definition: slideshow.cxx:624
static bool IsRunning(ViewShellBase const &rBase)
returns true if there is a running presentation for the given ViewShellBase
Definition: slideshow.cxx:208
bool swipe(const CommandGestureSwipeData &rSwipeData)
Definition: slideshow.cxx:1036
rtl::Reference< SlideshowImpl > mxController
Definition: slideshow.hxx:193
virtual void SAL_CALL end() override
Definition: slideshow.cxx:657
ViewShellBase * mpCurrentViewShellBase
Definition: slideshow.hxx:203
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: slideshow.cxx:247
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: slideshow.cxx:606
static css::uno::Reference< css::presentation::XSlideShowController > GetSlideShowController(ViewShellBase const &rBase)
Definition: slideshow.cxx:178
std::shared_ptr< PresentationSettingsEx > mxCurrentSettings
Definition: slideshow.hxx:201
void jumpToPageIndex(sal_Int32 nIndex)
Definition: slideshow.cxx:948
bool dependsOn(ViewShellBase const *pViewShellBase)
Definition: slideshow.cxx:1198
virtual void SAL_CALL rehearseTimings() override
Definition: slideshow.cxx:821
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: slideshow.cxx:618
SvxItemPropertySet maPropSet
Definition: slideshow.hxx:191
sal_Int32 getCurrentPageNumber() const
Definition: slideshow.cxx:960
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: slideshow.cxx:260
void ThrowIfDisposed() const
Definition: slideshow.cxx:145
virtual OUString SAL_CALL getImplementationName() override
Definition: slideshow.cxx:237
WorkWindow * GetWorkWindow()
Definition: slideshow.cxx:630
void StartInPlacePresentationConfigurationCallback()
Definition: slideshow.cxx:1046
SdDrawDocument * mpDoc
Definition: slideshow.hxx:199
void startPreview(const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage, const css::uno::Reference< css::animations::XAnimationNode > &xAnimationNode)
Definition: slideshow.cxx:926
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: slideshow.cxx:242
int getAnimationMode() const
Definition: slideshow.cxx:943
void StartInPlacePresentation()
Definition: slideshow.cxx:1060
SlideShow(SdDrawDocument *pDoc)
Definition: slideshow.cxx:134
static sal_Int32 GetDisplay()
convert configuration setting display concept to real screens
Definition: slideshow.cxx:1178
void resize(const Size &rSize)
Definition: slideshow.cxx:976
void StartFullscreenPresentation()
Definition: slideshow.cxx:1131
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: slideshow.cxx:614
static void Stop(ViewShellBase const &rBase)
Definition: slideshow.cxx:201
OutputDevice * getShowWindow()
Definition: slideshow.cxx:938
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: slideshow.cxx:610
bool activate(ViewShellBase &rBase)
Definition: slideshow.cxx:982
virtual css::uno::Reference< css::presentation::XSlideShowController > SAL_CALL getController() override
Definition: slideshow.cxx:896
void jumpToPageNumber(sal_Int32 nPage)
Definition: slideshow.cxx:954
static bool StartPreview(ViewShellBase const &rBase, const css::uno::Reference< css::drawing::XDrawPage > &xDrawPage, const css::uno::Reference< css::animations::XAnimationNode > &xAnimationNode)
Definition: slideshow.cxx:189
static rtl::Reference< SlideShow > GetSlideShow(SdDrawDocument const *pDocument)
Definition: slideshow.cxx:157
void pause(bool bPause)
sets or clears the pause state of the running slideshow.
Definition: slideshow.cxx:1025
virtual void SAL_CALL startWithArguments(const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
Definition: slideshow.cxx:829
bool IsExitAfterPresenting() const
Definition: slideshow.cxx:643
bool longpress(const CommandGestureLongPressData &rLongPressData)
Definition: slideshow.cxx:1041
bool keyInput(const KeyEvent &rKEvt)
Definition: slideshow.cxx:1014
ViewShellBase * mpFullScreenViewShellBase
Definition: slideshow.hxx:204
FrameView * mpFullScreenFrameView
Definition: slideshow.hxx:205
void CreateController(ViewShell *pViewSh, ::sd::View *pView, vcl::Window *pParentWindow)
Definition: slideshow.cxx:220
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: slideshow.cxx:253
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
DrawController * GetDrawController() const
static ViewShellBase * GetViewShellBase(SfxViewFrame const *pFrame)
When given a view frame this static method returns the corresponding sd::ViewShellBase object.
std::shared_ptr< ViewShell > GetMainViewShell() const
Return the main view shell stacked on the called ViewShellBase object.
vcl::Window * GetViewWindow()
Return the window that is used by the main view shell to display its view and other UI elements,...
DrawDocShell * GetDocShell() const
SdDrawDocument * GetDocument() const
Base class of the stacked shell hierarchy.
Definition: ViewShell.hxx:92
FrameView * GetFrameView()
Definition: ViewShell.hxx:221
::sd::View * GetView() const
Definition: ViewShell.hxx:144
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
Definition: viewshel.cxx:1397
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
SD_DLLPUBLIC ShellType GetShellType() const
Return the type of the shell.
Definition: viewshel.cxx:1402
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally=false) override
ends current text editing
Definition: sdview.cxx:772
static OUString GetViewURL(ViewShell::ShellType eType)
Return a view URL for the given identifier.
static const OUString msCenterPaneURL
static ::std::shared_ptr< FrameworkHelper > Instance(ViewShellBase &rBase)
Return the FrameworkHelper object that is associated with the given ViewShellBase.
vcl::Window * GetParent() const
void GrabFocus()
virtual void DataChanged(const DataChangedEvent &rDCEvt)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
Reference< XDispatch > xDispatch
URL aURL
float u
sal_Int16 nValue
Sequence< PropertyValue > aArguments
#define SAL_INFO_IF(condition, area, stream)
#define SAL_INFO(area, stream)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool any2bool(const css::uno::Any &rAny)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
std::shared_ptr< T > make_shared(Args &&... args)
IMPL_LINK_NOARG(MainSequence, onTimerHdl, Timer *, void)
@ ANIMATIONMODE_SHOW
Definition: slideshow.hxx:72
constexpr auto PRESENTATION_FACTORY_ID
Definition: FactoryIds.hxx:36
#define SFX_TITLE_DETECT
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
#define SD_MOD()
Definition: sdmod.hxx:184
static o3tl::span< const SfxItemPropertyMapEntry > ImplGetPresentationPropertyMap()
Definition: slideshow.cxx:107
Reference< presentation::XPresentation2 > CreatePresentation(const SdDrawDocument &rDocument)
Definition: slideshow.cxx:1203
Reference< XController > xController
unsigned char sal_Bool
OUString getPageApiNameFromUiName(const OUString &rUIName)
Definition: unopage.cxx:2174
OUString getUiNameFromPageApiNameImpl(const OUString &rApiName)
Definition: unopage.cxx:2197
WinBits const WB_CLIPCHILDREN
WinBits const WB_HIDE