-
Julien Nabet yazdı
Looking at history: 2014-05-02: reportdesign: sal_Bool->bool e23c98d7 2008-06-16: INTEGRATION: CWS rptchart02 (1.7.4); FILE MERGED 2008/05/16 12:53:21 oj 1.7.4.6: #i89365# copy props before set args at chart 2008/05/07 06:56:32 oj 1.7.4.5: #i88842# set databaseprovider at chart 2008/04/30 13:03:34 oj 1.7.4.4: #i88843# impl clone method 2008/04/16 06:28:15 oj 1.7.4.3: RESYNC: (1.7-1.8); FILE MERGED 2008/04/03 06:35:18 oj 1.7.4.2: #i86343# remove unused code 2008/03/12 09:45:16 oj 1.7.4.1: impl chart handling b8fe847a @@ -299,10 +297,9 @@ void OObjectBase::EndListening(sal_Bool /*bRemoveListener*/) DBG_CHKTHIS( rpt_OObjectBase,NULL); OSL_ENSURE(!m_xReportComponent.is() || isListening(), "OUnoObject::EndListening: not listening currently!"); + m_bIsListening = sal_False; if ( isListening() && m_xReportComponent.is() ) { - m_bIsListening = sal_False; - // XPropertyChangeListener if ( m_xPropertyChangeListener.is() ) { Since isListening() returns the value of m_bIsListening (see https://opengrok.libreoffice.org/xref/core/reportdesign/inc/RptObject.hxx#79) quite suspicious. We may think that "m_bIsListening = false;" should be put if we succeed in removing the listener 382 if ( isListening() && m_xReportComponent.is() ) 383 { 384 // XPropertyChangeListener 385 if ( m_xPropertyChangeListener.is() ) 386 { 387 // remove listener 388 try 389 { 390 m_xReportComponent->removePropertyChangeListener( OUString() , m_xPropertyChangeListener ); 391 } 392 catch(const uno::Exception &) 393 { 394 OSL_FAIL("OObjectBase::EndListening: Exception caught!"); 395 } 396 } 397 m_xPropertyChangeListener.clear(); 398 } Either in the try after the remove or in a finally if we don't want to care about catch part. (see https://opengrok.libreoffice.org/xref/core/reportdesign/source/core/sdr/RptObject.cxx#377) But considering the 2008 commit and the former state before it, it seems it was on purpose to put m_bIsListening in all cases so... Change-Id: I7db8ba45d915e28e707cea61d16ef94fc13b969a Reviewed-on: https://gerrit.libreoffice.org/56898 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
c8d8fdea