incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhan...@apache.org
Subject svn commit: r1356536 - in /incubator/ooo/branches/AOO34/main/framework: ./ source/accelerators/ source/inc/accelerators/ source/uiconfiguration/ source/uielement/
Date Tue, 03 Jul 2012 01:19:45 GMT
Author: zhangjf
Date: Tue Jul  3 01:19:43 2012
New Revision: 1356536

URL: http://svn.apache.org/viewvc?rev=1356536&view=rev
Log:
#i120029# Unregister on dispose.

          Patch by: zhang jianfang
          Review by: Andre Fischer

 Merge trunk revision r1352075 to 341.

Modified:
    incubator/ooo/branches/AOO34/main/framework/   (props changed)
    incubator/ooo/branches/AOO34/main/framework/source/accelerators/acceleratorconfiguration.cxx
    incubator/ooo/branches/AOO34/main/framework/source/accelerators/globalacceleratorconfiguration.cxx
    incubator/ooo/branches/AOO34/main/framework/source/accelerators/moduleacceleratorconfiguration.cxx
    incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/acceleratorconfiguration.hxx
    incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
    incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
    incubator/ooo/branches/AOO34/main/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
    incubator/ooo/branches/AOO34/main/framework/source/uielement/menubarmanager.cxx
    incubator/ooo/branches/AOO34/main/framework/source/uielement/toolbarmanager.cxx

Propchange: incubator/ooo/branches/AOO34/main/framework/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Jul  3 01:19:43 2012
@@ -0,0 +1,4 @@
+/incubator/ooo/branches/alg/linecap/main/framework:1226811-1232461
+/incubator/ooo/branches/alg/svgreplacement/main/framework:1205420-1220782
+/incubator/ooo/trunk/framework:1336210
+/incubator/ooo/trunk/main/framework:1333462,1336023,1336210,1336570,1338635,1344156,1346850,1348010,1351653,1352075,1353632,1354039,1354421

Modified: incubator/ooo/branches/AOO34/main/framework/source/accelerators/acceleratorconfiguration.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/accelerators/acceleratorconfiguration.cxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/accelerators/acceleratorconfiguration.cxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/accelerators/acceleratorconfiguration.cxx
Tue Jul  3 01:19:43 2012
@@ -676,21 +676,23 @@ AcceleratorCache& XMLBasedAcceleratorCon
 
 //-----------------------------------------------    
 //	XInterface, XTypeProvider
