diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-25 11:28:58 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-26 07:26:47 +0000 |
commit | 509f0c6a8aa36b7fa532f784e10bbe9ec4e57c4b (patch) | |
tree | a05e37827bdee103d11362388acbf6d0d57dca48 /connectivity | |
parent | Convert MtfConversion to scoped enum (diff) | |
download | core-509f0c6a8aa36b7fa532f784e10bbe9ec4e57c4b.tar.gz core-509f0c6a8aa36b7fa532f784e10bbe9ec4e57c4b.zip |
loplugin:unusedreturntypes
and clean up the python script
Change-Id: I0a7068153290fbbb60bfeb4c8bda1c24d514500f
Reviewed-on: https://gerrit.libreoffice.org/25439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
4 files changed, 19 insertions, 30 deletions
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 8a4339f2ddf6..1b886ed20a20 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -221,7 +221,7 @@ OOperand* OPredicateCompiler::execute(OSQLParseNode* pPredicateNode) } -OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +void OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 3,"OFILECursor: Fehler im Parse Tree"); @@ -240,7 +240,7 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th SQL_ISRULE(pPredicateNode->getChild(2),fold)) ) { m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,nullptr); - return nullptr; + return; } sal_Int32 ePredicateType( SQLFilterOperator::EQUAL ); @@ -264,12 +264,10 @@ OOperand* OPredicateCompiler::execute_COMPARE(OSQLParseNode* pPredicateNode) th execute(pPredicateNode->getChild(0)); execute(pPredicateNode->getChild(2)); m_aCodeList.push_back( new OOp_COMPARE(ePredicateType) ); - - return nullptr; } -OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +void OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); const OSQLParseNode* pPart2 = pPredicateNode->getChild(1); @@ -290,7 +288,7 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( SQL_ISRULE(pAtom,fold)) ) { m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,nullptr); - return nullptr; + return; } if (pOptEscape->count() != 0) @@ -315,11 +313,9 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( ? new OOp_NOTLIKE(cEscape) : new OOp_LIKE(cEscape); m_aCodeList.push_back(pOperator); - - return nullptr; } -OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +void OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); @@ -394,11 +390,9 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr else pBoolOp = new OOp_AND(); m_aCodeList.push_back(pBoolOp); - - return nullptr; } -OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +void OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() == 2,"OFILECursor: Fehler im Parse Tree"); const OSQLParseNode* pPart2 = pPredicateNode->getChild(1); @@ -414,8 +408,6 @@ OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) thro OBoolOperator* pOperator = (ePredicateType == SQLFilterOperator::SQLNULL) ? new OOp_ISNULL() : new OOp_ISNOTNULL(); m_aCodeList.push_back(pOperator); - - return nullptr; } OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) @@ -598,7 +590,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD delete pOperand; } -OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +void OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); @@ -612,10 +604,9 @@ OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) thro pOperator = new OOp_Lower(); m_aCodeList.push_back(pOperator); - return nullptr; } -OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) +void OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { OOperator* pOperator = nullptr; @@ -900,7 +891,6 @@ OOperand* OPredicateCompiler::executeFunction(OSQLParseNode* pPredicateNode) } m_aCodeList.push_back(pOperator); - return nullptr; } diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index 695564f91b96..d2b8356b2843 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -47,19 +47,18 @@ namespace connectivity LoadProductsInfo(); } - sal_Int32 ProfileAccess::LoadProductsInfo() + void ProfileAccess::LoadProductsInfo() { //tdf#39279: LO should search Thunderbird first then Seamonkey and finally Firefox //load thunderbird profiles to m_ProductProfileList - sal_Int32 count = LoadXPToolkitProfiles(MozillaProductType_Thunderbird); + LoadXPToolkitProfiles(MozillaProductType_Thunderbird); //load SeaMonkey 2 profiles to m_ProductProfileList - count += LoadXPToolkitProfiles(MozillaProductType_Mozilla); + LoadXPToolkitProfiles(MozillaProductType_Mozilla); //load firefox profiles to m_ProductProfileList //firefox profile does not containt address book, but maybe others need them - count += LoadXPToolkitProfiles(MozillaProductType_Firefox); - return count; + LoadXPToolkitProfiles(MozillaProductType_Firefox); } //Thunderbird and firefox profiles are saved in profiles.ini sal_Int32 ProfileAccess::LoadXPToolkitProfiles(MozillaProductType product) diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx index 585cf24eb881..ad7e85706ec2 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx @@ -79,7 +79,7 @@ namespace connectivity bool SAL_CALL getProfileExists( ::com::sun::star::mozilla::MozillaProductType product, const OUString& profileName ) throw (::com::sun::star::uno::RuntimeException); protected: ProductStruct m_ProductProfileList[4]; - sal_Int32 LoadProductsInfo(); + void LoadProductsInfo(); sal_Int32 LoadXPToolkitProfiles(MozillaProductType product); }; diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index 04acb53ec844..e0e6eab9b0cd 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -68,13 +68,13 @@ namespace connectivity void setOrigColumns(const css::uno::Reference< css::container::XNameAccess>& rCols) { m_orgColumns = rCols; } const css::uno::Reference< css::container::XNameAccess>& getOrigColumns() const { return m_orgColumns; } protected: - OOperand* execute_COMPARE(connectivity::OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - OOperand* execute_LIKE(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - OOperand* execute_BETWEEN(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - OOperand* execute_ISNULL(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void execute_COMPARE(connectivity::OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void execute_LIKE(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void execute_BETWEEN(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void execute_ISNULL(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); OOperand* execute_Operand(connectivity::OSQLParseNode* pPredicateNode) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - OOperand* execute_Fold(OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - OOperand* executeFunction(OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void execute_Fold(OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + void executeFunction(OSQLParseNode* pPredicateNode) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; |