vclxaccessibledropdowncombobox.cxx (0841af79) vclxaccessibledropdowncombobox.cxx (15466770)
1/**************************************************************
1/**************************************************************
2 *
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
9 * with the License. You may obtain a copy of the License at
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
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_accessibility.hxx"
26#include <accessibility/standard/vclxaccessibledropdowncombobox.hxx>
27#include <accessibility/standard/vclxaccessiblecombobox.hxx>

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

47
48
49using namespace ::com::sun::star;
50using namespace ::com::sun::star::lang;
51using namespace ::com::sun::star::uno;
52using namespace ::com::sun::star::accessibility;
53
54
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_accessibility.hxx"
26#include <accessibility/standard/vclxaccessibledropdowncombobox.hxx>
27#include <accessibility/standard/vclxaccessiblecombobox.hxx>

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

47
48
49using namespace ::com::sun::star;
50using namespace ::com::sun::star::lang;
51using namespace ::com::sun::star::uno;
52using namespace ::com::sun::star::accessibility;
53
54
55VCLXAccessibleDropDownComboBox::VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLWindow)
56 : VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::COMBOBOX, true)
55VCLXAccessibleDropDownComboBox::VCLXAccessibleDropDownComboBox (VCLXWindow* pVCLWindow)
56 : VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::COMBOBOX, true)
57{
58}
59
60
61
62
63VCLXAccessibleDropDownComboBox::~VCLXAccessibleDropDownComboBox (void)
64{
65}
66
67
68
69bool VCLXAccessibleDropDownComboBox::IsValid (void) const
70{
57{
58}
59
60
61
62
63VCLXAccessibleDropDownComboBox::~VCLXAccessibleDropDownComboBox (void)
64{
65}
66
67
68
69bool VCLXAccessibleDropDownComboBox::IsValid (void) const
70{
71 return static_cast<ComboBox*>(GetWindow()) != NULL;
72
71 return static_cast<ComboBox*>(GetWindow()) != NULL;
72
73}
74
75
76
77
78void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
79{
80 switch ( rVclWindowEvent.GetId() )
81 {
82 case VCLEVENT_DROPDOWN_OPEN:
83 case VCLEVENT_DROPDOWN_CLOSE:
84 {
73}
74
75
76
77
78void VCLXAccessibleDropDownComboBox::ProcessWindowEvent (const VclWindowEvent& rVclWindowEvent)
79{
80 switch ( rVclWindowEvent.GetId() )
81 {
82 case VCLEVENT_DROPDOWN_OPEN:
83 case VCLEVENT_DROPDOWN_CLOSE:
84 {
85 /* // child count changed
85 /* // child count changed
86 Any aOldValue, aNewValue;
87 // get the listbox child
88 Reference< XAccessible > xChild;
89 if ( !xChild.is() )
90 {
91 try
92 {
93 // the listbox is the second child

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

98 }
99 if ( rVclWindowEvent.GetId() == VCLEVENT_DROPDOWN_OPEN )
100 aNewValue <<= xChild;
101 else
102 aOldValue <<= xChild;
103 NotifyAccessibleEvent(
104 AccessibleEventId::CHILD, aOldValue, aNewValue
105 );
86 Any aOldValue, aNewValue;
87 // get the listbox child
88 Reference< XAccessible > xChild;
89 if ( !xChild.is() )
90 {
91 try
92 {
93 // the listbox is the second child

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

98 }
99 if ( rVclWindowEvent.GetId() == VCLEVENT_DROPDOWN_OPEN )
100 aNewValue <<= xChild;
101 else
102 aOldValue <<= xChild;
103 NotifyAccessibleEvent(
104 AccessibleEventId::CHILD, aOldValue, aNewValue
105 );
106 */
106 */
107 break;
108 }
109
110 default:
111 VCLXAccessibleBox::ProcessWindowEvent( rVclWindowEvent );
112 }
113}
114
115
116
117
118//===== XServiceInfo ========================================================
119
107 break;
108 }
109
110 default:
111 VCLXAccessibleBox::ProcessWindowEvent( rVclWindowEvent );
112 }
113}
114
115
116
117
118//===== XServiceInfo ========================================================
119
120::rtl::OUString VCLXAccessibleDropDownComboBox::getImplementationName()
121 throw (RuntimeException)
120::rtl::OUString VCLXAccessibleDropDownComboBox::getImplementationName()
121 throw (RuntimeException)
122{
123 return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleDropDownComboBox");
124}
125
126
127
128
122{
123 return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleDropDownComboBox");
124}
125
126
127
128
129Sequence< ::rtl::OUString > VCLXAccessibleDropDownComboBox::getSupportedServiceNames (void)
130 throw (RuntimeException)
129Sequence< ::rtl::OUString > VCLXAccessibleDropDownComboBox::getSupportedServiceNames (void)
130 throw (RuntimeException)
131{
132 Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames();
133 sal_Int32 nLength = aNames.getLength();
134 aNames.realloc( nLength + 1 );
135 aNames[nLength] = ::rtl::OUString::createFromAscii(
131{
132 Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames();
133 sal_Int32 nLength = aNames.getLength();
134 aNames.realloc( nLength + 1 );
135 aNames[nLength] = ::rtl::OUString::createFromAscii(
136 "com.sun.star.accessibility.AccessibleDropDownComboBox" );
136 "com.sun.star.accessibility.AccessibleDropDownComboBox" );
137 return aNames;
138}
137 return aNames;
138}