diff options
Diffstat (limited to 'reportdesign/source/ui/report/ReportControllerObserver.cxx')
-rw-r--r-- | reportdesign/source/ui/report/ReportControllerObserver.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/reportdesign/source/ui/report/ReportControllerObserver.cxx b/reportdesign/source/ui/report/ReportControllerObserver.cxx index 45c389f94bef..007e0e01966e 100644 --- a/reportdesign/source/ui/report/ReportControllerObserver.cxx +++ b/reportdesign/source/ui/report/ReportControllerObserver.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -78,7 +78,7 @@ public: ,m_bReadOnly(sal_False) { } - + OXReportControllerObserverImpl::~OXReportControllerObserverImpl() { } @@ -119,7 +119,7 @@ public: nEvent == VCLEVENT_WINDOW_RESIZE || nEvent == VCLEVENT_WINDOW_SHOW || nEvent == VCLEVENT_WINDOW_MOUSEMOVE || - nEvent == VCLEVENT_WINDOW_FRAMETITLECHANGED || + nEvent == VCLEVENT_WINDOW_FRAMETITLECHANGED || nEvent == VCLEVENT_WINDOW_HIDE || nEvent == VCLEVENT_EDIT_MODIFY || nEvent == VCLEVENT_SCROLLBAR_ENDSCROLL || @@ -136,18 +136,18 @@ public: return 0L; } */ - + if (nEvent == VCLEVENT_APPLICATION_DATACHANGED ) { DataChangedEvent* pData = reinterpret_cast<DataChangedEvent*>(_pEvt->GetData()); - if ( pData && ((( pData->GetType() == DATACHANGED_SETTINGS ) || - ( pData->GetType() == DATACHANGED_DISPLAY )) && - ( pData->GetFlags() & SETTINGS_STYLE ))) + if ( pData && ((( pData->GetType() == DATACHANGED_SETTINGS ) || + ( pData->GetType() == DATACHANGED_DISPLAY )) && + ( pData->GetFlags() & SETTINGS_STYLE ))) { OEnvLock aLock(*this); - + // sal_uInt32 nCount = m_pImpl->m_aSections.size(); - + // send all Section Objects a 'tingle' // maybe they need a change in format, color, etc ::std::vector< uno::Reference< container::XChild > >::const_iterator aIter = m_pImpl->m_aSections.begin(); @@ -159,7 +159,7 @@ public: { uno::Reference<report::XSection> xSection(xChild, uno::UNO_QUERY); if (xSection.is()) - { + { const sal_Int32 nCount = xSection->getCount(); for (sal_Int32 i = 0; i < nCount; ++i) { @@ -177,7 +177,7 @@ public: } } } - + return 0L; } @@ -196,14 +196,14 @@ public: RemoveElement(xSourceSet); } } - + void OXReportControllerObserver::Clear() { OEnvLock aLock(*this); // sal_uInt32 nDebugValue = m_pImpl->m_aSections.size(); m_pImpl->m_aSections.clear(); } - + // XPropertyChangeListener void SAL_CALL OXReportControllerObserver::propertyChange(const beans::PropertyChangeEvent& _rEvent) throw(uno::RuntimeException) { @@ -214,20 +214,20 @@ public: return; m_aFormattedFieldBeautifier.notifyPropertyChange(_rEvent); - m_aFixedTextColor.notifyPropertyChange(_rEvent); + m_aFixedTextColor.notifyPropertyChange(_rEvent); } - + // ----------------------------------------------------------------------------- -void OXReportControllerObserver::Lock() -{ +void OXReportControllerObserver::Lock() +{ OSL_ENSURE(m_refCount,"Illegal call to dead object!"); - osl_incrementInterlockedCount( &m_pImpl->m_nLocks ); + osl_incrementInterlockedCount( &m_pImpl->m_nLocks ); } -void OXReportControllerObserver::UnLock() -{ +void OXReportControllerObserver::UnLock() +{ OSL_ENSURE(m_refCount,"Illegal call to dead object!"); - osl_decrementInterlockedCount( &m_pImpl->m_nLocks ); + osl_decrementInterlockedCount( &m_pImpl->m_nLocks ); } sal_Bool OXReportControllerObserver::IsLocked() const { return m_pImpl->m_nLocks != 0; } @@ -379,7 +379,7 @@ void OXReportControllerObserver::AddElement(const uno::Reference< uno::XInterfac m_aFormattedFieldBeautifier.notifyElementInserted(_rxElement); m_aFixedTextColor.notifyElementInserted(_rxElement); // } - + // if it's a container, start listening at all elements uno::Reference< container::XIndexAccess > xContainer( _rxElement, uno::UNO_QUERY ); if ( xContainer.is() ) @@ -405,7 +405,7 @@ void OXReportControllerObserver::RemoveElement(const uno::Reference< uno::XInter if ( _xContainer.is() ) { aFind = ::std::find(m_pImpl->m_aSections.begin(),m_pImpl->m_aSections.end(),_xContainer); - + if ( aFind == m_pImpl->m_aSections.end() ) { uno::Reference<container::XChild> xParent(_xContainer->getParent(),uno::UNO_QUERY); |