diff options
-rw-r--r-- | reportdesign/source/core/sdr/UndoEnv.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportControllerObserver.cxx | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index b0fc3b9a9..3a0dc2569 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -544,10 +544,12 @@ void OXUndoEnvironment::switchListening( const Reference< XIndexAccess >& _rxCon Reference< XContainer > xSimpleContainer( _rxContainer, UNO_QUERY ); // OSL_ENSURE( xSimpleContainer.is(), "OXUndoEnvironment::switchListening: how are we expected to be notified of changes in the container?" ); if ( xSimpleContainer.is() ) + { if ( _bStartListening ) xSimpleContainer->addContainerListener( this ); else xSimpleContainer->removeContainerListener( this ); + } } catch( const Exception& ) { @@ -566,18 +568,22 @@ void OXUndoEnvironment::switchListening( const Reference< XInterface >& _rxObjec { Reference< XPropertySet > xProps( _rxObject, UNO_QUERY ); if ( xProps.is() ) + { if ( _bStartListening ) xProps->addPropertyChangeListener( ::rtl::OUString(), this ); else xProps->removePropertyChangeListener( ::rtl::OUString(), this ); + } } Reference< XModifyBroadcaster > xBroadcaster( _rxObject, UNO_QUERY ); if ( xBroadcaster.is() ) + { if ( _bStartListening ) xBroadcaster->addModifyListener( this ); else xBroadcaster->removeModifyListener( this ); + } } catch( const Exception& ) { diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index c55139610..59e5583e6 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -3968,7 +3968,7 @@ void OReportController::createDefaultControl(const uno::Sequence< beans::Propert const beans::PropertyValue* pEnd = pIter + _aArgs.getLength(); const beans::PropertyValue* pKeyModifier = ::std::find_if(pIter,pEnd,::std::bind2nd(PropertyValueCompare(),boost::cref(sKeyModifier))); sal_Int16 nKeyModifier = 0; - if ( pKeyModifier == pEnd || (pKeyModifier->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1 ) + if ( pKeyModifier == pEnd || ((pKeyModifier->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1) ) { Sequence< PropertyValue > aCreateArgs; m_pMyOwnView->unmarkAllObjects(NULL); diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index e2cbdca83..56b1d7152 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -344,10 +344,12 @@ void OXReportControllerObserver::switchListening( const uno::Reference< containe uno::Reference< container::XContainer > xSimpleContainer( _rxContainer, uno::UNO_QUERY ); // OSL_ENSURE( xSimpleContainer.is(), "OXReportControllerObserver::switchListening: how are we expected to be notified of changes in the container?" ); if ( xSimpleContainer.is() ) + { if ( _bStartListening ) xSimpleContainer->addContainerListener( this ); else xSimpleContainer->removeContainerListener( this ); + } } catch( const uno::Exception& ) { @@ -366,18 +368,22 @@ void OXReportControllerObserver::switchListening( const uno::Reference< uno::XIn { uno::Reference< beans::XPropertySet > xProps( _rxObject, uno::UNO_QUERY ); if ( xProps.is() ) + { if ( _bStartListening ) xProps->addPropertyChangeListener( ::rtl::OUString(), this ); else xProps->removePropertyChangeListener( ::rtl::OUString(), this ); + } } uno::Reference< util::XModifyBroadcaster > xBroadcaster( _rxObject, uno::UNO_QUERY ); if ( xBroadcaster.is() ) + { if ( _bStartListening ) xBroadcaster->addModifyListener( this ); else xBroadcaster->removeModifyListener( this ); + } } catch( const uno::Exception& ) { |