diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-11-06 11:48:40 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-11-06 11:48:40 +0000 |
commit | 48717b073f40e25d8feb3a0e9a54ca4e12a1140c (patch) | |
tree | 809b62c261334e55fad851bbe54cd8804f79ed71 /dbaccess/source/ui/tabledesign/TableController.cxx | |
parent | 1df90555e3f07de7dd718fc90d1c2727573f8124 (diff) |
#94329# check if table could be altered
Diffstat (limited to 'dbaccess/source/ui/tabledesign/TableController.cxx')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index f6d64acb50fb..ac913ae531c7 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TableController.cxx,v $ * - * $Revision: 1.56 $ + * $Revision: 1.57 $ * - * last change: $Author: oj $ $Date: 2001-10-19 12:46:24 $ + * last change: $Author: oj $ $Date: 2001-11-06 12:48:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1595,7 +1595,10 @@ sal_Bool OTableController::isDropAllowed() const Reference<XColumnsSupplier> xColsSup(m_xTable,UNO_QUERY); sal_Bool bDropAllowed = !m_xTable.is(); if(xColsSup.is()) - bDropAllowed = Reference<XDrop>(xColsSup->getColumns(),UNO_QUERY).is(); + { + Reference<XNameAccess> xNameAccess = xColsSup->getColumns(); + bDropAllowed = Reference<XDrop>(xNameAccess,UNO_QUERY).is() && xNameAccess->hasElements(); + } Reference< XDatabaseMetaData> xMetaData = getMetaData( ); bDropAllowed = bDropAllowed || ( xMetaData.is() && xMetaData->supportsAlterTableWithDropColumn()); |