summaryrefslogtreecommitdiffstats
path: root/include/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-02 14:18:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-02 17:06:38 +0100
commitc268527f731fc0764f34ac36c48fd1b6154be80c (patch)
treeb6d2830bb384d1281950f43743e42b543d76a5e0 /include/svtools
parentUse comphelper::getProcessComponentContext() (diff)
downloadcore-c268527f731fc0764f34ac36c48fd1b6154be80c.tar.gz
core-c268527f731fc0764f34ac36c48fd1b6154be80c.zip
weld AddressBookSourceDialog
Change-Id: I3e83c41db04268b7370fdb7370f5b630419c6d4e Reviewed-on: https://gerrit.libreoffice.org/68622 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/addresstemplate.hxx53
1 files changed, 21 insertions, 32 deletions
diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx
index 90b2dd308d69..29c5bfa9f6a8 100644
--- a/include/svtools/addresstemplate.hxx
+++ b/include/svtools/addresstemplate.hxx
@@ -22,10 +22,7 @@
#include <memory>
#include <svtools/svtdllapi.h>
-#include <vcl/dialog.hxx>
-#include <vcl/combobox.hxx>
-#include <vcl/button.hxx>
-#include <vcl/scrbar.hxx>
+#include <vcl/weld.hxx>
namespace com :: sun :: star :: container { class XNameAccess; }
namespace com :: sun :: star :: sdbc { class XDataSource; }
@@ -38,15 +35,12 @@ namespace com :: sun :: star :: util { struct AliasProgrammaticPair; }
namespace svt
{
-
-
// = AddressBookSourceDialog
-
struct AddressBookSourceDialogData;
- class SVT_DLLPUBLIC AddressBookSourceDialog final : public ModalDialog
+ class SVT_DLLPUBLIC AddressBookSourceDialog final : public weld::GenericDialogController
{
public:
- AddressBookSourceDialog( vcl::Window* _pParent,
+ AddressBookSourceDialog(weld::Window* _pParent,
const css::uno::Reference< css::uno::XComponentContext >& _rxORB );
/** if you use this ctor, the dialog
@@ -68,7 +62,7 @@ namespace svt
the table name to display. It must refer to a valid table, relative to a connection
obtained from <arg>_rxTransientDS</arg>
*/
- AddressBookSourceDialog( vcl::Window* _pParent,
+ AddressBookSourceDialog(weld::Window* _pParent,
const css::uno::Reference< css::uno::XComponentContext >& _rxORB,
const css::uno::Reference< css::sdbc::XDataSource >& _rxTransientDS,
const OUString& _rDataSourceName,
@@ -77,7 +71,6 @@ namespace svt
);
virtual ~AddressBookSourceDialog() override;
- virtual void dispose() override;
// to be used if the object was constructed for editing a field mapping only
void getFieldMapping(
@@ -86,12 +79,9 @@ namespace svt
private:
void implConstruct();
- // Window overridables
- virtual bool PreNotify( NotifyEvent& _rNEvt ) override;
-
// implementations
- void implScrollFields(sal_Int32 _nPos, bool _bAdjustFocus, bool _bAdjustScrollbar);
- static void implSelectField(ListBox* _pBox, const OUString& _rText);
+ void implScrollFields(sal_Int32 nPos, bool bAdjustFocus, bool bAdjustScrollbar);
+ static void implSelectField(weld::ComboBox* pBox, const OUString& rText);
void resetTables();
void resetFields();
@@ -102,21 +92,15 @@ namespace svt
// initialize the dialog from the configuration data
void loadConfiguration();
- DECL_LINK(OnFieldScroll, ScrollBar*, void);
- DECL_LINK(OnFieldSelect, ListBox&, void);
- DECL_LINK(OnAdministrateDatasources, Button*, void);
- DECL_STATIC_LINK(AddressBookSourceDialog, OnComboGetFocus, Control&, void);
- DECL_LINK(OnComboLoseFocus, Control&, void);
- DECL_LINK(OnComboSelect, ComboBox&, void);
- DECL_LINK(OnOkClicked, Button*, void);
+ DECL_LINK(OnFieldScroll, weld::ScrolledWindow&, void);
+ DECL_LINK(OnFieldSelect, weld::ComboBox&, void);
+ DECL_LINK(OnAdministrateDatasources, weld::Button&, void);
+ DECL_STATIC_LINK(AddressBookSourceDialog, OnComboGetFocus, weld::Widget&, void);
+ DECL_LINK(OnComboLoseFocus, weld::Widget&, void);
+ DECL_LINK(OnComboSelect, weld::ComboBox&, void);
+ DECL_LINK(OnOkClicked, weld::Button&, void);
DECL_LINK(OnDelayedInitialize, void*, void);
- // Controls
- VclPtr<ComboBox> m_pDatasource;
- VclPtr<PushButton> m_pAdministrateDatasources;
- VclPtr<ComboBox> m_pTable;
- VclPtr<ScrollBar> m_pFieldScroller;
-
// string to display for "no selection"
const OUString m_sNoFieldSelection;
@@ -129,13 +113,18 @@ namespace svt
css::uno::Reference< css::container::XNameAccess >
m_xCurrentDatasourceTables;
+ // Controls
+ std::unique_ptr<weld::ComboBox> m_xDatasource;
+ std::unique_ptr<weld::Button> m_xAdministrateDatasources;
+ std::unique_ptr<weld::ComboBox> m_xTable;
+ std::unique_ptr<weld::ScrolledWindow> m_xFieldScroller;
+ std::unique_ptr<weld::Button> m_xOKButton;
+ std::unique_ptr<weld::Widget> m_xGrid;
+
std::unique_ptr<AddressBookSourceDialogData> m_pImpl;
};
-
-
} // namespace svt
-
#endif // INCLUDED_SVTOOLS_ADDRESSTEMPLATE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */