summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/Awrapado.cxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:24:29 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-19 12:24:29 +0200
commit92667c8edbaee9a252b1d5d221eb62849f76697c (patch)
tree8f1d329f2259b7d5bff054bc14d0965637df6961 /connectivity/source/drivers/ado/Awrapado.cxx
parentbaecdfb578cb7bc992944857ad4d8882ef7e842c (diff)
parent48b4a99ce2451f1ddf2e8e128bbfcd6683072999 (diff)
Merge branch 'master' into feature/gnumake4
Conflicts: connectivity/source/cpool/Zregistration.cxx connectivity/source/drivers/evoab/LCatalog.cxx connectivity/source/drivers/evoab/LColumnAlias.cxx connectivity/source/drivers/evoab/LColumnAlias.hxx connectivity/source/drivers/evoab/LColumns.cxx connectivity/source/drivers/evoab/LColumns.hxx connectivity/source/drivers/evoab/LConfigAccess.cxx connectivity/source/drivers/evoab/LConfigAccess.hxx connectivity/source/drivers/evoab/LConnection.cxx connectivity/source/drivers/evoab/LConnection.hxx connectivity/source/drivers/evoab/LDatabaseMetaData.cxx connectivity/source/drivers/evoab/LDatabaseMetaData.hxx connectivity/source/drivers/evoab/LDriver.cxx connectivity/source/drivers/evoab/LDriver.hxx connectivity/source/drivers/evoab/LFolderList.cxx connectivity/source/drivers/evoab/LFolderList.hxx connectivity/source/drivers/evoab/LNoException.cxx connectivity/source/drivers/evoab/LPreparedStatement.cxx connectivity/source/drivers/evoab/LPreparedStatement.hxx connectivity/source/drivers/evoab/LResultSet.cxx connectivity/source/drivers/evoab/LResultSet.hxx connectivity/source/drivers/evoab/LServices.cxx connectivity/source/drivers/evoab/LStatement.cxx connectivity/source/drivers/evoab/LStatement.hxx connectivity/source/drivers/evoab/LTable.cxx connectivity/source/drivers/evoab/LTable.hxx connectivity/source/drivers/evoab/LTables.cxx connectivity/source/drivers/evoab/LTables.hxx connectivity/source/drivers/evoab/evoab.xml connectivity/source/drivers/evoab/makefile.mk editeng/Library_editeng.mk framework/Library_fwe.mk framework/test/test.cxx idl/prj/d.lst idl/util/idlpch.cxx linguistic/Makefile linguistic/Module_linguistic.mk linguistic/inc/linguistic/lngdllapi.h linguistic/inc/linguistic/lngprophelp.hxx linguistic/inc/linguistic/misc.hxx linguistic/prj/build.lst linguistic/prj/d.lst linguistic/qa/unoapi/Test.java linguistic/source/grammarchecker.cxx linguistic/source/grammarchecker.hxx linguistic/source/hyphdta.cxx linguistic/source/lngprophelp.cxx linguistic/source/makefile.mk linguistic/source/spelldta.cxx sfx2/Library_qstart.mk sfx2/Library_sfx.mk sfx2/inc/sfx2/qswin32.h sfx2/prj/build.lst sfx2/qa/cppunit/makefile.mk xmlscript/inc/xmlscript/xcrdllapi.h xmlscript/prj/d.lst xmlscript/util/makefile.mk
Diffstat (limited to 'connectivity/source/drivers/ado/Awrapado.cxx')
-rw-r--r--connectivity/source/drivers/ado/Awrapado.cxx48
1 files changed, 26 insertions, 22 deletions
diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx
index 442c1bdde439..35f16c778fe0 100644
--- a/connectivity/source/drivers/ado/Awrapado.cxx
+++ b/connectivity/source/drivers/ado/Awrapado.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
+#include <sal/macros.h>
#include "ado/Awrapado.hxx"
#include "ado/Awrapadox.hxx"
#include <comphelper/types.hxx>
@@ -407,7 +409,7 @@ CommandTypeEnum WpADOCommand::get_CommandType( ) const
return eNum;
}
-// gibt den Namen des Feldes zur"ueck
+// returns the name of the field
::rtl::OUString WpADOCommand::GetName() const
{
OSL_ENSURE(pInterface,"Interface is null!");
@@ -483,7 +485,7 @@ WpADOProperties WpADOField::get_Properties()
sal_Int32 WpADOField::GetActualSize() const
{
OSL_ENSURE(pInterface,"Interface is null!");
- sal_Int32 nActualSize=0;
+ ADO_LONGPTR nActualSize=0;
pInterface->get_ActualSize(&nActualSize);
return nActualSize;
}
@@ -507,12 +509,12 @@ sal_Int32 WpADOField::GetStatus() const
sal_Int32 WpADOField::GetDefinedSize() const
{
OSL_ENSURE(pInterface,"Interface is null!");
- sal_Int32 nDefinedSize=0;
+ ADO_LONGPTR nDefinedSize=0;
pInterface->get_DefinedSize(&nDefinedSize);
return nDefinedSize;
}
-// gibt den Namen des Feldes zur"ueck
+// returns the name of the field
::rtl::OUString WpADOField::GetName() const
{
OSL_ENSURE(pInterface,"Interface is null!");
@@ -774,10 +776,10 @@ void WpADORecordset::Close()
return bSupports == VARIANT_TRUE;
}
-PositionEnum WpADORecordset::get_AbsolutePosition()
+PositionEnum_Param WpADORecordset::get_AbsolutePosition()
{
OSL_ENSURE(pInterface,"Interface is null!");
- PositionEnum aTemp=adPosUnknown;
+ PositionEnum_Param aTemp=adPosUnknown;
pInterface->get_AbsolutePosition(&aTemp);
return aTemp;
}
@@ -896,19 +898,19 @@ WpADOProperties WpADORecordset::get_Properties() const
return SUCCEEDED(pInterface->NextRecordset(&RecordsAffected,ppiRset));
}
- sal_Bool WpADORecordset::get_RecordCount(sal_Int32 &_nRet) const
+ sal_Bool WpADORecordset::get_RecordCount(ADO_LONGPTR &_nRet) const
{
OSL_ENSURE(pInterface,"Interface is null!");
return SUCCEEDED(pInterface->get_RecordCount(&_nRet));
}
- sal_Bool WpADORecordset::get_MaxRecords(sal_Int32 &_nRet) const
+ sal_Bool WpADORecordset::get_MaxRecords(ADO_LONGPTR &_nRet) const
{
OSL_ENSURE(pInterface,"Interface is null!");
return SUCCEEDED(pInterface->get_MaxRecords(&_nRet));
}
- sal_Bool WpADORecordset::put_MaxRecords(sal_Int32 _nRet)
+ sal_Bool WpADORecordset::put_MaxRecords(ADO_LONGPTR _nRet)
{
OSL_ENSURE(pInterface,"Interface is null!");
return SUCCEEDED(pInterface->put_MaxRecords(_nRet));
@@ -1640,7 +1642,7 @@ ADORecordset* WpADOConnection::getExportedKeys( const ::com::sun::star::uno::Any
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1681,7 +1683,7 @@ ADORecordset* WpADOConnection::getImportedKeys( const ::com::sun::star::uno::Any
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1724,7 +1726,7 @@ ADORecordset* WpADOConnection::getPrimaryKeys( const ::com::sun::star::uno::Any&
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1765,7 +1767,7 @@ ADORecordset* WpADOConnection::getIndexInfo(
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1808,7 +1810,7 @@ ADORecordset* WpADOConnection::getTablePrivileges( const ::com::sun::star::uno::
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1855,7 +1857,7 @@ ADORecordset* WpADOConnection::getCrossReference( const ::com::sun::star::uno::A
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1905,7 +1907,7 @@ ADORecordset* WpADOConnection::getProcedures( const ::com::sun::star::uno::Any&
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -1947,7 +1949,7 @@ ADORecordset* WpADOConnection::getProcedureColumns( const ::com::sun::star::uno:
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -2004,7 +2006,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata
++nPos;
::rtl::OUStringBuffer aTypes;
- ::rtl::OUString aComma = ::rtl::OUString::createFromAscii(",");
+ ::rtl::OUString aComma( RTL_CONSTASCII_USTRINGPARAM( "," ));
const ::rtl::OUString* pIter = types.getConstArray();
const ::rtl::OUString* pEnd = pIter + types.getLength();
for( ; pIter != pEnd ; ++pIter)
@@ -2019,7 +2021,7 @@ ADORecordset* WpADOConnection::getTables( const ::com::sun::star::uno::Any& cata
varCriteria[nPos].setString(sTypeNames);
// Create SafeArray Bounds and initialize the array
- const sal_Int32 nCrit = sizeof varCriteria / sizeof varCriteria[0];
+ const sal_Int32 nCrit = SAL_N_ELEMENTS( varCriteria );
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
rgsabound[0].cElements = nCrit;
@@ -2057,7 +2059,7 @@ ADORecordset* WpADOConnection::getColumns( const ::com::sun::star::uno::Any& cat
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -2102,7 +2104,7 @@ ADORecordset* WpADOConnection::getColumnPrivileges( const ::com::sun::star::uno:
// Create SafeArray Bounds and initialize the array
rgsabound[0].lLbound = 0;
- rgsabound[0].cElements = sizeof varCriteria / sizeof varCriteria[0];
+ rgsabound[0].cElements = SAL_N_ELEMENTS( varCriteria );
psa = SafeArrayCreate( VT_VARIANT, 1, rgsabound );
sal_Int32 nPos=0;
@@ -2137,7 +2139,7 @@ ADORecordset* WpADOConnection::getTypeInfo(DataTypeEnum /*_eType*/)
{
// Create elements used in the array
OLEVariant varCriteria[2];
- const int nCrit = sizeof varCriteria / sizeof varCriteria[0];
+ const int nCrit = SAL_N_ELEMENTS( varCriteria );
// Create SafeArray Bounds and initialize the array
SAFEARRAYBOUND rgsabound[1];
rgsabound[0].lLbound = 0;
@@ -2199,3 +2201,5 @@ OLEVariant OTools::getValue(const WpADOProperties& _rProps,const OLEVariant &_aP
WpADOProperty aProp(_rProps.GetItem(_aPosition));
return aProp.GetValue();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */