Kaydet (Commit) 3963bab7 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SwCreateAddressListDialog

Change-Id: I3ae15af8a2c7475394dfc5f6e54b89950d2238c0
Reviewed-on: https://gerrit.libreoffice.org/68511
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst b164e74e
......@@ -41,50 +41,50 @@ namespace com{namespace sun{namespace star{
}
}}}
class SwMailMergeAddressBlockPage;
class SwAddrSourceLB;
class SwAddressListDialog : public SfxModalDialog
{
VclPtr<FixedText> m_pDescriptionFI;
VclPtr<SwAddrSourceLB> m_pListLB;
VclPtr<PushButton> m_pLoadListPB;
VclPtr<PushButton> m_pCreateListPB;
VclPtr<PushButton> m_pFilterPB;
VclPtr<PushButton> m_pEditPB;
VclPtr<PushButton> m_pTablePB;
VclPtr<OKButton> m_pOK;
struct AddressUserData_Impl;
class SwAddressListDialog : public SfxDialogController
{
OUString m_sConnecting;
SvTreeListEntry* m_pCreatedDataSource;
bool m_bInSelectHdl;
VclPtr<SwMailMergeAddressBlockPage> m_pAddressPage;
VclPtr<SwMailMergeAddressBlockPage> m_xAddressPage;
css::uno::Reference< css::sdb::XDatabaseContext> m_xDBContext;
SwDBData m_aDBData;
void DetectTablesAndQueries(SvTreeListEntry* pSelect, bool bWidthDialog);
DECL_LINK(FilterHdl_Impl, Button*, void);
DECL_LINK(LoadHdl_Impl, Button*, void);
DECL_LINK(CreateHdl_Impl, Button*, void);
DECL_LINK(ListBoxSelectHdl_Impl, SvTreeListBox*, void);
DECL_LINK(EditHdl_Impl, Button*, void);
DECL_LINK(TableSelectHdl_Impl, Button*, void);
DECL_LINK(OKHdl_Impl, Button*, void);
std::vector<std::unique_ptr<AddressUserData_Impl>> m_aUserData;
std::unique_ptr<weld::Label> m_xDescriptionFI;
std::unique_ptr<weld::Label> m_xConnecting;
std::unique_ptr<weld::TreeView> m_xListLB;
std::unique_ptr<weld::Button> m_xLoadListPB;
std::unique_ptr<weld::Button> m_xCreateListPB;
std::unique_ptr<weld::Button> m_xFilterPB;
std::unique_ptr<weld::Button> m_xEditPB;
std::unique_ptr<weld::Button> m_xTablePB;
std::unique_ptr<weld::Button> m_xOK;
std::unique_ptr<weld::TreeIter> m_xIter;
void DetectTablesAndQueries(int Select, bool bWidthDialog);
DECL_LINK(FilterHdl_Impl, weld::Button&, void);
DECL_LINK(LoadHdl_Impl, weld::Button&, void);
DECL_LINK(CreateHdl_Impl, weld::Button&, void);
DECL_LINK(ListBoxSelectHdl_Impl, weld::TreeView&, void);
DECL_LINK(EditHdl_Impl, weld::Button&, void);
DECL_LINK(TableSelectHdl_Impl, weld::Button&, void);
void TableSelectHdl(weld::Button* pButton);
DECL_LINK(OKHdl_Impl, weld::Button&, void);
DECL_LINK(StaticListBoxSelectHdl_Impl, void*, void);
public:
SwAddressListDialog(SwMailMergeAddressBlockPage* pParent);
virtual ~SwAddressListDialog() override;
virtual void dispose() override;
css::uno::Reference< css::sdbc::XDataSource>
GetSource();
......
......@@ -168,16 +168,16 @@ IMPL_LINK_NOARG(SwMailMergeAddressBlockPage, AddressListHdl_Impl, Button*, void)
{
try
{
ScopedVclPtrInstance< SwAddressListDialog > xAddrDialog(this);
if(RET_OK == xAddrDialog->Execute())
SwAddressListDialog aAddrDialog(this);
if (RET_OK == aAddrDialog.run())
{
SwMailMergeConfigItem& rConfigItem = m_pWizard->GetConfigItem();
rConfigItem.SetCurrentConnection(
xAddrDialog->GetSource(),
xAddrDialog->GetConnection(),
xAddrDialog->GetColumnsSupplier(),
xAddrDialog->GetDBData());
OUString sFilter = xAddrDialog->GetFilter();
aAddrDialog.GetSource(),
aAddrDialog.GetConnection(),
aAddrDialog.GetColumnsSupplier(),
aAddrDialog.GetDBData());
OUString sFilter = aAddrDialog.GetFilter();
rConfigItem.SetFilter( sFilter );
InsertDataHdl_Impl(nullptr);
GetWizard()->UpdateRoadmap();
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkTreeStore" id="liststore1">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name text2 -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkDialog" id="SelectAddressDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="selectaddressdialog|SelectAddressDialog">Select Address List</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
......@@ -82,10 +94,11 @@
<object class="GtkLabel" id="desc">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="selectaddressdialog|desc">Select an address list. Click '%1' to select recipients from a different list. If you do not have an address list you can create one by clicking '%2'.</property>
<property name="wrap">True</property>
<property name="width_chars">52</property>
<property name="max_width_chars">52</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -104,8 +117,8 @@
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="selectaddressdialog|label2">Your recipients are currently selected from:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -197,48 +210,63 @@
</packing>
</child>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<object class="GtkLabel" id="connecting">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes" context="selectaddressdialog|connecting">Connecting to data source...</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="svtlo-SvSimpleTableContainer" id="sources:border">
<object class="GtkTreeView" id="sources">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Simple Table Container-selection4"/>
<object class="GtkTreeSelection" id="Macro Library List-selection1"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="resizable">True</property>
<property name="spacing">6</property>
<property name="title" translatable="yes" context="selectaddressdialog|name">Name</property>
<child>
<object class="GtkCellRendererText" id="cellrenderer1"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="resizable">True</property>
<property name="spacing">6</property>
<property name="title" translatable="yes" context="selectaddressdialog|table">Table</property>
<child>
<object class="GtkCellRendererText" id="cellrenderer2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="name">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes" context="selectaddressdialog|name">Name</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="table">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes" context="selectaddressdialog|table">Table</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
......@@ -246,17 +274,6 @@
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="connecting">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="label" translatable="yes" context="selectaddressdialog|connecting">Connecting to data source...</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment