sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx | 3 + sd/source/ui/app/sdmod1.cxx | 2 - sd/source/ui/dlg/navigatr.cxx | 2 - sd/source/ui/docshell/docshel3.cxx | 2 - sd/source/ui/func/funavig.cxx | 2 - sd/source/ui/func/fupoor.cxx | 4 +- sd/source/ui/inc/slideshow.hxx | 3 + sd/source/ui/slideshow/slideshow.cxx | 7 +++ sd/source/ui/slideshow/slideshowimpl.cxx | 2 - sd/source/ui/view/drawview.cxx | 3 + sd/source/ui/view/drviews1.cxx | 4 +- sd/source/ui/view/drviews2.cxx | 6 ++- sd/source/ui/view/drviews3.cxx | 4 +- sd/source/ui/view/drviews4.cxx | 2 - sd/source/ui/view/drviews7.cxx | 9 ++--- sd/source/ui/view/drviewsa.cxx | 9 +++-- sd/source/ui/view/drviewse.cxx | 8 ++-- sd/source/ui/view/drviewsh.cxx | 5 ++ sd/source/ui/view/sdview2.cxx | 3 + sd/source/ui/view/viewshel.cxx | 25 +++++++++++--- 20 files changed, 72 insertions(+), 33 deletions(-)
New commits: commit 9a41cafae06fc01d7ee0764898cba526b7944b52 Author: Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de> AuthorDate: Fri Feb 16 17:01:39 2024 +0100 Commit: Armin Le Grand <armin.le.gr...@me.com> CommitDate: Sun Feb 18 13:28:55 2024 +0100 IASS: Preparations for InterActiveSlideShow The idea is a long wanted feature, to allow the EditView to stay active during a running Presentation so that you can do changes which then directly show up in the running presentation. This will need quite some steps. To be on the safe side all of the changes are isolated by a variable to cause no harm. For now this uses ENVVAR ENABLE_INTERACTIVE_SLIDESHOW, but that may change e.g. as config entry or option. Change-Id: Id0ab9a473603225456206fbd933e932248681509 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163514 Tested-by: Jenkins Reviewed-by: Armin Le Grand <armin.le.gr...@me.com> diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 3ec3efb2be91..0071b0e85647 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -339,7 +339,8 @@ void SAL_CALL //mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> ( // xView->getCurrentPage(), uno::UNO_QUERY)); rtl::Reference< sd::SlideShow > xSlideshow( sd::SlideShow::GetSlideShow( mpSdViewSh->GetViewShellBase() ) ); - if( xSlideshow.is() && xSlideshow->isRunning() && xSlideshow->isFullScreen() ) + if( xSlideshow.is() && (xSlideshow->isRunning() && !sd::SlideShow::IsInteractiveSlideshow()) //IASS + && xSlideshow->isFullScreen() ) { css::uno::Reference< drawing::XDrawPage > xSlide; // MT IA2: Not used... diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 310ee95190ac..199e8a41c6f0 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -196,7 +196,7 @@ void SdModule::Execute(SfxRequest& rReq) ::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr; if (pViewShell) { - if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) ) + if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) && !sd::SlideShow::IsInteractiveSlideshow() ) // IASS { // Prevent documents from opening while the slide // show is running, except when this request comes diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index f1a4a66c1e5f..930a68f7ec66 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -187,7 +187,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc ) // Disable the shape filter drop down menu when there is a running slide // show. - if (pViewShell!=nullptr && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() )) + if (pViewShell!=nullptr && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) && !sd::SlideShow::IsInteractiveSlideshow() ) // IASS mxToolbox->set_item_sensitive("shapes", false); else mxToolbox->set_item_sensitive("shapes", true); diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 1e3ab4512792..c79f23580872 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -129,7 +129,7 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, std::u16string_view rLa */ void DrawDocShell::Execute( SfxRequest& rReq ) { - if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() )) + if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow() ) // IASS { // during a running presentation no slot will be executed return; diff --git a/sd/source/ui/func/funavig.cxx b/sd/source/ui/func/funavig.cxx index f36ce34b22ad..b3adcdf89128 100644 --- a/sd/source/ui/func/funavig.cxx +++ b/sd/source/ui/func/funavig.cxx @@ -56,7 +56,7 @@ rtl::Reference<FuPoor> FuNavigation::Create( ViewShell* pViewSh, ::sd::Window* p void FuNavigation::DoExecute( SfxRequest& rReq ) { - bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ); + bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow(); // IASS switch ( rReq.GetSlot() ) { diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index e6fe25f7117d..31832a5e043c 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -123,7 +123,7 @@ void FuPoor::ForceScroll(const Point& aPixPos) aScrollTimer.Stop(); if ( mpView->IsDragHelpLine() || mpView->IsSetPageOrg() || - SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) ) + (SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) ) // IASS return; Point aPos = mpWindow->OutputToScreenPixel(aPixPos); @@ -176,7 +176,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) { sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); bool bReturn = false; - bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ); + bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow(); // IASS switch (nCode) { diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index afbfee68469b..81af4a52f4ee 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -101,6 +101,9 @@ public: /// returns false even if there is a running presentation but in another ViewShell static bool IsRunning( const ViewShell& rViewShell ); + /// returns true if the interactive slideshow mode is activated + static bool IsInteractiveSlideshow(); + // helper api void startPreview( diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 6a3dffd2780a..d0913569bd11 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -216,6 +216,13 @@ bool SlideShow::IsRunning( const ViewShell& rViewShell ) return xSlideShow.is() && xSlideShow->isRunning() && (xSlideShow->mxController->getViewShell() == &rViewShell); } +/// returns true if the interactive slideshow mode is activated +bool SlideShow::IsInteractiveSlideshow() +{ + static bool g_bEnable_Interactive_Slideshow(getenv("ENABLE_INTERACTIVE_SLIDESHOW")); + return g_bEnable_Interactive_Slideshow; +} + void SlideShow::CreateController( ViewShell* pViewSh, ::sd::View* pView, vcl::Window* pParentWindow ) { SAL_INFO_IF( !mxController.is(), "sd.slideshow", "sd::SlideShow::CreateController(), clean up old controller first!" ); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 4bf43fc3bda5..ca675e4509da 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -948,7 +948,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx const * pPresSettings ) mpPaneHider.reset(new PaneHider(*mpViewShell,this)); // these Slots are forbidden in other views for this document - if( mpDocSh ) + if( mpDocSh && !SlideShow::IsInteractiveSlideshow()) // IASS { mpDocSh->SetSlotFilter( true, pAllowed ); mpDocSh->ApplySlotFilter(); diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 69555bb7419d..992a1bea7d6a 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -501,7 +501,8 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sd { if( pShowWindow == pOutDev && mpViewSh ) xSlideshow->paint(); - return; + if (!SlideShow::IsInteractiveSlideshow()) // IASS + return; } } } diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index a481e944e7c6..7f7e6253c046 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1350,7 +1350,7 @@ sal_Int8 DrawViewShell::AcceptDrop ( sal_uInt16 /*nPage*/, SdrLayerID nLayer ) { - if( SlideShow::IsRunning( GetViewShellBase() ) ) + if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow() ) // IASS return DND_ACTION_NONE; return mpDrawView->AcceptDrop( rEvt, rTargetHelper, nLayer ); @@ -1370,7 +1370,7 @@ sal_Int8 DrawViewShell::ExecuteDrop ( if( nPage != SDRPAGE_NOTFOUND ) nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum(); - if( SlideShow::IsRunning( GetViewShellBase() ) ) + if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) // IASS return DND_ACTION_NONE; Broadcast(ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START)); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 84778fd2dbf5..5befa312542a 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -585,7 +585,9 @@ public: void DrawViewShell::FuTemporary(SfxRequest& rReq) { // during a native slide show nothing gets executed! - if(SlideShow::IsRunning( GetViewShellBase() ) && (rReq.GetSlot() != SID_NAVIGATOR)) + if(SlideShow::IsRunning( GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow() // IASS + && (rReq.GetSlot() != SID_NAVIGATOR)) return; DBG_ASSERT( mpDrawView, "sd::DrawViewShell::FuTemporary(), no draw view!" ); @@ -3971,7 +3973,7 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) void DrawViewShell::ExecutePropPanelAttr (SfxRequest const & rReq) { - if(SlideShow::IsRunning( GetViewShellBase() )) + if(SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) // IASS return; SdDrawDocument* pDoc = GetDoc(); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 607504fe3732..e01f7215fd00 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -138,7 +138,9 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) case SID_SWITCHPAGE: // BASIC { // switch page in running slide show - if(SlideShow::IsRunning(GetViewShellBase()) && rReq.GetArgs()) + if(SlideShow::IsRunning(GetViewShellBase()) + && !SlideShow::IsInteractiveSlideshow() // IASS + && rReq.GetArgs()) { if (const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE)) SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber(static_cast<sal_Int32>((pWhatPage->GetValue()-1)>>1)); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 4226f0e4e8d8..20cca262d039 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -530,7 +530,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) if( GetView() &&GetView()->getSmartTags().Command(rCEvt) ) return; - const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase())); + const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()); // IASS if( rCEvt.GetCommand() == CommandEventId::PasteSelection && !bNativeShow ) { diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 845bc956ed1b..ed96850d58ed 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1300,7 +1300,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) ); - if( (xSlideshow.is() && xSlideshow->isRunning() && (xSlideshow->getAnimationMode() != ANIMATIONMODE_PREVIEW) ) || GetDocSh()->IsPreview() ) + if( (xSlideshow.is() && xSlideshow->isRunning() && !SlideShow::IsInteractiveSlideshow() // IASS + && (xSlideshow->getAnimationMode() != ANIMATIONMODE_PREVIEW) ) || GetDocSh()->IsPreview() ) { // Own Slots rSet.DisableItem( SID_PRESENTATION ); @@ -1323,7 +1324,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_DELETE_PAGE ); rSet.DisableItem( SID_PAGESETUP ); - if( xSlideshow.is() && xSlideshow->isRunning() ) + if( xSlideshow.is() && xSlideshow->isRunning() && !SlideShow::IsInteractiveSlideshow() ) // IASS { rSet.ClearItem(SID_INSERTFILE); rSet.ClearItem(SID_OBJECT_ROTATE); @@ -1642,7 +1643,7 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet) // clause because the current function of the docshell can only be // search and replace or spell checking and in that case switching the // view mode is allowed. - const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()); + const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(); // IASS if (GetViewFrame()->GetFrame().IsInPlace() || bIsRunning) { @@ -1934,7 +1935,7 @@ void DrawViewShell::GetState (SfxItemSet& rSet) void DrawViewShell::Execute (SfxRequest& rReq) { - if(SlideShow::IsRunning(GetViewShellBase())) + if(SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS { // Do not execute anything during a native slide show. return; diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index c1e5955b118f..a0960b47bb56 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -371,7 +371,7 @@ void DrawViewShell::Shutdown() { ViewShell::Shutdown(); - if(SlideShow::IsRunning( GetViewShellBase() ) ) + if(SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) // IASS { // Turn off effects. GetDrawView()->SetAnimationMode(SdrAnimationMode::Disable); @@ -551,7 +551,8 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) or page) with the help of the ZoomItems !!! */ if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { - if (GetDocSh()->IsUIActive() || SlideShow::IsRunning(GetViewShellBase()) + if (GetDocSh()->IsUIActive() + || (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS || !GetActiveWindow()) { rSet.DisableItem( SID_ATTR_ZOOM ); @@ -582,7 +583,9 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) ) { rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) ); - if (GetDocSh()->IsUIActive() || (xSlideshow.is() && xSlideshow->isRunning()) || !GetActiveWindow() ) + if (GetDocSh()->IsUIActive() + || (xSlideshow.is() && xSlideshow->isRunning() && !SlideShow::IsInteractiveSlideshow()) // IASS + || !GetActiveWindow() ) { rSet.DisableItem( SID_ATTR_ZOOMSLIDER ); } diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 0b293773b07a..47205a55d694 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -142,7 +142,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) { // We do not execute a thing during a native slide show - if (SlideShow::IsRunning(GetViewShellBase())) + if (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS return; sal_uInt16 nSId = rReq.GetSlot(); @@ -738,9 +738,9 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) GetDocSh()->SetStyleFamily(static_cast<SfxStyleFamily>(rReq.GetArgs()->Get( SID_STYLE_FAMILY ).GetValue())); // We do not execute a thing during a native slide show - if(SlideShow::IsRunning(GetViewShellBase()) && - (rReq.GetSlot() != SID_PRESENTATION_END && - rReq.GetSlot() != SID_SIZE_PAGE)) + if((SlideShow::IsRunning(GetViewShellBase()) + && !SlideShow::IsInteractiveSlideshow()) // IASS + && (rReq.GetSlot() != SID_PRESENTATION_END && rReq.GetSlot() != SID_SIZE_PAGE)) return; CheckLineTo (rReq); diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index f323497ac46f..d421a76163a8 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -47,7 +47,10 @@ void DrawViewShell::GotoBookmark(std::u16string_view rBookmark) void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rWin) { - if ( (IsMouseButtonDown() && !IsMouseSelecting()) || SlideShow::IsRunning( GetViewShellBase() ) ) + if ( IsMouseButtonDown() && !IsMouseSelecting() ) + return; + + if ( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow() ) // IASS return; // tdf#98646 check if Rectangle which contains the bounds of the region to diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 73880e91e064..465bb1f56a83 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -577,7 +577,8 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge mpDropMarkerObj = nullptr; } - if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh && SlideShow::IsRunning(mpViewSh->GetViewShellBase()) ) + if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh + && ( SlideShow::IsRunning(mpViewSh->GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow() )) // IASS bBookmark = false; if( bDrawing || bGraphic || bMtf || bBitmap || bBookmark || bFile || bFileList || bXFillExchange || bSBAFormat || bEditEngineODF || bString || bRTF ) diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 086efde29a24..1932dff94fee 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -331,7 +331,7 @@ void ViewShell::Activate(bool bIsMDIActivate) rBindings.Invalidate( SID_3D_STATE, true ); rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) ); - if (xSlideShow.is() && xSlideShow->isRunning()) + if (xSlideShow.is() && xSlideShow->isRunning()) //IASS { bool bSuccess = xSlideShow->activate(GetViewShellBase()); assert(bSuccess && "can only return false with a PresentationViewShell"); (void)bSuccess; @@ -383,7 +383,7 @@ void ViewShell::Deactivate(bool bIsMDIActivate) if (bIsMDIActivate) { rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) ); - if(xSlideShow.is() && xSlideShow->isRunning() ) + if(xSlideShow.is() && xSlideShow->isRunning() ) //IASS xSlideShow->deactivate(); if(HasCurrentFunction()) @@ -419,7 +419,18 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) if(!bReturn) { rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( GetViewShellBase() ) ); - if(xSlideShow.is() && xSlideShow->isRunning()) + const bool bSlideShowRunning(xSlideShow.is() && xSlideShow->isRunning()); + bool bUseForSlideShow(bSlideShowRunning); + + if(bSlideShowRunning && SlideShow::IsInteractiveSlideshow()) + { + // IASS + OutputDevice* pShOut(xSlideShow->getShowWindow()); + vcl::Window* pShWin(pShOut ? pShOut->GetOwnerWindow() : nullptr); + bUseForSlideShow = pShWin && pShWin->HasFocus(); + } + + if(bUseForSlideShow) //IASS { bReturn = xSlideShow->keyInput(rKEvt); } @@ -824,7 +835,10 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi void ViewShell::SetupRulers() { - if(!mbHasRulers || !mpContentWindow || SlideShow::IsRunning(GetViewShellBase())) + if(!mbHasRulers || !mpContentWindow ) + return; + + if( SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS return; ::tools::Long nHRulerOfs = 0; @@ -1041,7 +1055,8 @@ void ViewShell::ArrangeGUIElements() // The size of the window of the center pane is set differently from // that of the windows in the docking windows. - bool bSlideShowActive = (xSlideShow.is() && xSlideShow->isRunning()) && !xSlideShow->isFullScreen() && xSlideShow->getAnimationMode() == ANIMATIONMODE_SHOW; + bool bSlideShowActive = (xSlideShow.is() && xSlideShow->isRunning()) //IASS + && !xSlideShow->isFullScreen() && xSlideShow->getAnimationMode() == ANIMATIONMODE_SHOW; if ( !bSlideShowActive) { OSL_ASSERT (GetViewShell()!=nullptr);