summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx3
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx4
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx10
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx5
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx30
5 files changed, 27 insertions, 25 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index a167d72fefe5..fa1b228a6578 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -57,7 +57,6 @@
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <comphelper/processfactory.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/property.hxx>
#include <comphelper/seqstream.hxx>
@@ -359,7 +358,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
m_bOwnConnection = sal_True;
break;
case PROPERTY_ID_TYPEMAP:
- ::cppu::extractInterface(m_xTypeMap,m_aTypeMap);
+ m_xTypeMap.set(m_aTypeMap, css::uno::UNO_QUERY);
break;
case PROPERTY_ID_PROPCHANGE_NOTIFY:
m_bPropChangeNotifyEnabled = ::cppu::any2bool(rValue);
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index e4cf2969071c..318bad4026de 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -1385,8 +1385,8 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for
const PropertyValue* pFinalValues = aFinalValues.getConstArray();
for (sal_Int32 i=0; i<aFinalValues.getLength(); ++i, ++pFinalValues)
{
- Reference< XPropertySet > xParam;
- ::cppu::extractInterface(xParam, aRequest.Parameters->getByIndex(i));
+ Reference< XPropertySet > xParam(
+ aRequest.Parameters->getByIndex(i), css::uno::UNO_QUERY);
OSL_ENSURE(xParam.is(), "SbaXDataBrowserController::approveParameter: one of the parameters is no property set!");
if (xParam.is())
{
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 7a5aa0baca72..6cc20cd287c7 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -63,7 +63,6 @@
#include <connectivity/dbtools.hxx>
#include <connectivity/dbconversion.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <comphelper/extract.hxx>
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
@@ -789,7 +788,7 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId)
Reference< XIndexAccess > xCols(GetPeer()->getColumns(), UNO_QUERY);
Reference< XPropertySet > xAffectedCol;
if (xCols.is() && (nModelPos != (sal_uInt16)-1))
- ::cppu::extractInterface(xAffectedCol,xCols->getByIndex(nModelPos));
+ xAffectedCol.set(xCols->getByIndex(nModelPos), css::uno::UNO_QUERY);
if (xAffectedCol.is())
{
@@ -868,7 +867,7 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId)
Reference< XIndexAccess > xCols(GetPeer()->getColumns(), UNO_QUERY);
Reference< XPropertySet > xAffectedCol;
if (xCols.is() && (nModelPos != (sal_uInt16)-1))
- ::cppu::extractInterface(xAffectedCol,xCols->getByIndex(nModelPos));
+ xAffectedCol.set(xCols->getByIndex(nModelPos), css::uno::UNO_QUERY);
// get the field the column is bound to
Reference< XPropertySet > xField = getField(nModelPos);
@@ -1326,8 +1325,9 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
Reference< XIndexAccess > xColumnControls((::com::sun::star::form::XGridPeer*)GetPeer(), UNO_QUERY);
if (xColumnControls.is())
{
- Reference< ::com::sun::star::awt::XTextComponent > xColControl;
- ::cppu::extractInterface(xColControl,xColumnControls->getByIndex(GetViewColumnPos(nCol)));
+ Reference< ::com::sun::star::awt::XTextComponent > xColControl(
+ xColumnControls->getByIndex(GetViewColumnPos(nCol)),
+ css::uno::UNO_QUERY);
if (xColControl.is())
{
m_bActivatingForDrop = sal_True;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 8dd70fb3c1db..b679a28d64cd 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -3026,8 +3026,9 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION) >>= xConn;
#if OSL_DEBUG_LEVEL > 1
{
- Reference< XComponent > xComp;
- ::cppu::extractInterface(xComp, xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION));
+ Reference< XComponent > xComp(
+ xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),
+ css::uno::UNO_QUERY);
}
#endif
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();
}
}
}