summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx28
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx18
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx15
3 files changed, 37 insertions, 24 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 76b3bd0ee867..5190dd225701 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: brwctrlr.cxx,v $
*
- * $Revision: 1.50 $
+ * $Revision: 1.51 $
*
- * last change: $Author: fs $ $Date: 2001-08-23 14:41:10 $
+ * last change: $Author: oj $ $Date: 2001-08-24 06:31:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -502,19 +502,23 @@ Sequence< sal_Int8 > SAL_CALL SbaXDataBrowserController::getImplementationId( )
Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw (RuntimeException)
{
// check for our additional interfaces
- Any aRet = SbaXDataBrowserController_Base::queryInterface(_rType);
+ Any aRet = OGenericUnoController::queryInterface(_rType);
// check for the base controllers interfaces
if (!aRet.hasValue())
- aRet = OGenericUnoController::queryInterface(_rType);
+ {
+ aRet = SbaXDataBrowserController_Base::queryInterface(_rType);
- // check for our aggregate (implementing the XFormController)
- if (!aRet.hasValue())
- aRet = m_xFormControllerImpl->queryAggregation(_rType);
+ // check for our aggregate (implementing the XFormController)
+ if (!aRet.hasValue())
+ {
+ aRet = m_xFormControllerImpl->queryAggregation(_rType);
- // check for the property set interfaces
- if (!aRet.hasValue())
- aRet = OPropertySetHelper::queryInterface(_rType);
+ // check for the property set interfaces
+ if (!aRet.hasValue())
+ aRet = OPropertySetHelper::queryInterface(_rType);
+ }
+ }
// no more to offer
return aRet;
@@ -2459,8 +2463,8 @@ sal_Bool SbaXDataBrowserController::isValidCursor() const
Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xSupplyCols(m_xRowSet, UNO_QUERY);
if (!xSupplyCols.is())
return sal_False;
- Reference< ::com::sun::star::container::XIndexAccess > xCols(xSupplyCols->getColumns(), UNO_QUERY);
- if (!xCols.is() || (xCols->getCount() == 0))
+ Reference< ::com::sun::star::container::XNameAccess > xCols = xSupplyCols->getColumns();
+ if (!xCols.is() || !xCols->hasElements())
return sal_False;
Reference<XPropertySet> xProp(m_xRowSet,UNO_QUERY);
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index 6d688b0b1f36..c92ee7a7bea7 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.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: oj $ $Date: 2001-07-30 06:20:24 $
+ * last change: $Author: oj $ $Date: 2001-08-24 06:31:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -843,6 +843,12 @@ namespace dbaui
// now create,fill and execute the prepared statement
Reference< XPreparedStatement > xPrep(_xMetaData->getConnection()->prepareStatement(aSql));
Reference< XParameters > xParameter(xPrep,UNO_QUERY);
+ ::std::vector<sal_Int32> aColumnTypes;
+ aColumnTypes.reserve(nCount+1);
+ aColumnTypes.push_back(-1); // just to avoid a everytime i-1 call
+ for(sal_Int32 k=1;k <= nCount;++k)
+ aColumnTypes.push_back(xMeta->getColumnType(k));
+
sal_Int32 nRowCount = 0;
while(xSrcRs->next())
@@ -859,8 +865,7 @@ namespace dbaui
xParameter->setInt(1,nRowCount);
continue;
}
- sal_Int32 nType = xMeta->getColumnType(i);
- switch(nType)
+ switch(aColumnTypes[i])
{
case DataType::CHAR:
case DataType::VARCHAR:
@@ -915,7 +920,7 @@ namespace dbaui
OSL_ENSURE(0,"Unknown type");
}
if(xRow->wasNull())
- xParameter->setNull(nPos,nType);
+ xParameter->setNull(nPos,aColumnTypes[i]);
}
xPrep->executeUpdate();
}
@@ -1086,6 +1091,9 @@ namespace dbaui
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.25 2001/07/30 06:20:24 oj
+ * #90291# check if table should be appended
+ *
* Revision 1.24 2001/07/26 14:12:01 oj
* #90291# check if table should be appended
*
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index ee0577d05cf4..4274563a2f0d 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodatbr.cxx,v $
*
- * $Revision: 1.100 $
+ * $Revision: 1.101 $
*
- * last change: $Author: fs $ $Date: 2001-08-16 14:09:46 $
+ * last change: $Author: oj $ $Date: 2001-08-24 06:31:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2515,26 +2515,27 @@ IMPL_LINK(SbaTableQueryBrowser, OnSelectEntry, SvLBoxEntry*, _pEntry)
// -----------------------------------------------------------------------------
SvLBoxEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAccess>& _rxNameAccess)
{
- SvLBoxEntry* pDSLoop = m_pTreeView->getListBox()->FirstChild(NULL);
+ DBTreeListBox* pListBox = m_pTreeView->getListBox();
+ SvLBoxEntry* pDSLoop = pListBox->FirstChild(NULL);
SvLBoxEntry* pContainer = NULL;
while (pDSLoop)
{
- pContainer = m_pTreeView->getListBox()->GetEntry(pDSLoop, CONTAINER_QUERIES);
+ pContainer = pListBox->GetEntry(pDSLoop, CONTAINER_QUERIES);
DBTreeListModel::DBTreeListUserData* pQueriesData = static_cast<DBTreeListModel::DBTreeListUserData*>(pContainer->GetUserData());
if(pQueriesData && pQueriesData->xObject.get() == _rxNameAccess.get())
break;
- pContainer = m_pTreeView->getListBox()->GetEntry(pDSLoop, CONTAINER_TABLES);
+ pContainer = pListBox->GetEntry(pDSLoop, CONTAINER_TABLES);
DBTreeListModel::DBTreeListUserData* pTablesData = static_cast<DBTreeListModel::DBTreeListUserData*>(pContainer->GetUserData());
if(pTablesData && pTablesData->xObject.get() == _rxNameAccess.get())
break;
- pContainer = m_pTreeView->getListBox()->GetEntry(pDSLoop, CONTAINER_BOOKMARKS);
+ pContainer = pListBox->GetEntry(pDSLoop, CONTAINER_BOOKMARKS);
DBTreeListModel::DBTreeListUserData* pBookmarksData = static_cast<DBTreeListModel::DBTreeListUserData*>(pContainer->GetUserData());
if(pBookmarksData && pBookmarksData->xObject.get() == _rxNameAccess.get())
break;
- pDSLoop = m_pTreeView->getListBox()->NextSibling(pDSLoop);
+ pDSLoop = pListBox->NextSibling(pDSLoop);
pContainer = NULL;
}
return pContainer;