Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_LISTSELECTIONDLG_HXX
21 : #define INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_LISTSELECTIONDLG_HXX
22 :
23 : #include <vcl/dialog.hxx>
24 : #include <vcl/layout.hxx>
25 : #include <vcl/lstbox.hxx>
26 :
27 : #include <com/sun/star/beans/XPropertySet.hpp>
28 :
29 : namespace pcr
30 : {
31 0 : class ListSelectionDialog : public ModalDialog
32 : {
33 : private:
34 : ListBox* m_pEntries;
35 :
36 : ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
37 : m_xListBox;
38 : OUString m_sPropertyName;
39 :
40 : public:
41 : ListSelectionDialog(
42 : vcl::Window* _pParent,
43 : const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxListBox,
44 : const OUString& _rPropertyName,
45 : const OUString& _rPropertyUIName
46 : );
47 :
48 : // Dialog overridables
49 : virtual short Execute() SAL_OVERRIDE;
50 :
51 : private:
52 : void initialize( );
53 : void commitSelection();
54 :
55 : void fillEntryList ( const ::com::sun::star::uno::Sequence< OUString >& _rListEntries );
56 :
57 : void selectEntries ( const ::com::sun::star::uno::Sequence< sal_Int16 >& /* [in ] */ _rSelection );
58 : void collectSelection( ::com::sun::star::uno::Sequence< sal_Int16 >& /* [out] */ _rSelection );
59 : };
60 :
61 :
62 : } // namespacepcr
63 :
64 :
65 : #endif // INCLUDED_EXTENSIONS_SOURCE_PROPCTRLR_LISTSELECTIONDLG_HXX
66 :
67 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|