LibreOffice Module sw (master) 1
createaddresslistdialog.hxx
Go to the documentation of this file.
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#ifndef INCLUDED_SW_SOURCE_UI_DBUI_CREATEADDRESSLISTDIALOG_HXX
20#define INCLUDED_SW_SOURCE_UI_DBUI_CREATEADDRESSLISTDIALOG_HXX
21
22#include <sfx2/basedlgs.hxx>
23#include <vcl/weld.hxx>
24#include <vector>
25
28
29// container of the created database
31{
32 std::vector< OUString > aDBColumnHeaders;
33 std::vector< std::vector< OUString> > aDBData;
34};
35
38{
40 OUString m_sURL;
41
42 std::unique_ptr<SwCSVData> m_pCSVData;
43 std::unique_ptr<SwFindEntryDialog> m_xFindDlg;
44
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;
57
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();
67
68 void UpdateButtons();
69
70public:
71 SwCreateAddressListDialog(weld::Window* pParent, OUString aURL, SwMailMergeConfigItem const & rConfig);
72 virtual ~SwCreateAddressListDialog() override;
73
74 const OUString& GetURL() const { return m_sURL; }
75 void Find( const OUString& rSearch, sal_Int32 nColumn);
76};
77
79{
81
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;
87
88 DECL_LINK(FindHdl_Impl, weld::Button&, void);
89 DECL_LINK(FindEnableHdl_Impl, weld::Entry&, void);
90 DECL_LINK(CloseHdl_Impl, weld::Button&, void);
91
92public:
94 virtual ~SwFindEntryDialog() override;
95
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(); }
99
101 {
102 return *m_xFindOnlyLB;
103 }
104};
105
106#endif
107
108/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Button > m_xFindPB
DECL_LINK(OkHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xOK
void Find(const OUString &rSearch, sal_Int32 nColumn)
DECL_LINK(DBCursorHdl_Impl, weld::Button &, void)
DECL_LINK(DBNumCursorHdl_Impl, weld::Entry &, void)
DECL_LINK(DeleteHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::SpinButton > m_xSetNoNF
std::unique_ptr< weld::Button > m_xNewPB
virtual ~SwCreateAddressListDialog() override
std::unique_ptr< weld::Button > m_xDeletePB
DECL_LINK(RefreshNum_Impl, weld::Widget &, void)
std::unique_ptr< SwCSVData > m_pCSVData
std::unique_ptr< weld::Button > m_xNextPB
std::unique_ptr< SwAddressControl_Impl > m_xAddressControl
std::unique_ptr< weld::Button > m_xStartPB
DECL_LINK(NewHdl_Impl, weld::Button &, void)
const OUString & GetURL() const
DECL_LINK(FindHdl_Impl, weld::Button &, void)
SwCreateAddressListDialog(weld::Window *pParent, OUString aURL, SwMailMergeConfigItem const &rConfig)
DECL_LINK(CustomizeHdl_Impl, weld::Button &, void)
std::unique_ptr< SwFindEntryDialog > m_xFindDlg
std::unique_ptr< weld::Button > m_xEndPB
std::unique_ptr< weld::Entry > m_xSetNoED
std::unique_ptr< weld::Button > m_xPrevPB
std::unique_ptr< weld::Button > m_xCustomizePB
DECL_LINK(FindHdl_Impl, weld::Button &, void)
void set_visible(bool bVisible)
virtual ~SwFindEntryDialog() override
std::unique_ptr< weld::Button > m_xCancel
SwFindEntryDialog(SwCreateAddressListDialog *pParent)
std::unique_ptr< weld::ComboBox > m_xFindOnlyLB
std::unique_ptr< weld::Button > m_xFindPB
std::unique_ptr< weld::Entry > m_xFindED
std::unique_ptr< weld::CheckButton > m_xFindOnlyCB
SwCreateAddressListDialog * m_pParent
weld::ComboBox & GetFieldsListBox()
DECL_LINK(FindEnableHdl_Impl, weld::Entry &, void)
DECL_LINK(CloseHdl_Impl, weld::Button &, void)
std::shared_ptr< weld::Dialog > m_xDialog
std::vector< OUString > aDBColumnHeaders
std::vector< std::vector< OUString > > aDBData
bool bVisible