summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-09-19 12:20:12 +0000
committerOcke Janssen <oj@openoffice.org>2001-09-19 12:20:12 +0000
commit2e15d4b235a1d1b36d56015fe637bc5a07ec3ad8 (patch)
tree0e15c4115d2a8c49529fec721a630ba8b27c4ac7 /dbaccess/source/ui
parent8d6a89a0a1603e20220e67081b3006ecec775e1a (diff)
#92047# close task async
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx20
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx15
2 files changed, 26 insertions, 9 deletions
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 315ba7d057a0..69cf4ff3c9e7 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: genericcontroller.cxx,v $
*
- * $Revision: 1.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 14:15:52 $
+ * last change: $Author: oj $ $Date: 2001-09-19 13:20:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -151,6 +151,7 @@ using namespace ::comphelper;
OGenericUnoController::OGenericUnoController(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM)
:OGenericUnoController_COMPBASE(m_aMutex)
,m_aAsyncInvalidateAll(LINK(this, OGenericUnoController, OnAsyncInvalidateAll))
+ ,m_aAsyncCloseTask(LINK(this, OGenericUnoController, OnAsyncCloseTask))
,m_xMultiServiceFacatory(_rM)
,m_bCurrentlyModified(sal_False)
,m_bFrameUiActive(sal_False)
@@ -981,9 +982,18 @@ String OGenericUnoController::getMenu() const
// -----------------------------------------------------------------------------
void OGenericUnoController::closeTask()
{
- Reference<XTask> xTask(m_xCurrentFrame,UNO_QUERY);
- if(xTask.is())
- xTask->close();
+ m_aAsyncCloseTask.Call();
+}
+// -----------------------------------------------------------------------------
+IMPL_LINK(OGenericUnoController, OnAsyncCloseTask, void*, EMPTYARG)
+{
+ if(!OGenericUnoController_COMPBASE::rBHelper.bInDispose)
+ {
+ Reference<XTask> xTask(m_xCurrentFrame,UNO_QUERY);
+ if(xTask.is())
+ xTask->close();
+ }
+ return 0L;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 0c6f419ed37b..3093e00d2ed6 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.106 $
+ * $Revision: 1.107 $
*
- * last change: $Author: hr $ $Date: 2001-09-13 14:15:52 $
+ * last change: $Author: oj $ $Date: 2001-09-19 13:20:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -3631,8 +3631,15 @@ sal_Bool SbaTableQueryBrowser::requestContextMenu( const CommandEvent& _rEvent )
Reference<XConnection> xCon(pDSData->xObject,UNO_QUERY);
if(xCon.is())
{
- bIsConnectionWriteAble = !xCon->getMetaData()->isReadOnly();
- aContextMenu.EnableItem(ID_TREE_RELATION_DESIGN, xCon->getMetaData()->supportsIntegrityEnhancementFacility());
+ try
+ {
+ bIsConnectionWriteAble = !xCon->getMetaData()->isReadOnly();
+ aContextMenu.EnableItem(ID_TREE_RELATION_DESIGN, xCon->getMetaData()->supportsIntegrityEnhancementFacility());
+ }
+ catch(SQLException&)
+ {
+ aContextMenu.EnableItem(ID_TREE_RELATION_DESIGN, sal_False);
+ }
}
}