summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-16 07:31:09 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-16 07:31:09 +0000
commitb5345a6f8629478c9e543c494063bfec51ddbf74 (patch)
treec95338ebbc74ec5f2472a815b3d2f876134d81bb /dbaccess
parentcaa3bf5c34c08e5e93a03deb3064792139f030bb (diff)
CWS-TOOLING: integrate CWS mysql1
2009-01-29 13:25:23 +0100 fs r267126 : #i98559# 2009-01-29 10:29:23 +0100 fs r267100 : #i98559# 2009-01-29 09:56:20 +0100 fs r267098 : do not display empty schematas in the table list in the query designer 2009-01-29 09:40:28 +0100 fs r267097 : corrected acceptsURL 2009-01-28 11:17:42 +0100 fs r267042 : display empty catalogs/schemas, if indicated by the connection settings 2009-01-28 11:14:30 +0100 fs r267040 : +displayEmptyTableFolders 2009-01-28 11:03:28 +0100 fs r267036 : mysql:mysqlc, not mysql:mysql, for the native driver 2009-01-28 10:23:53 +0100 fs r267031 : select the first catalog/schema, if the guess for the current one did not match 2009-01-28 10:22:23 +0100 fs r267030 : select the first catalog/schema, if the guess for the current one did not match 2009-01-27 15:03:29 +0100 fs r266996 : #i10000# 2009-01-27 14:56:13 +0100 fs r266992 : #i20563# better (more dedicated) UI for the MySQL native driver's properties 2009-01-27 08:20:24 +0100 oj r266953 : enable sdbcx mysql driver for mysqlc 2009-01-27 08:20:09 +0100 oj r266952 : enable sdbcx mysql driver for mysqlc
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx6
-rw-r--r--dbaccess/source/core/resource/strings.src2
-rw-r--r--dbaccess/source/filter/xml/xmlServerDatabase.cxx8
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx73
-rw-r--r--dbaccess/source/ui/dlg/AutoControls_tmpl.hrc6
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx86
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.hxx25
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx32
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.hxx11
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.cxx10
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPageSetup.hxx11
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx13
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx1
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.cxx58
-rw-r--r--dbaccess/source/ui/dlg/dbadmin.src68
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx8
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx124
-rw-r--r--dbaccess/source/ui/dlg/detailpages.hxx32
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx2
-rw-r--r--dbaccess/source/ui/inc/dbadmin.hxx7
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc2
-rw-r--r--dbaccess/source/ui/inc/tabletree.hxx3
23 files changed, 411 insertions, 179 deletions
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 94f4f9fd26bc..30ec32935cd5 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -494,8 +494,8 @@ DATASOURCE_TYPE ODsnTypeCollection::implDetermineType(const String& _rDsn) const
return DST_FLAT;
if (_rDsn.EqualsIgnoreCaseAscii("sdbc:calc:", 0, nSeparator))
return DST_CALC;
- if ( ( 11 <= nSeparator) && _rDsn.EqualsIgnoreCaseAscii("sdbc:mysqlc:", 0, nSeparator))
- return DST_MYSQL_NATIVE;
+ //if ( ( 11 <= nSeparator) && _rDsn.EqualsIgnoreCaseAscii("sdbc:mysqlc:", 0, nSeparator))
+ // return DST_MYSQL_NATIVE;
if (_rDsn.EqualsIgnoreCaseAscii("sdbc:embedded:hsqldb", 0, _rDsn.Len()))
return DST_EMBEDDED_HSQLDB;
@@ -537,6 +537,8 @@ DATASOURCE_TYPE ODsnTypeCollection::implDetermineType(const String& _rDsn) const
return DST_MYSQL_ODBC;
if (_rDsn.EqualsIgnoreCaseAscii("sdbc:mysql:jdbc", 0, nSeparator))
return DST_MYSQL_JDBC;
+ if (_rDsn.EqualsIgnoreCaseAscii("sdbc:mysql:mysqlc", 0, nSeparator))
+ return DST_MYSQL_NATIVE;
DBG_ERROR("ODsnTypeCollection::implDetermineType : unrecognized data source type !");
return DST_UNKNOWN;
diff --git a/dbaccess/source/core/resource/strings.src b/dbaccess/source/core/resource/strings.src
index ae81cd48ff03..23ad6023cbbc 100644
--- a/dbaccess/source/core/resource/strings.src
+++ b/dbaccess/source/core/resource/strings.src
@@ -337,7 +337,7 @@ Resource RSC_DATASOURCE_TYPES
};
String STR_MYSQL_NATIVE
{
- Text ="sdbc:mysqlc:";
+ Text ="sdbc:mysql:mysqlc:";
};
};
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
index 9c473766336c..7f400f62f63c 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -112,9 +112,13 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
if ( sType.getLength() )
{
::rtl::OUStringBuffer sURL;
- if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysql:jdbc" ) ) )
+ if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysql:jdbc" ) )
+ || sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysqlc" ) )
+ || sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysql:mysqlc" ) )
+ )
{
- sURL.appendAscii("sdbc:mysql:jdbc:");
+ sURL.append( sType );
+ sURL.append( sal_Unicode( ':' ) );
sURL.append(sHostName);
if ( sPortNumber.getLength() )
{
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index 2f469a948b64..43a5728411ee 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -97,6 +97,8 @@
#ifndef _RTL_USTRBUF_HXX_
#include <rtl/ustrbuf.hxx>
#endif
+#include <connectivity/dbmetadata.hxx>
+
#include <algorithm>
//.........................................................................
@@ -126,6 +128,7 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, const Reference< XMultiSe
:OMarkableTreeListBox(pParent,_rxORB,nWinStyle)
,m_pImageProvider( new ImageProvider )
,m_bVirtualRoot(_bVirtualRoot)
+ ,m_bNoEmptyFolders( false )
{
implSetDefaultImages();
}
@@ -134,6 +137,7 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, const Reference< XMultiSe
:OMarkableTreeListBox(pParent,_rxORB,rResId)
,m_pImageProvider( new ImageProvider )
,m_bVirtualRoot(_bVirtualRoot)
+ ,m_bNoEmptyFolders( false )
{
implSetDefaultImages();
}
@@ -302,6 +306,26 @@ void OTableTreeListBox::UpdateTableList(
}
UpdateTableList( _rxConnection, aTables );
}
+
+//------------------------------------------------------------------------
+namespace
+{
+ ::std::vector< ::rtl::OUString > lcl_getMetaDataStrings_throw( const Reference< XResultSet >& _rxMetaDataResult, sal_Int32 _nColumnIndex )
+ {
+ ::std::vector< ::rtl::OUString > aStrings;
+ Reference< XRow > xRow( _rxMetaDataResult, UNO_QUERY_THROW );
+ while ( _rxMetaDataResult->next() )
+ aStrings.push_back( xRow->getString( _nColumnIndex ) );
+ return aStrings;
+ }
+
+ bool lcl_shouldDisplayEmptySchemasAndCatalogs( const Reference< XConnection >& _rxConnection )
+ {
+ ::dbtools::DatabaseMetaData aMetaData( _rxConnection );
+ return aMetaData.displayEmptyTableFolders();
+ }
+}
+
//------------------------------------------------------------------------
void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConnection, const TNames& _rTables )
{
@@ -349,6 +373,35 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn
sal_False
);
}
+
+ if ( !m_bNoEmptyFolders && lcl_shouldDisplayEmptySchemasAndCatalogs( _rxConnection ) )
+ {
+ sal_Bool bSupportsCatalogs = xMeta->supportsCatalogsInDataManipulation();
+ sal_Bool bSupportsSchemas = xMeta->supportsSchemasInDataManipulation();
+
+ if ( bSupportsCatalogs || bSupportsSchemas )
+ {
+ // we display empty catalogs if the DB supports catalogs, and they're noted at the beginning of a
+ // composed name. Otherwise, we display empty schematas. (also see the tree structure explained in
+ // implAddEntry)
+ bool bCatalogs = bSupportsCatalogs && xMeta->isCatalogAtStart();
+
+ ::std::vector< ::rtl::OUString > aFolderNames( lcl_getMetaDataStrings_throw(
+ bCatalogs ? xMeta->getCatalogs() : xMeta->getSchemas(), 1 ) );
+ sal_Int32 nFolderType = bCatalogs ? DatabaseObjectContainer::CATALOG : DatabaseObjectContainer::SCHEMA;
+
+ SvLBoxEntry* pRootEntry = getAllObjectsEntry();
+ for ( ::std::vector< ::rtl::OUString >::const_iterator folder = aFolderNames.begin();
+ folder != aFolderNames.end();
+ ++folder
+ )
+ {
+ SvLBoxEntry* pFolder = GetEntryPosByName( *folder, pRootEntry );
+ if ( !pFolder )
+ pFolder = InsertEntry( *folder, pRootEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFolderType ) );
+ }
+ }
+ }
}
catch ( const Exception& )
{
@@ -474,24 +527,24 @@ SvLBoxEntry* OTableTreeListBox::implAddEntry(
// +- catalog
// +- table
sal_Bool bCatalogAtStart = _rxMeta->isCatalogAtStart();
- ::rtl::OUString& nFirstName = bCatalogAtStart ? sCatalog : sSchema;
- sal_Int32 nFirstFolderType = bCatalogAtStart ? DatabaseObjectContainer::CATALOG : DatabaseObjectContainer::SCHEMA;
- ::rtl::OUString& nSecondName = bCatalogAtStart ? sSchema : sCatalog;
- sal_Int32 nSecondFolderType = bCatalogAtStart ? DatabaseObjectContainer::SCHEMA : DatabaseObjectContainer::CATALOG;
+ const ::rtl::OUString& rFirstName = bCatalogAtStart ? sCatalog : sSchema;
+ const sal_Int32 nFirstFolderType = bCatalogAtStart ? DatabaseObjectContainer::CATALOG : DatabaseObjectContainer::SCHEMA;
+ const ::rtl::OUString& rSecondName = bCatalogAtStart ? sSchema : sCatalog;
+ const sal_Int32 nSecondFolderType = bCatalogAtStart ? DatabaseObjectContainer::SCHEMA : DatabaseObjectContainer::CATALOG;
- if ( nFirstName.getLength() )
+ if ( rFirstName.getLength() )
{
- SvLBoxEntry* pFolder = GetEntryPosByName( nFirstName, pParentEntry );
+ SvLBoxEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( nFirstName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
+ pFolder = InsertEntry( rFirstName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) );
pParentEntry = pFolder;
}
- if ( nSecondName.getLength() )
+ if ( rSecondName.getLength() )
{
- SvLBoxEntry* pFolder = GetEntryPosByName( nSecondName, pParentEntry );
+ SvLBoxEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry );
if ( !pFolder )
- pFolder = InsertEntry( nSecondName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
+ pFolder = InsertEntry( rSecondName, pParentEntry, FALSE, LIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) );
pParentEntry = pFolder;
}
diff --git a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc
index 97e50641bd40..6a72f9fe4295 100644
--- a/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc
+++ b/dbaccess/source/ui/dlg/AutoControls_tmpl.hrc
@@ -169,7 +169,7 @@
Edit ET_AUTODATABASENAME \
{ \
Pos = MAP_APPFONT ( EDIT_X, AUTO_Y) ; \
- Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
+ Size = MAP_APPFONT ( 97, EDIT_HEIGHT ) ; \
HelpId = AUTO_HID; \
TabStop = TRUE ; \
Border = TRUE ; \
@@ -498,15 +498,13 @@
Pos = MAP_APPFONT (START_X , AUTO_Y +2) ; \
Size = MAP_APPFONT ( EDIT_X - START_X - UNRELATED_CONTROLS , FIXEDTEXT_HEIGHT ) ; \
Text = "Socket" ; \
- Hide = TRUE ; \
}; \
\
Edit ET_SOCKET \
{ \
Pos = MAP_APPFONT (EDIT_X, AUTO_Y ) ; \
- Size = MAP_APPFONT ( 60, EDIT_HEIGHT ) ; \
+ Size = MAP_APPFONT ( 97, EDIT_HEIGHT ) ; \
TabStop = TRUE ; \
- Hide = TRUE ; \
Border = TRUE ; \
};
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 9c2e2d91fb98..f9a01133b215 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -193,9 +193,9 @@ DBG_NAME(OConnectionHelper)
OConnectionHelper::OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs)
:OGenericAdministrationPage(pParent, _rId, _rCoreAttrs)
- ,m_aFT_Connection(this, ResId(FT_AUTOBROWSEURL,*_rId.GetResMgr()))
- ,m_aET_Connection(this, ResId(ET_AUTOBROWSEURL,*_rId.GetResMgr()))
- ,m_aPB_Connection(this, ResId(PB_AUTOBROWSEURL,*_rId.GetResMgr()))
+ ,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() ) )
{
DBG_CTOR(OConnectionHelper,NULL);
@@ -222,15 +222,12 @@ DBG_NAME(OConnectionHelper)
sal_Bool bValid, bReadonly;
getFlags(_rSet, bValid, bReadonly);
- BOOL bEnableBrowseButton = m_pCollection->supportsBrowsing(m_eType);
m_aFT_Connection.Show();
- m_aET_Connection.Show();
- m_aET_Connection.ShowPrefix( ::dbaccess::DST_JDBC == m_eType );
- m_aPB_Connection.Show(sal_True);
+ m_aConnectionURL.Show();
+ m_aConnectionURL.ShowPrefix( ::dbaccess::DST_JDBC == m_eType );
- LocalResourceAccess aLocRes( PAGE_CONNECTION, RSC_TABPAGE );
-
- m_aPB_Connection.Show(bEnableBrowseButton);
+ BOOL bEnableBrowseButton = m_pCollection->supportsBrowsing( m_eType );
+ m_aPB_Connection.Show( bEnableBrowseButton );
SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
@@ -241,7 +238,7 @@ DBG_NAME(OConnectionHelper)
setURL( sUrl );
checkTestConnection();
- m_aET_Connection.ClearModifyFlag();
+ m_aConnectionURL.ClearModifyFlag();
}
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
@@ -527,10 +524,10 @@ DBG_NAME(OConnectionHelper)
}
//-------------------------------------------------------------------------
- void OConnectionHelper::implSetURL( const String& _rURL, sal_Bool _bPrefix )
+ void OConnectionHelper::impl_setURL( const String& _rURL, sal_Bool _bPrefix )
{
String sURL( _rURL );
- DBG_ASSERT( m_pCollection, "OConnectionHelper::implSetURL: have no interpreter for the URLs!" );
+ DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" );
if ( m_pCollection && sURL.Len() )
{
@@ -563,20 +560,20 @@ DBG_NAME(OConnectionHelper)
}
if ( _bPrefix )
- m_aET_Connection.SetText( sURL );
+ m_aConnectionURL.SetText( sURL );
else
- m_aET_Connection.SetTextNoPrefix( sURL );
+ m_aConnectionURL.SetTextNoPrefix( sURL );
implUpdateURLDependentStates();
}
//-------------------------------------------------------------------------
- String OConnectionHelper::implGetURL( sal_Bool _bPrefix ) const
+ String OConnectionHelper::impl_getURL( sal_Bool _bPrefix ) const
{
// get the pure text
- String sURL = _bPrefix ? m_aET_Connection.GetText() : m_aET_Connection.GetTextNoPrefix();
+ String sURL = _bPrefix ? m_aConnectionURL.GetText() : m_aConnectionURL.GetTextNoPrefix();
- DBG_ASSERT( m_pCollection, "OConnectionHelper::implGetURL: have no interpreter for the URLs!" );
+ DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
if ( m_pCollection && sURL.Len() )
{
@@ -612,19 +609,19 @@ DBG_NAME(OConnectionHelper)
//-------------------------------------------------------------------------
void OConnectionHelper::setURL( const String& _rURL )
{
- implSetURL( _rURL, sal_True );
+ impl_setURL( _rURL, sal_True );
}
//-------------------------------------------------------------------------
String OConnectionHelper::getURLNoPrefix( ) const
{
- return implGetURL( sal_False );
+ return impl_getURL( sal_False );
}
//-------------------------------------------------------------------------
void OConnectionHelper::setURLNoPrefix( const String& _rURL )
{
- implSetURL( _rURL, sal_False );
+ impl_setURL( _rURL, sal_False );
}
//-------------------------------------------------------------------------
@@ -820,14 +817,14 @@ DBG_NAME(OConnectionHelper)
switch (_rNEvt.GetType())
{
case EVENT_GETFOCUS:
- if (m_aET_Connection.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
+ if (m_aConnectionURL.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
{ // a descendant of the URL edit field got the focus
- m_aET_Connection.SaveValueNoPrefix();
+ m_aConnectionURL.SaveValueNoPrefix();
}
break;
case EVENT_LOSEFOCUS:
- if (m_aET_Connection.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
+ if (m_aConnectionURL.IsWindowOrChild(_rNEvt.GetWindow()) && m_bUserGrabFocus)
{ // a descendant of the URL edit field lost the focus
if (!commitURL())
return 1L; // handled
@@ -923,7 +920,7 @@ DBG_NAME(OConnectionHelper)
// -----------------------------------------------------------------------
void OConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
{
- _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aET_Connection));
+ _rControlList.push_back( new OSaveValueWrapper<Edit>( &m_aConnectionURL ) );
}
//-------------------------------------------------------------------------
@@ -931,15 +928,18 @@ DBG_NAME(OConnectionHelper)
{
String sURL;
String sOldPath;
- sOldPath = m_aET_Connection.GetSavedValueNoPrefix();
- sURL = m_aET_Connection.GetTextNoPrefix();
- if ( ( ::dbaccess::DST_DBASE == m_eType)
- || ( ::dbaccess::DST_FLAT == m_eType)
- || ( ::dbaccess::DST_MSACCESS == m_eType)
- || ( ::dbaccess::DST_MSACCESS_2007 == m_eType)
- || ( ::dbaccess::DST_CALC == m_eType) )
+ sOldPath = m_aConnectionURL.GetSavedValueNoPrefix();
+ sURL = m_aConnectionURL.GetTextNoPrefix();
+
+ switch ( m_eType )
+ {
+ case ::dbaccess::DST_DBASE:
+ case ::dbaccess::DST_FLAT:
+ case ::dbaccess::DST_MSACCESS:
+ case ::dbaccess::DST_MSACCESS_2007:
+ case ::dbaccess::DST_CALC:
{
- if ((sURL != sOldPath) && (0 != sURL.Len()))
+ if ( ( sURL != sOldPath ) && ( 0 != sURL.Len() ) )
{ // the text changed since entering the control
// the path may be in system notation ....
@@ -958,11 +958,6 @@ DBG_NAME(OConnectionHelper)
callModifiedHdl();
return sal_False;
}
- else
- {
-// setURLNoPrefix(sURL);
-// m_aET_Connection.SaveValueNoPrefix();
- }
}
else
{
@@ -970,25 +965,24 @@ DBG_NAME(OConnectionHelper)
{
case RET_RETRY:
m_bUserGrabFocus = sal_False;
- m_aET_Connection.GrabFocus();
+ m_aConnectionURL.GrabFocus();
m_bUserGrabFocus = sal_True;
return sal_False;
case RET_CANCEL:
setURLNoPrefix(sOldPath);
return sal_False;
-
- default:
- // accept the input
-// setURLNoPrefix(sURL);
-// m_aET_Connection.SaveValueNoPrefix();
- break;
}
}
}
}
+ break;
+ default:
+ break;
+ }
+
setURLNoPrefix(sURL);
- m_aET_Connection.SaveValueNoPrefix();
+ m_aConnectionURL.SaveValueNoPrefix();
return sal_True;
}
//-------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
index c25751960648..cb9e4ff19816 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx
@@ -75,7 +75,7 @@ namespace dbaui
OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs);
virtual ~OConnectionHelper();
FixedText m_aFT_Connection;
- OConnectionURLEdit m_aET_Connection;
+ OConnectionURLEdit m_aConnectionURL;
PushButton m_aPB_Connection;
::dbaccess::DATASOURCE_TYPE
m_eType; // the type can't be changed in this class, so we hold it as member.
@@ -96,8 +96,8 @@ namespace dbaui
// setting/retrieving the current connection URL
// necessary because for some types, the URL must be decoded for display purposes
- String getURL( OConnectionURLEdit* _m_pConnection ) const;
- void setURL( const String& _rURL, OConnectionURLEdit* _m_pConnection );
+ //String getURL( OConnectionURLEdit* _m_pConnection ) const;
+ //void setURL( const String& _rURL, OConnectionURLEdit* _m_pConnection );
String getURLNoPrefix( ) const;
void setURLNoPrefix( const String& _rURL );
@@ -122,19 +122,20 @@ namespace dbaui
virtual void SetServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB)
{
OGenericAdministrationPage::SetServiceFactory(_rxORB);
- m_aET_Connection.initializeTypeCollection(m_xORB);
+ m_aConnectionURL.initializeTypeCollection(m_xORB);
}
protected:
+ void setURL( const String& _rURL );
+ virtual bool checkTestConnection();
+
+ private:
DECL_LINK(OnBrowseConnections, PushButton*);
- void setURL( const String& _rURL );
- String implGetURL( sal_Bool _bPrefix ) const;
- void implSetURL( const String& _rURL, sal_Bool _bPrefix );
- StringBag getInstalledAdabasDBDirs(const String &_rPath,const ::ucbhelper::ResultSetInclude& _reResultSetInclude);
- StringBag getInstalledAdabasDBs(const String &_rConfigDir,const String &_rWorkDir);
- virtual bool checkTestConnection();
-
- void implUpdateURLDependentStates() const;
+ StringBag getInstalledAdabasDBDirs(const String &_rPath,const ::ucbhelper::ResultSetInclude& _reResultSetInclude);
+ StringBag getInstalledAdabasDBs(const String &_rConfigDir,const String &_rWorkDir);
+ String impl_getURL( sal_Bool _bPrefix ) const;
+ void impl_setURL( const String& _rURL, sal_Bool _bPrefix );
+ void implUpdateURLDependentStates() const;
};
//.........................................................................
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index 9b7f2484cc88..24d7a62d149b 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -212,7 +212,7 @@ namespace dbaui
,m_aTestConnection(this, ModuleRes(PB_TESTCONNECTION))
{
DBG_CTOR(OConnectionTabPage,NULL);
- m_aET_Connection.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
+ m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
m_aJavaDriver.SetModifyHdl(getControlModifiedLink());
m_aJavaDriver.SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified));
m_aUserName.SetModifyHdl(getControlModifiedLink());
@@ -251,19 +251,19 @@ namespace dbaui
{
case ::dbaccess::DST_DBASE:
m_aFT_Connection.SetText(String(ModuleRes(STR_DBASE_PATH_OR_FILE)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_DBASE_PATH);
+ m_aConnectionURL.SetHelpId(HID_DSADMIN_DBASE_PATH);
break;
case ::dbaccess::DST_FLAT:
m_aFT_Connection.SetText(String(ModuleRes(STR_FLAT_PATH_OR_FILE)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_FLAT_PATH);
+ m_aConnectionURL.SetHelpId(HID_DSADMIN_FLAT_PATH);
break;
case ::dbaccess::DST_CALC:
m_aFT_Connection.SetText(String(ModuleRes(STR_CALC_PATH_OR_FILE)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_CALC_PATH);
+ m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH);
break;
case ::dbaccess::DST_ADABAS:
m_aFT_Connection.SetText(String(ModuleRes(STR_ADABAS_DATABASE_NAME)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_ADABAS_DATABASE);
+ m_aConnectionURL.SetHelpId(HID_DSADMIN_ADABAS_DATABASE);
break;
case ::dbaccess::DST_ADO:
m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL)));
@@ -271,33 +271,33 @@ namespace dbaui
case ::dbaccess::DST_MSACCESS:
case ::dbaccess::DST_MSACCESS_2007:
m_aFT_Connection.SetText(String(ModuleRes(STR_MSACCESS_MDB_FILE)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE);
+ m_aConnectionURL.SetHelpId(HID_DSADMIN_MSACCESS_MDB_FILE);
break;
case ::dbaccess::DST_MYSQL_NATIVE:
case ::dbaccess::DST_MYSQL_JDBC:
m_aFT_Connection.SetText(String(ModuleRes(STR_MYSQL_DATABASE_NAME)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_MYSQL_DATABASE);
+ m_aConnectionURL.SetHelpId( HID_DSADMIN_MYSQL_DATABASE );
break;
case ::dbaccess::DST_ORACLE_JDBC:
m_aFT_Connection.SetText(String(ModuleRes(STR_ORACLE_DATABASE_NAME)));
- m_aET_Connection.SetHelpId(HID_DSADMIN_ORACLE_DATABASE);
+ m_aConnectionURL.SetHelpId(HID_DSADMIN_ORACLE_DATABASE);
break;
case ::dbaccess::DST_MYSQL_ODBC:
case ::dbaccess::DST_ODBC:
m_aFT_Connection.SetText(String(ModuleRes(STR_NAME_OF_ODBC_DATASOURCE)));
- m_aET_Connection.SetHelpId( m_eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE);
+ m_aConnectionURL.SetHelpId( m_eType == ::dbaccess::DST_MYSQL_ODBC ? HID_DSADMIN_MYSQL_ODBC_DATASOURCE : HID_DSADMIN_ODBC_DATASOURCE);
break;
case ::dbaccess::DST_LDAP:
m_aFT_Connection.SetText(String(ModuleRes(STR_HOSTNAME)));
- m_aET_Connection.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME );
+ m_aConnectionURL.SetHelpId( HID_DSADMIN_LDAP_HOSTNAME );
break;
case ::dbaccess::DST_MOZILLA:
m_aFT_Connection.SetText(String(ModuleRes(STR_MOZILLA_PROFILE_NAME)));
- m_aET_Connection.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME );
+ m_aConnectionURL.SetHelpId( HID_DSADMIN_MOZILLA_PROFILE_NAME );
break;
case ::dbaccess::DST_THUNDERBIRD:
m_aFT_Connection.SetText(String(ModuleRes(STR_THUNDERBIRD_PROFILE_NAME)));
- m_aET_Connection.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME );
+ m_aConnectionURL.SetHelpId( HID_DSADMIN_THUNDERBIRD_PROFILE_NAME );
break;
case ::dbaccess::DST_OUTLOOK:
case ::dbaccess::DST_OUTLOOKEXP:
@@ -312,7 +312,7 @@ namespace dbaui
sText.SearchAndReplaceAscii("~",sTemp);
m_aFT_Connection.SetText(sText);
}
- m_aET_Connection.Hide();
+ m_aConnectionURL.Hide();
break;
case ::dbaccess::DST_JDBC:
m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL)));
@@ -363,7 +363,7 @@ namespace dbaui
checkTestConnection();
m_aUserName.ClearModifyFlag();
- m_aET_Connection.ClearModifyFlag();
+ m_aConnectionURL.ClearModifyFlag();
m_aJavaDriver.ClearModifyFlag();
}
}
@@ -410,7 +410,7 @@ namespace dbaui
fillString(_rSet,&m_aJavaDriver, DSID_JDBCDRIVERCLASS, bChangedSomething);
}
- fillString(_rSet,&m_aET_Connection, DSID_CONNECTURL, bChangedSomething);
+ fillString(_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething);
return bChangedSomething;
}
@@ -440,7 +440,7 @@ namespace dbaui
bool OConnectionTabPage::checkTestConnection()
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
- BOOL bEnableTestConnection = !m_aET_Connection.IsVisible() || (m_aET_Connection.GetTextNoPrefix().Len() != 0);
+ BOOL bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
if ( m_eType == ::dbaccess::DST_JDBC )
bEnableTestConnection = bEnableTestConnection && (m_aJavaDriver.GetText().Len() != 0);
m_aTestConnection.Enable(bEnableTestConnection);
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx
index c9ae69e57278..90a120a32ef8 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx
@@ -81,7 +81,6 @@ namespace dbaui
// called when the test connection button was clicked
- DECL_LINK(OnBrowseConnections, PushButton*);
DECL_LINK(OnTestJavaClickHdl,PushButton*);
DECL_LINK(OnEditModified,Edit*);
@@ -91,14 +90,8 @@ namespace dbaui
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
- virtual void SetServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB)
- {
- OGenericAdministrationPage::SetServiceFactory(_rxORB);
- m_aET_Connection.initializeTypeCollection(m_xORB);
- }
-
- inline void enableConnectionURL() { m_aET_Connection.SetReadOnly(sal_False); }
- inline void disableConnectionURL() { m_aET_Connection.SetReadOnly(); }
+ inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
+ inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
/** changes the connection URL.
<p>The new URL must be of the type which is currently selected, only the parts which do not
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
index 18897b83f088..4af66d7581a0 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx
@@ -241,21 +241,21 @@ namespace dbaui
{
Point aPos = m_aFT_HelpText.GetPosPixel();
Point aFTPos = m_aFT_Connection.GetPosPixel();
- Point aEDPos = m_aET_Connection.GetPosPixel();
+ Point aEDPos = m_aConnectionURL.GetPosPixel();
Point aPBPos = m_aPB_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_aET_Connection.SetPosPixel(aEDPos);
+ m_aConnectionURL.SetPosPixel(aEDPos);
m_aPB_Connection.SetPosPixel(aPBPos);
}
}
else
m_aFT_Connection.Hide();
- m_aET_Connection.SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified));
+ m_aConnectionURL.SetModifyHdl(LINK(this, OConnectionTabPageSetup, OnEditModified));
SetRoadmapStateValue(sal_False);
}
@@ -299,13 +299,13 @@ namespace dbaui
sal_Bool OConnectionTabPageSetup::FillItemSet(SfxItemSet& _rSet)
{
sal_Bool bChangedSomething = sal_False;
- fillString(_rSet,&m_aET_Connection, DSID_CONNECTURL, bChangedSomething);
+ fillString(_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething);
return bChangedSomething;
}
// -----------------------------------------------------------------------
bool OConnectionTabPageSetup::checkTestConnection()
{
- return !m_aET_Connection.IsVisible() || (m_aET_Connection.GetTextNoPrefix().Len() != 0);
+ return !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
}
// -----------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
index fe949a522a75..09473411897e 100644
--- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
+++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx
@@ -89,21 +89,14 @@ namespace dbaui
static OGenericAdministrationPage* CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet );
- virtual void SetServiceFactory(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > _rxORB)
- {
- OConnectionHelper::SetServiceFactory(_rxORB);
-// m_aET_Connection.initializeTypeCollection(m_xORB);
- }
-
-
virtual BOOL FillItemSet (SfxItemSet& _rCoreAttrs);
virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
virtual sal_Bool commitPage( CommitPageReason _eReason );
- inline void enableConnectionURL() { m_aET_Connection.SetReadOnly(sal_False); }
- inline void disableConnectionURL() { m_aET_Connection.SetReadOnly(); }
+ inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); }
+ inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); }
/** changes the connection URL.
<p>The new URL must be of the type which is currently selected, only the parts which do not
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 129c2cdd216a..aa3ad63f4377 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -724,7 +724,7 @@ DBG_NAME(OMySQLIntroPageSetup)
bool OJDBCConnectionPageSetup::checkTestConnection()
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
- BOOL bEnableTestConnection = !m_aET_Connection.IsVisible() || (m_aET_Connection.GetTextNoPrefix().Len() != 0);
+ BOOL bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0);
return bEnableTestConnection;
// m_aTestConnection.Enable(bEnableTestConnection);
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 779814ca508b..533ff93d5820 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -1113,9 +1113,16 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest)
if ( sUrlPart.Len() )
{
- String sNewUrl = pCollection->getDatasourcePrefix(eType);
- sNewUrl += sUrlPart;
- _rDest.Put(SfxStringItem(DSID_CONNECTURL, sNewUrl));
+ if ( eType == ::dbaccess::DST_MYSQL_NATIVE )
+ {
+ _rDest.Put( SfxStringItem( DSID_DATABASENAME, sUrlPart ) );
+ }
+ else
+ {
+ String sNewUrl = pCollection->getDatasourcePrefix(eType);
+ sNewUrl += sUrlPart;
+ _rDest.Put( SfxStringItem( DSID_CONNECTURL, sNewUrl ) );
+ }
}
if ( sNewHostName.Len() )
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index d5ce1cdd47e5..35328ba5b241 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -384,6 +384,7 @@ OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext )
m_aTableList.EnableCheckButton( NULL ); // do not show any buttons
m_aTableList.SetSelectionMode( SINGLE_SELECTION );
m_aTableList.notifyHiContrastChanged();
+ m_aTableList.suppressEmptyFolders();
//////////////////////////////////////////////////////////////////////
m_aQueryList.EnableInplaceEditing( FALSE );
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx
index dbcf11dc0fc5..539ccc9abd78 100644
--- a/dbaccess/source/ui/dlg/dbadmin.cxx
+++ b/dbaccess/source/ui/dlg/dbadmin.cxx
@@ -105,15 +105,16 @@ ODbAdminDialog::ODbAdminDialog(Window* _pParent
, const Reference< XMultiServiceFactory >& _rxORB
)
:SfxTabDialog(_pParent, ModuleRes(DLG_DATABASE_ADMINISTRATION), _pItems)
- ,m_bResetting(sal_False)
,m_bApplied(sal_False)
,m_bUIEnabled( sal_True )
+ ,m_nMainPageID( PAGE_CONNECTION )
{
DBG_CTOR(ODbAdminDialog,NULL);
m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
+
// add the initial tab page
- AddTabPage(PAGE_CONNECTION, String(ModuleRes(STR_PAGETITLE_GENERAL)), OConnectionTabPage::Create, NULL);
+ AddTabPage( m_nMainPageID, String( ModuleRes( STR_PAGETITLE_GENERAL ) ), OConnectionTabPage::Create, NULL );
// remove the reset button - it's meaning is much too ambiguous in this dialog
RemoveResetButton();
@@ -174,13 +175,11 @@ void ODbAdminDialog::addDetailPage(USHORT _nPageId, USHORT _nTextId, CreateTabPa
}
//-------------------------------------------------------------------------
-void ODbAdminDialog::implSelectDatasource(const ::com::sun::star::uno::Any& _aDataSourceName)
+void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName)
{
m_pImpl->setDataSourceOrName(_aDataSourceName);
-
- // reset the tag pages
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
- resetPages(xDatasource);
+ impl_resetPages( xDatasource );
::dbaccess::DATASOURCE_TYPE eType = getDatasourceType(*getOutputSet());
@@ -208,12 +207,11 @@ void ODbAdminDialog::implSelectDatasource(const ::com::sun::star::uno::Any& _aDa
case ::dbaccess::DST_MYSQL_ODBC:
addDetailPage(PAGE_MYSQL_ODBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
break;
+
case ::dbaccess::DST_MYSQL_JDBC:
addDetailPage(PAGE_MYSQL_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
break;
- case ::dbaccess::DST_MYSQL_NATIVE:
- addDetailPage(PAGE_MYSQL_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLNATIVE);
- break;
+
case ::dbaccess::DST_ORACLE_JDBC:
addDetailPage(PAGE_ORACLE_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
break;
@@ -252,7 +250,7 @@ void ODbAdminDialog::implSelectDatasource(const ::com::sun::star::uno::Any& _aDa
}
//-------------------------------------------------------------------------
-void ODbAdminDialog::resetPages(const Reference< XPropertySet >& _rxDatasource)
+void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasource)
{
// the selection is valid if and only if we have a datasource now
GetInputSetImpl()->Put(SfxBoolItem(DSID_INVALID_SELECTION, !_rxDatasource.is()));
@@ -261,19 +259,9 @@ void ODbAdminDialog::resetPages(const Reference< XPropertySet >& _rxDatasource)
// reset the pages
- sal_uInt16 nOldSelectedPage = GetCurPageId();
-
// prevent flicker
SetUpdateMode(sal_False);
- m_bResetting = sal_True;
- ShowPage(PAGE_CONNECTION);
- m_bResetting = sal_False;
-
- // remove all tab pages (except the general one)
- // remove all current detail pages
- removeDetailPages();
-
// remove all items which relate to indirect properties from the input set
// (without this, the following may happen: select an arbitrary data source where some indirect properties
// are set. Select another data source of the same type, where the indirect props are not set (yet). Then,
@@ -293,30 +281,24 @@ void ODbAdminDialog::resetPages(const Reference< XPropertySet >& _rxDatasource)
delete pExampleSet;
pExampleSet = new SfxItemSet(*GetInputSetImpl());
- m_bResetting = sal_True;
-
- // unfortunately, I have no chance if a page with ID nOldSelectedPage still exists
- // So we first select the general page (which is always available) and the the old page (which may not be there)
+ // special case: MySQL Native does not have the generic PAGE_CONNECTION page
+ ::dbaccess::DATASOURCE_TYPE eType = getDatasourceType( *pExampleSet );
+ if ( eType == ::dbaccess::DST_MYSQL_NATIVE )
+ {
+ LocalResourceAccess aDummy(DLG_DATABASE_ADMINISTRATION, RSC_TABDIALOG);
+ AddTabPage( PAGE_MYSQL_NATIVE, String( ModuleRes( STR_PAGETITLE_CONNECTION ) ), ODriversSettings::CreateMySQLNATIVE, NULL );
+ RemoveTabPage( PAGE_CONNECTION );
+ m_nMainPageID = PAGE_MYSQL_NATIVE;
+ }
- ShowPage( PAGE_CONNECTION );
- SfxTabPage* pConnectionPage = GetTabPage(PAGE_CONNECTION);
+ ShowPage( m_nMainPageID );
+ SfxTabPage* pConnectionPage = GetTabPage( m_nMainPageID );
if ( pConnectionPage )
pConnectionPage->Reset(*GetInputSetImpl());
// if this is NULL, the page has not been created yet, which means we're called before the
// dialog was displayed (probably from inside the ctor)
- if ( isUIEnabled() )
- {
- ShowPage( nOldSelectedPage );
- // same for the previously selected page, if it is still there
- SfxTabPage* pOldPage = GetTabPage( nOldSelectedPage );
- if (pOldPage)
- pOldPage->Reset(*GetInputSetImpl());
- }
-
SetUpdateMode(sal_True);
-
- m_bResetting = sal_False;
}
// -----------------------------------------------------------------------------
void ODbAdminDialog::setTitle(const ::rtl::OUString& _sTitle)
@@ -357,7 +339,7 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges()
//-------------------------------------------------------------------------
void ODbAdminDialog::selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName)
{
- implSelectDatasource(_aDataSourceName);
+ impl_selectDataSource(_aDataSourceName);
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src
index 3ccb261bad48..23143193a355 100644
--- a/dbaccess/source/ui/dlg/dbadmin.src
+++ b/dbaccess/source/ui/dlg/dbadmin.src
@@ -61,41 +61,42 @@
//-------------------------------------------------------------------------
-#define AUTO_SPECIAL_JDBC(AUTO_Y) \
+#define AUTO_FIXEDLINE_CONNSETTINGS(AUTO_Y) \
FixedLine FL_SEPARATOR1 \
{ \
Pos = MAP_APPFONT ( 4 , AUTO_Y ) ; \
- Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ; \
- Text[ en-US ] = "Connection Settings"; \
+ Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ; \
+ Text[ en-US ] = "Connection Settings"; \
}; \
- \
+
+#define AUTO_HOST_AND_PORT(AUTO_Y) \
FixedText FT_HOSTNAME \
{ \
- Pos = MAP_APPFONT ( 6 , AUTO_Y + RELATED_CONTROLS + FIXEDTEXT_HEIGHT) ; \
+ Pos = MAP_APPFONT ( 6 , AUTO_Y ) ; \
Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
- Text[ en-US ] = "~Host name"; \
+ Text[ en-US ] = "~Host name"; \
}; \
Edit ET_HOSTNAME \
{ \
TabStop = TRUE ; \
Border = TRUE ; \
HelpId = HID_DSADMIN_HOSTNAME; \
- Pos = MAP_APPFONT ( EDIT_X , AUTO_Y + RELATED_CONTROLS + FIXEDTEXT_HEIGHT -1 ) ; \
+ Pos = MAP_APPFONT ( EDIT_X , AUTO_Y - 1 ) ; \
Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; \
}; \
\
FixedText FT_PORTNUMBER \
{ \
- Pos = MAP_APPFONT ( 6 , AUTO_Y + UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT) ; \
+ Pos = MAP_APPFONT ( 6 , AUTO_Y + UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT ) ; \
Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; \
- Text[ en-US ] = "~Port number"; \
+ Text[ en-US ] = "~Port number"; \
}; \
NumericField NF_PORTNUMBER \
{ \
TabStop = TRUE ; \
Border = TRUE ; \
HelpId = HID_DSADMIN_PORTNUMBER; \
- Pos = MAP_APPFONT ( EDIT_X , AUTO_Y +UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT -1 ) ; \
+ Pos = MAP_APPFONT ( EDIT_X , AUTO_Y +UNRELATED_CONTROLS + FIXEDTEXT_HEIGHT -1 ) ; \
Size = MAP_APPFONT ( 97 , EDIT_HEIGHT ) ; \
};
//-------------------------------------------------------------------------
@@ -532,7 +533,8 @@ TabPage PAGE_MYSQL_JDBC
Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
Hide = TRUE;
- AUTO_SPECIAL_JDBC( UNRELATED_CONTROLS )
+ AUTO_FIXEDLINE_CONNSETTINGS( UNRELATED_CONTROLS )
+ AUTO_HOST_AND_PORT( UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT )
AUTO_SOCKETCONTROLGROUP(3*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT)
FixedText FT_JDBCDRIVERCLASS
@@ -561,6 +563,47 @@ TabPage PAGE_MYSQL_JDBC
AUTO_CHARSET( 5*UNRELATED_CONTROLS + RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT+ EDIT_HEIGHT, PAGE_X )
};
+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 )
+ AUTO_NAMECONTROLGROUP( UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT, HID_PAGE_DBWIZARD_JDBC_ET_MYSQLDBNAME )
+ AUTO_HOST_AND_PORT( UNRELATED_CONTROLS + 2*RELATED_CONTROLS + FIXEDTEXT_HEIGHT + EDIT_HEIGHT )
+ AUTO_SOCKETCONTROLGROUP(3*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + EDIT_HEIGHT )
+
+ FixedLine FL_SEPARATOR2
+ {
+ Pos = MAP_APPFONT ( 3 , 4*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT + 2*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 + 3*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*EDIT_HEIGHT ) ;
+ Size = MAP_APPFONT ( EDIT_X - 6 - RELATED_CONTROLS, FIXEDTEXT_HEIGHT ) ;
+ Text [ en-US ] = "~User name" ;
+ };
+ Edit ET_USERNAME
+ {
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 3*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*EDIT_HEIGHT - 1 ) ;
+ Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ;
+ TabStop = TRUE ;
+ };
+ CheckBox CB_PASSWORD_REQUIRED
+ {
+ Pos = MAP_APPFONT ( EDIT_X, 4*UNRELATED_CONTROLS + 4*RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT ) ;
+ Size = MAP_APPFONT ( 105, CHECKBOX_HEIGHT ) ;
+ Text [ en-US ] = "Password required";
+ };
+
+ AUTO_CHARSET( 5*UNRELATED_CONTROLS + 4*RELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT + 3*EDIT_HEIGHT, PAGE_X )
+};
+
TabPage PAGE_ORACLE_JDBC
{
SVLook = TRUE ;
@@ -568,7 +611,8 @@ TabPage PAGE_ORACLE_JDBC
Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ;
Hide = TRUE;
- AUTO_SPECIAL_JDBC( UNRELATED_CONTROLS )
+ AUTO_FIXEDLINE_CONNSETTINGS( UNRELATED_CONTROLS )
+ AUTO_HOST_AND_PORT( UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT )
AUTO_SOCKETCONTROLGROUP(3*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT)
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index ae2e827616ac..3ace14f2fc36 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -202,6 +202,9 @@ WizardTypes::WizardState ODbTypeWizDialog::determineNextState( WizardState _nCur
case ::dbaccess::DST_MACAB:
nNextState = WZS_INVALID_STATE;
break;
+ case ::dbaccess::DST_MYSQL_NATIVE:
+ nNextState = ADDITIONAL_PAGE_MYSQL_NATIVE;
+ break;
default:
nNextState = CONNECTION_PAGE;
break;
@@ -235,9 +238,6 @@ WizardTypes::WizardState ODbTypeWizDialog::determineNextState( WizardState _nCur
case ::dbaccess::DST_ADABAS:
nNextState = ADDITIONAL_PAGE_ADABAS;
break;
- case ::dbaccess::DST_MYSQL_NATIVE:
- nNextState = ADDITIONAL_PAGE_MYSQL_NATIVE;
- break;
case ::dbaccess::DST_MYSQL_JDBC:
nNextState = ADDITIONAL_PAGE_MYSQL_JDBC;
break;
@@ -335,7 +335,7 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState)
case ADDITIONAL_PAGE_MYSQL_JDBC:
pPage = ODriversSettings::CreateMySQLJDBC(this,*m_pOutSet);
break;
- case ADDITIONAL_PAGE_MYSQL_NATIVE:
+ case ADDITIONAL_PAGE_MYSQL_NATIVE:
pPage = ODriversSettings::CreateMySQLNATIVE(this,*m_pOutSet);
break;
case ADDITIONAL_PAGE_MYSQL_ODBC:
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index 1dc117fc474a..6e65fbe5d253 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -689,6 +689,128 @@ namespace dbaui
return 0L;
}
+ //========================================================================
+ //= 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_aDatabaseNameLabel ( this, ModuleRes( FT_AUTODATABASENAME ) )
+ ,m_aDatabaseName ( this, ModuleRes( ET_AUTODATABASENAME ) )
+ ,m_aFTHostname ( this, ModuleRes(FT_HOSTNAME))
+ ,m_aEDHostname ( this, ModuleRes(ET_HOSTNAME))
+ ,m_aPortNumber ( this, ModuleRes(FT_PORTNUMBER))
+ ,m_aNFPortNumber ( this, ModuleRes(NF_PORTNUMBER))
+ ,m_aFTSocket ( this, ModuleRes(FT_SOCKET))
+ ,m_aEDSocket ( this, ModuleRes(ET_SOCKET))
+ ,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_aDatabaseName.SetModifyHdl(getControlModifiedLink());
+ m_aEDHostname.SetModifyHdl(getControlModifiedLink());
+ m_aNFPortNumber.SetModifyHdl(getControlModifiedLink());
+ m_aEDSocket.SetModifyHdl(getControlModifiedLink());
+ m_aUserName.SetModifyHdl(getControlModifiedLink());
+
+ // #98982# OJ
+ m_aNFPortNumber.SetUseThousandSep(sal_False);
+
+ Window* pWindows[] = { &m_aDatabaseNameLabel, &m_aDatabaseName, &m_aFTHostname, &m_aEDHostname,
+ &m_aPortNumber,&m_aNFPortNumber,&m_aFTSocket,&m_aEDSocket,
+ &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);
+
+ FreeResource();
+ }
+
+ // -----------------------------------------------------------------------
+ void MySQLNativePage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
+ {
+ OCommonBehaviourTabPage::fillControls(_rControlList);
+
+ _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aDatabaseName));
+ _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aEDHostname));
+ _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber));
+ _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aEDSocket));
+ _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aUserName));
+ _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aPasswordRequired));
+ }
+ // -----------------------------------------------------------------------
+ void MySQLNativePage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
+ {
+ OCommonBehaviourTabPage::fillWindows(_rControlList);
+
+ _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aSeparator1));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aDatabaseNameLabel));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostname));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aPortNumber));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTSocket));
+ _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aSeparator2));
+ _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aUserNameLabel));
+ }
+
+ // -----------------------------------------------------------------------
+ sal_Bool MySQLNativePage::FillItemSet( SfxItemSet& _rSet )
+ {
+ sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
+
+ fillString(_rSet,&m_aDatabaseName,DSID_DATABASENAME,bChangedSomething);
+ fillString(_rSet,&m_aEDHostname,DSID_CONN_HOSTNAME,bChangedSomething);
+ fillString(_rSet,&m_aEDSocket,DSID_CONN_SOCKET,bChangedSomething);
+ fillInt32(_rSet,&m_aNFPortNumber,DSID_MYSQL_PORTNUMBER,bChangedSomething );
+
+ if ( m_aUserName.GetText() != m_aUserName.GetSavedValue() )
+ {
+ _rSet.Put( SfxStringItem( DSID_USER, m_aUserName.GetText() ) );
+ _rSet.Put( SfxStringItem( DSID_PASSWORD, String()));
+ bChangedSomething = sal_True;
+ }
+ fillBool(_rSet,&m_aPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething);
+
+ return bChangedSomething;
+ }
+ // -----------------------------------------------------------------------
+ void MySQLNativePage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
+ {
+ // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
+ sal_Bool bValid, bReadonly;
+ getFlags(_rSet, bValid, bReadonly);
+
+ SFX_ITEMSET_GET(_rSet, pDatabaseName, SfxStringItem, DSID_DATABASENAME, sal_True);
+ SFX_ITEMSET_GET(_rSet, pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True);
+ SFX_ITEMSET_GET(_rSet, pPortNumber, SfxInt32Item, DSID_MYSQL_PORTNUMBER, sal_True);
+ SFX_ITEMSET_GET(_rSet, pSocket, SfxStringItem, DSID_CONN_SOCKET, sal_True);
+ SFX_ITEMSET_GET(_rSet, pUidItem, SfxStringItem, DSID_USER, sal_True);
+ SFX_ITEMSET_GET(_rSet, pAllowEmptyPwd, SfxBoolItem, DSID_PASSWORDREQUIRED, sal_True);
+
+ if ( bValid )
+ {
+ m_aDatabaseName.SetText( pDatabaseName->GetValue() );
+ m_aDatabaseName.ClearModifyFlag();
+
+ m_aEDHostname.SetText(pHostName->GetValue());
+ m_aEDHostname.ClearModifyFlag();
+
+ m_aNFPortNumber.SetValue(pPortNumber->GetValue());
+ m_aNFPortNumber.ClearModifyFlag();
+
+ m_aEDSocket.SetText(pSocket->GetValue());
+ m_aEDSocket.ClearModifyFlag();
+
+ m_aUserName.SetText(pUidItem->GetValue());
+ m_aUserName.ClearModifyFlag();
+ m_aPasswordRequired.Check(pAllowEmptyPwd->GetValue());
+ }
+
+ OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
+ }
+
// -----------------------------------------------------------------------
SfxTabPage* ODriversSettings::CreateMySQLJDBC( Window* pParent, const SfxItemSet& _rAttrSet )
{
@@ -697,7 +819,7 @@ namespace dbaui
// -----------------------------------------------------------------------
SfxTabPage* ODriversSettings::CreateMySQLNATIVE( Window* pParent, const SfxItemSet& _rAttrSet )
{
- return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_MYSQL_JDBC, _rAttrSet,DSID_MYSQL_PORTNUMBER ,0) );
+ return ( new MySQLNativePage( pParent, _rAttrSet ) );
}
// -----------------------------------------------------------------------
diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx
index b8de1b9d6184..6d42f163a57b 100644
--- a/dbaccess/source/ui/dlg/detailpages.hxx
+++ b/dbaccess/source/ui/dlg/detailpages.hxx
@@ -251,6 +251,38 @@ namespace dbaui
};
//========================================================================
+ //= MySQLNativePage
+ //========================================================================
+ class MySQLNativePage : public OCommonBehaviourTabPage
+ {
+ public:
+ MySQLNativePage( Window* pParent,
+ const SfxItemSet& _rCoreAttrs );
+
+ private:
+ FixedLine m_aSeparator1;
+ FixedText m_aDatabaseNameLabel;
+ Edit m_aDatabaseName;
+ FixedText m_aFTHostname;
+ Edit m_aEDHostname;
+ FixedText m_aPortNumber;
+ NumericField m_aNFPortNumber;
+ FixedText m_aFTSocket;
+ Edit m_aEDSocket;
+
+ FixedLine m_aSeparator2;
+ FixedText m_aUserNameLabel;
+ Edit m_aUserName;
+ CheckBox m_aPasswordRequired;
+
+ protected:
+ virtual BOOL FillItemSet( SfxItemSet& _rCoreAttrs );
+ virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
+ virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
+ virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
+ };
+
+ //========================================================================
//= OAdabasDetailsPage
//========================================================================
class OAdabasDetailsPage : public OCommonBehaviourTabPage
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 1318f03955cb..712dca576efa 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -230,6 +230,8 @@ namespace
USHORT nPos = _rList.GetEntryPos( String( _rCurrent ) );
if ( nPos != COMBOBOX_ENTRY_NOTFOUND )
_rList.SelectEntryPos( nPos );
+ else
+ _rList.SelectEntryPos( 0 );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx
index 94bfb2633c9e..aae2b0af95f1 100644
--- a/dbaccess/source/ui/inc/dbadmin.hxx
+++ b/dbaccess/source/ui/inc/dbadmin.hxx
@@ -69,9 +69,9 @@ private:
::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
- sal_Bool m_bResetting : 1; /// sal_True while we're resetting the pages
sal_Bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing
sal_Bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
+ USHORT m_nMainPageID;
public:
/** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
@@ -124,10 +124,11 @@ protected:
inline sal_Bool isUIEnabled() const { return m_bUIEnabled; }
inline void disabledUI() { m_bUIEnabled = sal_False; }
+private:
/// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
- void implSelectDatasource(const ::com::sun::star::uno::Any& _aDataSourceName);
+ void impl_selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName);
/// reset the tag pages according to m_sCurrentDatasource and <arg>_rxDatasource</arg>
- void resetPages(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatasource);
+ void impl_resetPages(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatasource);
enum ApplyResult
{
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 4c60de3e9c8e..41ed7e0a7fe6 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -147,7 +147,7 @@
#define PAGE_MYSQL_JDBC RID_PAGE_START + 20
#define PAGE_GENERATED_VALUES RID_PAGE_START + 22
#define PAGE_ADVANCED_SETTINGS_SPECIAL RID_PAGE_START + 23
- // FREE
+#define PAGE_MYSQL_NATIVE RID_PAGE_START + 24
// FREE
// FREE
#define PAGE_ORACLE_JDBC RID_PAGE_START + 27
diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx
index 4bd8cd698ab4..f6987a8816c3 100644
--- a/dbaccess/source/ui/inc/tabletree.hxx
+++ b/dbaccess/source/ui/inc/tabletree.hxx
@@ -74,6 +74,7 @@ protected:
::std::auto_ptr< ImageProvider >
m_pImageProvider; // provider for our images
sal_Bool m_bVirtualRoot; // should the first entry be visible
+ bool m_bNoEmptyFolders; // should empty catalogs/schematas be prevented from being displayed?
public:
OTableTreeListBox(
@@ -93,6 +94,8 @@ public:
typedef ::std::pair< ::rtl::OUString,sal_Bool> TTableViewName;
typedef ::std::vector< TTableViewName > TNames;
+ void suppressEmptyFolders() { m_bNoEmptyFolders = true; }
+
/** call when HiContrast change.
*/
void notifyHiContrastChanged();