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
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
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.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_accessibility.hxx"
26 
27 #include <accessibility/standard/vclxaccessibledropdownlistbox.hxx>
28 #include <accessibility/standard/vclxaccessiblelistbox.hxx>
29 #include <accessibility/helper/accresmgr.hxx>
30 #include <accessibility/helper/accessiblestrings.hrc>
31 
32 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
33 #include <com/sun/star/accessibility/AccessibleRole.hpp>
34 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
35 #include <tools/debug.hxx>
36 #include <vcl/svapp.hxx>
37 #include <vcl/lstbox.hxx>
38 #include <vcl/unohelp.hxx>
39 
40 #include <toolkit/awt/vclxwindow.hxx>
41 #include <toolkit/helper/convert.hxx>
42 
43 #include <comphelper/sequence.hxx>
44 #include <cppuhelper/typeprovider.hxx>
45 #include <unotools/accessiblestatesethelper.hxx>
46 
47 
48 using namespace ::com::sun::star;
49 using namespace ::com::sun::star::lang;
50 using namespace ::com::sun::star::uno;
51 using namespace ::com::sun::star::accessibility;
52 
53 
VCLXAccessibleDropDownListBox(VCLXWindow * pVCLWindow)54 VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWindow)
55 	: VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::LISTBOX, true)
56 {
57 }
58 
59 
60 
61 
~VCLXAccessibleDropDownListBox()62 VCLXAccessibleDropDownListBox::~VCLXAccessibleDropDownListBox()
63 {
64 }
65 
66 
67 
68 
IsValid(void) const69 bool VCLXAccessibleDropDownListBox::IsValid (void) const
70 {
71 	return static_cast<ListBox*>(GetWindow()) != NULL;
72 
73 }
74 
75 
76 
77 
ProcessWindowEvent(const VclWindowEvent & rVclWindowEvent)78 void VCLXAccessibleDropDownListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
79 {
80 	VCLXAccessibleBox::ProcessWindowEvent (rVclWindowEvent);
81 }
82 
83 
84 
85 
86 //=====  XServiceInfo  ========================================================
87 
getImplementationName()88 ::rtl::OUString VCLXAccessibleDropDownListBox::getImplementationName()
89 	throw (RuntimeException)
90 {
91 	return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleDropDownListBox");
92 }
93 
94 
95 
96 
getSupportedServiceNames(void)97 Sequence< ::rtl::OUString > VCLXAccessibleDropDownListBox::getSupportedServiceNames (void)
98 	throw (RuntimeException)
99 {
100 	Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames();
101 	sal_Int32 nLength = aNames.getLength();
102 	aNames.realloc( nLength + 1 );
103 	aNames[nLength] = ::rtl::OUString::createFromAscii(
104 		"com.sun.star.accessibility.AccessibleDropDownListBox" );
105 	return aNames;
106 }
107