Kaydet (Commit) 0059f083 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) David Tardon

PAGE_MYSQL_NATIVE and PAGE_DBWIZARD_MYSQL_NATIVE conversion to .ui

Change-Id: I5daec87637f1b3ad528c1f966a148adec7fae166
Reviewed-on: https://gerrit.libreoffice.org/10706Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst dc2cd08a
......@@ -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 \
......
......@@ -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 \
......
......@@ -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>
......
......@@ -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 );
}
......
......@@ -107,8 +107,7 @@ namespace dbaui
class MySQLNativeSetupPage : public OGenericAdministrationPage
{
private:
FixedText m_aHeader;
FixedText m_aHelpText;
FixedText *m_pHelpText;
MySQLNativeSettings m_aMySQLSettings;
public:
......
/* -*- 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: */
......@@ -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;
......
/* -*- 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: */
......@@ -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
......
......@@ -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";
......
/* -*- 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: */
......@@ -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" ;
......
......@@ -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"
......
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
<?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>
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment