summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/tabledesign/TableController.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-02-22 17:09:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-02-24 08:08:00 +0100
commitad73967e99235a2ba9b5a2106c5d6d0f8efaa1ca (patch)
tree5b11b7812b84c2647c64d1002bad7ed8a1d1754d /dbaccess/source/ui/tabledesign/TableController.cxx
parenta53577e6ff3629c4e9219616960d89eea9463593 (diff)
Remove unnecessary extractInterface
Change-Id: I4848bf84615274ad5732223a354fb7a6b845d9a8
Diffstat (limited to 'dbaccess/source/ui/tabledesign/TableController.cxx')
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx30
1 files changed, 16 insertions, 14 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index d47bbe71338d..8c08e7359554 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -55,7 +55,6 @@
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
-#include <comphelper/extract.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/streamsection.hxx>
#include <comphelper/types.hxx>
@@ -1379,22 +1378,25 @@ void OTableController::assignTable()
xNameAccess = xSup->getTables();
OSL_ENSURE(xNameAccess.is(),"no nameaccess for the queries!");
- Reference<XPropertySet> xProp;
- if(xNameAccess->hasByName(m_sName) && ::cppu::extractInterface(xProp,xNameAccess->getByName(m_sName)) && xProp.is())
+ if(xNameAccess->hasByName(m_sName))
{
- m_xTable = xProp;
- startTableListening();
-
- // check if we set the table editable
- Reference<XDatabaseMetaData> xMeta = getConnection()->getMetaData();
- setEditable( xMeta.is() && !xMeta->isReadOnly() && (isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
- if(!isEditable())
+ Reference<XPropertySet> xProp(xNameAccess->getByName(m_sName), css::uno::UNO_QUERY);
+ if (xProp.is())
{
- ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
+ m_xTable = xProp;
+ startTableListening();
+
+ // check if we set the table editable
+ Reference<XDatabaseMetaData> xMeta = getConnection()->getMetaData();
+ setEditable( xMeta.is() && !xMeta->isReadOnly() && (isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
+ if(!isEditable())
+ {
+ ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
+ }
+ m_bNew = sal_False;
+ // be notified when the table is in disposing
+ InvalidateAll();
}
- m_bNew = sal_False;
- // be notified when the table is in disposing
- InvalidateAll();
}
}
}