diff options
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/inc/controls/controlmodelcontainerbase.hxx | 1 | ||||
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/toolkit/inc/controls/controlmodelcontainerbase.hxx b/toolkit/inc/controls/controlmodelcontainerbase.hxx index 31ff2cdb9e73..c2d715dc3b61 100644 --- a/toolkit/inc/controls/controlmodelcontainerbase.hxx +++ b/toolkit/inc/controls/controlmodelcontainerbase.hxx @@ -83,7 +83,6 @@ protected: AllGroups maGroups; bool mbGroupsUpToDate; - bool m_bEnabled; OUString m_sImageURL; OUString m_sTooltip; sal_Int16 m_nTabPageId; 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() { |