summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser/dsbrowserDnD.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-12-01 09:36:20 +0000
committerRüdiger Timm <rt@openoffice.org>2003-12-01 09:36:20 +0000
commit3e2e24676e2ddd767a58eac5432d3c6006f46ee8 (patch)
treef3f294f0c5c37a62add5fe1da8cfd3de00884c7d /dbaccess/source/ui/browser/dsbrowserDnD.cxx
parent7f3c07ed1dfb70b0aed85c681ce09c32f642e2a0 (diff)
INTEGRATION: CWS geordi2q10 (1.61.106); FILE MERGED
2003/11/28 09:43:00 rt 1.61.106.1: #111934#: join CWS dba01pp1
Diffstat (limited to 'dbaccess/source/ui/browser/dsbrowserDnD.cxx')
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx18
1 files changed, 12 insertions, 6 deletions
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index 282b6cb36c02..748c4dbf8aad 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dsbrowserDnD.cxx,v $
*
- * $Revision: 1.61 $
+ * $Revision: 1.62 $
*
- * last change: $Author: hr $ $Date: 2003-04-04 17:52:28 $
+ * last change: $Author: rt $ $Date: 2003-12-01 10:36:20 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -248,7 +248,7 @@ namespace dbaui
Reference< XRowLocate > xRowLocate( xSrcRs, UNO_QUERY );
sal_Bool bUseSelection = _aSelection.getLength() > 0;
- if ( !xRow.is() || ( bUseSelection && _bBookmarkSelection && !xRowLocate.is() ) )
+ if ( !xRow.is() || ( bUseSelection && _bBookmarkSelection && !xRowLocate.is() ) || !_xMetaData.is() )
{
DBG_ERROR( "insertRows: bad arguments!" );
return;
@@ -265,7 +265,9 @@ namespace dbaui
static ::rtl::OUString aPara(RTL_CONSTASCII_USTRINGPARAM("?,"));
static ::rtl::OUString aComma(RTL_CONSTASCII_USTRINGPARAM(","));
- ::rtl::OUString aQuote = _xMetaData->getIdentifierQuoteString();
+ ::rtl::OUString aQuote;
+ if ( _xMetaData.is() )
+ aQuote = _xMetaData->getIdentifierQuoteString();
Reference<XColumnsSupplier> xColsSup(_xDestTable,UNO_QUERY);
OSL_ENSURE(xColsSup.is(),"SbaTableQueryBrowser::insertRows: No columnsSupplier!");
@@ -424,7 +426,10 @@ namespace dbaui
sSql = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT "));
// we need to create the sql stmt with column names
// otherwise it is possible that names don't match
- ::rtl::OUString sQuote = _xSrcConnection->getMetaData()->getIdentifierQuoteString();
+ ::rtl::OUString sQuote;
+ Reference<XDatabaseMetaData> xMeta = _xSrcConnection->getMetaData();
+ if ( xMeta.is() )
+ sQuote = xMeta->getIdentifierQuoteString();
static ::rtl::OUString sComma = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","));
Reference<XColumnsSupplier> xSrcColsSup(xSourceObject,UNO_QUERY);
@@ -1439,7 +1444,8 @@ namespace dbaui
{
try
{
- bIsConnectionWriteAble = !xCon->getMetaData()->isReadOnly();
+ Reference<XDatabaseMetaData> xMeta = xCon->getMetaData();
+ bIsConnectionWriteAble = xMeta.is() && !xMeta->isReadOnly();
}
catch(SQLException&)
{