summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-24 15:56:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-25 09:56:25 +0200
commit08402a81e55ab43bf079a9c91df8b9494634ef52 (patch)
treebfd63899b4c31f4e4a48b8dcb222b6da33f41c49 /dbaccess
parente6176cdb896a53e132920d1e13f2d4f274a62df2 (diff)
weld OSpreadSheetConnectionPageSetup
Change-Id: Ibcf63af2bb1272d35420ac1b6f71aaa6f147ec16 Reviewed-on: https://gerrit.libreoffice.org/62322 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx23
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx7
-rw-r--r--dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui55
3 files changed, 47 insertions, 38 deletions
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 0055f65dbc4f..d818b2dc12a8 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -690,11 +690,12 @@ using namespace ::com::sun::star;
}
- OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup( vcl::Window* pParent, const SfxItemSet& _rCoreAttrs )
- :OConnectionTabPageSetup(pParent, "DBWizSpreadsheetPage", "dbaccess/ui/dbwizspreadsheetpage.ui", _rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH)
+ OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup(TabPageParent pParent, const SfxItemSet& rCoreAttrs)
+ : DBOConnectionTabPageSetup(pParent, "dbaccess/ui/dbwizspreadsheetpage.ui", "DBWizSpreadsheetPage",
+ rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH)
+ , m_xPasswordrequired(m_xBuilder->weld_check_button("passwordrequired"))
{
- get(m_pPasswordrequired, "passwordrequired");
- m_pPasswordrequired->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) );
+ m_xPasswordrequired->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
}
OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup()
@@ -702,27 +703,21 @@ using namespace ::com::sun::star;
disposeOnce();
}
- void OSpreadSheetConnectionPageSetup::dispose()
- {
- m_pPasswordrequired.clear();
- OConnectionTabPageSetup::dispose();
- }
-
void OSpreadSheetConnectionPageSetup::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& /*_rControlList*/)
{
}
void OSpreadSheetConnectionPageSetup::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
{
- OConnectionTabPageSetup::fillControls(_rControlList);
- _rControlList.emplace_back(new OSaveValueWrapper<CheckBox>(m_pPasswordrequired));
+ DBOConnectionTabPageSetup::fillControls(_rControlList);
+ _rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::CheckButton>(m_xPasswordrequired.get()));
}
bool OSpreadSheetConnectionPageSetup::FillItemSet( SfxItemSet* _rSet )
{
- bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet);
- fillBool(*_rSet,m_pPasswordrequired,DSID_PASSWORDREQUIRED,bChangedSomething);
+ bool bChangedSomething = DBOConnectionTabPageSetup::FillItemSet(_rSet);
+ fillBool(*_rSet,m_xPasswordrequired.get(),DSID_PASSWORDREQUIRED,false,bChangedSomething);
return bChangedSomething;
}
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 419be4acc05c..f634232113ae 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -36,17 +36,16 @@ namespace dbaui
{
// OSpreadSheetConnectionPageSetup
- class OSpreadSheetConnectionPageSetup final : public OConnectionTabPageSetup
+ class OSpreadSheetConnectionPageSetup final : public DBOConnectionTabPageSetup
{
public:
virtual bool FillItemSet ( SfxItemSet* _rCoreAttrs ) override;
static VclPtr<OGenericAdministrationPage> CreateDocumentOrSpreadSheetTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet );
- OSpreadSheetConnectionPageSetup(vcl::Window* pParent, const SfxItemSet& _rCoreAttrs);
+ OSpreadSheetConnectionPageSetup(TabPageParent pParent, const SfxItemSet& _rCoreAttrs);
virtual ~OSpreadSheetConnectionPageSetup() override;
- virtual void dispose() override;
private:
- VclPtr<CheckBox> m_pPasswordrequired;
+ std::unique_ptr<weld::CheckButton> m_xPasswordrequired;
virtual void fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
virtual void fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList) override;
diff --git a/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui b/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui
index 897bd3c006ed..b104f4d664c1 100644
--- a/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui
+++ b/dbaccess/uiconfig/ui/dbwizspreadsheetpage.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
<interface domain="dba">
- <!-- interface-requires gtk+ 3.0 -->
- <!-- interface-requires LibreOffice 1.0 -->
+ <requires lib="gtk+" version="3.18"/>
<object class="GtkBox" id="DBWizSpreadsheetPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -39,9 +39,9 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="xalign">0</property>
<property name="wrap">True</property>
<property name="max_width_chars">100</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -57,18 +57,6 @@
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
- <object class="dbulo-ConnectionURLEdit" id="browseurl">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkButton" id="browse">
<property name="label" translatable="yes" context="dbwizspreadsheetpage|browse">Browse</property>
<property name="visible">True</property>
@@ -78,8 +66,6 @@
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -92,8 +78,6 @@
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
</packing>
</child>
<child>
@@ -102,13 +86,44 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">browseurl</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">3</property>
- <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkEntry" id="browseurl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="browselabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
</object>