diff options
Diffstat (limited to 'toolkit/source/controls/controlmodelcontainerbase.cxx')
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index bff374628d49..fc5b0e374c1f 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -169,9 +169,9 @@ ControlModelContainerBase::ControlModelContainerBase( const Reference< XComponen ,maContainerListeners( *this ) ,maChangeListeners ( GetMutex() ) ,mbGroupsUpToDate( false ) - ,m_bEnabled( true ) ,m_nTabPageId(0) { + ImplRegisterProperty(BASEPROPERTY_ENABLED); } ControlModelContainerBase::ControlModelContainerBase( const ControlModelContainerBase& rModel ) @@ -179,7 +179,6 @@ ControlModelContainerBase::ControlModelContainerBase( const ControlModelContaine , maContainerListeners( *this ) , maChangeListeners ( GetMutex() ) , mbGroupsUpToDate( false ) - , m_bEnabled( rModel.m_bEnabled ) , m_nTabPageId( rModel.m_nTabPageId ) { } @@ -735,11 +734,17 @@ void SAL_CALL ControlModelContainerBase::initialize (const Sequence<Any>& rArgum } sal_Bool SAL_CALL ControlModelContainerBase::getEnabled() { - return m_bEnabled; + SolarMutexGuard aGuard; + Reference<XPropertySet> xThis(*this, UNO_QUERY); + bool bEnabled; + xThis->getPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED)) >>= bEnabled; + return bEnabled; } void SAL_CALL ControlModelContainerBase::setEnabled( sal_Bool _enabled ) { - m_bEnabled = _enabled; + SolarMutexGuard aGuard; + Reference<XPropertySet> xThis(*this, UNO_QUERY); + xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED), makeAny(_enabled)); } OUString SAL_CALL ControlModelContainerBase::getTitle() { |