summaryrefslogtreecommitdiffstats
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-02 16:15:51 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-08 06:08:14 +0000
commitb14224fe97b8a44232c9c1401d3a49771f46582e (patch)
tree8f9cf31cf4b51a0edbb43022499a6acd17d0945d /connectivity
parentBASIC : Use vector in SbiExprList to avoid any dependencies (diff)
downloadcore-b14224fe97b8a44232c9c1401d3a49771f46582e.tar.gz
core-b14224fe97b8a44232c9c1401d3a49771f46582e.zip
loplugin:unusedmethods
using an idea from dtardon: <dtardon> noelgrandin, hi. could you try to run the unusedmethods clang plugin with "make build-nocheck"? that would catch functions that are only used in tests. e.g., i just removed the whole o3tl::range class, which has not been used in many years, but htere was a test for it... <noelgrandin> dtardon, interesting idea! Sure, I can do that. Change-Id: I5653953a426a2186a1e43017212d87ffce520387 Reviewed-on: https://gerrit.libreoffice.org/22041 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbexception.cxx7
-rw-r--r--connectivity/source/drivers/firebird/ResultSetMetaData.hxx4
-rw-r--r--connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx13
-rw-r--r--connectivity/source/drivers/mork/MResultSet.hxx6
-rw-r--r--connectivity/source/drivers/mork/MResultSetMetaData.hxx4
-rw-r--r--connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx3
-rw-r--r--connectivity/source/inc/dbase/dindexnode.hxx5
-rw-r--r--connectivity/source/inc/file/FResultSetMetaData.hxx4
-rw-r--r--connectivity/source/inc/java/sql/DriverPropertyInfo.hxx2
-rw-r--r--connectivity/source/inc/java/tools.hxx18
-rw-r--r--connectivity/source/inc/odbc/OResultSetMetaData.hxx3
11 files changed, 0 insertions, 69 deletions
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index da440efd1a13..83b02d6cf56f 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -178,13 +178,6 @@ SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLException*() const
}
-SQLExceptionInfo::operator const ::com::sun::star::sdbc::SQLWarning*() const
-{
- OSL_ENSURE(isKindOf(SQL_WARNING), "SQLExceptionInfo::operator SQLException* : invalid call !");
- return static_cast<const ::com::sun::star::sdbc::SQLWarning*>(m_aContent.getValue());
-}
-
-
SQLExceptionInfo::operator const ::com::sun::star::sdb::SQLContext*() const
{
OSL_ENSURE(isKindOf(SQL_CONTEXT), "SQLExceptionInfo::operator SQLException* : invalid call !");
diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.hxx b/connectivity/source/drivers/firebird/ResultSetMetaData.hxx
index 5f6d5914e2ee..7047abc03f29 100644
--- a/connectivity/source/drivers/firebird/ResultSetMetaData.hxx
+++ b/connectivity/source/drivers/firebird/ResultSetMetaData.hxx
@@ -52,10 +52,6 @@ namespace connectivity
, m_pSqlda(pSqlda)
{}
- /// Avoid ambigous cast error from the compiler.
- inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
- { return this; }
-
virtual sal_Int32 SAL_CALL getColumnCount()
throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL isAutoIncrement(sal_Int32 column)
diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
index 1c8d6f98749c..6ad2734a085a 100644
--- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
+++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx
@@ -48,17 +48,4 @@ jclass java_sql_DriverPropertyInfo::getMyClass() const
}
-bool java_sql_DriverPropertyInfo::required()
-{
- jboolean out(0);
- SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
-
- {
- jfieldID id = t.pEnv->GetFieldID(getMyClass(),"required","Z");
- if(id)
- out = t.pEnv->GetBooleanField( object, id);
- } //t.pEnv
- return out;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx
index 142c375c52de..4c370c42ae5c 100644
--- a/connectivity/source/drivers/mork/MResultSet.hxx
+++ b/connectivity/source/drivers/mork/MResultSet.hxx
@@ -118,12 +118,6 @@ namespace connectivity
OResultSet(OCommonStatement* pStmt, const std::shared_ptr< ::connectivity::OSQLParseTreeIterator >& _pSQLIterator );
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
- {
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this));
- }
-
// ::cppu::OComponentHelper
virtual void SAL_CALL disposing() override;
// XInterface
diff --git a/connectivity/source/drivers/mork/MResultSetMetaData.hxx b/connectivity/source/drivers/mork/MResultSetMetaData.hxx
index e3bd88e4ca32..f3f9da432a7f 100644
--- a/connectivity/source/drivers/mork/MResultSetMetaData.hxx
+++ b/connectivity/source/drivers/mork/MResultSetMetaData.hxx
@@ -58,10 +58,6 @@ namespace connectivity
{}
- /// Avoid ambigous cast error from the compiler.
- inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
- { return this; }
-
void checkColumnIndex(sal_Int32 column) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx
index bf11724a9c8c..cde5ecdddb84 100644
--- a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx
+++ b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx
@@ -48,9 +48,6 @@ namespace connectivity
ODatabaseMetaDataResultSetMetaData( )
{
}
- /// Avoid ambigous cast error from the compiler.
- inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
- { return this; }
virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx
index 18b143ac8dd0..2a324b4c03eb 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -69,7 +69,6 @@ namespace connectivity
bool operator < (const ONDXKey& rKey) const;
bool operator <= (const ONDXKey& rKey) const;
bool operator > (const ONDXKey& rKey) const;
- bool operator >= (const ONDXKey& rKey) const;
static bool IsText(sal_Int32 eType);
@@ -310,10 +309,6 @@ namespace connectivity
{
return !operator > (rKey);
}
- inline bool ONDXKey::operator >= (const ONDXKey& rKey) const
- {
- return !operator< (rKey);
- }
inline void ONDXNode::SetChild(ONDXPagePtr aCh, ONDXPage* pParent)
{
diff --git a/connectivity/source/inc/file/FResultSetMetaData.hxx b/connectivity/source/inc/file/FResultSetMetaData.hxx
index 5c03723b10cc..d5071612f681 100644
--- a/connectivity/source/inc/file/FResultSetMetaData.hxx
+++ b/connectivity/source/inc/file/FResultSetMetaData.hxx
@@ -50,10 +50,6 @@ namespace connectivity
// a Constructor, that is needed for when Returning the Object is needed:
OResultSetMetaData(const ::rtl::Reference<connectivity::OSQLColumns>& _rxColumns,const OUString& _aTableName,OFileTable* _pTable);
- /// Avoid ambigous cast error from the compiler.
- inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
- { return this; }
-
virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL isCaseSensitive( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
diff --git a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx
index db86f2af73fe..1db9dae973e2 100644
--- a/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx
+++ b/connectivity/source/inc/java/sql/DriverPropertyInfo.hxx
@@ -39,8 +39,6 @@ namespace connectivity
virtual ~java_sql_DriverPropertyInfo();
// A ctor that is needed for returning the object
java_sql_DriverPropertyInfo( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ){}
-
- bool required();
};
}
diff --git a/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx
index bd600501cfc3..aa6e805628b6 100644
--- a/connectivity/source/inc/java/tools.hxx
+++ b/connectivity/source/inc/java/tools.hxx
@@ -43,24 +43,6 @@ namespace connectivity
java_util_Properties* createStringPropertyArray(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& info ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- template<class T,class JT> ::com::sun::star::uno::Sequence< T > copyArrayAndDelete(JNIEnv *pEnv,jobjectArray _Array, const T*, const JT* )
- {
- ::com::sun::star::uno::Sequence< T > xOut;
- if(_Array)
- {
- jsize nLen = pEnv->GetArrayLength(_Array);
- xOut.realloc(nLen);
- for(jsize i=0;i<nLen;++i)
- {
- JT xInfo(pEnv,pEnv->GetObjectArrayElement(_Array,i));
- java_lang_Object::ThrowSQLException(pEnv,nullptr);
- xOut.getArray()[i] = xInfo;
- }
- pEnv->DeleteLocalRef(_Array);
- }
- return xOut;
- }
-
jobject convertTypeMapToJavaMap(JNIEnv *pEnv,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & _rMap);
/** return if a exception occurred
diff --git a/connectivity/source/inc/odbc/OResultSetMetaData.hxx b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
index 70ec0382b884..de591e3035f1 100644
--- a/connectivity/source/inc/odbc/OResultSetMetaData.hxx
+++ b/connectivity/source/inc/odbc/OResultSetMetaData.hxx
@@ -84,9 +84,6 @@ namespace connectivity
{
return m_pConnection->getOdbcFunction(_nIndex);
}
- // Avoid ambigous cast error from the compiler.
- inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
- { return this; }
virtual sal_Int32 SAL_CALL getColumnCount( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL isAutoIncrement( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) override;