1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_ADDRESSLISTDIALOG_HXX
20 #define INCLUDED_SW_SOURCE_UI_DBUI_ADDRESSLISTDIALOG_HXX
22 #include <sfx2/basedlgs.hxx>
23 #include <swdbdata.hxx>
24 #include <sharedconnection.hxx>
26 namespace com::sun::star
{
31 class XDatabaseContext
;
37 class XColumnsSupplier
;
40 class SwMailMergeAddressBlockPage
;
42 struct AddressUserData_Impl
;
44 class SwAddressListDialog
: public SfxDialogController
46 OUString m_sConnecting
;
50 SwMailMergeAddressBlockPage
* m_pAddressPage
;
52 css::uno::Reference
< css::sdb::XDatabaseContext
> m_xDBContext
;
56 std::vector
<std::unique_ptr
<AddressUserData_Impl
>> m_aUserData
;
58 std::unique_ptr
<weld::Label
> m_xDescriptionFI
;
59 std::unique_ptr
<weld::Label
> m_xConnecting
;
60 std::unique_ptr
<weld::TreeView
> m_xListLB
;
61 std::unique_ptr
<weld::Button
> m_xLoadListPB
;
62 std::unique_ptr
<weld::Button
> m_xRemovePB
;
63 std::unique_ptr
<weld::Button
> m_xCreateListPB
;
64 std::unique_ptr
<weld::Button
> m_xFilterPB
;
65 std::unique_ptr
<weld::Button
> m_xEditPB
;
66 std::unique_ptr
<weld::Button
> m_xTablePB
;
67 std::unique_ptr
<weld::Button
> m_xOK
;
68 std::unique_ptr
<weld::TreeIter
> m_xIter
;
70 void DetectTablesAndQueries(int Select
, bool bWidthDialog
);
72 DECL_LINK(FilterHdl_Impl
, weld::Button
&, void);
73 DECL_LINK(LoadHdl_Impl
, weld::Button
&, void);
74 DECL_LINK(CreateHdl_Impl
, weld::Button
&, void);
75 DECL_LINK(RemoveHdl_Impl
, weld::Button
&, void);
76 DECL_LINK(ListBoxSelectHdl_Impl
, weld::TreeView
&, void);
77 DECL_LINK(EditHdl_Impl
, weld::Button
&, void);
78 DECL_LINK(TableSelectHdl_Impl
, weld::Button
&, void);
79 void TableSelectHdl(const weld::Button
* pButton
);
80 DECL_LINK(OKHdl_Impl
, weld::Button
&, void);
82 DECL_LINK(StaticListBoxSelectHdl_Impl
, void*, void);
85 SwAddressListDialog(SwMailMergeAddressBlockPage
* pParent
);
86 virtual ~SwAddressListDialog() override
;
88 css::uno::Reference
< css::sdbc::XDataSource
>
91 SharedConnection
GetConnection() const;
93 css::uno::Reference
< css::sdbcx::XColumnsSupplier
>
94 GetColumnsSupplier() const;
96 const SwDBData
& GetDBData() const {return m_aDBData
;}
97 OUString
GetFilter() const;
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */