1c82f2877SAndrew Rist /**************************************************************
2*15466770Smseidel  *
3c82f2877SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4c82f2877SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5c82f2877SAndrew Rist  * distributed with this work for additional information
6c82f2877SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7c82f2877SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8c82f2877SAndrew Rist  * "License"); you may not use this file except in compliance
9c82f2877SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*15466770Smseidel  *
11c82f2877SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*15466770Smseidel  *
13c82f2877SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14c82f2877SAndrew Rist  * software distributed under the License is distributed on an
15c82f2877SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16c82f2877SAndrew Rist  * KIND, either express or implied.  See the License for the
17c82f2877SAndrew Rist  * specific language governing permissions and limitations
18c82f2877SAndrew Rist  * under the License.
19*15466770Smseidel  *
20c82f2877SAndrew Rist  *************************************************************/
21c82f2877SAndrew Rist 
22c82f2877SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_accessibility.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <accessibility/standard/vclxaccessibledropdownlistbox.hxx>
28cdf0e10cSrcweir #include <accessibility/standard/vclxaccessiblelistbox.hxx>
29cdf0e10cSrcweir #include <accessibility/helper/accresmgr.hxx>
30cdf0e10cSrcweir #include <accessibility/helper/accessiblestrings.hrc>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleEventId.hpp>
33cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleRole.hpp>
34cdf0e10cSrcweir #include <com/sun/star/accessibility/AccessibleStateType.hpp>
35cdf0e10cSrcweir #include <tools/debug.hxx>
36cdf0e10cSrcweir #include <vcl/svapp.hxx>
37cdf0e10cSrcweir #include <vcl/lstbox.hxx>
38cdf0e10cSrcweir #include <vcl/unohelp.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir #include <toolkit/awt/vclxwindow.hxx>
41cdf0e10cSrcweir #include <toolkit/helper/convert.hxx>
42cdf0e10cSrcweir 
43cdf0e10cSrcweir #include <comphelper/sequence.hxx>
44cdf0e10cSrcweir #include <cppuhelper/typeprovider.hxx>
45cdf0e10cSrcweir #include <unotools/accessiblestatesethelper.hxx>
46cdf0e10cSrcweir 
47cdf0e10cSrcweir 
48cdf0e10cSrcweir using namespace ::com::sun::star;
49cdf0e10cSrcweir using namespace ::com::sun::star::lang;
50cdf0e10cSrcweir using namespace ::com::sun::star::uno;
51cdf0e10cSrcweir using namespace ::com::sun::star::accessibility;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 
VCLXAccessibleDropDownListBox(VCLXWindow * pVCLWindow)54*15466770Smseidel VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWindow)
55*15466770Smseidel 	: VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::LISTBOX, true)
56cdf0e10cSrcweir {
57cdf0e10cSrcweir }
58cdf0e10cSrcweir 
59cdf0e10cSrcweir 
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 
~VCLXAccessibleDropDownListBox()62cdf0e10cSrcweir VCLXAccessibleDropDownListBox::~VCLXAccessibleDropDownListBox()
63cdf0e10cSrcweir {
64cdf0e10cSrcweir }
65cdf0e10cSrcweir 
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 
68cdf0e10cSrcweir 
IsValid(void) const69cdf0e10cSrcweir bool VCLXAccessibleDropDownListBox::IsValid (void) const
70cdf0e10cSrcweir {
71*15466770Smseidel 	return static_cast<ListBox*>(GetWindow()) != NULL;
72*15466770Smseidel 
73cdf0e10cSrcweir }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir 
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 
ProcessWindowEvent(const VclWindowEvent & rVclWindowEvent)78cdf0e10cSrcweir void VCLXAccessibleDropDownListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
79cdf0e10cSrcweir {
80*15466770Smseidel 	VCLXAccessibleBox::ProcessWindowEvent (rVclWindowEvent);
81cdf0e10cSrcweir }
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 
84cdf0e10cSrcweir 
85cdf0e10cSrcweir 
86cdf0e10cSrcweir //=====  XServiceInfo  ========================================================
87cdf0e10cSrcweir 
getImplementationName()88*15466770Smseidel ::rtl::OUString VCLXAccessibleDropDownListBox::getImplementationName()
89*15466770Smseidel 	throw (RuntimeException)
90cdf0e10cSrcweir {
91cdf0e10cSrcweir 	return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleDropDownListBox");
92cdf0e10cSrcweir }
93cdf0e10cSrcweir 
94cdf0e10cSrcweir 
95cdf0e10cSrcweir 
96cdf0e10cSrcweir 
getSupportedServiceNames(void)97*15466770Smseidel Sequence< ::rtl::OUString > VCLXAccessibleDropDownListBox::getSupportedServiceNames (void)
98*15466770Smseidel 	throw (RuntimeException)
99cdf0e10cSrcweir {
100cdf0e10cSrcweir 	Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames();
101cdf0e10cSrcweir 	sal_Int32 nLength = aNames.getLength();
102cdf0e10cSrcweir 	aNames.realloc( nLength + 1 );
103cdf0e10cSrcweir 	aNames[nLength] = ::rtl::OUString::createFromAscii(
104*15466770Smseidel 		"com.sun.star.accessibility.AccessibleDropDownListBox" );
105cdf0e10cSrcweir 	return aNames;
106cdf0e10cSrcweir }
107