[Libreoffice-commits] core.git: connectivity/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri Apr 28 12:01:36 UTC 2017
connectivity/source/drivers/jdbc/Array.cxx | 8 ++++----
connectivity/source/drivers/jdbc/ResultSet.cxx | 2 +-
connectivity/source/drivers/jdbc/tools.cxx | 2 +-
connectivity/source/drivers/mork/MResultSet.cxx | 7 -------
connectivity/source/drivers/mork/MResultSet.hxx | 1 -
connectivity/source/inc/java/tools.hxx | 2 +-
6 files changed, 7 insertions(+), 15 deletions(-)
New commits:
commit 04422d7f9f9f76708cd1f36fea5bd9cd50cf6083
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Apr 28 13:10:14 2017 +0200
loplugin:checkunusedparams in connectivity
Change-Id: I302af54f4bcb5807c264f7926cffa025550ccb00
Reviewed-on: https://gerrit.libreoffice.org/37065
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx
index 445848483dd6..9322687a0b29 100644
--- a/connectivity/source/drivers/jdbc/Array.cxx
+++ b/connectivity/source/drivers/jdbc/Array.cxx
@@ -56,7 +56,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL java_sql_Array::getArray( const css
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+ jobject obj = convertTypeMapToJavaMap(typeMap);
static const char * const cSignature = "(Ljava/util/Map;)[Ljava/lang/Object;";
static const char * const cMethodName = "getArray";
static jmethodID mID(nullptr);
@@ -74,7 +74,7 @@ css::uno::Sequence< css::uno::Any > SAL_CALL java_sql_Array::getArrayAtIndex( sa
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
- jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+ jobject obj = convertTypeMapToJavaMap(typeMap);
static const char * const cSignature = "(IILjava/util/Map;)[Ljava/lang/Object;";
static const char * const cMethodName = "getArray";
// submit Java-Call
@@ -93,7 +93,7 @@ css::uno::Reference< css::sdbc::XResultSet > SAL_CALL java_sql_Array::getResultS
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
// convert Parameter
- jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+ jobject obj = convertTypeMapToJavaMap(typeMap);
// initialize temporary variable
static const char * const cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * const cMethodName = "getResultSet";
@@ -113,7 +113,7 @@ css::uno::Reference< css::sdbc::XResultSet > SAL_CALL java_sql_Array::getResultS
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
{
// convert parameter
- jobject obj = convertTypeMapToJavaMap(t.pEnv,typeMap);
+ jobject obj = convertTypeMapToJavaMap(typeMap);
// initialize temporary variable
static const char * const cSignature = "(Ljava/util/Map;)Ljava/sql/ResultSet;";
static const char * const cMethodName = "getResultSetAtIndex";
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 490006b529f7..2b5f7fded2fe 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -295,7 +295,7 @@ Any SAL_CALL java_sql_ResultSet::getObject( sal_Int32 columnIndex, const Referen
jvalue args[2];
// convert parameter
args[0].i = columnIndex;
- args[1].l = convertTypeMapToJavaMap(t.pEnv,typeMap);
+ args[1].l = convertTypeMapToJavaMap(typeMap);
// initialize temporary Variable
// Java-Call
static jmethodID mID(nullptr);
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index 58580ccc16d2..13ee3000ddb5 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -173,7 +173,7 @@ OUString connectivity::JavaString2String(JNIEnv *pEnv,jstring Str)
return aStr;
}
-jobject connectivity::convertTypeMapToJavaMap(JNIEnv* /*pEnv*/,const Reference< css::container::XNameAccess > & _rMap)
+jobject connectivity::convertTypeMapToJavaMap(const Reference< css::container::XNameAccess > & _rMap)
{
if ( _rMap.is() )
{
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index f7e29c8612b7..da0e28facaa8 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -309,13 +309,6 @@ bool OResultSet::fetchRow(sal_Int32 cardNumber,bool bForceReload)
// Check whether we've already fetched the row...
if ( !(m_aRow->get())[0].isNull() && (sal_Int32)(m_aRow->get())[0] == cardNumber )
return true;
- //Check whether the old row has been changed
- if (cardNumber == m_nUpdatedRow)
- {
- //write back the changes first
- if (!pushCard(cardNumber)) //error write back the changes
- throw SQLException();
- }
}
// else
// m_aQuery.resyncRow(cardNumber);
diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx
index eb87579bfe9d..0633ada71638 100644
--- a/connectivity/source/drivers/mork/MResultSet.hxx
+++ b/connectivity/source/drivers/mork/MResultSet.hxx
@@ -259,7 +259,6 @@ protected:
/// @throws css::sdbc::SQLException
/// @throws css::uno::RuntimeException
bool fetchCurrentRow();
- static bool pushCard(sal_uInt32 ) { return true; }
bool validRow( sal_uInt32 nRow );
bool seekRow( eRowPosition pos, sal_Int32 nOffset = 0 );
sal_Int32 deletedCount();
diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx
index ed68a9e9498c..0aab2bb0b0e2 100644
--- a/connectivity/source/inc/java/tools.hxx
+++ b/connectivity/source/inc/java/tools.hxx
@@ -45,7 +45,7 @@ namespace connectivity
/// @throws css::uno::RuntimeException
java_util_Properties* createStringPropertyArray(const css::uno::Sequence< css::beans::PropertyValue >& info );
- jobject convertTypeMapToJavaMap(JNIEnv *pEnv,const css::uno::Reference< css::container::XNameAccess > & _rMap);
+ jobject convertTypeMapToJavaMap(const css::uno::Reference< css::container::XNameAccess > & _rMap);
/** return if a exception occurred
@param pEnv
More information about the Libreoffice-commits
mailing list