From 29b323c1489d6d4e2c20a32a035cee0f63f8ec88 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Tue, 3 Feb 2009 16:28:45 +0000 Subject: CWS-TOOLING: integrate CWS mysql1_OOO310 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 --- connectivity/source/commontools/dbmetadata.cxx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'connectivity/source/commontools/dbmetadata.cxx') diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx index bc57ed806f..1116e3ce2d 100644 --- a/connectivity/source/commontools/dbmetadata.cxx +++ b/connectivity/source/commontools/dbmetadata.cxx @@ -72,6 +72,7 @@ namespace dbtools using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::beans::XPropertySetInfo; using ::com::sun::star::uno::UNO_QUERY; + using ::com::sun::star::uno::UNO_SET_THROW; /** === end UNO using === **/ namespace BooleanComparisonMode = ::com::sun::star::sdb::BooleanComparisonMode; @@ -308,7 +309,30 @@ namespace dbtools OSL_VERIFY( setting >>= doGenerate ); return doGenerate; } + //-------------------------------------------------------------------- + bool DatabaseMetaData::displayEmptyTableFolders() const + { + bool doDisplay( true ); +#ifdef IMPLEMENTED_LATER + Any setting; + if ( lcl_getConnectionSetting( "DisplayEmptyTableFolders", *m_pImpl, setting ) ) + OSL_VERIFY( setting >>= doDisplay ); +#else + try + { + Reference< XDatabaseMetaData > xMeta( m_pImpl->xConnectionMetaData, UNO_SET_THROW ); + ::rtl::OUString sConnectionURL( xMeta->getURL() ); + doDisplay = sConnectionURL.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "sdbc:mysql:mysqlc" ) ) == 0; + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } +#endif + return doDisplay; + } + //........................................................................ } // namespace dbtools //........................................................................ -- cgit v1.2.3