1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: vclxaccessiblelistbox.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_accessibility.hxx"
33 #include <accessibility/standard/vclxaccessiblelistbox.hxx>
34 #include <accessibility/standard/vclxaccessiblelistitem.hxx>
35 #include <accessibility/helper/listboxhelper.hxx>
39 #include <com/sun/star/accessibility/AccessibleEventId.hpp>
40 #include <com/sun/star/accessibility/AccessibleRole.hpp>
41 #include <com/sun/star/accessibility/AccessibleStateType.hpp>
42 #include <tools/debug.hxx>
43 #include <vcl/svapp.hxx>
44 #include <vcl/lstbox.hxx>
45 #include <vcl/unohelp.hxx>
47 #include <toolkit/awt/vclxwindow.hxx>
48 #include <toolkit/helper/convert.hxx>
50 #include <comphelper/sequence.hxx>
51 #include <cppuhelper/typeprovider.hxx>
52 #include <unotools/accessiblestatesethelper.hxx>
54 using namespace ::com::sun::star
;
55 using namespace ::com::sun::star::lang
;
56 using namespace ::com::sun::star::uno
;
57 using namespace ::com::sun::star::accessibility
;
59 VCLXAccessibleListBox::VCLXAccessibleListBox (VCLXWindow
* pVCLWindow
)
60 : VCLXAccessibleBox (pVCLWindow
, VCLXAccessibleBox::LISTBOX
, false)
67 VCLXAccessibleListBox::~VCLXAccessibleListBox (void)
74 bool VCLXAccessibleListBox::IsValid (void) const
76 return static_cast<ListBox
*>(GetWindow()) != NULL
;
83 void VCLXAccessibleListBox::ProcessWindowEvent (const VclWindowEvent
& rVclWindowEvent
)
85 VCLXAccessibleBox::ProcessWindowEvent( rVclWindowEvent
);
91 //===== XServiceInfo ========================================================
93 ::rtl::OUString
VCLXAccessibleListBox::getImplementationName (void)
94 throw (RuntimeException
)
96 return ::rtl::OUString::createFromAscii("com.sun.star.comp.toolkit.AccessibleListBox");
102 Sequence
< ::rtl::OUString
> VCLXAccessibleListBox::getSupportedServiceNames (void)
103 throw (RuntimeException
)
105 Sequence
< ::rtl::OUString
> aNames
= VCLXAccessibleBox::getSupportedServiceNames();
106 sal_Int32 nLength
= aNames
.getLength();
107 aNames
.realloc( nLength
+ 1 );
108 aNames
[nLength
] = ::rtl::OUString::createFromAscii(
109 "com.sun.star.accessibility.AccessibleListBox" );