From c34415de2026fbdb32c7fa28f3b38b359e02b0d5 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Apr 25 2014 19:55:10 +0000 Subject: Related: rhbz#1032774 disable slide auto-exit when swithing monitors --- diff --git a/0001-Related-rhbz-1032774-slide-restarter-should-disable-.patch b/0001-Related-rhbz-1032774-slide-restarter-should-disable-.patch new file mode 100644 index 0000000..6748fd8 --- /dev/null +++ b/0001-Related-rhbz-1032774-slide-restarter-should-disable-.patch @@ -0,0 +1,108 @@ +From c7d2d4953e4d9825157f09345ed45b8730522f36 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 25 Apr 2014 19:27:57 +0100 +Subject: [PATCH] Related: rhbz#1032774 slide restarter should disable + auto-exit + +The scenario is a pps that exits the app when the presentation +is complete. But using "switch screens" in the presenter +console will stop and restart the presentation. So protect +that "stop" against existing by disabling the autoexit +and restoring it afterwards + +(cherry picked from commit b7197cfe5d207b171412760c6d72353f31947e93) + +Conflicts: + sd/source/ui/slideshow/slideshow.cxx + +Change-Id: Id986ad7e3cfafb8068540fb90d05443f329b554c +--- + sd/source/ui/inc/slideshow.hxx | 5 ++++- + sd/source/ui/slideshow/SlideShowRestarter.cxx | 3 +++ + sd/source/ui/slideshow/slideshow.cxx | 20 +++++++++++++++----- + 3 files changed, 22 insertions(+), 6 deletions(-) + +diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx +index 6573b2b..f6567e1 100644 +--- a/sd/source/ui/inc/slideshow.hxx ++++ b/sd/source/ui/inc/slideshow.hxx +@@ -178,6 +178,9 @@ public: + + static sal_Int32 GetDisplay(); + ++ bool IsExitAfterPresenting() const; ++ void SetExitAfterPresenting(bool bExit); ++ + private: + SlideShow( SdDrawDocument* pDoc ); + +@@ -187,7 +190,7 @@ private: + void StartInPlacePresentation(); + void StartFullscreenPresentation(); + +- void ThrowIfDisposed() throw (::com::sun::star::uno::RuntimeException); ++ void ThrowIfDisposed() const throw (css::uno::RuntimeException); + + void CreateController( ViewShell* pViewSh, ::sd::View* pView, ::Window* pParentWindow ); + WorkWindow *GetWorkWindow(); +diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx +index 822e8be..63fae11 100644 +--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx ++++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx +@@ -83,7 +83,10 @@ IMPL_LINK_NOARG(SlideShowRestarter, EndPresentation) + { + if (mnDisplayCount != (sal_Int32)Application::GetScreenCount()) + { ++ bool bIsExitAfterPresenting = mpSlideShow->IsExitAfterPresenting(); ++ mpSlideShow->SetExitAfterPresenting(false); + mpSlideShow->end(); ++ mpSlideShow->SetExitAfterPresenting(bIsExitAfterPresenting); + + // The following piece of code should not be here because the + // slide show should be aware of the existence of the presenter +diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx +index 2bab38d..20a210b 100644 +--- a/sd/source/ui/slideshow/slideshow.cxx ++++ b/sd/source/ui/slideshow/slideshow.cxx +@@ -146,16 +146,12 @@ SlideShow::SlideShow( SdDrawDocument* pDoc ) + { + } + +-// -------------------------------------------------------------------- +- +-void SlideShow::ThrowIfDisposed() throw (RuntimeException) ++void SlideShow::ThrowIfDisposed() const throw (RuntimeException) + { + if( mpDoc == 0 ) + throw DisposedException(); + } + +-// -------------------------------------------------------------------- +- + /// used by the model to create a slideshow for it + rtl::Reference< SlideShow > SlideShow::Create( SdDrawDocument* pDoc ) + { +@@ -678,6 +674,20 @@ WorkWindow *SlideShow::GetWorkWindow() + return dynamic_cast(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); + } + ++bool SlideShow::IsExitAfterPresenting() const ++{ ++ SolarMutexGuard aGuard; ++ ThrowIfDisposed(); ++ return mpDoc->IsExitAfterPresenting(); ++} ++ ++void SlideShow::SetExitAfterPresenting(bool bExit) ++{ ++ SolarMutexGuard aGuard; ++ ThrowIfDisposed(); ++ mpDoc->SetExitAfterPresenting(bExit); ++} ++ + void SAL_CALL SlideShow::end() throw(RuntimeException) + { + SolarMutexGuard aGuard; +-- +1.9.0 + diff --git a/libreoffice.spec b/libreoffice.spec index c3798eb..086bba5 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -42,7 +42,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.3 -Release: 8%{?libo_prerelease}%{?dist} +Release: 9%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 Group: Applications/Productivity URL: http://www.libreoffice.org/default/ @@ -305,6 +305,7 @@ Patch40: 0001-Resolves-rhbz-1089377-crash-on-loading-a-specific-rt.patch Patch41: 0001-avoid-repeated-table-layouting-fdo-75622.patch Patch42: 0001-table-not-resizing-when-rows-columns-added-to-it.patch Patch43: 0001-Resolves-fdo-60040-crash-after-undoing-master-page-a.patch +Patch44: 0001-Related-rhbz-1032774-slide-restarter-should-disable-.patch %define instdir %{_libdir} %define baseinstdir %{instdir}/libreoffice @@ -2296,6 +2297,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %endif %changelog +* Fri Apr 25 2014 Caolán McNamara - 1:4.2.3.3-9 +- Related: rhbz#1032774 disable slide auto-exit when swithing monitors + * Thu Apr 24 2014 Caolán McNamara - 1:4.2.3.3-8 - Resolves: fdo#75622 presentations with table slow to load - Resolves: fdo#60040 rhbz#1090956 crash after undoing master page