blob: 2ad82af1f4ae5d3980fd454e9b1feb928717cc4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
#define INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
#include <svtools/svtdllapi.h>
#include <svtools/place.hxx>
#include <svtools/PlaceEditDialog.hxx>
#include <vcl/button.hxx>
#include <vcl/menubtn.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/dialog.hxx>
#include <vcl/vclptr.hxx>
#include <svtools/fileview.hxx>
#include <officecfg/Office/Common.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <vector>
#define WB_MULTISELECTION 0x20000000L
enum SvtRemoteDlgMode
{
REMOTEDLG_MODE_OPEN = 0,
REMOTEDLG_MODE_SAVE = 1
};
enum SvtRemoteDlgType
{
REMOTEDLG_TYPE_FILEDLG = 0,
REMOTEDLG_TYPE_PATHDLG = 1
};
typedef std::shared_ptr<Place> ServicePtr;
typedef ::com::sun::star::uno::Sequence<OUString> OUStringList;
class FileViewContainer;
class SVT_DLLPUBLIC RemoteFilesDialog : public ModalDialog
{
public:
RemoteFilesDialog(vcl::Window* pParent, WinBits nBits);
~RemoteFilesDialog();
virtual void dispose() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
private:
::com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_context;
SvtRemoteDlgMode m_eMode;
SvtRemoteDlgType m_eType;
bool m_bMultiselection;
bool m_bIsUpdated;
VclPtr<PushButton> m_pOpen_btn;
VclPtr<PushButton> m_pSave_btn;
VclPtr<CancelButton> m_pCancel_btn;
VclPtr<MenuButton> m_pAddService_btn;
VclPtr<ListBox> m_pServices_lb;
VclPtr<Edit> m_pPath_ed;
VclPtr<SvtFileView> m_pFileView;
VclPtr<FileViewContainer> m_pContainer;
std::vector<ServicePtr> m_aServices;
void FillServicesListbox();
/* If failure returns < 0 */
int GetSelectedServicePos();
void OpenURL( OUString sURL );
DECL_LINK ( AddServiceHdl, void * );
DECL_LINK ( SelectServiceHdl, void * );
DECL_LINK_TYPED ( EditServiceMenuHdl, MenuButton *, void );
DECL_LINK( DoubleClickHdl, void * );
};
#endif // INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|