From 3e2e24676e2ddd767a58eac5432d3c6006f46ee8 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Mon, 1 Dec 2003 09:36:20 +0000 Subject: INTEGRATION: CWS geordi2q10 (1.61.106); FILE MERGED 2003/11/28 09:43:00 rt 1.61.106.1: #111934#: join CWS dba01pp1 --- dbaccess/source/ui/browser/dsbrowserDnD.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'dbaccess/source/ui/browser/dsbrowserDnD.cxx') 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 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 xMeta = _xSrcConnection->getMetaData(); + if ( xMeta.is() ) + sQuote = xMeta->getIdentifierQuoteString(); static ::rtl::OUString sComma = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(",")); Reference xSrcColsSup(xSourceObject,UNO_QUERY); @@ -1439,7 +1444,8 @@ namespace dbaui { try { - bIsConnectionWriteAble = !xCon->getMetaData()->isReadOnly(); + Reference xMeta = xCon->getMetaData(); + bIsConnectionWriteAble = xMeta.is() && !xMeta->isReadOnly(); } catch(SQLException&) { -- cgit