merge the formfield patch from ooo-build
[ooovba.git] / extensions / source / propctrlr / listselectiondlg.hxx
bloba4d83712924f4c1deab19e7284cc0ec75ac3d950
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: listselectiondlg.hxx,v $
10 * $Revision: 1.4 $
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 #ifndef EXTENSIONS_SOURCE_PROPCTRLR_LISTSELECTIONDLG_HXX
32 #define EXTENSIONS_SOURCE_PROPCTRLR_LISTSELECTIONDLG_HXX
34 #include <vcl/dialog.hxx>
35 #include <vcl/fixed.hxx>
36 #ifndef _SV_BUTTON_HXX
37 #include <vcl/button.hxx>
38 #endif
39 #include <vcl/lstbox.hxx>
41 /** === begin UNO includes === **/
42 #include <com/sun/star/beans/XPropertySet.hpp>
43 /** === end UNO includes === **/
45 //........................................................................
46 namespace pcr
48 //........................................................................
50 //====================================================================
51 //= ListSelectionDialog
52 //====================================================================
53 class ListSelectionDialog : public ModalDialog
55 private:
56 FixedText m_aLabel;
57 ListBox m_aEntries;
58 OKButton m_aOK;
59 CancelButton m_aCancel;
60 HelpButton m_aHelp;
62 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
63 m_xListBox;
64 ::rtl::OUString m_sPropertyName;
66 public:
67 ListSelectionDialog(
68 Window* _pParent,
69 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxListBox,
70 const ::rtl::OUString& _rPropertyName,
71 const String& _rPropertyUIName
74 // Dialog overridables
75 virtual short Execute();
77 private:
78 void initialize( );
79 void commitSelection();
81 void fillEntryList ( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rListEntries );
83 void selectEntries ( const ::com::sun::star::uno::Sequence< sal_Int16 >& /* [in ] */ _rSelection );
84 void collectSelection( ::com::sun::star::uno::Sequence< sal_Int16 >& /* [out] */ _rSelection );
87 //........................................................................
88 } // namespacepcr
89 //........................................................................
91 #endif // EXTENSIONS_SOURCE_PROPCTRLR_LISTSELECTIONDLG_HXX