summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-08-05 11:39:31 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-05 11:06:14 +0000
commit020e283970783d53f0c8a4b88ff7ae79f6f81618 (patch)
treed68b483a83bc97d012ae2bddb8d316e7028e960b
parentc05105151b730b5d1014475b7b89857bc486629f (diff)
Convert PAGE_CONNECTION to .ui
Change-Id: Id65d57b848280fee12384b4f470782a28233acd8 Reviewed-on: https://gerrit.libreoffice.org/10748 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx119
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.hrc45
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.hxx25
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.src110
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx10
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc1
-rw-r--r--dbaccess/uiconfig/ui/connectionpage.ui330
-rw-r--r--dbaccess/uiconfig/ui/dbwizconnectionpage.ui122
-rw-r--r--extensions/source/abpilot/abspilot.cxx2
10 files changed, 445 insertions, 320 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 52d2bf404550..0ac73bf65fb5 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/connectionpage \
dbaccess/uiconfig/ui/copytablepage \
dbaccess/uiconfig/ui/dbaseindexdialog \
+ dbaccess/uiconfig/ui/dbwizconnectionpage \
dbaccess/uiconfig/ui/dbwizmysqlintropage \
dbaccess/uiconfig/ui/dbwizmysqlnativepage \
dbaccess/uiconfig/ui/dbwizspreadsheetpage \
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index b3c05d6d9e23..1f925b7de155 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -19,7 +19,6 @@
#include <config_features.h>
#include "ConnectionPage.hxx"
-#include "ConnectionPage.hrc"
#include "dbu_dlg.hrc"
#include "dsmeta.hxx"
#if HAVE_FEATURE_JAVA
@@ -89,30 +88,26 @@ namespace dbaui
}
// OConnectionTabPage
OConnectionTabPage::OConnectionTabPage(Window* pParent, const SfxItemSet& _rCoreAttrs)
- :OConnectionHelper(pParent, ModuleRes(PAGE_CONNECTION), _rCoreAttrs)
- ,m_aFL1(this, ModuleRes(FL_SEPARATOR1))
- ,m_aFL2(this, ModuleRes(FL_SEPARATOR2))
- ,m_aUserNameLabel(this, ModuleRes(FT_USERNAME))
- ,m_aUserName(this, ModuleRes(ET_USERNAME))
- ,m_aPasswordRequired(this, ModuleRes(CB_PASSWORD_REQUIRED))
- ,m_aFL3(this, ModuleRes(FL_SEPARATOR3))
- ,m_aJavaDriverLabel(this, ModuleRes(FT_JDBCDRIVERCLASS))
- ,m_aJavaDriver(this, ModuleRes(ET_JDBCDRIVERCLASS))
- ,m_aTestJavaDriver(this, ModuleRes(PB_TESTDRIVERCLASS))
- ,m_aTestConnection(this, ModuleRes(PB_TESTCONNECTION))
+ :OConnectionHelper(pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rCoreAttrs)
{
- m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
- m_aJavaDriver.SetModifyHdl(getControlModifiedLink());
- m_aJavaDriver.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
- m_aUserName.SetModifyHdl(getControlModifiedLink());
- m_aPasswordRequired.SetClickHdl(getControlModifiedLink());
-
- m_aTestConnection.SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl));
- m_aTestJavaDriver.SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl));
+ get(m_pFL2, "userlabel");
+ get(m_pUserNameLabel, "userNameLabel");
+ get(m_pUserName, "userNameEntry");
+ get(m_pPasswordRequired, "passCheckbutton");
+ get(m_pFL3, "JDBCLabel");
+ get(m_pJavaDriverLabel, "javaDriverLabel");
+ get(m_pJavaDriver, "driverEntry");
+ get(m_pTestJavaDriver, "driverButton");
+ get(m_pTestConnection, "connectionButton");
- FreeResource();
+ m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
+ m_pJavaDriver->SetModifyHdl(getControlModifiedLink());
+ m_pJavaDriver->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
+ m_pUserName->SetModifyHdl(getControlModifiedLink());
+ m_pPasswordRequired->SetClickHdl(getControlModifiedLink());
- LayoutHelper::fitSizeRightAligned( m_aTestConnection );
+ m_pTestConnection->SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl));
+ m_pTestJavaDriver->SetClickHdl(LINK(this,OConnectionTabPage,OnTestJavaClickHdl));
}
OConnectionTabPage::~OConnectionTabPage()
@@ -128,7 +123,6 @@ namespace dbaui
m_eType = m_pAdminDialog->getDatasourceType(_rSet);
OConnectionHelper::implInitControls( _rSet, _bSaveValue);
- LocalResourceAccess aLocRes( PAGE_CONNECTION, RSC_TABPAGE );
::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(m_eType);
switch( eType )
{
@@ -188,7 +182,7 @@ namespace dbaui
m_pFT_Connection->SetText(OUString(ModuleRes(STR_NO_ADDITIONAL_SETTINGS)));
{
OUString sText = m_pFT_Connection->GetText();
- sText = sText.replaceAll("%test",m_aTestConnection.GetText());
+ sText = sText.replaceAll("%test",m_pTestConnection->GetText());
OUString sTemp;
sText = sText.replaceAll("~",sTemp);
m_pFT_Connection->SetText(sText);
@@ -207,12 +201,12 @@ namespace dbaui
bool bShowUser = ( eAuthMode == AuthUserPwd );
m_pPB_Connection->SetHelpId(HID_DSADMIN_BROWSECONN);
- m_aFL2.Show( bShowUserAuthenfication );
- m_aUserNameLabel.Show( bShowUser && bShowUserAuthenfication );
- m_aUserName.Show( bShowUser && bShowUserAuthenfication );
- m_aPasswordRequired.Show( bShowUserAuthenfication );
+ m_pFL2->Show( bShowUserAuthenfication );
+ m_pUserNameLabel->Show( bShowUser && bShowUserAuthenfication );
+ m_pUserName->Show( bShowUser && bShowUserAuthenfication );
+ m_pPasswordRequired->Show( bShowUserAuthenfication );
if ( !bShowUser && bShowUserAuthenfication )
- m_aPasswordRequired.SetPosPixel(m_aUserNameLabel.GetPosPixel());
+ m_pPasswordRequired->SetPosPixel(m_pUserNameLabel->GetPosPixel());
// collect the items
SFX_ITEMSET_GET(_rSet, pUidItem, SfxStringItem, DSID_USER, true);
@@ -224,8 +218,8 @@ namespace dbaui
// forward the values to the controls
if ( bValid )
{
- m_aUserName.SetText(pUidItem->GetValue());
- m_aPasswordRequired.Check(pAllowEmptyPwd->GetValue());
+ m_pUserName->SetText(pUidItem->GetValue());
+ m_pPasswordRequired->Check(pAllowEmptyPwd->GetValue());
OUString sUrl = pUrlItem->GetValue();
setURL( sUrl );
@@ -236,64 +230,43 @@ namespace dbaui
OUString sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
if ( !sDefaultJdbcDriverName.isEmpty() )
{
- m_aJavaDriver.SetText(sDefaultJdbcDriverName);
- m_aJavaDriver.SetModifyFlag();
+ m_pJavaDriver->SetText(sDefaultJdbcDriverName);
+ m_pJavaDriver->SetModifyFlag();
}
}
else
- m_aJavaDriver.SetText(pJdbcDrvItem->GetValue());
+ m_pJavaDriver->SetText(pJdbcDrvItem->GetValue());
- m_aJavaDriverLabel.Show(bEnableJDBC);
- m_aJavaDriver.Show(bEnableJDBC);
- m_aTestJavaDriver.Show(bEnableJDBC);
- m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().trim().isEmpty() );
- m_aFL3.Show(bEnableJDBC);
+ m_pJavaDriverLabel->Show(bEnableJDBC);
+ m_pJavaDriver->Show(bEnableJDBC);
+ m_pTestJavaDriver->Show(bEnableJDBC);
+ m_pTestJavaDriver->Enable( !m_pJavaDriver->GetText().trim().isEmpty() );
+ m_pFL3->Show(bEnableJDBC);
checkTestConnection();
- m_aUserName.ClearModifyFlag();
+ m_pUserName->ClearModifyFlag();
m_pConnectionURL->ClearModifyFlag();
- m_aJavaDriver.ClearModifyFlag();
+ m_pJavaDriver->ClearModifyFlag();
}
}
- void OConnectionTabPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
- {
- _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL1));
-
- _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL2));
- _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aJavaDriverLabel));
- _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aTestJavaDriver));
-
- _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL3));
- _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aUserNameLabel));
- _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aTestConnection));
- OConnectionHelper::fillWindows(_rControlList);
-
- }
- void OConnectionTabPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
- {
- _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aJavaDriver));
- _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aUserName));
- _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aPasswordRequired));
- OConnectionHelper::fillControls(_rControlList);
- }
bool OConnectionTabPage::FillItemSet(SfxItemSet* _rSet)
{
bool bChangedSomething = false;
- if (m_aUserName.IsValueChangedFromSaved())
+ if (m_pUserName->IsValueChangedFromSaved())
{
- _rSet->Put(SfxStringItem(DSID_USER, m_aUserName.GetText()));
+ _rSet->Put(SfxStringItem(DSID_USER, m_pUserName->GetText()));
_rSet->Put(SfxStringItem(DSID_PASSWORD, OUString()));
bChangedSomething = true;
}
- fillBool(*_rSet,&m_aPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething);
+ fillBool(*_rSet,m_pPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething);
if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC )
{
- fillString(*_rSet,&m_aJavaDriver, DSID_JDBCDRIVERCLASS, bChangedSomething);
+ fillString(*_rSet,m_pJavaDriver, DSID_JDBCDRIVERCLASS, bChangedSomething);
}
fillString(*_rSet,m_pConnectionURL, DSID_CONNECTURL, bChangedSomething);
@@ -307,11 +280,11 @@ namespace dbaui
#if HAVE_FEATURE_JAVA
try
{
- if ( !m_aJavaDriver.GetText().trim().isEmpty() )
+ if ( !m_pJavaDriver->GetText().trim().isEmpty() )
{
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( m_pAdminDialog->getORB() );
- m_aJavaDriver.SetText(m_aJavaDriver.GetText().trim()); // fdo#68341
- bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_aJavaDriver.GetText().trim());
+ m_pJavaDriver->SetText(m_pJavaDriver->GetText().trim()); // fdo#68341
+ bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_pJavaDriver->GetText().trim());
}
}
catch(Exception&)
@@ -330,14 +303,14 @@ namespace dbaui
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
bool bEnableTestConnection = !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty();
if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC )
- bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().trim().isEmpty());
- m_aTestConnection.Enable(bEnableTestConnection);
+ bEnableTestConnection = bEnableTestConnection && (!m_pJavaDriver->GetText().trim().isEmpty());
+ m_pTestConnection->Enable(bEnableTestConnection);
return true;
}
IMPL_LINK(OConnectionTabPage, OnEditModified, Edit*, _pEdit)
{
- if ( _pEdit == &m_aJavaDriver )
- m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().trim().isEmpty() );
+ if ( _pEdit == m_pJavaDriver )
+ m_pTestJavaDriver->Enable( !m_pJavaDriver->GetText().trim().isEmpty() );
checkTestConnection();
// tell the listener we were modified
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hrc b/dbaccess/source/ui/dlg/ConnectionPage.hrc
deleted file mode 100644
index 805c3dfb363e..000000000000
--- a/dbaccess/source/ui/dlg/ConnectionPage.hrc
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef DBAUI_CONNECTIONPAGE_HRC
-#define DBAUI_CONNECTIONPAGE_HRC
-
-// control ids
-
-#define FT_USERNAME 1
-#define FT_JDBCDRIVERCLASS 2
-#define FT_MYSQL_DATABASE_NAME 5
- // FREE
-#define FT_NO_ADDITIONAL_SETTINGS 10
-#define FT_HOSTNAME 11
-
-#define ET_USERNAME 1
-#define ET_JDBCDRIVERCLASS 2
-
-#define PB_TESTDRIVERCLASS 1
-#define PB_TESTCONNECTION 2
-
-#define CB_PASSWORD_REQUIRED 1
-
-#define FL_SEPARATOR2 1
-#define FL_SEPARATOR3 2
-
-#endif // DBAUI_CONNECTIONPAGE_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index 1a828ee95655..692d5536440f 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -35,22 +35,20 @@ namespace dbaui
class OConnectionTabPage : public OConnectionHelper
{
protected:
- // connection
- FixedLine m_aFL1;
// user authentification
- FixedLine m_aFL2;
- FixedText m_aUserNameLabel;
- Edit m_aUserName;
- CheckBox m_aPasswordRequired;
+ FixedText* m_pFL2;
+ FixedText* m_pUserNameLabel;
+ Edit* m_pUserName;
+ CheckBox* m_pPasswordRequired;
// jdbc driver
- FixedLine m_aFL3;
- FixedText m_aJavaDriverLabel;
- Edit m_aJavaDriver;
- PushButton m_aTestJavaDriver;
+ FixedText* m_pFL3;
+ FixedText* m_pJavaDriverLabel;
+ Edit* m_pJavaDriver;
+ PushButton* m_pTestJavaDriver;
// connection test
- PushButton m_aTestConnection;
+ PushButton* m_pTestConnection;
// called when the test connection button was clicked
DECL_LINK(OnTestJavaClickHdl,PushButton*);
@@ -74,11 +72,6 @@ namespace dbaui
// nControlFlags is a combination of the CBTP_xxx-constants
virtual ~OConnectionTabPage();
- // <method>OGenericAdministrationPage::fillControls</method>
- virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
- // <method>OGenericAdministrationPage::fillWindows</method>
- virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE;
-
private:
/** enables the test connection button, if allowed
*/
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src
index 428ed65d55c9..d48505ad8ac9 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.src
+++ b/dbaccess/source/ui/dlg/ConnectionPage.src
@@ -19,118 +19,8 @@
#include "dbaccess_helpid.hrc"
#include "dbu_dlg.hrc"
-#include "ConnectionPage.hrc"
#include "AutoControls.hrc"
-TabPage PAGE_CONNECTION
-{
- HelpID = "dbaccess:TabPage:PAGE_CONNECTION";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
- Hide = TRUE;
-
- FixedLine FL_SEPARATOR1
- {
- Pos = MAP_APPFONT ( 4 , UNRELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "General";
- };
-
- AUTO_BROWSECONTROLGROUP( 6, UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS, PAGE_X, HID_DSADMIN_URL_GENERAL, HID_DSADMIN_BROWSECONN)
-
- FixedText FT_NO_ADDITIONAL_SETTINGS
- {
- Hide = TRUE;
- WordBreak = TRUE;
- Pos = MAP_APPFONT ( 6 , UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( PAGE_X - 12 , 3*FIXEDTEXT_HEIGHT ) ;
- };
-
- FixedText FT_HOSTNAME
- {
- Hide = TRUE;
- Pos = MAP_APPFONT ( 6 , UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT + RELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( PAGE_X - 12 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "~Host name";
- };
-
- FixedLine FL_SEPARATOR2
- {
- Pos = MAP_APPFONT ( 4 , 3*FIXEDTEXT_HEIGHT + 3*UNRELATED_CONTROLS + RELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "User authentication";
- };
-
- FixedText FT_USERNAME
- {
- Pos = MAP_APPFONT ( 6 , 3*UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( 90 - 12 , FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "~User name" ;
- };
-
- Edit ET_USERNAME
- {
- HelpID = "dbaccess:Edit:PAGE_CONNECTION:ET_USERNAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 90 , 3*UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS -1 ) ;
- Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
- TabStop = TRUE ;
- };
-
- CheckBox CB_PASSWORD_REQUIRED
- {
- HelpID = "dbaccess:CheckBox:PAGE_CONNECTION:CB_PASSWORD_REQUIRED";
- Pos = MAP_APPFONT ( 90 , 4*UNRELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS ) ;
- Size = MAP_APPFONT ( 105 , CHECKBOX_HEIGHT ) ;
- Text [ en-US ] = "Password required";
- };
-
- FixedLine FL_SEPARATOR3
- {
- Pos = MAP_APPFONT ( 4 , 5*UNRELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS + CHECKBOX_HEIGHT) ;
-
- Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "JDBC properties";
- };
-
- FixedText FT_JDBCDRIVERCLASS
- {
- Pos = MAP_APPFONT ( 6 , 5*UNRELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + CHECKBOX_HEIGHT) ;
-
- Size = MAP_APPFONT ( 90 - 12 , FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "~JDBC driver class" ;
- };
-
- Edit ET_JDBCDRIVERCLASS
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 90 , 5*UNRELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + CHECKBOX_HEIGHT -1) ;
- Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
- TabStop = TRUE ;
- HelpId = HID_DSADMIN_DRIVERCLASS;
- };
-
- PushButton PB_TESTDRIVERCLASS
- {
- HelpID = "dbaccess:PushButton:PAGE_CONNECTION:PB_TESTDRIVERCLASS";
- TabStop = TRUE ;
- Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS , 5*UNRELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT + 3*RELATED_CONTROLS + CHECKBOX_HEIGHT -2 ) ;
- Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ;
- Text [ en-US ] = "Test Class" ;
- };
-
- PushButton PB_TESTCONNECTION
- {
- HelpID = "dbaccess:PushButton:PAGE_CONNECTION:PB_TESTCONNECTION";
- Pos = MAP_APPFONT ( PAGE_X - 75 - UNRELATED_CONTROLS, PAGE_Y - BUTTON_HEIGHT - UNRELATED_CONTROLS) ;
- Size = MAP_APPFONT ( 75 , BUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "Test Connection";
- };
-
-};
-
String STR_CONNECTION_TEST
{
Text [ en-US ] = "Connection Test";
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 95174d5b30f4..9717d6985743 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -67,27 +67,27 @@ namespace dbaui
OGenericAdministrationPage* OConnectionTabPageSetup::CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE);
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateMSAccessTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE);
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateADOTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL);
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateODBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE);
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, STR_ODBC_HELPTEXT, STR_ODBC_HEADERTEXT, STR_NAME_OF_ODBC_DATASOURCE);
}
OGenericAdministrationPage* OConnectionTabPageSetup::CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
{
- return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/connectionpage.ui", _rAttrSet, USHRT_MAX, USHRT_MAX, STR_COMMONURL);
+ return new OConnectionTabPageSetup( pParent, "ConnectionPage", "dbaccess/ui/dbwizconnectionpage.ui", _rAttrSet, USHRT_MAX, USHRT_MAX, STR_COMMONURL);
}
// OConnectionTabPageSetup
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index e7a261cc9084..f61c119cb6a8 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -93,7 +93,6 @@
#define PAGE_ODBC RID_PAGE_START + 3
#define PAGE_TEXT RID_PAGE_START + 4
// FREE
-#define PAGE_CONNECTION RID_PAGE_START + 6
#define PAGE_ADO RID_PAGE_START + 7
// FREE
#define TAB_WIZ_TYPE_SELECT RID_PAGE_START + 10
diff --git a/dbaccess/uiconfig/ui/connectionpage.ui b/dbaccess/uiconfig/ui/connectionpage.ui
index 81bb0aef1659..42dda385a1d7 100644
--- a/dbaccess/uiconfig/ui/connectionpage.ui
+++ b/dbaccess/uiconfig/ui/connectionpage.ui
@@ -11,14 +11,102 @@
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
- <object class="GtkLabel" id="header">
+ <object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="margin_bottom">12</property>
- <attributes>
- <attribute name="weight" value="semibold"/>
- </attributes>
+ <property name="valign">start</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="vexpand">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="row_spacing">2</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="browseurllabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Path to the dBASE files</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="dbulo-ConnectionURLEdit" id="browseurl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">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="create">
+ <property name="label" translatable="yes">_Create New</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">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="GtkButton" id="browse">
+ <property name="label" translatable="yes">_Browse</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</property>
+ </object>
+ <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>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="generalLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">General</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -27,14 +115,92 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="helptext">
+ <object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_bottom">6</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">label</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">60</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="userNameLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">_User name</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">userNameEntry</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="userNameEntry">
+ <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="passCheckbutton">
+ <property name="label" translatable="yes">Password required</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">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="userlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">User authentication</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
@@ -43,73 +209,82 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="grid1">
+ <object class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">2</property>
- <property name="column_spacing">6</property>
+ <property name="valign">start</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
<child>
- <object class="GtkLabel" id="browseurllabel">
+ <object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Path to the dBASE files</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="dbulo-ConnectionURLEdit" id="browseurl">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
<property name="hexpand">True</property>
- <property name="invisible_char">•</property>
- <property name="invisible_char_set">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="javaDriverLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_JDBC driver class</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">driverEntry</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="driverEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="driverButton">
+ <property name="label" translatable="yes">Test Class</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
</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="create">
- <property name="label" translatable="yes">_Create New</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">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="GtkButton" id="browse">
- <property name="label" translatable="yes">_Browse</property>
- <property name="use_action_appearance">False</property>
+ <child type="label">
+ <object class="GtkLabel" id="JDBCLabel">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">JDBC properties</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
</object>
- <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>
</object>
<packing>
@@ -118,5 +293,22 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="connectionButton">
+ <property name="label" translatable="yes">Test Connection</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="halign">end</property>
+ <property name="valign">end</property>
+ <property name="vexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</interface>
diff --git a/dbaccess/uiconfig/ui/dbwizconnectionpage.ui b/dbaccess/uiconfig/ui/dbwizconnectionpage.ui
new file mode 100644
index 000000000000..81bb0aef1659
--- /dev/null
+++ b/dbaccess/uiconfig/ui/dbwizconnectionpage.ui
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkBox" id="ConnectionPage">
+ <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="GtkLabel" id="header">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_bottom">12</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="helptext">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_bottom">6</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">label</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">60</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">2</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="browseurllabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="label" translatable="yes">Path to the dBASE files</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="dbulo-ConnectionURLEdit" id="browseurl">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">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="create">
+ <property name="label" translatable="yes">_Create New</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">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="GtkButton" id="browse">
+ <property name="label" translatable="yes">_Browse</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ </object>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx
index 01e2e73749e7..0e83f33bcb1b 100644
--- a/extensions/source/abpilot/abspilot.cxx
+++ b/extensions/source/abpilot/abspilot.cxx
@@ -128,7 +128,7 @@ namespace abp
typeSelectionChanged( m_aSettings.eType );
OUString sDialogTitle = ModuleRes(RID_STR_ABSOURCEDIALOGTITLE).toString();
- SetText(sDialogTitle);
+ setTitleBase(sDialogTitle);
SetHelpId(HID_ABSPILOT);
}