summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 15:27:20 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 15:27:20 +0000
commit20524789e62f4bd93c1ba9f3c234673d32944b2e (patch)
treef923a1893dc1b5c531bb15a17aa04f605a967070 /forms
parent8f4a724ed27c196b26fa7b7c3a6cfb4d34bf3b67 (diff)
INTEGRATION: CWS insight01 (1.22.22); FILE MERGED
2004/07/23 12:28:34 oj 1.22.22.3: RESYNC: (1.24-1.25); FILE MERGED 2004/05/28 19:56:46 oj 1.22.22.2: RESYNC: (1.22-1.24); FILE MERGED 2004/04/23 06:21:36 oj 1.22.22.1: new switch to disable catalog and schema
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/ComboBox.cxx25
1 files changed, 16 insertions, 9 deletions
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 0cf803ec2400..1441b4d291dd 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ComboBox.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: rt $ $Date: 2004-07-06 13:37:07 $
+ * last change: $Author: hr $ $Date: 2004-08-02 16:27:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -650,15 +650,22 @@ void OComboBoxModel::loadData()
break;
Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
- ::rtl::OUString aQuote = xMeta->getIdentifierQuoteString();
- ::rtl::OUString aStatement = ::rtl::OUString::createFromAscii("SELECT DISTINCT ");
+ OSL_ENSURE(xMeta.is(),"No database meta data!");
+ if ( xMeta.is() )
+ {
+ ::rtl::OUString aQuote = xMeta->getIdentifierQuoteString();
+ ::rtl::OUString aStatement = ::rtl::OUString::createFromAscii("SELECT DISTINCT ");
- aStatement += quoteName(aQuote, aFieldName);
- aStatement += ::rtl::OUString::createFromAscii(" FROM ");
- aStatement += quoteTableName(xMeta, m_aListSource,::dbtools::eInDataManipulation);
+ aStatement += quoteName(aQuote, aFieldName);
+ aStatement += ::rtl::OUString::createFromAscii(" FROM ");
- xStmt = xConnection->createStatement();
- xListCursor = xStmt->executeQuery(aStatement);
+ sal_Bool bUseCatalogInSelect = ::dbtools::isDataSourcePropertyEnabled(xConnection,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCatalogInSelect")),sal_True);
+ sal_Bool bUseSchemaInSelect = ::dbtools::isDataSourcePropertyEnabled(xConnection,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSchemaInSelect")),sal_True);
+ aStatement += quoteTableName(xMeta, m_aListSource,::dbtools::eInDataManipulation,bUseCatalogInSelect,bUseSchemaInSelect);
+
+ xStmt = xConnection->createStatement();
+ xListCursor = xStmt->executeQuery(aStatement);
+ }
} break;
case ListSourceType_QUERY:
{