diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2024-02-23 16:30:23 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-02-24 01:02:28 +0100 |
commit | 9d184cd26a43cb9d9adc74d04f65300ad598c9fb (patch) | |
tree | fccdf290d45788cdc3c885256ee17a78e01780d8 | |
parent | 1ad60d6860fd92d58394061f3bdb49dce38ecf72 (diff) |
IASS: make live slideshow experimental and configurable
* adding an option button to slideshow settings dlg
* switch from env var to officecfg
Change-Id: I9713fde374b04264947daaab73759eb585c4a3f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163851
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
31 files changed, 107 insertions, 40 deletions
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 50a5e2f09ca3..610e8992305a 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -111,6 +111,7 @@ namespace sd sal_Int32 mnPauseTimeout; bool mbShowPauseLogo; bool mbStartCustomShow; + bool mbInteractive; PresentationSettings(); }; diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc index 2e2bfddec98b..d928326b4571 100644 --- a/sd/inc/sdattr.hrc +++ b/sd/inc/sdattr.hrc @@ -56,8 +56,9 @@ class XColorItem; #define ATTR_PRESENT_SHOW_PAUSELOGO ATTR_PRESENT_START + 14 #define ATTR_PRESENT_DISPLAY TypedWhichId<SfxInt32Item>(ATTR_PRESENT_START + 15) #define ATTR_PRESENT_SHOW_NAVIGATION_BUTTONS ATTR_PRESENT_START + 16 +#define ATTR_PRESENT_INTERACTIVE ATTR_PRESENT_START + 17 -#define ATTR_PRESENT_END ATTR_PRESENT_SHOW_NAVIGATION_BUTTONS +#define ATTR_PRESENT_END ATTR_PRESENT_INTERACTIVE // animation attributes #define ATTR_ANIMATION_START ATTR_PRESENT_END + 1 diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index eb8aa7be3c2f..1e1e1cd025bb 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -421,6 +421,8 @@ VclPtr<VclAbstractDialog> SdDialogsTest::createDialogByID(sal_uInt32 nID) aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_FULLSCREEN, rPresentationSettings.mbFullScreen)); aDlgSet.Put(SfxUInt32Item(ATTR_PRESENT_PAUSE_TIMEOUT, rPresentationSettings.mnPauseTimeout)); aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_SHOW_PAUSELOGO, rPresentationSettings.mbShowPauseLogo)); + aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_INTERACTIVE, rPresentationSettings.mbInteractive)); + //SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); aDlgSet.Put(SfxInt32Item(ATTR_PRESENT_DISPLAY, 0 /*pOptions->GetDisplay()*/)); pRetval = getSdAbstractDialogFactory()->CreateSdStartPresentationDlg( diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 3adb91275784..10f61d176b6e 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -110,7 +110,8 @@ PresentationSettings::PresentationSettings() mbAnimationAllowed( true ), mnPauseTimeout( 0 ), mbShowPauseLogo( false ), - mbStartCustomShow( false ) + mbStartCustomShow( false ), + mbInteractive( true ) { } diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx index 35f70a079c94..a8b8997fd637 100644 --- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx @@ -338,7 +338,7 @@ 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() && !sd::SlideShow::IsInteractiveSlideshow()) //IASS + if( xSlideshow.is() && (xSlideshow->isRunning() && !xSlideshow->IsInteractiveSlideshow()) //IASS && xSlideshow->isFullScreen() ) { css::uno::Reference< drawing::XDrawPage > xSlide; diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index d4199e14aad7..537ad79d80c4 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1883,7 +1883,7 @@ void CustomAnimationPane::onAdd() updateControls(); - if (!SlideShow::IsInteractiveSlideshow()) // IASS + if (!SlideShow::IsInteractiveSlideshow(&mrBase)) // IASS SlideShow::Stop( mrBase ); } diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 74f459095b4c..e39f36f6b9e7 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -884,7 +884,7 @@ void SlideTransitionPane::applyToSelectedPages(bool bPreview = true) { if (aEffect.mnType) // mnType = 0 denotes no transition playCurrentEffect(); - else if( mxView.is() && !SlideShow::IsInteractiveSlideshow()) // IASS + else if( mxView.is() && !SlideShow::IsInteractiveSlideshow(&mrBase)) // IASS SlideShow::Stop( mrBase ); } diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 1d19eb6e9204..197977498189 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -196,7 +196,8 @@ void SdModule::Execute(SfxRequest& rReq) ::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr; if (pViewShell) { - if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) && !sd::SlideShow::IsInteractiveSlideshow() ) // IASS + if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) + && !sd::SlideShow::IsInteractiveSlideshow( &pViewShell->GetViewShellBase() ) ) // 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 b5183a9fc1fb..6f107fc9bc24 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -187,7 +187,8 @@ 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() ) && !sd::SlideShow::IsInteractiveSlideshow() ) // IASS + if (pViewShell!=nullptr && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) + && !sd::SlideShow::IsInteractiveSlideshow( &pViewShell->GetViewShellBase() ) ) // IASS mxToolbox->set_item_sensitive("shapes", false); else mxToolbox->set_item_sensitive("shapes", true); diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index 3584a46fb4cc..4f97a76fa8fe 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -24,6 +24,8 @@ #include <svl/stritem.hxx> #include <vcl/svapp.hxx> +#include <officecfg/Office/Common.hxx> + #include <sdattr.hrc> #include <present.hxx> #include <cusshow.hxx> @@ -66,6 +68,7 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI , m_xCbxChangePage(m_xBuilder->weld_check_button("changeslidesbyclick")) , m_xCbxAlwaysOnTop(m_xBuilder->weld_check_button("alwaysontop")) , m_xCbxShowNavigationButton(m_xBuilder->weld_check_button("shownavigationbutton")) + , m_xCbxInteractiveMode(m_xBuilder->weld_check_button("enableinteractivemode")) , m_xLbConsole(m_xBuilder->weld_combo_box("console_cb")) , m_xFtMonitor(m_xBuilder->weld_label("presdisplay_label")) , m_xLBMonitor(m_xBuilder->weld_combo_box("presdisplay_cb")) @@ -151,6 +154,10 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI else m_xLbConsole->set_active(PresenterConsoleMode::Windowed); + m_xCbxInteractiveMode->set_active( static_cast<const SfxBoolItem&>( rOutAttrs.Get( ATTR_PRESENT_INTERACTIVE ) ).GetValue() ); + if (!officecfg::Office::Common::Misc::ExperimentalMode::get()) + m_xCbxInteractiveMode->set_visible(false); + InitMonitorSettings(); ChangeRangeHdl(*m_xRbtCustomshow); @@ -306,6 +313,7 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr ) rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ENDLESS, m_xRbtAuto->get_active() ) ); rAttr.Put( SfxUInt32Item ( ATTR_PRESENT_PAUSE_TIMEOUT, m_xFormatter->GetTime().GetMSFromTime() / 1000 ) ); rAttr.Put( SfxBoolItem ( ATTR_PRESENT_SHOW_PAUSELOGO, m_xCbxAutoLogo->get_active() ) ); + rAttr.Put( SfxBoolItem ( ATTR_PRESENT_INTERACTIVE, m_xCbxInteractiveMode->get_active() ) ); int nPos = m_xLBMonitor->get_active(); if (nPos != -1) diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index bc60da435d36..54e80988b17e 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -133,7 +133,8 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, std::u16string_view rLa */ void DrawDocShell::Execute( SfxRequest& rReq ) { - if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow() ) // IASS + if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow( &mpViewShell->GetViewShellBase() ) ) // 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 3e1861645461..35e776cd6dba 100644 --- a/sd/source/ui/func/funavig.cxx +++ b/sd/source/ui/func/funavig.cxx @@ -51,7 +51,8 @@ rtl::Reference<FuPoor> FuNavigation::Create( ViewShell* pViewSh, ::sd::Window* p void FuNavigation::DoExecute( SfxRequest& rReq ) { - bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow(); // IASS + bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow( &mpViewShell->GetViewShellBase() ); // IASS switch ( rReq.GetSlot() ) { diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 3b0934a9fe1b..57d1b5084bbf 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -123,7 +123,8 @@ void FuPoor::ForceScroll(const Point& aPixPos) aScrollTimer.Stop(); if ( mpView->IsDragHelpLine() || mpView->IsSetPageOrg() || - (SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) ) // IASS + (SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow( &mpViewShell->GetViewShellBase() )) ) // IASS return; Point aPos = mpWindow->OutputToScreenPixel(aPixPos); @@ -176,7 +177,8 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) { sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); bool bReturn = false; - bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow(); // IASS + bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow( &mpViewShell->GetViewShellBase() ); // IASS switch (nCode) { diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index ddb8f2ccf7cb..de3380cfc13b 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -103,6 +103,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_FULLSCREEN, rPresentationSettings.mbFullScreen ) ); aDlgSet.Put( SfxUInt32Item( ATTR_PRESENT_PAUSE_TIMEOUT, rPresentationSettings.mnPauseTimeout ) ); aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_SHOW_PAUSELOGO, rPresentationSettings.mbShowPauseLogo ) ); + aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_INTERACTIVE, rPresentationSettings.mbInteractive ) ); SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress); aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) ); @@ -222,6 +223,13 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) rPresentationSettings.mbShowPauseLogo = bValue; } + bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_INTERACTIVE, SfxBoolItem ); + if ( bValue != rPresentationSettings.mbInteractive ) + { + bValuesChanged = true; + rPresentationSettings.mbInteractive = bValue; + } + pOptions->SetDisplay( aDlgSet.Get(ATTR_PRESENT_DISPLAY).GetValue() ); // is something has changed, we set the modified flag diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx index de6761314b00..5524709aefce 100644 --- a/sd/source/ui/inc/present.hxx +++ b/sd/source/ui/inc/present.hxx @@ -55,6 +55,7 @@ private: std::unique_ptr<weld::CheckButton> m_xCbxChangePage; std::unique_ptr<weld::CheckButton> m_xCbxAlwaysOnTop; std::unique_ptr<weld::CheckButton> m_xCbxShowNavigationButton; + std::unique_ptr<weld::CheckButton> m_xCbxInteractiveMode; std::unique_ptr<weld::ComboBox> m_xLbConsole; diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index 2703d9611e31..4d84d5a8a994 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -102,7 +102,8 @@ public: static bool IsRunning( const ViewShell& rViewShell ); /// returns true if the interactive slideshow mode is activated - static bool IsInteractiveSlideshow(); + static bool IsInteractiveSlideshow(const ViewShellBase* pViewShellBase); + bool IsInteractiveSlideshow() const; // helper api diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 010f8697e42a..5f6620ee346a 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -39,6 +39,8 @@ #include <framework/FrameworkHelper.hxx> #include <comphelper/extract.hxx> +#include <officecfg/Office/Common.hxx> + #include <FrameView.hxx> #include <createpresentation.hxx> #include <unomodel.hxx> @@ -195,12 +197,12 @@ bool SlideShow::StartPreview( ViewShellBase const & rBase, return false; // end an already running IASS Preview (when someone is fast) - if (SlideShow::IsInteractiveSlideshow() && xSlideShow->isInteractiveSetup()) + if (xSlideShow->IsInteractiveSlideshow() && xSlideShow->isInteractiveSetup()) xSlideShow->endInteractivePreview(); // check if IASS re-use of running Slideshow can/should be done // and do it - if (SlideShow::IsInteractiveSlideshow() && xSlideShow->isFullScreen()) // IASS + if (xSlideShow->IsInteractiveSlideshow() && xSlideShow->isFullScreen()) // IASS return xSlideShow->startInteractivePreview( xDrawPage, xAnimationNode ); // fallback to usual mode @@ -228,10 +230,24 @@ bool SlideShow::IsRunning( const ViewShell& rViewShell ) } /// returns true if the interactive slideshow mode is activated -bool SlideShow::IsInteractiveSlideshow() +bool SlideShow::IsInteractiveSlideshow(const ViewShellBase* pViewShellBase) { + if (nullptr == pViewShellBase) + return false; + rtl::Reference< SlideShow > xSlideShow(GetSlideShow(*pViewShellBase)); + if (!xSlideShow.is()) + return false; + return xSlideShow->IsInteractiveSlideshow(); +} + +bool SlideShow::IsInteractiveSlideshow() const +{ + // allow override with ENV_VAR for practical dev reasons static bool g_bEnable_Interactive_Slideshow(getenv("ENABLE_INTERACTIVE_SLIDESHOW")); - return g_bEnable_Interactive_Slideshow; + if (g_bEnable_Interactive_Slideshow) + return true; + + return officecfg::Office::Common::Misc::ExperimentalMode::get() && mpDoc->getPresentationSettings().mbInteractive; } void SlideShow::CreateController( ViewShell* pViewSh, ::sd::View* pView, vcl::Window* pParentWindow ) @@ -675,7 +691,7 @@ void SAL_CALL SlideShow::end() { SolarMutexGuard aGuard; - if (SlideShow::IsInteractiveSlideshow() && isInteractiveSetup()) + if (IsInteractiveSlideshow() && isInteractiveSetup()) { // If IASS was active clean that up, but do not end SlideShow endInteractivePreview(); diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index d247da44190c..4987a598ae1a 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -1126,7 +1126,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 && !SlideShow::IsInteractiveSlideshow()) // IASS + if( mpDocSh && !pPresSettings->mbInteractive) // IASS { mpDocSh->SetSlotFilter( true, pAllowed ); mpDocSh->ApplySlotFilter(); diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx index 7f974cb4ac6a..0ffef2b1337c 100644 --- a/sd/source/ui/unoidl/DrawController.cxx +++ b/sd/source/ui/unoidl/DrawController.cxx @@ -184,7 +184,7 @@ sal_Bool SAL_CALL DrawController::suspend( sal_Bool Suspend ) rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( *pViewShellBase ) ); if (xSlideShow.is()) { - if (SlideShow::IsInteractiveSlideshow()) + if (xSlideShow->IsInteractiveSlideshow()) { // IASS mode: If preview mode, end it if (xSlideShow->isInteractiveSetup()) diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index e70de30f2194..b564e2c67d91 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -509,7 +509,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sd { if( pShowWindow == pOutDev && mpViewSh ) xSlideshow->paint(); - if (!SlideShow::IsInteractiveSlideshow()) // IASS + if (!xSlideshow->IsInteractiveSlideshow()) // IASS return; } } diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 067d5fc65788..dddd49b34e79 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1332,7 +1332,7 @@ sal_Int8 DrawViewShell::AcceptDrop ( sal_uInt16 /*nPage*/, SdrLayerID nLayer ) { - if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow() ) // IASS + if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) ) // IASS return DND_ACTION_NONE; return mpDrawView->AcceptDrop( rEvt, rTargetHelper, nLayer ); @@ -1352,7 +1352,7 @@ sal_Int8 DrawViewShell::ExecuteDrop ( if( nPage != SDRPAGE_NOTFOUND ) nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum(); - if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) // IASS + if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // 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 b3a7d16da693..e0f68bbef0bc 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -607,7 +607,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // during a native slide show nothing gets executed! if(SlideShow::IsRunning( GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow() // IASS + && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) // IASS && (rReq.GetSlot() != SID_NAVIGATOR)) return; @@ -3930,7 +3930,8 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) void DrawViewShell::ExecutePropPanelAttr (SfxRequest const & rReq) { - if(SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) // IASS + if(SlideShow::IsRunning( GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS return; SdDrawDocument* pDoc = GetDoc(); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 3eb669633806..024142418014 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -139,7 +139,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { // switch page in running slide show if(SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow() // IASS + && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase()) // IASS && rReq.GetArgs()) { if (const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE)) diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index bc389c069a34..ff2af851206b 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -530,7 +530,8 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) if( GetView() &&GetView()->getSmartTags().Command(rCEvt) ) return; - const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()); // IASS + const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()) + && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())); // IASS if( rCEvt.GetCommand() == CommandEventId::PasteSelection && !bNativeShow ) { diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 1852cdbc2290..b1f60b5da3c3 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1297,7 +1297,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) ); - if( (xSlideshow.is() && xSlideshow->isRunning() && !SlideShow::IsInteractiveSlideshow() // IASS + if( (xSlideshow.is() && xSlideshow->isRunning() && !xSlideshow->IsInteractiveSlideshow() // IASS && (xSlideshow->getAnimationMode() != ANIMATIONMODE_PREVIEW) ) || GetDocSh()->IsPreview() ) { // Own Slots @@ -1321,7 +1321,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem( SID_DELETE_PAGE ); rSet.DisableItem( SID_PAGESETUP ); - if( xSlideshow.is() && xSlideshow->isRunning() && !SlideShow::IsInteractiveSlideshow() ) // IASS + if( xSlideshow.is() && xSlideshow->isRunning() && !xSlideshow->IsInteractiveSlideshow() ) // IASS { rSet.ClearItem(SID_INSERTFILE); rSet.ClearItem(SID_OBJECT_ROTATE); @@ -1649,7 +1649,8 @@ 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()) && !SlideShow::IsInteractiveSlideshow(); // IASS + const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()) + && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase()); // IASS if (GetViewFrame()->GetFrame().IsInPlace() || bIsRunning) { @@ -1941,7 +1942,8 @@ void DrawViewShell::GetState (SfxItemSet& rSet) void DrawViewShell::Execute (SfxRequest& rReq) { - if(SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS + if(SlideShow::IsRunning(GetViewShellBase()) + && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // 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 6bb62eaaea31..2db582ec28c2 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -357,7 +357,8 @@ void DrawViewShell::Shutdown() { ViewShell::Shutdown(); - if(SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow()) // IASS + if(SlideShow::IsRunning( GetViewShellBase() ) + && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS { // Turn off effects. GetDrawView()->SetAnimationMode(SdrAnimationMode::Disable); @@ -538,7 +539,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { if (GetDocSh()->IsUIActive() - || (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS + || (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS || !GetActiveWindow()) { rSet.DisableItem( SID_ATTR_ZOOM ); @@ -570,7 +571,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) { rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( GetDoc() ) ); if (GetDocSh()->IsUIActive() - || (xSlideshow.is() && xSlideshow->isRunning() && !SlideShow::IsInteractiveSlideshow()) // IASS + || (xSlideshow.is() && xSlideshow->isRunning() && !xSlideshow->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 537bde162641..f1a11c90c866 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()) && !SlideShow::IsInteractiveSlideshow()) // IASS + if (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS return; sal_uInt16 nSId = rReq.GetSlot(); @@ -739,7 +739,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) // We do not execute a thing during a native slide show if((SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow()) // IASS + && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS && (rReq.GetSlot() != SID_PRESENTATION_END && rReq.GetSlot() != SID_SIZE_PAGE)) return; diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx index d421a76163a8..679fea7b5089 100644 --- a/sd/source/ui/view/drviewsh.cxx +++ b/sd/source/ui/view/drviewsh.cxx @@ -50,7 +50,7 @@ void DrawViewShell::MakeVisible(const ::tools::Rectangle& rRect, vcl::Window& rW if ( IsMouseButtonDown() && !IsMouseSelecting() ) return; - if ( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow() ) // IASS + if ( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) ) // 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 64c2b47ec30c..62b258e4fa85 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -578,7 +578,8 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge } if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh - && ( SlideShow::IsRunning(mpViewSh->GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow() )) // IASS + && ( SlideShow::IsRunning(mpViewSh->GetViewShellBase()) + && !SlideShow::IsInteractiveSlideshow(&mpViewSh->GetViewShellBase()) )) // 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 a93dd362d34e..bcea2f333062 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -407,7 +407,7 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin) const bool bSlideShowRunning(xSlideShow.is() && xSlideShow->isRunning()); bool bUseForSlideShow(bSlideShowRunning); - if(bSlideShowRunning && SlideShow::IsInteractiveSlideshow()) + if(bSlideShowRunning && xSlideShow->IsInteractiveSlideshow()) { // IASS OutputDevice* pShOut(xSlideShow->getShowWindow()); @@ -823,7 +823,7 @@ void ViewShell::SetupRulers() if(!mbHasRulers || !mpContentWindow ) return; - if( SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow()) // IASS + if( SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS return; ::tools::Long nHRulerOfs = 0; diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui b/sd/uiconfig/simpress/ui/presentationdialog.ui index d81c243306c8..36f2e1733426 100644 --- a/sd/uiconfig/simpress/ui/presentationdialog.ui +++ b/sd/uiconfig/simpress/ui/presentationdialog.ui @@ -713,7 +713,23 @@ </packing> </child> <child> - <placeholder/> + <object class="GtkCheckButton" id="enableinteractivemode"> + <property name="label" translatable="yes" context="presentationdialog|enableinteractivemode">Live-mode slidehow editing</property> + <property name="visible">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="enableinteractivemode-atkobject"> + <property name="AtkObject::accessible-description" translatable="yes" context="presentationdialog|extended_tip|enableinteractivemode">The Impress main document window remains active during the presentation. Users can continue editing slide content, which will be reflected in the running slideshow.</property> + </object> + </child> + </object> + <packing> + <property name="left-attach">0</property> + <property name="top-attach">8</property> + </packing> </child> </object> </child> |