android: Update app-specific/MIME type icons
[LibreOffice.git] / sw / source / ui / dbui / createaddresslistdialog.hxx
blob693dffed393cf90becd4520450d7d7138d24b511
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SW_SOURCE_UI_DBUI_CREATEADDRESSLISTDIALOG_HXX
20 #define INCLUDED_SW_SOURCE_UI_DBUI_CREATEADDRESSLISTDIALOG_HXX
22 #include <sfx2/basedlgs.hxx>
23 #include <vcl/weld.hxx>
24 #include <vector>
26 class SwAddressControl_Impl;
27 class SwMailMergeConfigItem;
29 // container of the created database
30 struct SwCSVData
32 std::vector< OUString > aDBColumnHeaders;
33 std::vector< std::vector< OUString> > aDBData;
36 class SwFindEntryDialog;
37 class SwCreateAddressListDialog : public SfxDialogController
39 OUString m_sAddressListFilterName;
40 OUString m_sURL;
42 std::unique_ptr<SwCSVData> m_pCSVData;
43 std::unique_ptr<SwFindEntryDialog> m_xFindDlg;
45 std::unique_ptr<SwAddressControl_Impl> m_xAddressControl;
46 std::unique_ptr<weld::Button> m_xNewPB;
47 std::unique_ptr<weld::Button> m_xDeletePB;
48 std::unique_ptr<weld::Button> m_xFindPB;
49 std::unique_ptr<weld::Button> m_xCustomizePB;
50 std::unique_ptr<weld::Button> m_xStartPB;
51 std::unique_ptr<weld::Button> m_xPrevPB;
52 std::unique_ptr<weld::Entry> m_xSetNoED;
53 std::unique_ptr<weld::SpinButton> m_xSetNoNF;
54 std::unique_ptr<weld::Button> m_xNextPB;
55 std::unique_ptr<weld::Button> m_xEndPB;
56 std::unique_ptr<weld::Button> m_xOK;
58 DECL_LINK(NewHdl_Impl, weld::Button&, void);
59 DECL_LINK(DeleteHdl_Impl, weld::Button&, void);
60 DECL_LINK(FindHdl_Impl, weld::Button&, void);
61 DECL_LINK(CustomizeHdl_Impl, weld::Button&, void);
62 DECL_LINK(OkHdl_Impl, weld::Button&, void);
63 DECL_LINK(DBCursorHdl_Impl, weld::Button&, void);
64 DECL_LINK(DBNumCursorHdl_Impl, weld::Entry&, void);
65 DECL_LINK(RefreshNum_Impl, weld::Widget&, void);
66 void DBNumCursor();
68 void UpdateButtons();
70 public:
71 SwCreateAddressListDialog(weld::Window* pParent, OUString aURL, SwMailMergeConfigItem const & rConfig);
72 virtual ~SwCreateAddressListDialog() override;
74 const OUString& GetURL() const { return m_sURL; }
75 void Find( const OUString& rSearch, sal_Int32 nColumn);
78 class SwFindEntryDialog : public weld::GenericDialogController
80 SwCreateAddressListDialog* m_pParent;
82 std::unique_ptr<weld::Entry> m_xFindED;
83 std::unique_ptr<weld::CheckButton> m_xFindOnlyCB;
84 std::unique_ptr<weld::ComboBox> m_xFindOnlyLB;
85 std::unique_ptr<weld::Button> m_xFindPB;
86 std::unique_ptr<weld::Button> m_xCancel;
88 DECL_LINK(FindHdl_Impl, weld::Button&, void);
89 DECL_LINK(FindEnableHdl_Impl, weld::Entry&, void);
90 DECL_LINK(CloseHdl_Impl, weld::Button&, void);
92 public:
93 SwFindEntryDialog(SwCreateAddressListDialog* pParent);
94 virtual ~SwFindEntryDialog() override;
96 void show() { m_xDialog->show(); }
97 void set_visible(bool bVisible) { m_xDialog->set_visible(bVisible); }
98 bool get_visible() const { return m_xDialog->get_visible(); }
100 weld::ComboBox& GetFieldsListBox()
102 return *m_xFindOnlyLB;
106 #endif
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */