summaryrefslogtreecommitdiff
path: root/extensions/source/bibliography/datman.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/bibliography/datman.cxx')
-rw-r--r--extensions/source/bibliography/datman.cxx23
1 files changed, 11 insertions, 12 deletions
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 34b92e1c5415..f183eaa799e8 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: datman.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: fs $ $Date: 2002-10-29 13:03:38 $
+ * last change: $Author: hr $ $Date: 2003-03-25 16:03:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -225,6 +225,9 @@
#ifndef __EXTENSIONS_INC_EXTENSIO_HRC__
#include "extensio.hrc"
#endif
+#ifndef _CONNECTIVITY_DBTOOLS_HXX_
+#include <connectivity/dbtools.hxx>
+#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::beans;
@@ -776,7 +779,6 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(Window* pParent, BibDataManager* pMan )
aSelectionHB.SetSizePixel(aSelectionHB.CalcWindowSizePixel());
aSelectionHB.Show();
- aSelectionLB.SetHelpId(HID_SELECTION_TLB);
aSelectionLB.SetTabs( &nTabs[0], MAP_PIXEL );
aSelectionLB.SetWindowBits(WB_CLIPCHILDREN|WB_SORT);
aSelectionLB.GetModel()->SetSortMode(SortAscending);
@@ -1154,9 +1156,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc)
m_xParser = xFactory->createQueryComposer();
rtl::OUString aString(C2U("SELECT * FROM "));
- aString += aQuoteChar;
- aString += aActiveDataTable;
- aString += aQuoteChar;
+ aString += ::dbtools::quoteTableName(xMetaData,aActiveDataTable,::dbtools::eInDataManipulation);
m_xParser->setQuery(aString);
BibConfig* pConfig = BibModul::GetConfig();
pConfig->setQueryField(getQueryField());
@@ -1342,9 +1342,10 @@ void BibDataManager::setActiveDataSource(const rtl::OUString& rURL)
aVal <<= aActiveDataTable;
aPropertySet->setPropertyValue(C2U("Command"), aVal);
rtl::OUString aString(C2U("SELECT * FROM "));
- aString+=aQuoteChar;
- aString+=aActiveDataTable;
- aString+=aQuoteChar;
+ // quote the table name which may contain catalog.schema.table
+ Reference<XDatabaseMetaData> xMetaData(xConnection->getMetaData(),UNO_QUERY);
+ aQuoteChar = xMetaData->getIdentifierQuoteString();
+ aString += ::dbtools::quoteTableName(xMetaData,aActiveDataTable,::dbtools::eInDataManipulation);
m_xParser->setQuery(aString);
BibConfig* pConfig = BibModul::GetConfig();
pConfig->setQueryField(getQueryField());
@@ -1410,9 +1411,7 @@ void BibDataManager::setActiveDataTable(const rtl::OUString& rTable)
m_xParser = xFactory->createQueryComposer();
rtl::OUString aString(C2U("SELECT * FROM "));
- aString+=aQuoteChar;
- aString+=aActiveDataTable;
- aString+=aQuoteChar;
+ aString += ::dbtools::quoteTableName(xMetaData,aActiveDataTable,::dbtools::eInDataManipulation);
m_xParser->setQuery(aString);
BibConfig* pConfig = BibModul::GetConfig();