[Libreoffice-commits] core.git: dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk
Palenik Mihály
palenik.mihaly at gmail.com
Thu Aug 7 00:34:08 PDT 2014
dbaccess/UIConfig_dbaccess.mk | 1
dbaccess/source/ui/dlg/dbadmin.hrc | 5 -
dbaccess/source/ui/dlg/dbadmin.src | 93 -------------------
dbaccess/source/ui/dlg/detailpages.cxx | 72 +++++---------
dbaccess/source/ui/dlg/detailpages.hxx | 14 --
dbaccess/uiconfig/ui/ldappage.ui | 161 +++++++++++++++++++++++++++++++++
6 files changed, 192 insertions(+), 154 deletions(-)
New commits:
commit 2159107594e2e4665e8d0724a56000d3be30d11e
Author: Palenik Mihály <palenik.mihaly at gmail.com>
Date: Wed Aug 6 22:02:43 2014 +0200
Convert PAGE_LDAP to .ui
Conflicts:
dbaccess/source/ui/dlg/dbadmin.src
Change-Id: I2655cc1d58c87a254c7074682fd7814e4d00fe73
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 289cd48..8a45cf1 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/jdbcconnectionpage \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/ldapconnectionpage \
+ dbaccess/uiconfig/ui/ldappage \
dbaccess/uiconfig/ui/migratepage \
dbaccess/uiconfig/ui/mysqlnativepage \
dbaccess/uiconfig/ui/mysqlnativesettings \
diff --git a/dbaccess/source/ui/dlg/dbadmin.hrc b/dbaccess/source/ui/dlg/dbadmin.hrc
index 4e1dcc8..5fa069f 100644
--- a/dbaccess/source/ui/dlg/dbadmin.hrc
+++ b/dbaccess/source/ui/dlg/dbadmin.hrc
@@ -24,21 +24,16 @@
#define FT_OPTIONS 5
#define FT_HOSTNAME 10
-#define FT_BASEDN 11
#define FT_PORTNUMBER 12
-#define FT_LDAPROWCOUNT 13
#define ET_OPTIONS 3
#define ET_HOSTNAME 5
-#define ET_BASEDN 6
-#define CB_USESSL 3
#define CB_USECATALOG 4
#define TLB_ACTIONS 1
#define NF_PORTNUMBER 1
-#define NF_LDAPROWCOUNT 2
#endif // _DBAUI_DBADMIN_HRC_
diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src
index f81b75a..e67416d 100644
--- a/dbaccess/source/ui/dlg/dbadmin.src
+++ b/dbaccess/source/ui/dlg/dbadmin.src
@@ -77,99 +77,6 @@ String STR_DATABASE_TYPE_CHANGE
Text [ en-US ] = "Database properties" ;
};
-TabPage PAGE_ADO
-{
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
- Hide = TRUE;
- HelpId = HID_DSADMIN_PAGE_ADO;
- AUTO_CHARSET(UNRELATED_CONTROLS,PAGE_X)
-};
-
-TabPage PAGE_MYSQL_ODBC
-{
- HelpID = "dbaccess:TabPage:PAGE_MYSQL_ODBC";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
- Hide = TRUE;
-
- AUTO_CHARSET( UNRELATED_CONTROLS, PAGE_X )
-};
-
-TabPage PAGE_LDAP
-{
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
- Hide = TRUE;
- HelpId = HID_DSADMIN_PAGE_LDAP;
-
- FixedLine FL_SEPARATOR1
- {
- Pos = MAP_APPFONT ( 4 , UNRELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "Connection Settings";
- };
-
- FixedText FT_BASEDN
- {
- Pos = MAP_APPFONT ( 6 , UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT) ;
- Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "~Base DN";
- };
- Edit ET_BASEDN
- {
- TabStop = TRUE ;
- Border = TRUE ;
- HelpId = HID_DSADMIN_LDAP_BASEDN;
-
- Pos = MAP_APPFONT ( EDIT_X , UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT -1 ) ;
- Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
- };
- CheckBox CB_USESSL
- {
- Pos = MAP_APPFONT ( 6 , 2*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT) ;
- Size = MAP_APPFONT ( PAGE_X - 12 , CHECKBOX_HEIGHT ) ;
- Text [ en-US ] = "Use secure connection (SSL)";
- HelpId = HID_DSADMIN_USESSL_LDAP;
- };
-
- FixedText FT_PORTNUMBER
- {
- Pos = MAP_APPFONT ( 6 , 3*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT) ;
- Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "~Port number";
- };
- NumericField NF_PORTNUMBER
- {
- TabStop = TRUE ;
- Border = TRUE ;
- HelpId = HID_DSADMIN_LDAP_PORTNUMBER;
- NoThousandSep = TRUE;
-
- Pos = MAP_APPFONT ( EDIT_X , 3*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT-1 + CHECKBOX_HEIGHT) ;
- Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
- };
- FixedText FT_LDAPROWCOUNT
- {
- Pos = MAP_APPFONT ( 6 , 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT ) ;
- Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "Maximum number of ~records";
- };
- NumericField NF_LDAPROWCOUNT
- {
- TabStop = TRUE ;
- Border = TRUE ;
- HelpId = HID_DSADMIN_LDAP_ROWCOUNT;
- NoThousandSep = TRUE;
-
- Pos = MAP_APPFONT ( EDIT_X , 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -1 + CHECKBOX_HEIGHT) ;
- Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
- };
-};
-
TabPage PAGE_USERDRIVER
{
SVLook = TRUE ;
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 0664f1e..165ef84 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -658,26 +658,22 @@ namespace dbaui
// OLDAPDetailsPage
OLDAPDetailsPage::OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs )
- :OCommonBehaviourTabPage(pParent, PAGE_LDAP, _rCoreAttrs,0,false)
- ,m_aFL_1 (this, ModuleRes( FL_SEPARATOR1) )
- ,m_aBaseDN (this, ModuleRes(FT_BASEDN))
- ,m_aETBaseDN (this, ModuleRes(ET_BASEDN))
- ,m_aCBUseSSL (this, ModuleRes(CB_USESSL))
- ,m_aPortNumber (this, ModuleRes(FT_PORTNUMBER))
- ,m_aNFPortNumber (this, ModuleRes(NF_PORTNUMBER))
- ,m_aFTRowCount (this, ModuleRes(FT_LDAPROWCOUNT))
- ,m_aNFRowCount (this, ModuleRes(NF_LDAPROWCOUNT))
+ :OCommonBehaviourTabPage(pParent, "LDAP", "dbaccess/ui/ldappage.ui", _rCoreAttrs, 0)
{
- m_aETBaseDN.SetModifyHdl(getControlModifiedLink());
- m_aCBUseSSL.SetToggleHdl(getControlModifiedLink());
- m_aNFPortNumber.SetModifyHdl(getControlModifiedLink());
- m_aNFRowCount.SetModifyHdl(getControlModifiedLink());
+ get(m_pETBaseDN, "baseDNEntry");
+ get(m_pCBUseSSL, "useSSLCheckbutton");
+ get(m_pNFPortNumber, "portNumberSpinbutton");
+ get(m_pNFRowCount, "LDAPRowCountspinbutton");
+
+ m_pETBaseDN->SetModifyHdl(getControlModifiedLink());
+ m_pCBUseSSL->SetToggleHdl(getControlModifiedLink());
+ m_pNFPortNumber->SetModifyHdl(getControlModifiedLink());
+ m_pNFRowCount->SetModifyHdl(getControlModifiedLink());
- m_aNFRowCount.SetUseThousandSep(false);
+ m_pNFRowCount->SetUseThousandSep(false);
m_iNormalPort = 389;
m_iSSLPort = 636;
- m_aCBUseSSL.SetClickHdl(LINK(this, OLDAPDetailsPage,OnCheckBoxClick));
- FreeResource();
+ m_pCBUseSSL->SetClickHdl(LINK(this, OLDAPDetailsPage,OnCheckBoxClick));
}
SfxTabPage* ODriversSettings::CreateLDAP( Window* pParent, const SfxItemSet* _rAttrSet )
@@ -689,47 +685,31 @@ namespace dbaui
{
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
- fillString(*_rSet,&m_aETBaseDN,DSID_CONN_LDAP_BASEDN,bChangedSomething);
- fillInt32(*_rSet,&m_aNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
- fillInt32(*_rSet,&m_aNFRowCount,DSID_CONN_LDAP_ROWCOUNT,bChangedSomething);
- fillBool(*_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething);
+ fillString(*_rSet,m_pETBaseDN,DSID_CONN_LDAP_BASEDN,bChangedSomething);
+ fillInt32(*_rSet,m_pNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
+ fillInt32(*_rSet,m_pNFRowCount,DSID_CONN_LDAP_ROWCOUNT,bChangedSomething);
+ fillBool(*_rSet,m_pCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething);
return bChangedSomething;
}
IMPL_LINK( OLDAPDetailsPage, OnCheckBoxClick, CheckBox*, pCheckBox )
{
callModifiedHdl();
- if ( pCheckBox == &m_aCBUseSSL)
+ if ( pCheckBox == m_pCBUseSSL)
{
- if ( m_aCBUseSSL.IsChecked() )
+ if ( m_pCBUseSSL->IsChecked() )
{
- m_iNormalPort = static_cast<sal_Int32>(m_aNFPortNumber.GetValue());
- m_aNFPortNumber.SetValue(m_iSSLPort);
+ m_iNormalPort = static_cast<sal_Int32>(m_pNFPortNumber->GetValue());
+ m_pNFPortNumber->SetValue(m_iSSLPort);
}
else
{
- m_iSSLPort = static_cast<sal_Int32>(m_aNFPortNumber.GetValue());
- m_aNFPortNumber.SetValue(m_iNormalPort);
+ m_iSSLPort = static_cast<sal_Int32>(m_pNFPortNumber->GetValue());
+ m_pNFPortNumber->SetValue(m_iNormalPort);
}
}
return 0;
}
- void OLDAPDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
- {
- OCommonBehaviourTabPage::fillControls(_rControlList);
- _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETBaseDN));
- _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBUseSSL));
- _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber));
- _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFRowCount));
- }
- void OLDAPDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
- {
- OCommonBehaviourTabPage::fillWindows(_rControlList);
- _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aBaseDN));
- _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aPortNumber));
- _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTRowCount));
- _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1));
- }
void OLDAPDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
{
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
@@ -743,10 +723,10 @@ namespace dbaui
if ( bValid )
{
- m_aETBaseDN.SetText(pBaseDN->GetValue());
- m_aNFPortNumber.SetValue(pPortNumber->GetValue());
- m_aNFRowCount.SetValue(pRowCount->GetValue());
- m_aCBUseSSL.Check(pUseSSL->GetValue());
+ m_pETBaseDN->SetText(pBaseDN->GetValue());
+ m_pNFPortNumber->SetValue(pPortNumber->GetValue());
+ m_pNFRowCount->SetValue(pRowCount->GetValue());
+ m_pCBUseSSL->Check(pUseSSL->GetValue());
}
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index 282ca26..840c01f 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -227,17 +227,11 @@ namespace dbaui
OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs );
protected:
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
- virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
- virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
private:
- FixedLine m_aFL_1;
- FixedText m_aBaseDN;
- Edit m_aETBaseDN;
- CheckBox m_aCBUseSSL;
- FixedText m_aPortNumber;
- NumericField m_aNFPortNumber;
- FixedText m_aFTRowCount;
- NumericField m_aNFRowCount;
+ Edit* m_pETBaseDN;
+ CheckBox* m_pCBUseSSL;
+ NumericField* m_pNFPortNumber;
+ NumericField* m_pNFRowCount;
sal_Int32 m_iSSLPort;
sal_Int32 m_iNormalPort;
diff --git a/dbaccess/uiconfig/ui/ldappage.ui b/dbaccess/uiconfig/ui/ldappage.ui
new file mode 100644
index 0000000..4c9faed
--- /dev/null
+++ b/dbaccess/uiconfig/ui/ldappage.ui
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="LDAP">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">2</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_Base DN</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">baseDNEntry</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="baseDNEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="useSSLCheckbutton">
+ <property name="label" translatable="yes">Use secure connection (SSL)</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">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="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_Port number</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">portNumberSpinbutton</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="portNumberSpinbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Maximum number of _records</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">LDAPRowCountspinbutton</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="LDAPRowCountspinbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="charsetheader">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Connection Settings</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>
More information about the Libreoffice-commits
mailing list