Kaydet (Commit) 08402a81 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld OSpreadSheetConnectionPageSetup

Change-Id: Ibcf63af2bb1272d35420ac1b6f71aaa6f147ec16
Reviewed-on: https://gerrit.libreoffice.org/62322
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e6176cdb
......@@ -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;
}
......
......@@ -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;
......
<?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>
......@@ -56,18 +56,6 @@
<property name="hexpand">True</property>
<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>
......@@ -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>
......
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