[openoffice.org/f14] Related: rhbz#702833 addEventListener without removeEventListener

Caolan McNamara caolanm at fedoraproject.org
Fri Jun 17 12:40:48 UTC 2011


commit 5b875965bab2274e978a5c6a52be9467075a3a58
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jun 17 13:40:12 2011 +0100

    Related: rhbz#702833 addEventListener without removeEventListener

 ...z-702833-addEventListener-without-removeE.patch |   54 ++++++++++++++++++++
 openoffice.org.spec                                |    7 ++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/0001-Related-rhbz-702833-addEventListener-without-removeE.patch b/0001-Related-rhbz-702833-addEventListener-without-removeE.patch
new file mode 100644
index 0000000..6a192bb
--- /dev/null
+++ b/0001-Related-rhbz-702833-addEventListener-without-removeE.patch
@@ -0,0 +1,54 @@
+From 6f42aa185adc436d976da04b8b193dfe25d61f7a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Fri, 17 Jun 2011 13:38:27 +0100
+Subject: [PATCH] Related: rhbz#702833 addEventListener without
+ removeEventListener
+
+---
+ .../source/deployment/gui/dp_gui_extlistbox.cxx    |   12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+index 8cdf0a6..3d0d426 100644
+--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
++++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+@@ -970,18 +970,20 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &
+     if ( ! pEntry->m_sTitle.Len() )
+         return 0;
+ 
+-    xPackage->addEventListener( uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) );
++    bool bNewEntryInserted = false;
+ 
+     ::osl::ClearableMutexGuard guard(m_entriesMutex);
+     if ( m_vEntries.empty() )
+     {
+         m_vEntries.push_back( pEntry );
++        bNewEntryInserted = true;
+     }
+     else
+     {
+         if ( !FindEntryPos( pEntry, 0, m_vEntries.size()-1, nPos ) )
+         {
+             m_vEntries.insert( m_vEntries.begin()+nPos, pEntry );
++            bNewEntryInserted = true;
+         }
+         else if ( !m_bInCheckMode )
+         {
+@@ -989,6 +991,14 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &
+         }
+     }
+ 
++    //Related: rhbz#702833 Only add a Listener if we're adding a new entry, to
++    //keep in sync with removeEventListener logic
++    if (bNewEntryInserted)
++    {
++        pEntry->m_xPackage->addEventListener(uno::Reference< lang::XEventListener > ( m_xRemoveListener, uno::UNO_QUERY ) );
++    }
++
++
+     pEntry->m_bHasOptions = m_pManager->supportsOptions( xPackage );
+     pEntry->m_bUser       = xPackage->getRepositoryName().equals( USER_PACKAGE_MANAGER );
+     pEntry->m_bShared     = xPackage->getRepositoryName().equals( SHARED_PACKAGE_MANAGER );
+-- 
+1.7.5.4
+
diff --git a/openoffice.org.spec b/openoffice.org.spec
index bad9bb0..8028afe 100644
--- a/openoffice.org.spec
+++ b/openoffice.org.spec
@@ -1,6 +1,6 @@
 %define oootag OOO330
 %define ooomilestone 20
-%define rh_rpm_release 6
+%define rh_rpm_release 7
 
 # rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF
 %define __jar_repack %{nil}
@@ -173,6 +173,7 @@ Patch89: libreoffice-fdo33947.sd.print.crash.patch
 Patch90: 0001-helgrind-Related-rhbz-655686-get-order-of-shutdown-c.patch
 Patch91: 0001-Resolves-rhbz-695509-crash-in-RefreshDocumentLB.patch
 Patch92: 0001-Related-rhbz-652604-better-survive-exceptions-thrown.patch
+Patch93: 0001-Related-rhbz-702833-addEventListener-without-removeE.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1762,6 +1763,7 @@ cp -p %{SOURCE5} external/unowinreg/unowinreg.dll
 %patch90 -p1 -b .rhbz655686-get-order-of-shutdown-c.patch
 %patch91 -p1 -b .rhbz695509-crash-in-RefreshDocumentLB.patch
 %patch92 -p1 -b .rhbz652604-better-survive-exceptions-thrown.patch
+%patch93 -p1 -b .rhbz702833-addEventListener-without-removeE.patch
 touch scripting/source/pyprov/delzip
 touch scripting/util/provider/beanshell/delzip
 touch scripting/util/provider/javascript/delzip
@@ -3957,6 +3959,9 @@ unopkg remove --shared org.openoffice.legacy.ScriptProviderForPython.zip > /dev/
 %endif
 
 %changelog
+* Fri Jun 15 2011 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-20.7-UNBUILT
+- Related: rhbz#702833 addEventListener without removeEventListener
+
 * Wed Jun 08 2011 Caolán McNamara <caolanm at redhat.com>- 1:3.3.0-20.6
 - Resolves: rhbz#695509 crash in RefreshDocumentLB
 - Resolves: rhbz#652604 better survive exceptions in autocorrect


More information about the scm-commits mailing list