summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/dbmgr.hxx9
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx112
-rw-r--r--sw/source/ui/dbui/dbtree.cxx47
-rw-r--r--sw/source/ui/dbui/dbui.cxx123
-rw-r--r--sw/source/ui/fldui/changedb.cxx6
-rw-r--r--sw/source/ui/fldui/flddb.cxx6
-rw-r--r--sw/source/ui/fldui/xfldui.cxx37
-rw-r--r--sw/source/ui/inc/dbtree.hxx8
-rw-r--r--sw/source/ui/inc/dbui.hxx28
9 files changed, 154 insertions, 222 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 26e54a816ebf..1bb1f8ea21fb 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbmgr.hxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: os $ $Date: 2001-07-10 13:49:54 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -206,6 +206,7 @@ class SwNewDBMgr
SwMailMergeDlg* pMergeDialog;
SwDSParam* FindDSData(const SwDBData& rData, BOOL bCreate);
+ SwDSParam* FindDSConnection(const ::rtl::OUString& rSource, BOOL bCreate);
DECL_LINK( PrtCancelHdl, Button * );
@@ -301,6 +302,10 @@ public:
BOOL GetColumnCnt(const String& rSourceName, const String& rTableName,
const String& rColumnName, sal_uInt32 nAbsRecordId, long nLanguage,
String& rResult, double* pNumber);
+ //create and store or find an already stored connection to a data source for use
+ //in SwFldMgr and SwDBTreeList
+ ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>
+ RegisterConnection(::rtl::OUString& rSource);
const SwDSParam* CreateDSData(const SwDBData& rData)
{return FindDSData(rData, TRUE);}
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 9aa6c6a0113d..a51e63a56c15 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbmgr.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: os $ $Date: 2001-08-02 08:30:38 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -726,7 +726,12 @@ BOOL SwNewDBMgr::GetTableNames(ListBox* pListBox, const String& rDBName)
String sOldTableName(pListBox->GetSelectEntry());
pListBox->Clear();
Reference< XDataSource> xSource;
- Reference< XConnection> xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
+ SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ Reference< XConnection> xConnection;
+ if(pParam && pParam->xConnection.is())
+ xConnection = pParam->xConnection;
+ else
+ xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
if(xConnection.is())
{
Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY);
@@ -769,7 +774,12 @@ BOOL SwNewDBMgr::GetColumnNames(ListBox* pListBox,
if (!bAppend)
pListBox->Clear();
Reference< XDataSource> xSource;
- Reference< XConnection> xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
+ SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ Reference< XConnection> xConnection;
+ if(pParam && pParam->xConnection.is())
+ xConnection = pParam->xConnection;
+ else
+ xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
Reference< XColumnsSupplier> xColsSupp = SwNewDBMgr::GetColumnSupplier(xConnection, rTableName);
if(xColsSupp.is())
{
@@ -823,6 +833,23 @@ SwNewDBMgr::SwNewDBMgr() :
---------------------------------------------------------------------------*/
SwNewDBMgr::~SwNewDBMgr()
{
+ for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ {
+ SwDSParam* pParam = aDataSourceParams[nPos];
+ if(pParam->xConnection.is())
+ {
+ try
+ {
+ Reference<XComponent> xComp(pParam->xConnection, UNO_QUERY);
+ if(xComp.is())
+ xComp->dispose();
+ }
+ catch(RuntimeException& rEx)
+ {
+ //may be disposed already since multiple entries may have used the same connection
+ }
+ }
+ }
}
/*--------------------------------------------------------------------
Beschreibung: Serienbrief drucken
@@ -1266,7 +1293,11 @@ ULONG SwNewDBMgr::GetColumnFmt( const String& rDBName,
}
if(!xConnection.is() || !xSource.is())
{
- xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
+ SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ if(pParam && pParam->xConnection.is())
+ xConnection = pParam->xConnection;
+ else
+ xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
if(bUseMergeData)
pMergeData->xConnection = xConnection;
}
@@ -1381,7 +1412,12 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName,
{
sal_Int32 nRet = DataType::SQLNULL;
Reference< XDataSource> xSource;
- Reference< XConnection> xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
+ SwDSParam* pParam = FindDSConnection(rDBName, FALSE);
+ Reference< XConnection> xConnection;
+ if(pParam && pParam->xConnection.is())
+ xConnection = pParam->xConnection;
+ else
+ xConnection = SwNewDBMgr::GetConnection(rDBName, xSource);
Reference< XColumnsSupplier> xColsSupp = SwNewDBMgr::GetColumnSupplier(xConnection, rTableName);
if(xColsSupp.is())
{
@@ -1783,7 +1819,12 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
Reference< XDataSource> xSource;
if(pFound->xResultSet.is())
return TRUE;
- pFound->xConnection = SwNewDBMgr::GetConnection(rDataSource, xSource );
+ SwDSParam* pParam = FindDSConnection(rDataSource, FALSE);
+ Reference< XConnection> xConnection;
+ if(pParam && pParam->xConnection.is())
+ pFound->xConnection = pParam->xConnection;
+ else
+ pFound->xConnection = SwNewDBMgr::GetConnection(rDataSource, xSource );
if(pFound->xConnection.is())
{
try
@@ -1815,6 +1856,17 @@ BOOL SwNewDBMgr::OpenDataSource(const String& rDataSource, const String& rTableO
}
return pFound->xResultSet.is();
}
+/* -----------------------------14.08.2001 10:26------------------------------
+
+ ---------------------------------------------------------------------------*/
+Reference< XConnection> SwNewDBMgr::RegisterConnection(OUString& rDataSource)
+{
+ SwDSParam* pFound = SwNewDBMgr::FindDSConnection(rDataSource, TRUE);
+ Reference< XDataSource> xSource;
+ if(!pFound->xConnection.is())
+ pFound->xConnection = SwNewDBMgr::GetConnection(rDataSource, xSource );
+ return pFound->xConnection;
+}
/* -----------------------------17.07.00 15:55--------------------------------
---------------------------------------------------------------------------*/
@@ -1852,16 +1904,17 @@ sal_uInt32 SwNewDBMgr::GetSelectedRecordId(
---------------------------------------------------------------------------*/
void SwNewDBMgr::CloseAll(BOOL bIncludingMerge)
{
- for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
- {
- SwDSParam* pParam = aDataSourceParams[nPos];
- if(bIncludingMerge || pParam != pMergeData)
- {
- pParam->xResultSet = 0;
- pParam->xStatement = 0;
- pParam->xConnection = 0;
- }
- }
+ //do nothing - keep all connections until the destructor
+// for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+// {
+// SwDSParam* pParam = aDataSourceParams[nPos];
+// if(bIncludingMerge || pParam != pMergeData)
+// {
+// pParam->xResultSet = 0;
+// pParam->xStatement = 0;
+// pParam->xConnection = 0;
+// }
+// }
}
/* -----------------------------17.07.00 14:54--------------------------------
@@ -1890,6 +1943,31 @@ SwDSParam* SwNewDBMgr::FindDSData(const SwDBData& rData, BOOL bCreate)
}
return pFound;
}
+/* -----------------------------14.08.2001 10:27------------------------------
+
+ ---------------------------------------------------------------------------*/
+SwDSParam* SwNewDBMgr::FindDSConnection(const OUString& rDataSource, BOOL bCreate)
+{
+ SwDSParam* pFound = 0;
+ for(USHORT nPos = 0; nPos < aDataSourceParams.Count(); nPos++)
+ {
+ SwDSParam* pParam = aDataSourceParams[nPos];
+ if(rDataSource == pParam->sDataSource)
+ {
+ pFound = pParam;
+ break;
+ }
+ }
+ if(bCreate && !pFound)
+ {
+ SwDBData aData;
+ aData.sDataSource = rDataSource;
+ pFound = new SwDSParam(aData);
+ aDataSourceParams.Insert(pFound, aDataSourceParams.Count());
+ }
+ return pFound;
+}
+
/* -----------------------------17.07.00 14:31--------------------------------
rDBName: <Source> + DB_DELIM + <Table>; + <Statement>
---------------------------------------------------------------------------*/
diff --git a/sw/source/ui/dbui/dbtree.cxx b/sw/source/ui/dbui/dbtree.cxx
index 37f98a794400..fbb90ccc9ea5 100644
--- a/sw/source/ui/dbui/dbtree.cxx
+++ b/sw/source/ui/dbui/dbtree.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbtree.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: os $ $Date: 2001-08-08 10:11:56 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -163,7 +163,6 @@ using namespace com::sun::star::beans;
struct SwConnectionData
{
OUString sSourceName;
- Reference<XDataSource> xSource;
Reference<XConnection> xConnection;
};
@@ -177,8 +176,11 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
{
Reference< XNameAccess > xDBContext;
SwConnectionArr aConnections;
+ SwWrtShell& rWrtSh;
+
public:
- SwDBTreeList_Impl(){}
+ SwDBTreeList_Impl(SwWrtShell& rShell) :
+ rWrtSh(rShell) {}
~SwDBTreeList_Impl();
virtual void SAL_CALL elementInserted( const ContainerEvent& Event ) throw (RuntimeException);
@@ -195,13 +197,6 @@ class SwDBTreeList_Impl : public cppu::WeakImplHelper1 < XContainerListener >
---------------------------------------------------------------------------*/
SwDBTreeList_Impl::~SwDBTreeList_Impl()
{
- for(USHORT i = 0; i < aConnections.Count(); i++)
- {
- SwConnectionDataPtr pPtr = aConnections[i];
- Reference<XComponent> xComp(pPtr->xConnection, UNO_QUERY);
- if(xComp.is())
- xComp->dispose();
- }
Reference<XContainer> xContainer(xDBContext, UNO_QUERY);
if(xContainer.is())
{
@@ -235,9 +230,9 @@ void SwDBTreeList_Impl::elementRemoved( const ContainerEvent& rEvent ) throw (Ru
if(pPtr->sSourceName == sSource)
{
SwConnectionDataPtr pPtr = aConnections[i];
- Reference<XComponent> xComp(pPtr->xConnection, UNO_QUERY);
- if(xComp.is())
- xComp->dispose();
+// Reference<XComponent> xComp(pPtr->xConnection, UNO_QUERY);
+// if(xComp.is())
+// xComp->dispose();
aConnections.DeleteAndDestroy(i);
break;
}
@@ -297,23 +292,7 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
{
SwConnectionDataPtr pPtr = new SwConnectionData();
pPtr->sSourceName = rSourceName;
- Reference<XConnection> xConnection;
- try
- {
- Any aDBSource = xDBContext->getByName(rSourceName);
- Reference<XCompletedConnection> xComplConnection;
- aDBSource >>= xComplConnection;
- pPtr->xSource = Reference<XDataSource>(xComplConnection, UNO_QUERY);
-
- Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
- Reference< XInteractionHandler > xHandler(
- xMgr->createInstance( C2U( "com.sun.star.sdb.InteractionHandler" )), UNO_QUERY);
- pPtr->xConnection = xComplConnection->connectWithCompletion( xHandler );
- xRet = pPtr->xConnection;
- }
- catch(Exception&)
- {
- }
+ xRet = rWrtSh.GetNewDBMgr()->RegisterConnection(pPtr->sSourceName);
aConnections.Insert(pPtr, aConnections.Count());
}
return xRet;
@@ -321,7 +300,9 @@ Reference<XConnection> SwDBTreeList_Impl::GetConnection(const rtl::OUString& rS
/*------------------------------------------------------------------------
Beschreibung:
------------------------------------------------------------------------*/
-SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId, const String& rDefDBName, const BOOL bShowCol):
+SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId,
+ SwWrtShell& rSh,
+ const String& rDefDBName, const BOOL bShowCol):
SvTreeListBox (pParent, rResId),
@@ -333,7 +314,7 @@ SwDBTreeList::SwDBTreeList(Window *pParent, const ResId& rResId, const String& r
sDefDBName (rDefDBName),
bShowColumns (bShowCol),
- pImpl(new SwDBTreeList_Impl),
+ pImpl(new SwDBTreeList_Impl(rSh)),
bInitialized (FALSE)
{
SetHelpId(HID_DB_SELECTION_TLB);
diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx
index 46321b778011..84c50a627bb9 100644
--- a/sw/source/ui/dbui/dbui.cxx
+++ b/sw/source/ui/dbui/dbui.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbui.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:34 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,71 +76,6 @@
#include "dbui.hrc"
#include "dbui.hxx"
-
-// STATIC DATA -----------------------------------------------------------
-
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-#if 0
-SwDBSelect::SwDBSelect(Window *pParent, SwWrtShell *pSh, const String& rDefDBName):
-
- SvxStandardDialog(pParent, SW_RES(DLG_DBSELECTION)),
-
- aTree (this, SW_RES(TLB_DBLIST), rDefDBName),
-
- aOkBTN (this, SW_RES(BTN_OK)),
- aCancelBTN (this, SW_RES(BTN_CANCEL)),
- aHelpBTN (this, SW_RES(BTN_HELP))
-{
- FreeResource();
-
- aTree.SetSelectHdl(LINK(this, SwDBSelect, TreeSelectHdl));
-}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-__EXPORT SwDBSelect::~SwDBSelect()
-{
-}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-void __EXPORT SwDBSelect::Apply()
-{
-}
-
-/*------------------------------------------------------------------------
- Beschreibung:
-------------------------------------------------------------------------*/
-
-
-String SwDBSelect::GetDBName() const
-{
- return aTree.GetDBName();
-}
-
-/*---------------------------------------------------------------------
- Beschreibung:
----------------------------------------------------------------------*/
-
-
-IMPL_LINK( SwDBSelect, TreeSelectHdl, SvTreeListBox *, pBox )
-{
- SvLBoxEntry* pEntry = pBox->GetCurEntry();
- if (pEntry)
- aOkBTN.Enable(aTree.GetParent(pEntry) != 0);
- return 0;
-}
-#endif
/*---------------------------------------------------------------------
Beschreibung:
---------------------------------------------------------------------*/
@@ -160,57 +95,3 @@ PrintMonitor::PrintMonitor( Window *pParent, BOOL bEMail )
FreeResource();
}
-/*------------------------------------------------------------------------
-
- $Log: not supported by cvs2svn $
- Revision 1.15 2000/09/18 16:05:19 willem.vandorp
- OpenOffice header added.
-
- Revision 1.14 2000/06/26 13:31:03 os
- new DataBase API
-
- Revision 1.13 1999/03/08 08:56:26 MH
- chg: header
-
-
- Rev 1.12 08 Mar 1999 09:56:26 MH
- chg: header
-
- Rev 1.11 27 Oct 1998 12:17:08 OM
- #58132# Progress fuer Serienmailings
-
- Rev 1.10 09 Dec 1997 12:30:52 OM
- #45200# Serienbrief: Speichern-Monitor
-
- Rev 1.9 02 Sep 1997 09:57:12 OM
- SDB-Headeranpassung
-
- Rev 1.8 01 Sep 1997 13:16:04 OS
- DLL-Umstellung
-
- Rev 1.7 11 Nov 1996 09:25:38 MA
- ResMgr
-
- Rev 1.6 02 Oct 1996 18:00:56 MA
- Umstellung Enable/Disable
-
- Rev 1.5 28 Aug 1996 09:18:04 OS
- includes
-
- Rev 1.4 05 Aug 1996 15:47:52 OM
- Datenbankumstellung
-
- Rev 1.3 25 Jul 1996 16:36:26 OM
- Eigene TreeListbox fuer Datenbankauswahl
-
- Rev 1.2 23 Jul 1996 13:28:38 OM
- Neue Segs
-
- Rev 1.1 23 Jul 1996 13:26:08 OM
- Datenbank und Tabelle auswaehlen
-
- Rev 1.0 22 Jul 1996 11:01:52 OM
- Initial revision.
-
-------------------------------------------------------------------------*/
-
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 0bab28368ae7..0329a1c68843 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: changedb.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fme $ $Date: 2001-05-21 12:27:13 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -145,7 +145,7 @@ SwChangeDBDlg::SwChangeDBDlg(SwView& rVw) :
aUsedDBFT (this, SW_RES(FT_USEDDB )),
aAvailDBFT (this, SW_RES(FT_AVAILDB )),
aUsedDBTLB (this, SW_RES(TLB_USEDDB )),
- aAvailDBTLB (this, SW_RES(TLB_AVAILDB )),
+ aAvailDBTLB (this, SW_RES(TLB_AVAILDB ), rVw.GetWrtShell()),
aDescFT (this, SW_RES(FT_DESC )),
aDocDBTextFT(this, SW_RES(FT_DOCDBTEXT )),
aDocDBNameFT(this, SW_RES(FT_DOCDBNAME )),
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index d8bdbeac6401..b893d4dbd4b0 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: flddb.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2001-07-18 13:24:40 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,7 +114,7 @@ SwFldDBPage::SwFldDBPage(Window* pParent, const SfxItemSet& rCoreSet ) :
aTypeFT (this, SW_RES(FT_DBTYPE)),
aTypeLB (this, SW_RES(LB_DBTYPE)),
aSelectionFT(this, SW_RES(FT_DBSELECTION)),
- aDatabaseTLB(this, SW_RES(TLB_DBLIST), aEmptyStr, FALSE),
+ aDatabaseTLB(this, SW_RES(TLB_DBLIST), ::GetActiveView()->GetWrtShell(),aEmptyStr, FALSE),
aConditionFT(this, SW_RES(FT_DBCONDITION)),
aConditionED(this, SW_RES(ED_DBCONDITION)),
aValueFT (this, SW_RES(FT_DBSETNUMBER)),
diff --git a/sw/source/ui/fldui/xfldui.cxx b/sw/source/ui/fldui/xfldui.cxx
index ea87128db4f7..51235328c4c6 100644
--- a/sw/source/ui/fldui/xfldui.cxx
+++ b/sw/source/ui/fldui/xfldui.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xfldui.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: os $ $Date: 2001-07-18 13:24:40 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -100,6 +100,18 @@
#ifndef _FLDMGR_HXX
#include <fldmgr.hxx>
#endif
+#ifndef _DBMGR_HXX
+#include <dbmgr.hxx>
+#endif
+#ifndef _WRTSH_HXX
+#include <wrtsh.hxx> // Actives Fenster
+#endif
+#ifndef _VIEW_HXX
+#include <view.hxx>
+#endif
+#ifndef _SWMODULE_HXX
+#include <swmodule.hxx>
+#endif
using namespace com::sun::star::uno;
@@ -126,21 +138,18 @@ BOOL SwFldMgr::IsDBNumeric( const String& rDBName, const String& rTblQryName,
BOOL bIsTable, const String& rFldName)
{
BOOL bNumeric = TRUE;
- if( !GetDBContext().is() || !xDBContext->hasByName(rDBName) )
+
+ SwNewDBMgr* pDBMgr = pWrtShell ? pWrtShell->GetNewDBMgr() :
+ ::GetActiveView()->GetWrtShell().GetNewDBMgr();
+
+ ::rtl::OUString sSource(rDBName);
+ Reference< XConnection> xConnection =
+ pDBMgr->RegisterConnection(sSource);
+
+ if( !xConnection.is() )
return bNumeric;
- Any aDBSource = xDBContext->getByName(rDBName);
- Reference<XDataSource>* pxSource = (Reference<XDataSource>*)aDBSource.getValue();
- Reference<XConnection> xConnection;
- try
- {
- rtl::OUString sDummy;
- xConnection = (*pxSource)->getConnection(sDummy, sDummy);
- }
- catch(Exception&)
- {}
Reference<XColumnsSupplier> xColsSupplier;
-
if(bIsTable)
{
Reference<XTablesSupplier> xTSupplier = Reference<XTablesSupplier>(xConnection, UNO_QUERY);
diff --git a/sw/source/ui/inc/dbtree.hxx b/sw/source/ui/inc/dbtree.hxx
index 9d75640b4361..c1c13730377c 100644
--- a/sw/source/ui/inc/dbtree.hxx
+++ b/sw/source/ui/inc/dbtree.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbtree.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2001-07-17 12:34:53 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,6 +79,7 @@ namespace com{namespace sun{namespace star{namespace container{
#include <swunodef.hxx>
#endif
class SwDBTreeList_Impl;
+class SwWrtShell;
class SwDBTreeList : public SvTreeListBox
{
Bitmap aRootOpened;
@@ -103,7 +104,8 @@ class SwDBTreeList : public SvTreeListBox
public:
SwDBTreeList( Window* pParent, const ResId& rResId,
- const String& rDefDBName = aEmptyStr,
+ SwWrtShell& rSh,
+ const String& rDefDBName = aEmptyStr,
const BOOL bShowCol = FALSE );
virtual ~SwDBTreeList();
diff --git a/sw/source/ui/inc/dbui.hxx b/sw/source/ui/inc/dbui.hxx
index ffb5571d54b5..e3daeffbe259 100644
--- a/sw/source/ui/inc/dbui.hxx
+++ b/sw/source/ui/inc/dbui.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dbui.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:39 $
+ * last change: $Author: os $ $Date: 2001-08-15 08:20:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,30 +73,6 @@
#include <vcl/fixed.hxx>
#endif
-#include "dbtree.hxx"
-#include "swtypes.hxx"
-
-class SwWrtShell;
-class SbaObject;
-
-class SwDBSelect : public SvxStandardDialog
-{
- SwDBTreeList aTree;
-
- OKButton aOkBTN;
- CancelButton aCancelBTN;
- HelpButton aHelpBTN;
-
- DECL_LINK(TreeSelectHdl, SvTreeListBox* pBox);
-
- virtual void Apply();
-
-public:
- SwDBSelect(Window* pParent, SwWrtShell* pSh, const String& rDefDBName = aEmptyStr);
- ~SwDBSelect();
-
- String GetDBName() const;
-};
class PrintMonitor: public ModelessDialog
{