Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : :
30 : : #include <accessibility/standard/vclxaccessibledropdownlistbox.hxx>
31 : : #include <accessibility/standard/vclxaccessiblelistbox.hxx>
32 : : #include <accessibility/helper/accresmgr.hxx>
33 : : #include <accessibility/helper/accessiblestrings.hrc>
34 : :
35 : : #include <com/sun/star/accessibility/AccessibleEventId.hpp>
36 : : #include <com/sun/star/accessibility/AccessibleRole.hpp>
37 : : #include <com/sun/star/accessibility/AccessibleStateType.hpp>
38 : : #include <vcl/svapp.hxx>
39 : : #include <vcl/lstbox.hxx>
40 : : #include <vcl/unohelp.hxx>
41 : :
42 : : #include <toolkit/awt/vclxwindow.hxx>
43 : : #include <toolkit/helper/convert.hxx>
44 : :
45 : : #include <comphelper/sequence.hxx>
46 : : #include <cppuhelper/typeprovider.hxx>
47 : : #include <unotools/accessiblestatesethelper.hxx>
48 : :
49 : :
50 : : using namespace ::com::sun::star;
51 : : using namespace ::com::sun::star::lang;
52 : : using namespace ::com::sun::star::uno;
53 : : using namespace ::com::sun::star::accessibility;
54 : :
55 : :
56 : 6 : VCLXAccessibleDropDownListBox::VCLXAccessibleDropDownListBox (VCLXWindow* pVCLWindow)
57 : 6 : : VCLXAccessibleBox (pVCLWindow, VCLXAccessibleBox::LISTBOX, true)
58 : : {
59 : 6 : }
60 : :
61 : :
62 : :
63 : :
64 : 0 : VCLXAccessibleDropDownListBox::~VCLXAccessibleDropDownListBox()
65 : : {
66 [ # # ]: 0 : }
67 : :
68 : :
69 : :
70 : :
71 : 68 : bool VCLXAccessibleDropDownListBox::IsValid (void) const
72 : : {
73 : 68 : return static_cast<ListBox*>(GetWindow()) != NULL;
74 : :
75 : : }
76 : :
77 : :
78 : :
79 : :
80 : 28 : void VCLXAccessibleDropDownListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent )
81 : : {
82 : 28 : VCLXAccessibleBox::ProcessWindowEvent (rVclWindowEvent);
83 : 28 : }
84 : :
85 : :
86 : :
87 : :
88 : : //===== XServiceInfo ========================================================
89 : :
90 : 8 : ::rtl::OUString VCLXAccessibleDropDownListBox::getImplementationName()
91 : : throw (RuntimeException)
92 : : {
93 : 8 : return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.toolkit.AccessibleDropDownListBox" ));
94 : : }
95 : :
96 : :
97 : :
98 : :
99 : 0 : Sequence< ::rtl::OUString > VCLXAccessibleDropDownListBox::getSupportedServiceNames (void)
100 : : throw (RuntimeException)
101 : : {
102 : 0 : Sequence< ::rtl::OUString > aNames = VCLXAccessibleBox::getSupportedServiceNames();
103 : 0 : sal_Int32 nLength = aNames.getLength();
104 [ # # ]: 0 : aNames.realloc( nLength + 1 );
105 [ # # ][ # # ]: 0 : aNames[nLength] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.accessibility.AccessibleDropDownListBox" ));
106 : 0 : return aNames;
107 : : }
108 : :
109 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|