summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2014-08-03 13:44:00 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-04 10:38:30 +0000
commit0059f083e511bb6c7113ad62a72abf3d7618f9e1 (patch)
tree51bc22fceb65696ab804dc68ddf67152400784e6
parentdc2cd08af181e8f29ac403a242a15cf4cf7a5bd2 (diff)
PAGE_MYSQL_NATIVE and PAGE_DBWIZARD_MYSQL_NATIVE conversion to .ui
Change-Id: I5daec87637f1b3ad528c1f966a148adec7fae166 Reviewed-on: https://gerrit.libreoffice.org/10706 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
-rw-r--r--dbaccess/AllLangResTarget_dbu.mk1
-rw-r--r--dbaccess/UIConfig_dbaccess.mk3
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx1
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx14
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx3
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx136
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.hrc41
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.hxx26
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.src126
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.hrc5
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.src42
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.hrc34
-rw-r--r--dbaccess/source/ui/dlg/dbadminsetup.src33
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx1
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx77
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx12
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc2
-rw-r--r--dbaccess/uiconfig/ui/dbwizmysqlnativepage.ui89
-rw-r--r--dbaccess/uiconfig/ui/mysqlnativepage.ui228
-rw-r--r--dbaccess/uiconfig/ui/mysqlnativesettings.ui286
20 files changed, 735 insertions, 425 deletions
diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
index 11150f8e42fc..f44c2202a171 100644
--- a/dbaccess/AllLangResTarget_dbu.mk
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -36,7 +36,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/control/TableGrantCtrl.src \
dbaccess/source/ui/control/tabletree.src \
dbaccess/source/ui/control/undosqledit.src \
- dbaccess/source/ui/dlg/admincontrols.src \
dbaccess/source/ui/dlg/AutoControls.src \
dbaccess/source/ui/dlg/ConnectionPage.src \
dbaccess/source/ui/dlg/dbadmin2.src \
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 522c0096229d..0225fdb59e41 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -22,6 +22,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/copytablepage \
dbaccess/uiconfig/ui/dbaseindexdialog \
dbaccess/uiconfig/ui/dbwizmysqlintropage \
+ dbaccess/uiconfig/ui/dbwizmysqlnativepage \
dbaccess/uiconfig/ui/dbwizspreadsheetpage \
dbaccess/uiconfig/ui/dbwiztextpage \
dbaccess/uiconfig/ui/directsqldialog \
@@ -36,6 +37,8 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/ldapconnectionpage \
dbaccess/uiconfig/ui/migratepage \
+ dbaccess/uiconfig/ui/mysqlnativepage \
+ dbaccess/uiconfig/ui/mysqlnativesettings \
dbaccess/uiconfig/ui/password \
dbaccess/uiconfig/ui/preparepage \
dbaccess/uiconfig/ui/queryfilterdialog \
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 2c2d3fbe94e9..95174d5b30f4 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -19,7 +19,6 @@
#include "ConnectionPageSetup.hxx"
#include "AutoControls.hrc"
-#include "dbadminsetup.hrc"
#include "dbu_dlg.hrc"
#include <svl/itemset.hxx>
#include <unotools/pathoptions.hxx>
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 1d20da9c278a..d2363fedd187 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -23,7 +23,6 @@
#include "sqlmessage.hxx"
#include "dbu_resource.hrc"
#include "AutoControls.hrc"
-#include "dbadminsetup.hrc"
#include <svl/itemset.hxx>
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
@@ -291,18 +290,13 @@ using namespace ::com::sun::star;
// MySQLNativeSetupPage
MySQLNativeSetupPage::MySQLNativeSetupPage( Window* _pParent, const SfxItemSet& _rCoreAttrs )
- :OGenericAdministrationPage( _pParent, ModuleRes( PAGE_DBWIZARD_MYSQL_NATIVE ), _rCoreAttrs )
- ,m_aHeader ( this, ModuleRes( FT_SETUP_WIZARD_HEADER ) )
- ,m_aHelpText ( this, ModuleRes( FT_SETUP_WIZARD_HELP ) )
- ,m_aMySQLSettings ( *this, getControlModifiedLink() )
+ :OGenericAdministrationPage( _pParent, "DBWizMysqlNativePage", "dbaccess/ui/dbwizmysqlnativepage.ui", _rCoreAttrs )
+ ,m_aMySQLSettings ( *get<VclVBox>("MySQLSettingsContainer"), getControlModifiedLink() )
{
- SetControlFontWeight( &m_aHeader );
-
- LayoutHelper::positionBelow( m_aHelpText, m_aMySQLSettings, UnrelatedControls, 0 );
+ get(m_pHelpText, "helptext");
m_aMySQLSettings.Show();
SetRoadmapStateValue(false);
- FreeResource();
}
OGenericAdministrationPage* MySQLNativeSetupPage::Create( Window* pParent, const SfxItemSet& _rAttrSet )
@@ -317,7 +311,7 @@ using namespace ::com::sun::star;
void MySQLNativeSetupPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
- _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aHelpText ) );
+ _rControlList.push_back( new ODisableWrapper< FixedText >( m_pHelpText ) );
m_aMySQLSettings.fillWindows( _rControlList );
}
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 56f1185017af..6ffd08b5c770 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -107,8 +107,7 @@ namespace dbaui
class MySQLNativeSetupPage : public OGenericAdministrationPage
{
private:
- FixedText m_aHeader;
- FixedText m_aHelpText;
+ FixedText *m_pHelpText;
MySQLNativeSettings m_aMySQLSettings;
public:
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index e87ba7d33df8..c2b93d926b32 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -18,7 +18,6 @@
*/
#include "admincontrols.hxx"
-#include "admincontrols.hrc"
#include "dbu_dlg.hrc"
#include "dsitems.hxx"
#include "moduledbu.hxx"
@@ -127,45 +126,44 @@ namespace dbaui
// MySQLNativeSettings
MySQLNativeSettings::MySQLNativeSettings( Window& _rParent, const Link& _rControlModificationLink )
- :Control( &_rParent, ModuleRes( RID_MYSQL_NATIVE_SETTINGS ).SetAutoRelease( false ) )
- ,m_aDatabaseNameLabel ( this, ModuleRes( FT_MYSQL_DATABASE_NAME ) )
- ,m_aDatabaseName ( this, ModuleRes( ED_MYSQL_DATABASE_NAME ) )
- ,m_aHostPortRadio ( this, ModuleRes( RB_MYSQL_HOST_PORT ) )
- ,m_aSocketRadio ( this, ModuleRes( RB_MYSQL_SOCKET ) )
- ,m_aNamedPipeRadio ( this, ModuleRes( RB_MYSQL_NAMED_PIPE ) )
- ,m_aHostNameLabel ( this, ModuleRes( FT_COMMON_HOST_NAME ) )
- ,m_aHostName ( this, ModuleRes( ED_COMMON_HOST_NAME ) )
- ,m_aPortLabel ( this, ModuleRes( FT_COMMON_PORT ) )
- ,m_aPort ( this, ModuleRes( NF_COMMON_PORT ) )
- ,m_aDefaultPort ( this, ModuleRes( FT_COMMON_PORT_DEFAULT ) )
- ,m_aSocket ( this, ModuleRes( ED_MYSQL_SOCKET ) )
- ,m_aNamedPipe ( this, ModuleRes( ED_MYSQL_NAMED_PIPE ) )
+ :TabPage( &_rParent, "MysqlNativeSettings", "dbaccess/ui/mysqlnativesettings.ui" )
{
- FreeResource();
-
- m_aDatabaseName.SetModifyHdl( _rControlModificationLink );
- m_aHostName.SetModifyHdl( _rControlModificationLink );
- m_aPort.SetModifyHdl( _rControlModificationLink );
- m_aSocket.SetModifyHdl( _rControlModificationLink );
- m_aNamedPipe.SetModifyHdl( _rControlModificationLink );
- m_aSocketRadio.SetToggleHdl( _rControlModificationLink );
- m_aNamedPipeRadio.SetToggleHdl( _rControlModificationLink );
-
- m_aControlDependencies.enableOnRadioCheck( m_aHostPortRadio, m_aHostNameLabel, m_aHostName, m_aPortLabel, m_aPort, m_aDefaultPort );
- m_aControlDependencies.enableOnRadioCheck( m_aSocketRadio, m_aSocket );
- m_aControlDependencies.enableOnRadioCheck( m_aNamedPipeRadio, m_aNamedPipe );
+ get(m_pDatabaseNameLabel, "dbnamelabel");
+ get(m_pDatabaseName, "dbname");
+ get(m_pHostPortRadio, "hostport");
+ get(m_pSocketRadio, "socketlabel");
+ get(m_pNamedPipeRadio, "namedpipelabel");
+ get(m_pHostNameLabel, "serverlabel");
+ get(m_pHostName, "server");
+ get(m_pPortLabel, "portlabel");
+ get(m_pPort, "port");
+ get(m_pDefaultPort, "defaultport");
+ get(m_pSocket, "socket");
+ get(m_pNamedPipe, "namedpipe");
+
+ m_pDatabaseName->SetModifyHdl( _rControlModificationLink );
+ m_pHostName->SetModifyHdl( _rControlModificationLink );
+ m_pPort->SetModifyHdl( _rControlModificationLink );
+ m_pSocket->SetModifyHdl( _rControlModificationLink );
+ m_pNamedPipe->SetModifyHdl( _rControlModificationLink );
+ m_pSocketRadio->SetToggleHdl( _rControlModificationLink );
+ m_pNamedPipeRadio->SetToggleHdl( _rControlModificationLink );
+
+ m_aControlDependencies.enableOnRadioCheck( *m_pHostPortRadio, *m_pHostNameLabel, *m_pHostName, *m_pPortLabel, *m_pPort, *m_pDefaultPort );
+ m_aControlDependencies.enableOnRadioCheck( *m_pSocketRadio, *m_pSocket );
+ m_aControlDependencies.enableOnRadioCheck( *m_pNamedPipeRadio, *m_pNamedPipe );
m_aControlDependencies.addController( ::svt::PDialogController(
- new TextResetOperatorController( m_aHostName, OUString("localhost") )
+ new TextResetOperatorController( *m_pHostName, OUString("localhost") )
) );
// sockets are available on Unix systems only, named pipes only on Windows
#ifdef UNX
- m_aNamedPipeRadio.Hide();
- m_aNamedPipe.Hide();
+ m_pNamedPipeRadio->Hide();
+ m_pNamedPipe->Hide();
#else
- m_aSocketRadio.Hide();
- m_aSocket.Hide();
+ m_pSocketRadio->Hide();
+ m_pSocket->Hide();
#endif
}
@@ -175,34 +173,34 @@ namespace dbaui
void MySQLNativeSettings::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
- _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aDatabaseName ) );
- _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aHostName ) );
- _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aPort ) );
- _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aSocket ) );
- _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aNamedPipe ) );
+ _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pDatabaseName ) );
+ _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pHostName ) );
+ _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pPort ) );
+ _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pSocket ) );
+ _rControlList.push_back( new OSaveValueWrapper< Edit >( m_pNamedPipe ) );
}
void MySQLNativeSettings::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
{
- _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aDatabaseNameLabel ) );
- _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aHostNameLabel ) );
- _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aPortLabel ) );
- _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aDefaultPort ) );
- _rControlList.push_back( new ODisableWrapper< RadioButton >( &m_aSocketRadio ) );
- _rControlList.push_back( new ODisableWrapper< RadioButton >( &m_aNamedPipeRadio ) );
+ _rControlList.push_back( new ODisableWrapper< FixedText >( m_pDatabaseNameLabel ) );
+ _rControlList.push_back( new ODisableWrapper< FixedText >( m_pHostNameLabel ) );
+ _rControlList.push_back( new ODisableWrapper< FixedText >( m_pPortLabel ) );
+ _rControlList.push_back( new ODisableWrapper< FixedText >( m_pDefaultPort ) );
+ _rControlList.push_back( new ODisableWrapper< RadioButton >( m_pSocketRadio ) );
+ _rControlList.push_back( new ODisableWrapper< RadioButton >( m_pNamedPipeRadio ) );
}
bool MySQLNativeSettings::FillItemSet( SfxItemSet* _rSet )
{
bool bChangedSomething = false;
- OGenericAdministrationPage::fillString( *_rSet, &m_aHostName, DSID_CONN_HOSTNAME, bChangedSomething );
- OGenericAdministrationPage::fillString( *_rSet, &m_aDatabaseName, DSID_DATABASENAME, bChangedSomething );
- OGenericAdministrationPage::fillInt32 ( *_rSet, &m_aPort, DSID_MYSQL_PORTNUMBER, bChangedSomething );
+ OGenericAdministrationPage::fillString( *_rSet, m_pHostName, DSID_CONN_HOSTNAME, bChangedSomething );
+ OGenericAdministrationPage::fillString( *_rSet, m_pDatabaseName, DSID_DATABASENAME, bChangedSomething );
+ OGenericAdministrationPage::fillInt32 ( *_rSet, m_pPort, DSID_MYSQL_PORTNUMBER, bChangedSomething );
#ifdef UNX
- OGenericAdministrationPage::fillString( *_rSet, &m_aSocket, DSID_CONN_SOCKET, bChangedSomething );
+ OGenericAdministrationPage::fillString( *_rSet, m_pSocket, DSID_CONN_SOCKET, bChangedSomething );
#else
- OGenericAdministrationPage::fillString( *_rSet, &m_aNamedPipe, DSID_NAMED_PIPE, bChangedSomething );
+ OGenericAdministrationPage::fillString( *_rSet, m_pNamedPipe, DSID_NAMED_PIPE, bChangedSomething );
#endif
return bChangedSomething;
@@ -221,56 +219,56 @@ namespace dbaui
SFX_ITEMSET_GET( _rSet, pSocket, SfxStringItem, DSID_CONN_SOCKET, true );
SFX_ITEMSET_GET( _rSet, pNamedPipe, SfxStringItem, DSID_NAMED_PIPE, true );
- m_aDatabaseName.SetText( pDatabaseName->GetValue() );
- m_aDatabaseName.ClearModifyFlag();
+ m_pDatabaseName->SetText( pDatabaseName->GetValue() );
+ m_pDatabaseName->ClearModifyFlag();
- m_aHostName.SetText( pHostName->GetValue() );
- m_aHostName.ClearModifyFlag();
+ m_pHostName->SetText( pHostName->GetValue() );
+ m_pHostName->ClearModifyFlag();
- m_aPort.SetValue( pPortNumber->GetValue() );
- m_aPort.ClearModifyFlag();
+ m_pPort->SetValue( pPortNumber->GetValue() );
+ m_pPort->ClearModifyFlag();
- m_aSocket.SetText( pSocket->GetValue() );
- m_aSocket.ClearModifyFlag();
+ m_pSocket->SetText( pSocket->GetValue() );
+ m_pSocket->ClearModifyFlag();
- m_aNamedPipe.SetText( pNamedPipe->GetValue() );
- m_aNamedPipe.ClearModifyFlag();
+ m_pNamedPipe->SetText( pNamedPipe->GetValue() );
+ m_pNamedPipe->ClearModifyFlag();
// if a socket (on Unix) or a pipe name (on Windows) is given, this is preferred over
// the port
#ifdef UNX
- RadioButton& rSocketPipeRadio = m_aSocketRadio;
+ RadioButton& rSocketPipeRadio = *m_pSocketRadio;
const SfxStringItem* pSocketPipeItem = pSocket;
#else
- RadioButton& rSocketPipeRadio = m_aNamedPipeRadio;
+ RadioButton& rSocketPipeRadio = *m_pNamedPipeRadio;
const SfxStringItem* pSocketPipeItem = pNamedPipe;
#endif
OUString sSocketPipe( pSocketPipeItem->GetValue() );
if ( !sSocketPipe.isEmpty() )
rSocketPipeRadio.Check();
else
- m_aHostPortRadio.Check();
+ m_pHostPortRadio->Check();
}
bool MySQLNativeSettings::canAdvance() const
{
- if ( m_aDatabaseName.GetText().isEmpty() )
+ if ( m_pDatabaseName->GetText().isEmpty() )
return false;
- if ( m_aHostPortRadio.IsChecked()
- && ( ( m_aHostName.GetText().isEmpty() )
- || ( m_aPort.GetText().isEmpty() )
+ if ( m_pHostPortRadio->IsChecked()
+ && ( ( m_pHostName->GetText().isEmpty() )
+ || ( m_pPort->GetText().isEmpty() )
)
)
return false;
#ifdef UNX
- if ( ( m_aSocketRadio.IsChecked() )
- && ( m_aSocket.GetText().isEmpty() )
+ if ( ( m_pSocketRadio->IsChecked() )
+ && ( m_pSocket->GetText().isEmpty() )
)
#else
- if ( ( m_aNamedPipeRadio.IsChecked() )
- && ( m_aNamedPipe.GetText().isEmpty() )
+ if ( ( m_pNamedPipeRadio->IsChecked() )
+ && ( m_pNamedPipe->GetText().isEmpty() )
)
#endif
return false;
diff --git a/dbaccess/source/ui/dlg/admincontrols.hrc b/dbaccess/source/ui/dlg/admincontrols.hrc
deleted file mode 100644
index cd50b86e9c7a..000000000000
--- a/dbaccess/source/ui/dlg/admincontrols.hrc
+++ /dev/null
@@ -1,41 +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 ADMINCONTROLS_HRC
-#define ADMINCONTROLS_HRC
-
-#define FT_MYSQL_DATABASE_NAME 1
-#define FT_COMMON_HOST_NAME 2
-#define FT_COMMON_PORT_DEFAULT 3
-#define FT_COMMON_PORT 4
-
-#define RB_MYSQL_HOST_PORT 1
-#define RB_MYSQL_SOCKET 2
-#define RB_MYSQL_NAMED_PIPE 3
-
-#define ED_MYSQL_DATABASE_NAME 1
-#define ED_MYSQL_SOCKET 2
-#define ED_COMMON_HOST_NAME 3
-#define ED_MYSQL_NAMED_PIPE 4
-
-#define NF_COMMON_PORT 1
-
-#endif // ADMINCONTROLS_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index 8147c9c73faa..daff95a6a918 100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -32,21 +32,21 @@ namespace dbaui
{
// MySQLNativeSettings
- class MySQLNativeSettings : public Control
+ class MySQLNativeSettings : public TabPage
{
private:
- FixedText m_aDatabaseNameLabel;
- Edit m_aDatabaseName;
- RadioButton m_aHostPortRadio;
- RadioButton m_aSocketRadio;
- RadioButton m_aNamedPipeRadio;
- FixedText m_aHostNameLabel;
- Edit m_aHostName;
- FixedText m_aPortLabel;
- NumericField m_aPort;
- FixedText m_aDefaultPort;
- Edit m_aSocket;
- Edit m_aNamedPipe;
+ FixedText *m_pDatabaseNameLabel;
+ Edit *m_pDatabaseName;
+ RadioButton *m_pHostPortRadio;
+ RadioButton *m_pSocketRadio;
+ RadioButton *m_pNamedPipeRadio;
+ FixedText *m_pHostNameLabel;
+ Edit *m_pHostName;
+ FixedText *m_pPortLabel;
+ NumericField *m_pPort;
+ FixedText *m_pDefaultPort;
+ Edit *m_pSocket;
+ Edit *m_pNamedPipe;
::svt::ControlDependencyManager
m_aControlDependencies;
diff --git a/dbaccess/source/ui/dlg/admincontrols.src b/dbaccess/source/ui/dlg/admincontrols.src
deleted file mode 100644
index b933d72c7b74..000000000000
--- a/dbaccess/source/ui/dlg/admincontrols.src
+++ /dev/null
@@ -1,126 +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 .
- */
-
-#include "AutoControls.hrc"
-#include "dbu_dlg.hrc"
-#include "admincontrols.hrc"
-
-#define LINE_HEIGHT ( EDIT_HEIGHT + RELATED_CONTROLS )
-#define SETTINGS_CONTROL_WIDTH ( WIZARD_PAGE_X - 2 * START_X )
-#define COLUMN_WIDTH_1 80
-#define COLUMN_WIDTH_2 ( SETTINGS_CONTROL_WIDTH - COLUMN_WIDTH_1 )
-
-Control RID_MYSQL_NATIVE_SETTINGS
-{
- DialogControl = TRUE;
- Size = MAP_APPFONT( SETTINGS_CONTROL_WIDTH, 5 * LINE_HEIGHT );
- Hide = FALSE;
-
- FixedText FT_MYSQL_DATABASE_NAME
- {
- Pos = MAP_APPFONT ( 0, 2 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_1 - UNRELATED_CONTROLS, FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "~Database name";
- };
-
- Edit ED_MYSQL_DATABASE_NAME
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1, 0 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
- Border = TRUE;
- };
-
- RadioButton RB_MYSQL_HOST_PORT
- {
- Pos = MAP_APPFONT ( 0, LINE_HEIGHT );
- Size = MAP_APPFONT ( COLUMN_WIDTH_1, FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "Se~rver / Port" ;
- Group = TRUE;
- };
-
-#define OPTION_GROUP_START ( LINE_HEIGHT + FIXEDTEXT_HEIGHT + RELATED_CONTROLS )
-
- FixedText FT_COMMON_HOST_NAME
- {
- Pos = MAP_APPFONT ( INDENT_BELOW_RADIO, OPTION_GROUP_START + 2 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS - INDENT_BELOW_RADIO, FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "~Server" ;
- };
-
- Edit ED_COMMON_HOST_NAME
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START );
- Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
- Border = TRUE;
- };
-
- FixedText FT_COMMON_PORT
- {
- Pos = MAP_APPFONT ( INDENT_BELOW_RADIO, OPTION_GROUP_START + LINE_HEIGHT + 2 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS - INDENT_BELOW_RADIO, FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "~Port" ;
- Group = TRUE;
- };
-
- NumericField NF_COMMON_PORT
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + LINE_HEIGHT );
- Size = MAP_APPFONT ( 25, EDIT_HEIGHT );
- Border = TRUE;
- NoThousandSep = TRUE;
- Value = 3306;
- };
-
- FixedText FT_COMMON_PORT_DEFAULT
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1 + 25 + RELATED_CONTROLS, OPTION_GROUP_START + LINE_HEIGHT + 2 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_2 - 25 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT );
- Text[ en-US ] = "Default: 3306";
- };
-
- RadioButton RB_MYSQL_SOCKET
- {
- Pos = MAP_APPFONT ( 0, OPTION_GROUP_START + 2 * LINE_HEIGHT + 2 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "So~cket";
- };
-
- Edit ED_MYSQL_SOCKET
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + 2 * LINE_HEIGHT );
- Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
- Border = TRUE ;
- };
-
- RadioButton RB_MYSQL_NAMED_PIPE
- {
- Pos = MAP_APPFONT ( 0, OPTION_GROUP_START + 2 * LINE_HEIGHT + 2 );
- Size = MAP_APPFONT ( COLUMN_WIDTH_1 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT );
- Text [ en-US ] = "Named p~ipe";
- };
-
- Edit ED_MYSQL_NAMED_PIPE
- {
- Pos = MAP_APPFONT ( COLUMN_WIDTH_1, OPTION_GROUP_START + 2 * LINE_HEIGHT );
- Size = MAP_APPFONT ( COLUMN_WIDTH_2, EDIT_HEIGHT );
- Border = TRUE ;
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbadmin.hrc b/dbaccess/source/ui/dlg/dbadmin.hrc
index c5d65e61b0c8..75d39b6448e0 100644
--- a/dbaccess/source/ui/dlg/dbadmin.hrc
+++ b/dbaccess/source/ui/dlg/dbadmin.hrc
@@ -22,7 +22,6 @@
// control ids
-#define FT_USERNAME 3
#define FT_OPTIONS 5
#define FT_JDBCDRIVERCLASS 7
#define FT_SPECIAL_MESSAGE 8
@@ -31,7 +30,6 @@
#define FT_PORTNUMBER 12
#define FT_LDAPROWCOUNT 13
-#define ET_USERNAME 1
#define ET_OPTIONS 3
#define ET_JDBCDRIVERCLASS 4
#define ET_HOSTNAME 5
@@ -40,13 +38,10 @@
#define PB_INDICIES 1
#define PB_TESTDRIVERCLASS 5
-#define CB_PASSWORD_REQUIRED 1
#define CB_SHOWDELETEDROWS 2
#define CB_USESSL 3
#define CB_USECATALOG 4
-#define FL_SEPARATOR2 1
-
#define TLB_ACTIONS 1
#define NF_PORTNUMBER 1
diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src
index c28cabe1d7fa..4e89db903d7d 100644
--- a/dbaccess/source/ui/dlg/dbadmin.src
+++ b/dbaccess/source/ui/dlg/dbadmin.src
@@ -22,7 +22,6 @@
#include "dbu_dlg.hrc"
#include "dbadmin.hrc"
#include "browserids.hxx"
-#include "admincontrols.hrc"
#define AUTO_USECATALOG(AUTO_Y) \
CheckBox CB_USECATALOG \
@@ -218,47 +217,6 @@ TabPage PAGE_MYSQL_JDBC
AUTO_CHARSET( 5*UNRELATED_CONTROLS + RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT+ EDIT_HEIGHT, PAGE_X )
};
-TabPage PAGE_MYSQL_NATIVE
-{
- HelpID = "dbaccess:TabPage:PAGE_MYSQL_NATIVE";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0 , 0 ) ;
- Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
- Hide = TRUE;
-
- AUTO_FIXEDLINE_CONNSETTINGS( UNRELATED_CONTROLS )
-
- FixedLine FL_SEPARATOR2
- {
- Pos = MAP_APPFONT ( 3 , 4*UNRELATED_CONTROLS + 3*RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT ) ;
- Size = MAP_APPFONT ( PAGE_X - 6, FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "User authentication";
- };
- FixedText FT_USERNAME
- {
- Pos = MAP_APPFONT ( 6 , 4*UNRELATED_CONTROLS + 4*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT ) ;
- Size = MAP_APPFONT ( EDIT_X - 6 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "~User name" ;
- };
- Edit ET_USERNAME
- {
- HelpID = "dbaccess:Edit:PAGE_MYSQL_NATIVE:ET_USERNAME";
- Border = TRUE ;
- Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 4*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT - 1 ) ;
- Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
- TabStop = TRUE ;
- };
- CheckBox CB_PASSWORD_REQUIRED
- {
- HelpID = "dbaccess:CheckBox:PAGE_MYSQL_NATIVE:CB_PASSWORD_REQUIRED";
- Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 5*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 4*EDIT_HEIGHT ) ;
- Size = MAP_APPFONT ( 105, CHECKBOX_HEIGHT ) ;
- Text [ en-US ] = "Password required";
- };
-
- AUTO_CHARSET( 5*UNRELATED_CONTROLS + 5*RELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT + 4*EDIT_HEIGHT, PAGE_X )
-};
-
TabPage PAGE_ORACLE_JDBC
{
HelpID = "dbaccess:TabPage:PAGE_ORACLE_JDBC";
diff --git a/dbaccess/source/ui/dlg/dbadminsetup.hrc b/dbaccess/source/ui/dlg/dbadminsetup.hrc
deleted file mode 100644
index 3cdfea205ac2..000000000000
--- a/dbaccess/source/ui/dlg/dbadminsetup.hrc
+++ /dev/null
@@ -1,34 +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_DBADMINSETUP_HRC_
-#define _DBAUI_DBADMINSETUP_HRC_
-
-#include "dbaccess_helpid.hrc"
-#include "dbu_dlg.hrc"
-#include "browserids.hxx"
-
- // FREE
-#define FT_SETUP_WIZARD_HEADER 15
-#define FT_SETUP_WIZARD_HELP 16
-
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src
index 2cd1b5adeae3..802fc1f1a6a9 100644
--- a/dbaccess/source/ui/dlg/dbadminsetup.src
+++ b/dbaccess/source/ui/dlg/dbadminsetup.src
@@ -17,16 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "dbadminsetup.hrc"
#include "AutoControls.hrc"
-#define CHECKBOX_HEIGHT 8
-#define FIXEDTEXT_HEIGHT 8
-#define RELATED_CONTROLS 4
-#define UNRELATED_CONTROLS 7
-#define EDIT_HEIGHT 12
-#define EDIT_X 101
-
String STR_DBWIZARDTITLE
{
Text[ en-US ] = "Database Wizard" ;
@@ -128,31 +120,6 @@ String STR_MYSQL_DEFAULT
Text[ en-US ] = "Default: 3306";
};
-TabPage PAGE_DBWIZARD_MYSQL_NATIVE
-{
- HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_MYSQL_NATIVE";
- SVLook = TRUE ;
- Pos = MAP_APPFONT ( 0, 0 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ;
- Hide = TRUE ;
-
- FixedText FT_SETUP_WIZARD_HEADER
- {
- Pos = MAP_APPFONT ( START_X , 8 ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X - START_X - 12 , 2 * FIXEDTEXT_HEIGHT ) ;
- Text[ en-US ] = "Set up connection to a MySQL database" ;
- WordBreak = TRUE;
- };
-
- FixedText FT_SETUP_WIZARD_HELP
- {
- Pos = MAP_APPFONT ( START_X , INIT_Y ) ;
- Size = MAP_APPFONT ( WIZARD_PAGE_X - START_X - 12 , 3 * FIXEDTEXT_HEIGHT ) ;
- Text [ en-US ] = "Please enter the required information to connect to a MySQL database.";
- WordBreak = TRUE;
- };
-};
-
String STR_DBASE_HEADERTEXT
{
Text[ en-US ] = "Set up a connection to dBASE files" ;
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 2db0e8f2b2f4..c770779332ac 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -20,7 +20,6 @@
#include "dbwizsetup.hxx"
#include "dsmeta.hxx"
#include "DBSetupConnectionPages.hxx"
-#include "dbadminsetup.hrc"
#include "dbu_dlg.hrc"
#include "dsitems.hxx"
#include "dsnItem.hxx"
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 05802b95d91e..6d63fcee0ab8 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -75,6 +75,7 @@ namespace dbaui
,m_pAutoRetrievingLabel(NULL)
,m_pAutoRetrieving(NULL)
,m_nControlFlags(nControlFlags)
+ ,m_bDelete(true)
{
if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS)
@@ -131,6 +132,7 @@ namespace dbaui
,m_pAutoRetrievingLabel(NULL)
,m_pAutoRetrieving(NULL)
,m_nControlFlags(nControlFlags)
+ ,m_bDelete(false)
{
if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS)
@@ -156,20 +158,23 @@ namespace dbaui
OCommonBehaviourTabPage::~OCommonBehaviourTabPage()
{
- DELETEZ(m_pOptionsLabel);
- DELETEZ(m_pOptions);
+ if(m_bDelete)
+ {
+ DELETEZ(m_pOptionsLabel);
+ DELETEZ(m_pOptions);
- DELETEZ(m_pDataConvertFixedLine);
- DELETEZ(m_pCharsetLabel);
- DELETEZ(m_pCharset);
+ DELETEZ(m_pDataConvertFixedLine);
+ DELETEZ(m_pCharsetLabel);
+ DELETEZ(m_pCharset);
- DELETEZ(m_pAutoFixedLine);
- DELETEZ(m_pAutoIncrementLabel);
- DELETEZ(m_pAutoIncrement);
+ DELETEZ(m_pAutoFixedLine);
+ DELETEZ(m_pAutoIncrementLabel);
+ DELETEZ(m_pAutoIncrement);
- DELETEZ(m_pAutoRetrievingEnabled);
- DELETEZ(m_pAutoRetrievingLabel);
- DELETEZ(m_pAutoRetrieving);
+ DELETEZ(m_pAutoRetrievingEnabled);
+ DELETEZ(m_pAutoRetrievingLabel);
+ DELETEZ(m_pAutoRetrieving);
+ }
}
@@ -638,26 +643,18 @@ namespace dbaui
// MySQLNativePage
MySQLNativePage::MySQLNativePage( Window* pParent, const SfxItemSet& _rCoreAttrs )
- :OCommonBehaviourTabPage(pParent, PAGE_MYSQL_NATIVE, _rCoreAttrs, CBTP_USE_CHARSET, false )
- ,m_aSeparator1 ( this, ModuleRes( FL_SEPARATOR1) )
- ,m_aMySQLSettings ( *this, getControlModifiedLink() )
- ,m_aSeparator2 ( this, ModuleRes(FL_SEPARATOR2))
- ,m_aUserNameLabel ( this, ModuleRes(FT_USERNAME))
- ,m_aUserName ( this, ModuleRes(ET_USERNAME))
- ,m_aPasswordRequired ( this, ModuleRes(CB_PASSWORD_REQUIRED))
- {
- m_aUserName.SetModifyHdl(getControlModifiedLink());
-
- Window* pWindows[] = { &m_aMySQLSettings, &m_aSeparator2, &m_aUserNameLabel, &m_aUserName,
- &m_aPasswordRequired, m_pCharsetLabel, m_pCharset};
- sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
- for (sal_Int32 i=1; i < nCount; ++i)
- pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND);
+ :OCommonBehaviourTabPage(pParent, "MysqlNativePage", "dbaccess/ui/mysqlnativepage.ui", _rCoreAttrs, CBTP_USE_CHARSET )
+ ,m_aMySQLSettings ( *get<VclVBox>("MySQLSettingsContainer"), getControlModifiedLink() )
+ {
+ get(m_pSeparator1, "connectionheader");
+ get(m_pSeparator2, "userheader");
+ get(m_pUserNameLabel, "usernamelabel");
+ get(m_pUserName, "username");
+ get(m_pPasswordRequired, "passwordrequired");
- LayoutHelper::positionBelow( m_aSeparator1, m_aMySQLSettings, RelatedControls, 3 );
- m_aMySQLSettings.Show();
+ m_pUserName->SetModifyHdl(getControlModifiedLink());
- FreeResource();
+ m_aMySQLSettings.Show();
}
void MySQLNativePage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
@@ -665,17 +662,17 @@ namespace dbaui
OCommonBehaviourTabPage::fillControls( _rControlList );
m_aMySQLSettings.fillControls( _rControlList );
- _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aUserName));
- _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aPasswordRequired));
+ _rControlList.push_back(new OSaveValueWrapper<Edit>(m_pUserName));
+ _rControlList.push_back(new OSaveValueWrapper<CheckBox>(m_pPasswordRequired));
}
void MySQLNativePage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
{
OCommonBehaviourTabPage::fillWindows( _rControlList );
m_aMySQLSettings.fillWindows( _rControlList);
- _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aSeparator1));
- _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aSeparator2));
- _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aUserNameLabel));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(m_pSeparator1));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(m_pSeparator2));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(m_pUserNameLabel));
}
bool MySQLNativePage::FillItemSet( SfxItemSet* _rSet )
@@ -684,13 +681,13 @@ namespace dbaui
bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet );
- 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);
return bChangedSomething;
}
@@ -707,9 +704,9 @@ namespace dbaui
if ( bValid )
{
- m_aUserName.SetText(pUidItem->GetValue());
- m_aUserName.ClearModifyFlag();
- m_aPasswordRequired.Check(pAllowEmptyPwd->GetValue());
+ m_pUserName->SetText(pUidItem->GetValue());
+ m_pUserName->ClearModifyFlag();
+ m_pPasswordRequired->Check(pAllowEmptyPwd->GetValue());
}
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index 8ef5415e8294..1db9ee82508e 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -67,6 +67,8 @@ namespace dbaui
sal_uInt32 m_nControlFlags;
+ bool m_bDelete;
+
public:
virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) SAL_OVERRIDE;
@@ -213,13 +215,13 @@ namespace dbaui
const SfxItemSet& _rCoreAttrs );
private:
- FixedLine m_aSeparator1;
+ FixedText *m_pSeparator1;
MySQLNativeSettings m_aMySQLSettings;
- FixedLine m_aSeparator2;
- FixedText m_aUserNameLabel;
- Edit m_aUserName;
- CheckBox m_aPasswordRequired;
+ FixedText *m_pSeparator2;
+ FixedText *m_pUserNameLabel;
+ Edit *m_pUserName;
+ CheckBox *m_pPasswordRequired;
protected:
virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE;
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index f87497de3867..e7a261cc9084 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -113,7 +113,6 @@
#define PAGE_TABLESUBSCRIPTION RID_PAGE_START + 28
// FREE
-#define PAGE_DBWIZARD_MYSQL_NATIVE RID_PAGE_START + 57
// error boxes
@@ -188,7 +187,6 @@
// controls
#define RID_DB_TAB_EDITOR RID_CONTROL_START + 0
-#define RID_MYSQL_NATIVE_SETTINGS RID_CONTROL_START + 1
// strings
#define STR_TBL_TITLE RID_STR_GEN_START
diff --git a/dbaccess/uiconfig/ui/dbwizmysqlnativepage.ui b/dbaccess/uiconfig/ui/dbwizmysqlnativepage.ui
new file mode 100644
index 000000000000..df5b59c9dc83
--- /dev/null
+++ b/dbaccess/uiconfig/ui/dbwizmysqlnativepage.ui
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="DBWizMysqlNativePage">
+ <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="vexpand">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="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="helptext">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Please enter the required information to connect to a MySQL database.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">100</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="MySQLSettingsContainer">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="header">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Set up connection to a MySQL database</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/dbaccess/uiconfig/ui/mysqlnativepage.ui b/dbaccess/uiconfig/ui/mysqlnativepage.ui
new file mode 100644
index 000000000000..9c148854a32a
--- /dev/null
+++ b/dbaccess/uiconfig/ui/mysqlnativepage.ui
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkBox" id="MysqlNativePage">
+ <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="vexpand">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="GtkBox" id="MySQLSettingsContainer">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="connectionheader">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Connection Settings</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">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="grid1">
+ <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>
+ <object class="GtkLabel" id="usernamelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_User name</property>
+ <property name="use_underline">True</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="username">
+ <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="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="passwordrequired">
+ <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="use_action_appearance">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>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="userheader">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">User authentication</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <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="alignment3">
+ <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="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="charsetlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Character set</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">charset</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="dbulo-CharSetListBox" id="charset">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">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">Data conversion</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/dbaccess/uiconfig/ui/mysqlnativesettings.ui b/dbaccess/uiconfig/ui/mysqlnativesettings.ui
new file mode 100644
index 000000000000..5b2f1dc1f200
--- /dev/null
+++ b/dbaccess/uiconfig/ui/mysqlnativesettings.ui
@@ -0,0 +1,286 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkBox" id="MysqlNativeSettings">
+ <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="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="dbnamelabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Database name</property>
+ <property name="use_underline">True</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="dbname">
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="hostport">
+ <property name="label" translatable="yes">Se_rver / Port</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="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</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="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">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="serverlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Server</property>
+ <property name="use_underline">True</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="GtkLabel" id="portlabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Port</property>
+ <property name="use_underline">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="GtkEntry" id="server">
+ <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">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="defaultport">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Default: 3306</property>
+ </object>
+ <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>
+ <object class="GtkSpinButton" id="port">
+ <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="numeric">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>
+ <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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="socketlabel">
+ <property name="label" translatable="yes">So_cket</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="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">hostport</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="socket">
+ <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="left_attach">1</property>
+ <property name="top_attach">0</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">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="namedpipelabel">
+ <property name="label" translatable="yes">Named p_ipe</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="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">hostport</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="namedpipe">
+ <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="left_attach">1</property>
+ <property name="top_attach">0</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">4</property>
+ </packing>
+ </child>
+ </object>
+</interface>