sd/source/ui/animations/CustomAnimationPane.cxx | 2 +- sd/source/ui/animations/SlideTransitionPane.cxx | 2 +- 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 | 2 +- sd/source/ui/slideshow/slideshow.cxx | 6 ++---- sd/source/ui/view/drviews1.cxx | 4 ++-- sd/source/ui/view/drviews2.cxx | 18 +++++++++--------- sd/source/ui/view/drviews3.cxx | 2 +- sd/source/ui/view/drviews4.cxx | 2 +- sd/source/ui/view/drviews7.cxx | 4 ++-- sd/source/ui/view/drviewsa.cxx | 4 ++-- sd/source/ui/view/drviewse.cxx | 4 ++-- sd/source/ui/view/drviewsh.cxx | 2 +- sd/source/ui/view/sdview2.cxx | 2 +- sd/source/ui/view/viewshel.cxx | 2 +- 19 files changed, 33 insertions(+), 35 deletions(-)
New commits: commit 6935920f8a52ad085026dd4f12f2b0056bf50645 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Sep 11 22:57:11 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 12 08:48:44 2025 +0200 sd: pass ViewShellBase by ref in IsInteractiveSlideshow Change-Id: I87c01d740d66e2d6cd43ad237eae85c0caebd308 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190842 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Jenkins diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index 6e23e5016245..5cb04499becd 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1870,7 +1870,7 @@ void CustomAnimationPane::onAdd() updateControls(); - if (!SlideShow::IsInteractiveSlideshow(&mrBase)) // 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 47366f875377..fc4034f2ab1a 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -900,7 +900,7 @@ void SlideTransitionPane::applyToSelectedPages(bool bPreview = true) { if (aEffect.mnType) // mnType = 0 denotes no transition playCurrentEffect(); - else if( mxView.is() && !SlideShow::IsInteractiveSlideshow(&mrBase)) // 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 13290c7d7e58..dfc7c0297523 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -215,7 +215,7 @@ void SdModule::Execute(SfxRequest& rReq) if (pViewShell) { if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) - && !sd::SlideShow::IsInteractiveSlideshow( &pViewShell->GetViewShellBase() ) ) // IASS + && !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 01e8edc544bc..991228e39de2 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -200,7 +200,7 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc ) // Disable the shape filter drop down menu when there is a running slide // show. if (sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) - && !sd::SlideShow::IsInteractiveSlideshow( &pViewShell->GetViewShellBase() ) ) // IASS + && !sd::SlideShow::IsInteractiveSlideshow( pViewShell->GetViewShellBase() ) ) // IASS mxToolbox->set_item_sensitive(u"shapes"_ustr, false); else mxToolbox->set_item_sensitive(u"shapes"_ustr, true); diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 0dc52d1785cf..4f648b3cc233 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -128,7 +128,7 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, std::u16string_view rLa void DrawDocShell::Execute( SfxRequest& rReq ) { if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &mpViewShell->GetViewShellBase() ) ) // IASS + && !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 9d085536eb8d..e84a57d299aa 100644 --- a/sd/source/ui/func/funavig.cxx +++ b/sd/source/ui/func/funavig.cxx @@ -57,7 +57,7 @@ rtl::Reference<FuPoor> FuNavigation::Create( ViewShell& rViewSh, ::sd::Window* p void FuNavigation::DoExecute( SfxRequest& rReq ) { bool bSlideShow = SlideShow::IsRunning( mrViewShell.GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &mrViewShell.GetViewShellBase() ); // IASS + && !SlideShow::IsInteractiveSlideshow( mrViewShell.GetViewShellBase() ); // IASS switch ( rReq.GetSlot() ) { diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 7029bd9afc67..cd61beca051b 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -124,7 +124,7 @@ void FuPoor::ForceScroll(const Point& aPixPos) if ( mpView->IsDragHelpLine() || mpView->IsSetPageOrg() || (SlideShow::IsRunning( mrViewShell.GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &mrViewShell.GetViewShellBase() )) ) // IASS + && !SlideShow::IsInteractiveSlideshow( mrViewShell.GetViewShellBase() )) ) // IASS return; Point aPos = mpWindow->OutputToScreenPixel(aPixPos); @@ -178,7 +178,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); bool bReturn = false; bool bSlideShow = SlideShow::IsRunning( mrViewShell.GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &mrViewShell.GetViewShellBase() ); // IASS + && !SlideShow::IsInteractiveSlideshow( mrViewShell.GetViewShellBase() ); // IASS switch (nCode) { diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx index 4d84d5a8a994..85a915275712 100644 --- a/sd/source/ui/inc/slideshow.hxx +++ b/sd/source/ui/inc/slideshow.hxx @@ -102,7 +102,7 @@ public: static bool IsRunning( const ViewShell& rViewShell ); /// returns true if the interactive slideshow mode is activated - static bool IsInteractiveSlideshow(const ViewShellBase* pViewShellBase); + static bool IsInteractiveSlideshow(const ViewShellBase& rViewShellBase); bool IsInteractiveSlideshow() const; // helper api diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index c57bacb0fd69..e88144438a45 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -227,11 +227,9 @@ bool SlideShow::IsRunning( const ViewShell& rViewShell ) } /// returns true if the interactive slideshow mode is activated -bool SlideShow::IsInteractiveSlideshow(const ViewShellBase* pViewShellBase) +bool SlideShow::IsInteractiveSlideshow(const ViewShellBase& rViewShellBase) { - if (nullptr == pViewShellBase) - return false; - rtl::Reference< SlideShow > xSlideShow(GetSlideShow(*pViewShellBase)); + rtl::Reference< SlideShow > xSlideShow(GetSlideShow(rViewShellBase)); if (!xSlideShow.is()) return false; return xSlideShow->IsInteractiveSlideshow(); diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 6daa750132c9..784717d04792 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -1340,7 +1340,7 @@ sal_Int8 DrawViewShell::AcceptDrop ( sal_uInt16 /*nPage*/, SdrLayerID nLayer ) { - if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) ) // IASS + if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow( GetViewShellBase() ) ) // IASS return DND_ACTION_NONE; return mpDrawView->AcceptDrop( rEvt, rTargetHelper, nLayer ); @@ -1360,7 +1360,7 @@ sal_Int8 DrawViewShell::ExecuteDrop ( if( nPage != SDRPAGE_NOTFOUND ) nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum(); - if( SlideShow::IsRunning( GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // 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 def86b88869a..5dd3a6fa325a 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -676,7 +676,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // during a native slide show nothing gets executed! if(SlideShow::IsRunning( GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) // IASS + && !SlideShow::IsInteractiveSlideshow( GetViewShellBase() ) // IASS && (rReq.GetSlot() != SID_NAVIGATOR)) return; @@ -4617,7 +4617,7 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) void DrawViewShell::ExecutePropPanelAttr (SfxRequest const & rReq) { if(SlideShow::IsRunning( GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS + && !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 57f8f3f03dc4..729274038514 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -140,7 +140,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) { // switch page in running slide show if(SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase()) // 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 3677fd6cb867..fdb630ab527c 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -527,7 +527,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin) return; const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())); // IASS + && !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 1590032dfaed..2ba69e13f035 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1649,7 +1649,7 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet &rSet) // search and replace or spell checking and in that case switching the // view mode is allowed. const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase()); // IASS + && !SlideShow::IsInteractiveSlideshow(GetViewShellBase()); // IASS SfxViewFrame* pViewFrame = GetViewFrame(); const bool bIsInPlace = pViewFrame && pViewFrame->GetFrame().IsInPlace() ? true : false; @@ -1945,7 +1945,7 @@ void DrawViewShell::GetState (SfxItemSet& rSet) void DrawViewShell::Execute (SfxRequest& rReq) { if(SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS + && !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 07284629fb70..6e06446c7c94 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -385,7 +385,7 @@ void DrawViewShell::Shutdown() ViewShell::Shutdown(); if(SlideShow::IsRunning( GetViewShellBase() ) - && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS + && !SlideShow::IsInteractiveSlideshow( GetViewShellBase() )) // IASS { // Turn off effects. GetDrawView()->SetAnimationMode(SdrAnimationMode::Disable); @@ -566,7 +566,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet) if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) ) { if (GetDocSh()->IsUIActive() - || (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS + || (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(GetViewShellBase())) // IASS || !GetActiveWindow()) { rSet.DisableItem( SID_ATTR_ZOOM ); diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 32000084373b..65129b2eba0a 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -150,7 +150,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) { // We do not execute a thing during a native slide show - if (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS + if (SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(GetViewShellBase())) // IASS return; sal_uInt16 nSId = rReq.GetSlot(); @@ -806,7 +806,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) // We do not execute a thing during a native slide show if((SlideShow::IsRunning(GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // 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 679fea7b5089..57ec4c9b2970 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( &GetViewShellBase() ) ) // 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 81f2f5b2b966..7ce74bc04c25 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -586,7 +586,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh && ( SlideShow::IsRunning(mpViewSh->GetViewShellBase()) - && !SlideShow::IsInteractiveSlideshow(&mpViewSh->GetViewShellBase()) )) // IASS + && !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 fae4776dfd97..51ab68b362cd 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -933,7 +933,7 @@ void ViewShell::SetupRulers() if(!mbHasRulers || !mpContentWindow ) return; - if( SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS + if( SlideShow::IsRunning(GetViewShellBase()) && !SlideShow::IsInteractiveSlideshow(GetViewShellBase())) // IASS return; ::tools::Long nHRulerOfs = 0; commit 31515ca433cfae9f959cd1674f603dddd801353d Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Sep 11 22:44:49 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Sep 12 08:48:29 2025 +0200 sd: mrSlideSorter -> rSlideSorter it's not a member of a class Change-Id: Ic34f0649b1d5792da27b69faeb8a0c0b974b07c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190841 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index bd118a9312c5..def86b88869a 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -4570,9 +4570,9 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) // duplication alters the selection. sal_Int32 nInsertPosition (0); ::std::vector<SdPage*> aPagesToDuplicate; - sd::slidesorter::SlideSorter &mrSlideSorter = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase())->GetSlideSorter(); + sd::slidesorter::SlideSorter &rSlideSorter = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase())->GetSlideSorter(); sd::slidesorter::model::PageEnumeration aSelectedPages ( - sd::slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration(mrSlideSorter.GetModel())); + sd::slidesorter::model::PageEnumerationProvider::CreateSelectedPagesEnumeration(rSlideSorter.GetModel())); while (aSelectedPages.HasMoreElements()) { sd::slidesorter::model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement()); @@ -4585,9 +4585,9 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) // Duplicate the pages in aPagesToDuplicate and collect the newly // created pages in aPagesToSelect. - const bool bUndo (aPagesToDuplicate.size()>1 && mrSlideSorter.GetView().IsUndoEnabled()); + const bool bUndo (aPagesToDuplicate.size()>1 && rSlideSorter.GetView().IsUndoEnabled()); if (bUndo) - mrSlideSorter.GetView().BegUndo(SdResId(STR_INSERTPAGE)); + rSlideSorter.GetView().BegUndo(SdResId(STR_INSERTPAGE)); ::std::vector<SdPage*> aPagesToSelect; for(::std::vector<SdPage*>::const_iterator @@ -4597,16 +4597,16 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& rRequest) ++iPage, nInsertPosition+=2) { aPagesToSelect.push_back( - mrSlideSorter.GetViewShell().CreateOrDuplicatePage( + rSlideSorter.GetViewShell().CreateOrDuplicatePage( rRequest, PageKind::Standard, *iPage, nInsertPosition)); } aPagesToDuplicate.clear(); if (bUndo) - mrSlideSorter.GetView().EndUndo(); + rSlideSorter.GetView().EndUndo(); // Set the selection to the pages in aPagesToSelect. - sd::slidesorter::controller::PageSelector& rSelector (mrSlideSorter.GetController().GetPageSelector()); + sd::slidesorter::controller::PageSelector& rSelector (rSlideSorter.GetController().GetPageSelector()); rSelector.DeselectAllPages(); for (auto const& it: aPagesToSelect) {