[libreoffice/f16] Resolves: rhbz#759647 dispose clears mpPresTimer

Caolán McNamara caolanm at fedoraproject.org
Wed Dec 7 12:34:25 UTC 2011


commit 1894e9408abfd5ad5ba1bd896eb5bc4c67f68d49
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Dec 7 12:34:06 2011 +0000

    Resolves: rhbz#759647 dispose clears mpPresTimer

 ...bz-759647-dispose-clears-mpPresTimer-befo.patch |   34 ++++++++++++++++++++
 libreoffice.spec                                   |    7 +++-
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch b/0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch
new file mode 100644
index 0000000..c309f44
--- /dev/null
+++ b/0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch
@@ -0,0 +1,34 @@
+From d57887eaad534ca51fc4975918fab66b2f93633d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Tue, 6 Dec 2011 16:26:05 +0000
+Subject: [PATCH] Resolves: rhbz#759647 ::dispose clears mpPresTimer before
+ releaseTimer called
+
+---
+ slideshow/source/engine/slideshowimpl.cxx |    8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
+index 5be3b62..4277280 100644
+--- a/slideshow/source/engine/slideshowimpl.cxx
++++ b/slideshow/source/engine/slideshowimpl.cxx
+@@ -2025,10 +2025,14 @@ sal_Bool SlideShowImpl::update( double & nNextTimeout )
+         //    that have zero delay.  While the timer is stopped these events
+         //    are processed in the same run.
+         {
++            //Get a shared-ptr that outlives the scope-guard which will
++            //ensure that the pointed-to-item exists in the case of a
++            //::dispose clearing mpPresTimer
++            boost::shared_ptr<canvas::tools::ElapsedTime> xTimer(mpPresTimer);
+             comphelper::ScopeGuard scopeGuard(
+                 boost::bind( &canvas::tools::ElapsedTime::releaseTimer,
+-                             boost::cref(mpPresTimer) ) );
+-            mpPresTimer->holdTimer();
++                             boost::cref(xTimer) ) );
++            xTimer->holdTimer();
+ 
+             // process queues
+             maEventQueue.process();
+-- 
+1.7.6.4
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 1e7cbce..ff650bd 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -28,7 +28,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        4%{?dist}
+Release:        5%{?dist}
 License:        LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and (CDDL or GPLv2) and Public Domain
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -127,6 +127,7 @@ Patch28: 0001-add-Oracle-Java-1.7.0-recognition.patch
 Patch29: 0001-fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
 Patch30: 0001-Resolves-rhbz-751290-KDE-black-on-dark-tooltips.patch
 Patch31: 0001-gtk3-fix-cairo-canvas-crash-for-non-X-or-svp-backend.patch
+Patch32: 0001-Resolves-rhbz-759647-dispose-clears-mpPresTimer-befo.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -802,6 +803,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch29 -p1 -b .fix-horizontal-scrollbars-with-KDE-oxygen-style-bnc-.patch
 %patch30 -p1 -b .rhbz751290-KDE-black-on-dark-tooltips.patch
 %patch31 -p1 -b .gtk3-fix-cairo-canvas-crash-for-non-X-or-svp-backend.patch
+%patch32 -p1 -b .rhbz759647-dispose-clears-mpPresTimer-befo.patch
 
 # these are horribly incomplete--empty translations and copied english
 # strings with spattering of translated strings
@@ -2113,6 +2115,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Wed Dec 07 2011 Caolán McNamara <caolanm at redhat.com>  3.4.4.2-5.UNBUILT
+- Resolves: rhbz#759647 dispose clears mpPresTimer
+
 * Wed Nov 30 2011 Caolán McNamara <caolanm at redhat.com> - 3.4.4.2-4
 - Resolves: rhbz#757653 fix headless crash with cairo canvas
 - Resolves: rhbz#758338 KDE build problems


More information about the scm-commits mailing list