diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-08-06 13:54:58 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-08-06 13:54:58 +0000 |
commit | 5b823aa1e02ecaed5ed36e84b8e615f072414033 (patch) | |
tree | b332b01226fa1156d277843b021a780a190d9c3f /forms/source/component | |
parent | b01f6ee407fb876f2aa4702c5974a6aa223850fc (diff) |
#87690# members/methods for connection sharing
Diffstat (limited to 'forms/source/component')
-rw-r--r-- | forms/source/component/DatabaseForm.hxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index f3f066a725f5..f8c89652a974 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DatabaseForm.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: fs $ $Date: 2001-06-12 11:52:41 $ + * last change: $Author: fs $ $Date: 2001-08-06 14:54:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -320,6 +320,7 @@ class ODatabaseForm :public OFormComponents sal_Bool m_bLoaded : 1; sal_Bool m_bSubForm : 1; sal_Bool m_bForwardingConnection : 1; // sal_True if we're setting the ActiveConnection on the aggregate + sal_Bool m_bSharingConnection : 1; // sal_True if the connection we're using is shared with out parent public: ODatabaseForm(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); @@ -539,6 +540,23 @@ private: sal_Bool implEnsureConnection(); + // connection sharing + + /// checks if we can re-use (aka share) the connection of the given parent + sal_Bool canShareConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxParentProps ); + + /// starts sharing the connection with the parent + void doShareConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxParentProps ); + + /// stops sharing the connection with the parent + void stopSharingConnection( ); + + /// called when the connection which we share with our parent is beeing disposed + void disposingSharedConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn ); + + /// checks if we currently share our connection with our parent + sal_Bool isSharingConnection( ) const { return m_bSharingConnection; } + // error handling void onError(const ::com::sun::star::sdb::SQLErrorEvent& _rEvent); void onError(::com::sun::star::sdbc::SQLException&, const ::rtl::OUString& _rContextDescription); |