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

PAGE_DBWIZARD_TEXT, PAGE_TEXT, DLG_TEXT_CONNECTION_SETTINGS conversion to .ui

Change-Id: Iea5105cc33b436e9c0728df799b1ceb63f20e46e
Reviewed-on: https://gerrit.libreoffice.org/10579Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 8a406391
......@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/dlg/indexdialog.src \
dbaccess/source/ui/dlg/paramdialog.src \
dbaccess/source/ui/dlg/sqlmessage.src \
dbaccess/source/ui/dlg/textconnectionsettings.src \
dbaccess/source/ui/dlg/UserAdmin.src \
dbaccess/source/ui/misc/dbumiscres.src \
dbaccess/source/ui/misc/WizardPages.src \
......
......@@ -19,7 +19,9 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/colwidthdialog \
dbaccess/uiconfig/ui/copytablepage \
dbaccess/uiconfig/ui/dbaseindexdialog \
dbaccess/uiconfig/ui/dbwiztextpage \
dbaccess/uiconfig/ui/directsqldialog \
dbaccess/uiconfig/ui/emptypage \
dbaccess/uiconfig/ui/fielddialog \
dbaccess/uiconfig/ui/finalpagewizard \
dbaccess/uiconfig/ui/generalpagedialog \
......@@ -42,6 +44,8 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/tablesfilterdialog \
dbaccess/uiconfig/ui/tablesfilterpage \
dbaccess/uiconfig/ui/tablesjoindialog \
dbaccess/uiconfig/ui/textconnectionsettings \
dbaccess/uiconfig/ui/textpage \
dbaccess/uiconfig/ui/useradmindialog \
))
......
......@@ -39,6 +39,24 @@ namespace dbaui
}
}
CharSetListBox::CharSetListBox( Window* _pParent, WinBits _nBits = WB_DROPDOWN )
:ListBox( _pParent, _nBits )
{
SetDropDownLineCount( 20 );
OCharsetDisplay::const_iterator charSet = m_aCharSets.begin();
while ( charSet != m_aCharSets.end() )
{
InsertEntry( (*charSet).getDisplayName() );
++charSet;
}
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeCharSetListBox(Window *pParent)
{
return new CharSetListBox(pParent);
}
CharSetListBox::~CharSetListBox()
{
}
......
......@@ -33,6 +33,19 @@ OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,bo
{
}
OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, WinBits _nBits,bool _bShowPrefix)
:Edit(_pParent, _nBits)
,m_pTypeCollection(NULL)
,m_pForcedPrefix(NULL)
,m_bShowPrefix(_bShowPrefix)
{
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeConnectionURLEdit(Window *pParent)
{
return new OConnectionURLEdit(pParent, WB_BORDER, false);
}
OConnectionURLEdit::~OConnectionURLEdit()
{
// delete my sub controls
......
......@@ -92,25 +92,53 @@ namespace dbaui
OConnectionHelper::OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs)
: OGenericAdministrationPage(pParent, _rId, _rCoreAttrs)
, m_bUserGrabFocus(false)
, m_aFT_Connection(this, ResId(FT_AUTOBROWSEURL, *_rId.GetResMgr()))
, m_aConnectionURL(this, ResId(ET_AUTOBROWSEURL, *_rId.GetResMgr()))
, m_aPB_Connection(this, ResId(PB_AUTOBROWSEURL, *_rId.GetResMgr()))
, m_aPB_CreateDB(this, ResId(PB_CREATEDB, *_rId.GetResMgr()))
, m_pFT_Connection(new FixedText(this, ResId(FT_AUTOBROWSEURL, *_rId.GetResMgr())))
, m_pConnectionURL(new OConnectionURLEdit(this, ResId(ET_AUTOBROWSEURL, *_rId.GetResMgr())))
, m_pPB_Connection(new PushButton(this, ResId(PB_AUTOBROWSEURL, *_rId.GetResMgr())))
, m_pPB_CreateDB(new PushButton(this, ResId(PB_CREATEDB, *_rId.GetResMgr())))
, m_pCollection(NULL)
, m_bDelete(true)
{
// extract the datasource type collection from the item set
DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rCoreAttrs.GetItem(DSID_TYPECOLLECTION));
if (pCollectionItem)
m_pCollection = pCollectionItem->getCollection();
m_aPB_Connection.SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections));
m_aPB_CreateDB.SetClickHdl(LINK(this, OConnectionHelper, OnCreateDatabase));
m_pPB_Connection->SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections));
m_pPB_CreateDB->SetClickHdl(LINK(this, OConnectionHelper, OnCreateDatabase));
OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !");
m_aConnectionURL.SetTypeCollection(m_pCollection);
m_pConnectionURL->SetTypeCollection(m_pCollection);
}
OConnectionHelper::~OConnectionHelper()
OConnectionHelper::OConnectionHelper( Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs)
: OGenericAdministrationPage(pParent, _rId, _rUIXMLDescription, _rCoreAttrs)
, m_bUserGrabFocus(false)
, m_pCollection(NULL)
, m_bDelete(false)
{
get(m_pFT_Connection, "browseurllabel");
get(m_pConnectionURL, "browseurl");
get(m_pPB_Connection, "browse");
get(m_pPB_CreateDB, "create");
// extract the datasource type collection from the item set
DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rCoreAttrs.GetItem(DSID_TYPECOLLECTION));
if (pCollectionItem)
m_pCollection = pCollectionItem->getCollection();
m_pPB_Connection->SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections));
m_pPB_CreateDB->SetClickHdl(LINK(this, OConnectionHelper, OnCreateDatabase));
OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !");
m_pConnectionURL->SetTypeCollection(m_pCollection);
}
OConnectionHelper::~OConnectionHelper()
{
if(m_bDelete)
{
delete m_pFT_Connection;
delete m_pConnectionURL;
delete m_pPB_Connection;
delete m_pPB_CreateDB;
}
}
void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
......@@ -119,15 +147,15 @@ namespace dbaui
bool bValid, bReadonly;
getFlags(_rSet, bValid, bReadonly);
m_aFT_Connection.Show();
m_aConnectionURL.Show();
m_aConnectionURL.ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) );
m_pFT_Connection->Show();
m_pConnectionURL->Show();
m_pConnectionURL->ShowPrefix( ::dbaccess::DST_JDBC == m_pCollection->determineType(m_eType) );
bool bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType );
m_aPB_Connection.Show( bEnableBrowseButton );
m_pPB_Connection->Show( bEnableBrowseButton );
bool bEnableCreateButton = m_pCollection->supportsDBCreation( m_eType );
m_aPB_CreateDB.Show( bEnableCreateButton );
m_pPB_CreateDB->Show( bEnableCreateButton );
SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, true);
......@@ -138,7 +166,7 @@ namespace dbaui
setURL( sUrl );
checkTestConnection();
m_aConnectionURL.ClearModifyFlag();
m_pConnectionURL->ClearModifyFlag();
}
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
......@@ -398,9 +426,9 @@ namespace dbaui
}
if ( _bPrefix )
m_aConnectionURL.SetText( sURL );
m_pConnectionURL->SetText( sURL );
else
m_aConnectionURL.SetTextNoPrefix( sURL );
m_pConnectionURL->SetTextNoPrefix( sURL );
implUpdateURLDependentStates();
}
......@@ -408,7 +436,7 @@ namespace dbaui
OUString OConnectionHelper::impl_getURL( bool _bPrefix ) const
{
// get the pure text
OUString sURL = _bPrefix ? m_aConnectionURL.GetText() : OUString(m_aConnectionURL.GetTextNoPrefix());
OUString sURL = _bPrefix ? m_pConnectionURL->GetText() : OUString(m_pConnectionURL->GetTextNoPrefix());
OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
......@@ -555,14 +583,14 @@ namespace dbaui
switch (_rNEvt.GetType())
{
case EVENT_GETFOCUS:
if (m_aConnectionURL.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
if (m_pConnectionURL->IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
{ // a descendant of the URL edit field got the focus
m_aConnectionURL.SaveValueNoPrefix();
m_pConnectionURL->SaveValueNoPrefix();
}
break;
case EVENT_LOSEFOCUS:
if (m_aConnectionURL.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
if (m_pConnectionURL->IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
{ // a descendant of the URL edit field lost the focus
if (!commitURL())
return true; // handled
......@@ -644,22 +672,22 @@ namespace dbaui
void OConnectionHelper::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
{
_rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFT_Connection));
_rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPB_Connection));
_rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPB_CreateDB));
_rControlList.push_back(new ODisableWrapper<FixedText>(m_pFT_Connection));
_rControlList.push_back(new ODisableWrapper<PushButton>(m_pPB_Connection));
_rControlList.push_back(new ODisableWrapper<PushButton>(m_pPB_CreateDB));
}
void OConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
{
_rControlList.push_back( new OSaveValueWrapper<Edit>( &m_aConnectionURL ) );
_rControlList.push_back( new OSaveValueWrapper<Edit>( m_pConnectionURL ) );
}
bool OConnectionHelper::commitURL()
{
OUString sURL;
OUString sOldPath;
sOldPath = m_aConnectionURL.GetSavedValueNoPrefix();
sURL = m_aConnectionURL.GetTextNoPrefix();
sOldPath = m_pConnectionURL->GetSavedValueNoPrefix();
sURL = m_pConnectionURL->GetTextNoPrefix();
if ( m_pCollection->isFileSystemBased(m_eType) )
{
......@@ -691,7 +719,7 @@ namespace dbaui
{
case RET_RETRY:
m_bUserGrabFocus = false;
m_aConnectionURL.GrabFocus();
m_pConnectionURL->GrabFocus();
m_bUserGrabFocus = true;
return false;
......@@ -704,7 +732,7 @@ namespace dbaui
}
setURLNoPrefix(sURL);
m_aConnectionURL.SaveValueNoPrefix();
m_pConnectionURL->SaveValueNoPrefix();
return true;
}
void OConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen)
......
......@@ -41,11 +41,12 @@ namespace dbaui
public:
OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs);
OConnectionHelper( Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs);
virtual ~OConnectionHelper();
FixedText m_aFT_Connection;
OConnectionURLEdit m_aConnectionURL;
PushButton m_aPB_Connection;
PushButton m_aPB_CreateDB;
FixedText *m_pFT_Connection;
OConnectionURLEdit *m_pConnectionURL;
PushButton *m_pPB_Connection;
PushButton *m_pPB_CreateDB;
OUString m_eType; // the type can't be changed in this class, so we hold it as member.
public:
......@@ -95,6 +96,7 @@ namespace dbaui
OUString impl_getURL( bool _bPrefix ) const;
void impl_setURL( const OUString& _rURL, bool _bPrefix );
void implUpdateURLDependentStates() const;
bool m_bDelete;
};
} // namespace dbaui
......
......@@ -101,7 +101,7 @@ namespace dbaui
,m_aTestJavaDriver(this, ModuleRes(PB_TESTDRIVERCLASS))
,m_aTestConnection(this, ModuleRes(PB_TESTCONNECTION))
{
m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
m_aJavaDriver.SetModifyHdl(getControlModifiedLink());
m_aJavaDriver.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
m_aUserName.SetModifyHdl(getControlModifiedLink());
......@@ -133,50 +133,50 @@ namespace dbaui
switch( eType )
{
case ::dbaccess::DST_DBASE:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_DBASE_PATH_OR_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_DBASE_PATH);
m_pFT_Connection->SetText(OUString(ModuleRes(STR_DBASE_PATH_OR_FILE)));
m_pConnectionURL->SetHelpId(HID_DSADMIN_DBASE_PATH);
break;
case ::dbaccess::DST_FLAT:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_FLAT_PATH_OR_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_FLAT_PATH);
m_pFT_Connection->SetText(OUString(ModuleRes(STR_FLAT_PATH_OR_FILE)));
m_pConnectionURL->SetHelpId(HID_DSADMIN_FLAT_PATH);
break;
case ::dbaccess::DST_CALC:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_CALC_PATH_OR_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH);
m_pFT_Connection->SetText(OUString(ModuleRes(STR_CALC_PATH_OR_FILE)));
m_pConnectionURL->SetHelpId(HID_DSADMIN_CALC_PATH);
break;
case ::dbaccess::DST_ADO:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_COMMONURL)));
m_pFT_Connection->SetText(OUString(ModuleRes(STR_COMMONURL)));
break;
case ::dbaccess::DST_MSACCESS:
case ::dbaccess::DST_MSACCESS_2007:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_MSACCESS_MDB_FILE)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE);
m_pFT_Connection->SetText(OUString(ModuleRes(STR_MSACCESS_MDB_FILE)));
m_pConnectionURL->SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE);
break;
case ::dbaccess::DST_MYSQL_NATIVE:
case ::dbaccess::DST_MYSQL_JDBC:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_MYSQL_DATABASE_NAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_MYSQL_DATABASE );
m_pFT_Connection->SetText(OUString(ModuleRes(STR_MYSQL_DATABASE_NAME)));
m_pConnectionURL->SetHelpId( HID_DSADMIN_MYSQL_DATABASE );
break;
case ::dbaccess::DST_ORACLE_JDBC:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_ORACLE_DATABASE_NAME)));
m_aConnectionURL.SetHelpId(HID_DSADMIN_ORACLE_DATABASE);
m_pFT_Connection->SetText(OUString(ModuleRes(STR_ORACLE_DATABASE_NAME)));
m_pConnectionURL->SetHelpId(HID_DSADMIN_ORACLE_DATABASE);
break;
case ::dbaccess::DST_MYSQL_ODBC:
case ::dbaccess::DST_ODBC:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE)));
m_aConnectionURL.SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE);
m_pFT_Connection->SetText(OUString(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE)));
m_pConnectionURL->SetHelpId( eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE);
break;
case ::dbaccess::DST_LDAP:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_HOSTNAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME );
m_pFT_Connection->SetText(OUString(ModuleRes(STR_HOSTNAME)));
m_pConnectionURL->SetHelpId( HID_DSADMIN_LDAP_HOSTNAME );
break;
case ::dbaccess::DST_MOZILLA:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_MOZILLA_PROFILE_NAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME );
m_pFT_Connection->SetText(OUString(ModuleRes(STR_MOZILLA_PROFILE_NAME)));
m_pConnectionURL->SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME );
break;
case ::dbaccess::DST_THUNDERBIRD:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME)));
m_aConnectionURL.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME );
m_pFT_Connection->SetText(OUString(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME)));
m_pConnectionURL->SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME );
break;
case ::dbaccess::DST_OUTLOOK:
case ::dbaccess::DST_OUTLOOKEXP:
......@@ -185,19 +185,19 @@ namespace dbaui
case ::dbaccess::DST_EVOLUTION_LDAP:
case ::dbaccess::DST_KAB:
case ::dbaccess::DST_MACAB:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_NO_ADDITIONAL_SETTINGS)));
m_pFT_Connection->SetText(OUString(ModuleRes(STR_NO_ADDITIONAL_SETTINGS)));
{
OUString sText = m_aFT_Connection.GetText();
OUString sText = m_pFT_Connection->GetText();
sText = sText.replaceAll("%test",m_aTestConnection.GetText());
OUString sTemp;
sText = sText.replaceAll("~",sTemp);
m_aFT_Connection.SetText(sText);
m_pFT_Connection->SetText(sText);
}
m_aConnectionURL.Hide();
m_pConnectionURL->Hide();
break;
case ::dbaccess::DST_JDBC:
default:
m_aFT_Connection.SetText(OUString(ModuleRes(STR_COMMONURL)));
m_pFT_Connection->SetText(OUString(ModuleRes(STR_COMMONURL)));
break;
}
......@@ -206,7 +206,7 @@ namespace dbaui
bool bShowUserAuthenfication = ( eAuthMode != AuthNone );
bool bShowUser = ( eAuthMode == AuthUserPwd );
m_aPB_Connection.SetHelpId(HID_DSADMIN_BROWSECONN);
m_pPB_Connection->SetHelpId(HID_DSADMIN_BROWSECONN);
m_aFL2.Show( bShowUserAuthenfication );
m_aUserNameLabel.Show( bShowUser && bShowUserAuthenfication );
m_aUserName.Show( bShowUser && bShowUserAuthenfication );
......@@ -252,7 +252,7 @@ namespace dbaui
checkTestConnection();
m_aUserName.ClearModifyFlag();
m_aConnectionURL.ClearModifyFlag();
m_pConnectionURL->ClearModifyFlag();
m_aJavaDriver.ClearModifyFlag();
}
}
......@@ -296,7 +296,7 @@ namespace dbaui
fillString(*_rSet,&m_aJavaDriver, DSID_JDBCDRIVERCLASS, bChangedSomething);
}
fillString(*_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething);
fillString(*_rSet,m_pConnectionURL, DSID_CONNECTURL, bChangedSomething);
return bChangedSomething;
}
......@@ -328,7 +328,7 @@ namespace dbaui
bool OConnectionTabPage::checkTestConnection()
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty();
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);
......
......@@ -62,8 +62,8 @@ namespace dbaui
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(false); }
inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
inline void enableConnectionURL() { m_pConnectionURL->SetReadOnly(false); }
inline void disableConnectionURL() { m_pConnectionURL->SetReadOnly(); }
/** changes the connection URL.
<p>The new URL must be of the type which is currently selected, only the parts which do not
......
......@@ -105,16 +105,16 @@ namespace dbaui
OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId)
:OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs)
,m_bUserGrabFocus(true)
,m_aFT_HelpText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT))
,m_pHelpText(new FixedText(this, ModuleRes(FT_AUTOWIZARDHELPTEXT)))
{
if ( USHRT_MAX != _nHelpTextResId )
{
OUString sHelpText = ModuleRes(_nHelpTextResId);
m_aFT_HelpText.SetText(sHelpText);
m_pHelpText->SetText(sHelpText);
}
else
m_aFT_HelpText.Hide();
m_pHelpText->Hide();
if ( USHRT_MAX != _nHeaderResId )
SetHeaderText(FT_AUTOWIZARDHEADER, _nHeaderResId);
......@@ -122,26 +122,57 @@ namespace dbaui
if ( USHRT_MAX != _nUrlResId )
{
OUString sLabelText = ModuleRes(_nUrlResId);
m_aFT_Connection.SetText(sLabelText);
m_pFT_Connection->SetText(sLabelText);
if ( USHRT_MAX == _nHelpTextResId )
{
Point aPos = m_aFT_HelpText.GetPosPixel();
Point aFTPos = m_aFT_Connection.GetPosPixel();
Point aEDPos = m_aConnectionURL.GetPosPixel();
Point aPBPos = m_aPB_Connection.GetPosPixel();
Point aPos = m_pHelpText->GetPosPixel();
Point aFTPos = m_pFT_Connection->GetPosPixel();
Point aEDPos = m_pConnectionURL->GetPosPixel();
Point aPBPos = m_pPB_Connection->GetPosPixel();
aEDPos.Y() = aPos.Y() + aEDPos.Y() - aFTPos.Y();
aPBPos.Y() = aPos.Y() + aPBPos.Y() - aFTPos.Y();
aFTPos.Y() = aPos.Y();
m_aFT_Connection.SetPosPixel(aFTPos);
m_aConnectionURL.SetPosPixel(aEDPos);
m_aPB_Connection.SetPosPixel(aPBPos);
m_pFT_Connection->SetPosPixel(aFTPos);
m_pConnectionURL->SetPosPixel(aEDPos);
m_pPB_Connection->SetPosPixel(aPBPos);
}
}
else
m_aFT_Connection.Hide();
m_pFT_Connection->Hide();
m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified));
m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified));
SetRoadmapStateValue(false);
}
OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId)
:OConnectionHelper(pParent, _rId, _rUIXMLDescription, _rCoreAttrs)
,m_bUserGrabFocus(true)
{
get(m_pHelpText, "helptext");
get(m_pHeaderText, "header");
if ( USHRT_MAX != _nHelpTextResId )
{
OUString sHelpText = ModuleRes(_nHelpTextResId);
m_pHelpText->SetText(sHelpText);
}
else
m_pHelpText->Hide();
if ( USHRT_MAX != _nHeaderResId )
m_pHeaderText->SetText(ModuleRes(_nHeaderResId));
if ( USHRT_MAX != _nUrlResId )
{
OUString sLabelText = ModuleRes(_nUrlResId);
m_pFT_Connection->SetText(sLabelText);
}
else
m_pFT_Connection->Hide();
m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified));
SetRoadmapStateValue(false);
}
......@@ -183,12 +214,12 @@ namespace dbaui
bool OConnectionTabPageSetup::FillItemSet(SfxItemSet* _rSet)
{
bool bChangedSomething = false;
fillString(*_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething);
fillString(*_rSet,m_pConnectionURL, DSID_CONNECTURL, bChangedSomething);
return bChangedSomething;
}
bool OConnectionTabPageSetup::checkTestConnection()
{
return !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty();
return !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty();
}
IMPL_LINK(OConnectionTabPageSetup, OnEditModified, Edit*, /*_pEdit*/)
......
......@@ -39,7 +39,8 @@ namespace dbaui
bool m_bUserGrabFocus : 1;
protected:
FixedText m_aFT_HelpText;
FixedText *m_pHelpText;
FixedText *m_pHeaderText;
// called when the test connection button was clicked
DECL_LINK(OnEditModified,Edit*);
......@@ -56,8 +57,8 @@ namespace dbaui
virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE;
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) SAL_OVERRIDE;
inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(false); }
inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
inline void enableConnectionURL() { m_pConnectionURL->SetReadOnly(false); }
inline void disableConnectionURL() { m_pConnectionURL->SetReadOnly(); }
/** changes the connection URL.
<p>The new URL must be of the type which is currently selected, only the parts which do not
......@@ -68,6 +69,7 @@ namespace dbaui
protected:
OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
OConnectionTabPageSetup(Window* pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId);
virtual bool checkTestConnection() SAL_OVERRIDE;
// nControlFlags is a combination of the CBTP_xxx-constants
virtual ~OConnectionTabPageSetup();
......
......@@ -68,13 +68,11 @@ using namespace ::com::sun::star;
// OTextConnectionPageSetup
OTextConnectionPageSetup::OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
:OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_TEXT, _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE)
:OConnectionTabPageSetup(pParent, "DBWizTextPage", "dbaccess/ui/dbwiztextpage.ui", _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE)
{
m_pTextConnectionHelper = new OTextConnectionHelper( this, TC_EXTENSION | TC_SEPARATORS );
m_pTextConnectionHelper = new OTextConnectionHelper( get<VclVBox>("TextPageContainer"), TC_EXTENSION | TC_SEPARATORS );
m_pTextConnectionHelper->SetClickHandler(LINK( this, OTextConnectionPageSetup, ImplGetExtensionHdl ) );
FreeResource();
}
OTextConnectionPageSetup::~OTextConnectionPageSetup()
......@@ -596,7 +594,7 @@ using namespace ::com::sun::star;
bool OJDBCConnectionPageSetup::checkTestConnection()
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || !m_aConnectionURL.GetTextNoPrefix().isEmpty();
bool bEnableTestConnection = !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty();
bEnableTestConnection = bEnableTestConnection && (!m_aETDriverClass.GetText().isEmpty());
return bEnableTestConnection;
}
......
......@@ -40,7 +40,7 @@ namespace dbaui
#define TC_CHARSET ((short)0x08) // not yet implemented
// OTextConnectionPage
class OTextConnectionHelper : public Control
class OTextConnectionHelper : public TabPage
{
OTextConnectionHelper();
......@@ -51,25 +51,25 @@ namespace dbaui
virtual ~OTextConnectionHelper();
private:
FixedText m_aFTExtensionHeader;
RadioButton m_aRBAccessTextFiles;
RadioButton m_aRBAccessCSVFiles;
RadioButton m_aRBAccessOtherFiles;
Edit m_aETOwnExtension;
FixedText m_aFTExtensionExample;
FixedLine m_aLineFormat;
FixedText m_aFieldSeparatorLabel;
ComboBox m_aFieldSeparator;
FixedText m_aTextSeparatorLabel;
ComboBox m_aTextSeparator;
FixedText m_aDecimalSeparatorLabel;
ComboBox m_aDecimalSeparator;
FixedText m_aThousandsSeparatorLabel;
ComboBox m_aThousandsSeparator;
CheckBox m_aRowHeader;
FixedLine m_aCharSetHeader;
FixedText m_aCharSetLabel;
CharSetListBox m_aCharSet;
FixedText *m_pExtensionHeader;
RadioButton *m_pAccessTextFiles;
RadioButton *m_pAccessCSVFiles;
RadioButton *m_pAccessOtherFiles;
Edit *m_pOwnExtension;
FixedText *m_pExtensionExample;
FixedText *m_pFormatHeader;
FixedText *m_pFieldSeparatorLabel;
ComboBox *m_pFieldSeparator;
FixedText *m_pTextSeparatorLabel;
ComboBox *m_pTextSeparator;
FixedText *m_pDecimalSeparatorLabel;
ComboBox *m_pDecimalSeparator;
FixedText *m_pThousandsSeparatorLabel;
ComboBox *m_pThousandsSeparator;
CheckBox *m_pRowHeader;
FixedText *m_pCharSetHeader;
FixedText *m_pCharSetLabel;
CharSetListBox *m_pCharSet;
OUString m_aFieldSeparatorList;
OUString m_aTextSeparatorList;
OUString m_aTextNone;
......
......@@ -383,17 +383,6 @@ TabPage PAGE_LDAP
};
};
TabPage PAGE_TEXT
{
SVLook = TRUE ;
Hide = TRUE;
Pos = MAP_APPFONT ( 0 , 0 ) ;
Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
HelpId = HID_DSADMIN_PAGE_TEXT;
AUTO_SEPARATORCONTROLGROUP(UNRELATED_CONTROLS, PAGE_X)
};
TabPage PAGE_USERDRIVER
{
SVLook = TRUE ;
......@@ -470,4 +459,35 @@ String STR_UNSUPPORTED_DATASOURCE_TYPE
Text [ en-US ] = "This kind of data source is not supported on this platform.\nYou are allowed to change the settings, but you probably will not be able to connect to the database.";
};
String STR_AUTOTEXT_FIELD_SEP_NONE
{
Text[ en-US ] = "{None}";
};
String STR_AUTOTEXTSEPARATORLIST
{
Text = "\"\t34\t'\t39" ;
};
String STR_AUTOFIELDSEPARATORLIST
{
Text [ x-comment ] = "EM Dec 2002: 'Space' refers to what you get when you hit the space bar on your keyboard.";
Text [ en-US ] = ";\t59\t,\t44\t:\t58\t{Tab}\t9\t{Space}\t32" ;
};
String STR_AUTODELIMITER_MISSING
{
Text[ en-US ] = "#1 must be set." ;
};
String STR_AUTODELIMITER_MUST_DIFFER
{
Text[ en-US ] = "#1 and #2 must be different." ;
};
String STR_AUTONO_WILDCARDS
{
Text[ en-US ] = "Wildcards such as ?,* are not allowed in #1." ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -26,7 +26,6 @@
#define STR_DBASE_HELPTEXT 28
#define STR_MSACCESS_HELPTEXT 29
#define STR_TEXT_HELPTEXT 30
// FREE
#define STR_ADO_HELPTEXT 32
#define STR_JDBC_HELPTEXT 33
......@@ -37,7 +36,6 @@
#define STR_ORACLE_HELPTEXT 40
#define STR_DBASE_HEADERTEXT 41
#define STR_MSACCESS_HEADERTEXT 42
#define STR_TEXT_HEADERTEXT 43
// FREE
#define STR_ADO_HEADERTEXT 45
#define STR_JDBC_HEADERTEXT 46
......
......@@ -314,26 +314,21 @@ TabPage PAGE_DBWIZARD_DBASE
AUTO_HELP_BROWSECONTROLGROUP( 3, HID_PAGE_DBWIZARD_DBASE_ET_DBASELOCATION,HID_PAGE_DBWIZARD_DBASE_PB_DBASELOCATION)
};
TabPage PAGE_DBWIZARD_TEXT
{
HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_TEXT";
String STR_TEXT_HEADERTEXT
{
Text[ en-US ] = "Set up a connection to text files" ;
};
String STR_TEXT_HELPTEXT
{
Text[ en-US ] = "Select the folder where the CSV (Comma Separated Values) text files are stored. %PRODUCTNAME Base will open these files in read-only mode." ;
};
String STR_TEXT_HEADERTEXT
{
Text[ en-US ] = "Set up a connection to text files" ;
};
String STR_TEXT_PATH_OR_FILE{
Text[ en-US ] = "Path to text files";
};
String STR_TEXT_HELPTEXT
{
Text[ en-US ] = "Select the folder where the CSV (Comma Separated Values) text files are stored. %PRODUCTNAME Base will open these files in read-only mode." ;
};
AUTO_HELP_BROWSECONTROLGROUP(3, HID_PAGE_DBWIZARD_TEXT_ET_LOCATIONTEXTFILE,HID_PAGE_DBWIZARD_TEXT_PB_LOCATIONTEXTFILE)
AUTO_SEPARATORCONTROLGROUP(82, WIZARD_PAGE_X)
};
String STR_TEXT_PATH_OR_FILE
{
Text[ en-US ] = "Path to text files";
};
TabPage PAGE_DBWIZARD_MSACCESS
{
......
......@@ -115,6 +115,45 @@ namespace dbaui
FreeResource();
}
OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, const OString& rId, const OUString& rUIXMLDescription, const SfxItemSet& _rCoreAttrs,
sal_uInt32 nControlFlags)
:OGenericAdministrationPage(pParent, rId, rUIXMLDescription, _rCoreAttrs)
,m_pOptionsLabel(NULL)
,m_pOptions(NULL)
,m_pDataConvertFixedLine(NULL)
,m_pCharsetLabel(NULL)
,m_pCharset(NULL)
,m_pAutoFixedLine(NULL)
,m_pAutoRetrievingEnabled(NULL)
,m_pAutoIncrementLabel(NULL)
,m_pAutoIncrement(NULL)
,m_pAutoRetrievingLabel(NULL)
,m_pAutoRetrieving(NULL)
,m_nControlFlags(nControlFlags)
{
if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS)
{
m_pOptionsLabel = get<FixedText>("optionslabel");
m_pOptionsLabel->Show();
m_pOptions = get<Edit>("options");
m_pOptions->Show();
m_pOptions->SetModifyHdl(getControlModifiedLink());
}
if ((m_nControlFlags & CBTP_USE_CHARSET) == CBTP_USE_CHARSET)
{
m_pDataConvertLabel = get<FixedText>("charsetheader");
m_pDataConvertLabel->Show();
m_pCharsetLabel = get<FixedText>("charsetlabel");
m_pCharsetLabel->Show();
m_pCharset = get<CharSetListBox>("charset");
m_pCharset->Show();
m_pCharset->SetSelectHdl(getControlModifiedLink());
}
}
OCommonBehaviourTabPage::~OCommonBehaviourTabPage()
{
DELETEZ(m_pOptionsLabel);
......@@ -143,7 +182,7 @@ namespace dbaui
if ((m_nControlFlags & CBTP_USE_CHARSET) == CBTP_USE_CHARSET)
{
_rControlList.push_back(new ODisableWrapper<FixedLine>(m_pDataConvertFixedLine));
//_rControlList.push_back(new ODisableWrapper<FixedLine>(m_pDataConvertFixedLine));
_rControlList.push_back(new ODisableWrapper<FixedText>(m_pCharsetLabel));
}
}
......@@ -788,11 +827,10 @@ namespace dbaui
// OTextDetailsPage
OTextDetailsPage::OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs )
:OCommonBehaviourTabPage(pParent, PAGE_TEXT, _rCoreAttrs, 0, false )
:OCommonBehaviourTabPage(pParent, "EmptyPage", "dbaccess/ui/emptypage.ui", _rCoreAttrs, 0)
{
m_pTextConnectionHelper = new OTextConnectionHelper( this, TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET );
FreeResource();
m_pTextConnectionHelper = new OTextConnectionHelper( get<VclVBox>("EmptyPage"), TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET );
}
OTextDetailsPage::~OTextDetailsPage()
......
......@@ -54,6 +54,7 @@ namespace dbaui
Edit* m_pOptions;
FixedLine* m_pDataConvertFixedLine;
FixedText* m_pDataConvertLabel;
FixedText* m_pCharsetLabel;
CharSetListBox* m_pCharset;
......@@ -71,6 +72,7 @@ namespace dbaui
// nControlFlags is a combination of the CBTP_xxx-constants
OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource = true);
OCommonBehaviourTabPage(Window* pParent, const OString& rId, const OUString& rUIXMLDescription, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags);
protected:
virtual ~OCommonBehaviourTabPage();
......
......@@ -30,15 +30,13 @@ namespace dbaui
{
// TextConnectionSettingsDialog
TextConnectionSettingsDialog::TextConnectionSettingsDialog( Window* _pParent, SfxItemSet& _rItems )
:ModalDialog( _pParent, ModuleRes( DLG_TEXT_CONNECTION_SETTINGS ) )
,m_aOK( this, ModuleRes( 1 ) )
,m_aCancel( this, ModuleRes( 1 ) )
:ModalDialog( _pParent, "TextConnectionSettingsDialog", "dbaccess/ui/textconnectionsettings.ui" )
,m_rItems( _rItems )
{
m_pTextConnectionHelper.reset( new OTextConnectionHelper( this, TC_HEADER | TC_SEPARATORS | TC_CHARSET ) );
FreeResource();
get(m_pOK, "ok");
m_pTextConnectionHelper.reset( new OTextConnectionHelper( get<VclVBox>("TextPageContainer"), TC_HEADER | TC_SEPARATORS | TC_CHARSET ) );
m_aOK.SetClickHdl( LINK( this, TextConnectionSettingsDialog, OnOK ) );
m_pOK->SetClickHdl( LINK( this, TextConnectionSettingsDialog, OnOK ) );
}
TextConnectionSettingsDialog::~TextConnectionSettingsDialog()
......
/* -*- 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 "dbu_dlg.hrc"
#include "dbu_resource.hrc"
#include "AutoControls.hrc"
#define DIALOG_WIDTH 200
#define DIALOG_HEIGHT 160
ModalDialog DLG_TEXT_CONNECTION_SETTINGS
{
HelpID = "dbaccess:ModalDialog:DLG_TEXT_CONNECTION_SETTINGS";
Size = MAP_APPFONT( DIALOG_WIDTH, DIALOG_HEIGHT );
OutputSize = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Text [ en-US ] = "Text Connection Settings";
AUTO_SEPARATORCONTROLGROUP( UNRELATED_CONTROLS, DIALOG_WIDTH )
OKButton 1
{
Pos = MAP_APPFONT( DIALOG_WIDTH - 6 - BUTTON_WIDTH - RELATED_CONTROLS - BUTTON_WIDTH, DIALOG_HEIGHT - 6 - BUTTON_HEIGHT );
Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT );
DefButton = TRUE;
};
CancelButton 1
{
Pos = MAP_APPFONT( DIALOG_WIDTH - 6 - BUTTON_WIDTH, DIALOG_HEIGHT - 6 - BUTTON_HEIGHT );
Size = MAP_APPFONT( BUTTON_WIDTH, BUTTON_HEIGHT );
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -34,6 +34,7 @@ namespace dbaui
{
public:
CharSetListBox( Window* _pParent, const ResId& _rResId );
CharSetListBox( Window* _pParent, WinBits _nBits );
virtual ~CharSetListBox();
void SelectEntryByIanaName( const OUString& _rIanaName );
......
......@@ -42,6 +42,7 @@ class OConnectionURLEdit : public Edit
public:
OConnectionURLEdit(Window* pParent, const ResId& rResId,bool _bShowPrefix = false);
OConnectionURLEdit(Window* pParent, WinBits _nBits,bool _bShowPrefix = false);
virtual ~OConnectionURLEdit();
public:
......
......@@ -22,9 +22,9 @@
#include "dbu_resource.hrc"
#define PAGE_X 281
#define PAGE_Y 185
#define PAGE_Y 215
#define WIZARD_PAGE_X 225
#define WIZARD_PAGE_Y 210
#define WIZARD_PAGE_Y 240
#define START_X 6
#define CHECKBOX_HEIGHT 8
......@@ -83,6 +83,8 @@
#define STR_MSACCESS_FILTERNAME RID_STR_DLG_START + 39
#define STR_CONNECTION_NO_SUCCESS RID_STR_DLG_START + 40
#define STR_DBASE_PATH_OR_FILE RID_STR_DLG_START + 41
#define STR_TEXT_HEADERTEXT RID_STR_DLG_START + 42
#define STR_TEXT_HELPTEXT RID_STR_DLG_START + 43
#define STR_TEXT_PATH_OR_FILE RID_STR_DLG_START + 45
#define STR_FLAT_PATH_OR_FILE RID_STR_DLG_START + 46
#define STR_CALC_PATH_OR_FILE RID_STR_DLG_START + 47
......
......@@ -88,7 +88,6 @@
#define DLG_COLLECTION_VIEW RID_DIALOG_START + 27
#define DLG_DATABASE_TYPE_CHANGE RID_DIALOG_START + 28
#define DLG_DATABASE_WIZARD RID_DIALOG_START + 29
#define DLG_TEXT_CONNECTION_SETTINGS RID_DIALOG_START + 31
// tab pages
......@@ -117,7 +116,7 @@
#define PAGE_TABLESUBSCRIPTION RID_PAGE_START + 28
#define PAGE_DBWIZARD_DBASE RID_PAGE_START + 41
#define PAGE_DBWIZARD_TEXT RID_PAGE_START + 42
// FREE
#define PAGE_DBWIZARD_MSACCESS RID_PAGE_START + 43
#define PAGE_DBWIZARD_LDAP RID_PAGE_START + 44
// FREE
......@@ -255,6 +254,12 @@
#define STR_QRY_LABEL RID_STR_GEN_START + 44
#define STR_TITLE_RENAME RID_STR_GEN_START + 45
#define STR_TITLE_PASTE_AS RID_STR_GEN_START + 46
#define STR_AUTOFIELDSEPARATORLIST RID_STR_GEN_START + 47
#define STR_AUTOTEXTSEPARATORLIST RID_STR_GEN_START + 48
#define STR_AUTOTEXT_FIELD_SEP_NONE RID_STR_GEN_START + 49
#define STR_AUTODELIMITER_MISSING RID_STR_GEN_START + 50
#define STR_AUTODELIMITER_MUST_DIFFER RID_STR_GEN_START + 51
#define STR_AUTONO_WILDCARDS RID_STR_GEN_START + 52
// untyped resources
......
......@@ -49,8 +49,7 @@ namespace dbaui
private:
::std::auto_ptr< OTextConnectionHelper > m_pTextConnectionHelper;
OKButton m_aOK;
CancelButton m_aCancel;
OKButton *m_pOK;
SfxItemSet& m_rItems;
private:
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="DBWizTextPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="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="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="hexpand">True</property>
<property name="xalign">0</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="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="dbulo-ConnectionURLEdit" id="browseurl">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="browse">
<property name="label" translatable="yes">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>
</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>
<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>
</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="GtkLabel" id="browseurllabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">3</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</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>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="TextPageContainer">
<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>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkBox" id="EmptyPage">
<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>
<placeholder/>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="TextConnectionSettingsDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Text Connection Settings</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</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_stock">True</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="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="TextPageContainer">
<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>
<property name="spacing">6</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">ok</action-widget>
<action-widget response="0">cancel</action-widget>
</action-widgets>
</object>
</interface>
This diff is collapsed.
......@@ -54,6 +54,12 @@
<glade-widget-class title="OSQL NameEdit" name="dbulo-OSQLNameEdit"
generic-name="OSQLNameEdit" parent="GtkEntry"
icon-name="widget-gtk-textentry"/>
<glade-widget-class title="CharSetListBox" name="dbulo-CharSetListBox"
generic-name="CharSetListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
<glade-widget-class title="ConnectionURLEdit" name="dbulo-ConnectionURLEdit"
generic-name="ConnectionURLEdit" parent="GtkEntry"
icon-name="widget-gtk-entry"/>
<glade-widget-class title="VclComboBoxText" name="VclComboBoxText"
generic-name="ComboBoxText" parent="GtkComboBoxText"
......
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