-DEFINE_XINTERFACE_7(XCUBasedAcceleratorConfiguration                       ,
+DEFINE_XINTERFACE_8(XCUBasedAcceleratorConfiguration                       ,
 					OWeakObject                                            ,
 					DIRECT_INTERFACE(css::lang::XTypeProvider             ),
 					DIRECT_INTERFACE(css::ui::XAcceleratorConfiguration  ),
 					DIRECT_INTERFACE(css::util::XChangesListener          ),
 					DIRECT_INTERFACE(css::form::XReset                    ),
+					DIRECT_INTERFACE(css::lang::XComponent                ),
 					DIRECT_INTERFACE(css::ui::XUIConfigurationPersistence),
 					DIRECT_INTERFACE(css::ui::XUIConfigurationStorage    ),
 					DIRECT_INTERFACE(css::ui::XUIConfiguration           ))
 
-					DEFINE_XTYPEPROVIDER_7(XCUBasedAcceleratorConfiguration ,
+					DEFINE_XTYPEPROVIDER_8(XCUBasedAcceleratorConfiguration ,
 					css::lang::XTypeProvider             ,					   
 					css::ui::XAcceleratorConfiguration  ,
 					css::util::XChangesListener          ,
 					css::form::XReset                    ,
+					css::lang::XComponent                ,
 					css::ui::XUIConfigurationPersistence,
 					css::ui::XUIConfigurationStorage    ,
 					css::ui::XUIConfiguration           )
@@ -1292,6 +1294,27 @@ void SAL_CALL XCUBasedAcceleratorConfigu
 }
 
 //----------------------------------------------- 
+void SAL_CALL XCUBasedAcceleratorConfiguration::dispose()
+	throw(css::uno::RuntimeException)
+{
+    // nop
+}
+
+//----------------------------------------------- 
+void SAL_CALL XCUBasedAcceleratorConfiguration::addEventListener( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener >& xListener )
+	throw(css::uno::RuntimeException)
+{
+    // nop
+}
+
+//----------------------------------------------- 
+void SAL_CALL XCUBasedAcceleratorConfiguration::removeEventListener( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener >& aListener )
+	throw(css::uno::RuntimeException)
+{
+    // nop
+}
+
+//----------------------------------------------- 
 void XCUBasedAcceleratorConfiguration::impl_ts_load( sal_Bool bPreferred, const css::uno::Reference<
css::container::XNameAccess >& xCfg )
 {
     AcceleratorCache aReadCache = AcceleratorCache();

Modified: incubator/ooo/branches/AOO34/main/framework/source/accelerators/globalacceleratorconfiguration.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/accelerators/globalacceleratorconfiguration.cxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/accelerators/globalacceleratorconfiguration.cxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/accelerators/globalacceleratorconfiguration.cxx
Tue Jul  3 01:19:43 2012
@@ -120,4 +120,23 @@ void GlobalAcceleratorConfiguration::imp
         {}
 }
 
+//----------------------------------------------- 
+//
+// XComponent.dispose(),  #120029#, to release the cyclic reference
+//
+void SAL_CALL GlobalAcceleratorConfiguration::dispose()
+	throw(css::uno::RuntimeException)
+{
+    try
+    {
+        css::uno::Reference< css::util::XChangesNotifier > xBroadcaster(m_xCfg, css::uno::UNO_QUERY_THROW);
+        if ( xBroadcaster.is() )
+            xBroadcaster->removeChangesListener(static_cast< css::util::XChangesListener*
>(this));
+    }
+    catch(const css::uno::RuntimeException& exRun)
+    { throw exRun; }
+    catch(const css::uno::Exception&)
+    {}
+}
+
 } // namespace framework

Modified: incubator/ooo/branches/AOO34/main/framework/source/accelerators/moduleacceleratorconfiguration.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/accelerators/moduleacceleratorconfiguration.cxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/accelerators/moduleacceleratorconfiguration.cxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/accelerators/moduleacceleratorconfiguration.cxx
Tue Jul  3 01:19:43 2012
@@ -167,5 +167,24 @@ void ModuleAcceleratorConfiguration::imp
         {}
 }
 
+//----------------------------------------------- 
+//
+// XComponent.dispose(),  #120029#, to release the cyclic reference
+//
+void SAL_CALL ModuleAcceleratorConfiguration::dispose()
+	throw(css::uno::RuntimeException)
+{
+    try
+    {
+        css::uno::Reference< css::util::XChangesNotifier > xBroadcaster(m_xCfg, css::uno::UNO_QUERY_THROW);
+        if ( xBroadcaster.is() )
+            xBroadcaster->removeChangesListener(static_cast< css::util::XChangesListener*
>(this));
+    }
+    catch(const css::uno::RuntimeException& exRun)
+    { throw exRun; }
+    catch(const css::uno::Exception&)
+    {}
+}
+
 } // namespace framework
 

Modified: incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/acceleratorconfiguration.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/acceleratorconfiguration.hxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/acceleratorconfiguration.hxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/acceleratorconfiguration.hxx
Tue Jul  3 01:19:43 2012
@@ -309,6 +309,7 @@ class XCUBasedAcceleratorConfiguration :
 									   , public    ::cppu::OWeakObject
 								       , public    css::lang::XTypeProvider
 									   , public    css::util::XChangesListener  
+									   , public    css::lang::XComponent  
 									   , public    css::form::XReset                    // TODO use XPresetHandler instead
if available
 									   , public    css::ui::XAcceleratorConfiguration  // => css::ui::XUIConfigurationPersistence
					
 																					   //    css::ui::XUIConfigurationStorage
@@ -435,6 +436,11 @@ class XCUBasedAcceleratorConfiguration :
 		virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
 			throw(css::uno::RuntimeException);
 
+		// XComponent
+		virtual  void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+		virtual  void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener
>& xListener ) throw (::com::sun::star::uno::RuntimeException);
+		virtual  void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
+
 		//______________________________________
 		// helper for derived classes
 

Modified: incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/globalacceleratorconfiguration.hxx
Tue Jul  3 01:19:43 2012
@@ -88,6 +88,9 @@ class GlobalAcceleratorConfiguration : p
 			throw (css::uno::Exception       ,
 			css::uno::RuntimeException);
 
+        // XComponent
+        virtual  void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
     //______________________________________
     // helper
     

Modified: incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/inc/accelerators/moduleacceleratorconfiguration.hxx
Tue Jul  3 01:19:43 2012
@@ -96,6 +96,9 @@ class ModuleAcceleratorConfiguration : p
             throw(css::uno::Exception       ,
                   css::uno::RuntimeException);
                   
+        // XComponent
+        virtual  void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
+
     //______________________________________
     // helper
     

Modified: incubator/ooo/branches/AOO34/main/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
(original)
+++ incubator/ooo/branches/AOO34/main/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
Tue Jul  3 01:19:43 2012
@@ -777,6 +777,9 @@ void SAL_CALL ModuleUIConfigurationManag
     ResetableGuard aGuard( m_aLock );
     Reference< XComponent > xModuleImageManager( m_xModuleImageManager );
     m_xModuleImageManager.clear();
+    Reference< XComponent > xCompMAM( m_xModuleAcceleratorManager, UNO_QUERY );
+    if ( xCompMAM.is() )
+    	xCompMAM->dispose();
     m_xModuleAcceleratorManager.clear();
     m_aUIElements[LAYER_USERDEFINED].clear();
     m_aUIElements[LAYER_DEFAULT].clear();

Modified: incubator/ooo/branches/AOO34/main/framework/source/uielement/menubarmanager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/uielement/menubarmanager.cxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/uielement/menubarmanager.cxx (original)
+++ incubator/ooo/branches/AOO34/main/framework/source/uielement/menubarmanager.cxx Tue Jul
 3 01:19:43 2012
@@ -422,6 +422,9 @@ void SAL_CALL MenuBarManager::dispose() 
         }
         m_xDocImageManager.clear();
         m_xModuleImageManager.clear();
+        Reference< XComponent > xCompGAM( m_xGlobalAcceleratorManager, UNO_QUERY );
+        if ( xCompGAM.is() )
+            xCompGAM->dispose();
         m_xGlobalAcceleratorManager.clear();
         m_xModuleAcceleratorManager.clear();
         m_xDocAcceleratorManager.clear();

Modified: incubator/ooo/branches/AOO34/main/framework/source/uielement/toolbarmanager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/AOO34/main/framework/source/uielement/toolbarmanager.cxx?rev=1356536&r1=1356535&r2=1356536&view=diff
==============================================================================
--- incubator/ooo/branches/AOO34/main/framework/source/uielement/toolbarmanager.cxx (original)
+++ incubator/ooo/branches/AOO34/main/framework/source/uielement/toolbarmanager.cxx Tue Jul
 3 01:19:43 2012
@@ -706,6 +706,9 @@ void SAL_CALL ToolBarManager::dispose() 
 
         m_xFrame.clear();
         m_xServiceManager.clear();
+        Reference< XComponent > xCompGAM( m_xGlobalAcceleratorManager, UNO_QUERY );
+        if ( xCompGAM.is() )
+            xCompGAM->dispose();
         m_xGlobalAcceleratorManager.clear();
         m_xModuleAcceleratorManager.clear();
         m_xDocAcceleratorManager.clear();



Mime
View raw message