diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-02 16:41:24 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-02 16:41:24 +0000 |
commit | add2402154b5461e2118207f2101347912f74988 (patch) | |
tree | d0178a88d846264cf1f7ba15c96baaa86f7d697a /extensions/source/dbpilots/listcombowizard.cxx | |
parent | 292d6a4048196d72d0fecaf0cdfeed62e2feb0d5 (diff) |
INTEGRATION: CWS insight01 (1.11.182); FILE MERGED
2004/05/28 19:34:13 oj 1.11.182.3: RESYNC: (1.11-1.12); FILE MERGED
2004/04/23 06:23:12 oj 1.11.182.2: new switch to disable catalog and schema
2004/03/05 10:58:14 oj 1.11.182.1: WizardPage changes
Diffstat (limited to 'extensions/source/dbpilots/listcombowizard.cxx')
-rw-r--r-- | extensions/source/dbpilots/listcombowizard.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/extensions/source/dbpilots/listcombowizard.cxx b/extensions/source/dbpilots/listcombowizard.cxx index 8e242e060..9d5fc662e 100644 --- a/extensions/source/dbpilots/listcombowizard.cxx +++ b/extensions/source/dbpilots/listcombowizard.cxx @@ -2,9 +2,9 @@ * * $RCSfile: listcombowizard.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: kz $ $Date: 2004-05-19 13:41:46 $ + * last change: $Author: hr $ $Date: 2004-08-02 17:41:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -221,8 +221,7 @@ namespace dbp try { // for quoting identifiers, we need the connection meta data - Reference< XConnection > xConn; - getContext().xForm->getPropertyValue(::rtl::OUString::createFromAscii("ActiveConnection")) >>= xConn; + Reference< XConnection > xConn(getContext().xForm->getPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ActiveConnection"))),UNO_QUERY); DBG_ASSERT(xConn.is(), "OListComboWizard::implApplySettings: no connection, unable to quote!"); Reference< XDatabaseMetaData > xMetaData; if (xConn.is()) @@ -231,10 +230,14 @@ namespace dbp // do some quotings if (xMetaData.is()) { + ::rtl::OUString sQuoteString = xMetaData->getIdentifierQuoteString(); if (isListBox()) // only when we have a listbox this should be not empty - getSettings().sLinkedListField = quoteTableName(xMetaData, getSettings().sLinkedListField,::dbtools::eInDataManipulation); - getSettings().sListContentTable = quoteTableName(xMetaData, getSettings().sListContentTable,::dbtools::eInDataManipulation); - getSettings().sListContentField = quoteTableName(xMetaData, getSettings().sListContentField,::dbtools::eInDataManipulation); + getSettings().sLinkedListField = quoteName(sQuoteString, getSettings().sLinkedListField); + sal_Bool bUseCatalogInSelect = isDataSourcePropertyEnabled(xConn,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseCatalogInSelect")),sal_True); + sal_Bool bUseSchemaInSelect = isDataSourcePropertyEnabled(xConn,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSchemaInSelect")),sal_True); + + getSettings().sListContentTable = quoteTableName(xMetaData, getSettings().sListContentTable,::dbtools::eInDataManipulation,bUseCatalogInSelect,bUseSchemaInSelect); + getSettings().sListContentField = quoteName(sQuoteString, getSettings().sListContentField); } // ListSourceType: SQL @@ -417,14 +420,14 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OContentTableSelection::commitPage(COMMIT_REASON _eReason) + sal_Bool OContentTableSelection::commitPage(IWizardPage::COMMIT_REASON _eReason) { if (!OLCPage::commitPage(_eReason)) return sal_False; OListComboSettings& rSettings = getSettings(); rSettings.sListContentTable = m_aSelectTable.GetSelectEntry(); - if (!rSettings.sListContentTable.Len() && (CR_TRAVEL_PREVIOUS != _eReason)) + if (!rSettings.sListContentTable.Len() && (IWizardPage::CR_TRAVEL_PREVIOUS != _eReason)) // need to select a table return sal_False; @@ -495,7 +498,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OContentFieldSelection::commitPage(COMMIT_REASON _eReason) + sal_Bool OContentFieldSelection::commitPage(IWizardPage::COMMIT_REASON _eReason) { if (!OLCPage::commitPage(_eReason)) return sal_False; @@ -573,7 +576,7 @@ namespace dbp } //--------------------------------------------------------------------- - sal_Bool OLinkFieldsPage::commitPage(COMMIT_REASON _eReason) + sal_Bool OLinkFieldsPage::commitPage(IWizardPage::COMMIT_REASON _eReason) { if (!OLCPage::commitPage(_eReason)) return sal_False; |