accessiblemenubasecomponent.cxx (0841af79) accessiblemenubasecomponent.cxx (21075d77)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 120 unchanged lines hidden (view full) ---

129}
130
131// -----------------------------------------------------------------------------
132
133void OAccessibleMenuBaseComponent::SetEnabled( sal_Bool bEnabled )
134{
135 if ( m_bEnabled != bEnabled )
136 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 120 unchanged lines hidden (view full) ---

129}
130
131// -----------------------------------------------------------------------------
132
133void OAccessibleMenuBaseComponent::SetEnabled( sal_Bool bEnabled )
134{
135 if ( m_bEnabled != bEnabled )
136 {
137 sal_Int16 nStateType=AccessibleStateType::ENABLED;
138 if (IsMenuHideDisabledEntries())
139 {
140 nStateType = AccessibleStateType::VISIBLE;
141 }
137 Any aOldValue[2], aNewValue[2];
138 if ( m_bEnabled )
139 {
140 aOldValue[0] <<= AccessibleStateType::SENSITIVE;
142 Any aOldValue[2], aNewValue[2];
143 if ( m_bEnabled )
144 {
145 aOldValue[0] <<= AccessibleStateType::SENSITIVE;
141 aOldValue[1] <<= AccessibleStateType::ENABLED;
146 aOldValue[1] <<= nStateType;
142 }
143 else
144 {
147 }
148 else
149 {
145 aNewValue[0] <<= AccessibleStateType::ENABLED;
150 aNewValue[0] <<= nStateType;
146 aNewValue[1] <<= AccessibleStateType::SENSITIVE;
147 }
148 m_bEnabled = bEnabled;
149 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue[0], aNewValue[0] );
150 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue[1], aNewValue[1] );
151 }
152}
153

--- 618 unchanged lines hidden (view full) ---

772 {
773 pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
774 }
775
776 return xSet;
777}
778
779// -----------------------------------------------------------------------------
151 aNewValue[1] <<= AccessibleStateType::SENSITIVE;
152 }
153 m_bEnabled = bEnabled;
154 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue[0], aNewValue[0] );
155 NotifyAccessibleEvent( AccessibleEventId::STATE_CHANGED, aOldValue[1], aNewValue[1] );
156 }
157}
158

--- 618 unchanged lines hidden (view full) ---

777 {
778 pStateSetHelper->AddState( AccessibleStateType::DEFUNC );
779 }
780
781 return xSet;
782}
783
784// -----------------------------------------------------------------------------
785
786sal_Bool OAccessibleMenuBaseComponent::IsMenuHideDisabledEntries()
787{
788 return sal_False;
789}
790