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 | |
parent | 92d3025521ec8939b66500347f8d38ed5b24e3c8 (diff) |
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>
37 files changed, 148 insertions, 181 deletions
diff --git a/compilerplugins/clang/unusedmethods.py b/compilerplugins/clang/unusedmethods.py index a81bd6b5fd9f..a15107994374 100755 --- a/compilerplugins/clang/unusedmethods.py +++ b/compilerplugins/clang/unusedmethods.py @@ -4,17 +4,27 @@ import sys import re import io -definitionSet = set() -publicDefinitionSet = set() +# -------------------------------------------------------------------------------------------- +# globals +# -------------------------------------------------------------------------------------------- + +definitionSet = set() # set of tuple(return_type, name_and_params) definitionToSourceLocationMap = dict() -callSet = set() -usedReturnSet = set() -sourceLocationSet = set() -calledFromOutsideSet = set() + +# for the "unused methods" analysis +callSet = set() # set of tuple(return_type, name_and_params) + +# for the "unnecessary public" analysis +publicDefinitionSet = set() # set of tuple(return_type, name_and_params) +calledFromOutsideSet = set() # set of tuple(return_type, name_and_params) + +# for the "unused return types" analysis +usedReturnSet = set() # set of tuple(return_type, name_and_params) + # things we need to exclude for reasons like : # - it's a weird template thingy that confuses the plugin -exclusionSet = set([ +unusedMethodsExclusionSet = set([ "double basegfx::DoubleTraits::maxVal()", "double basegfx::DoubleTraits::minVal()", "double basegfx::DoubleTraits::neutral()", @@ -116,6 +126,10 @@ normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+") def normalizeTypeParams( line ): return normalizeTypeParamsRegex.sub("type-parameter-?-?", line) +# -------------------------------------------------------------------------------------------- +# primary input loop +# -------------------------------------------------------------------------------------------- + # The parsing here is designed to avoid grabbing stuff which is mixed in from gbuild. # I have not yet found a way of suppressing the gbuild output. with io.open(sys.argv[1], "rb", buffering=1024*1024) as txt: @@ -162,38 +176,46 @@ for k, definitions in sourceLocationToDefinitionMap.iteritems(): definitionSet.remove(d) def isOtherConstness( d, callSet ): - clazz = d[0] + " " + d[1] + method = d[0] + " " + d[1] # if this method is const, and there is a non-const variant of it, and the non-const variant is in use, then leave it alone if d[0].startswith("const ") and d[1].endswith(" const"): if ((d[0][6:],d[1][:-6]) in callSet): return True - elif clazz.endswith(" const"): - clazz2 = clazz[:len(clazz)-6] # strip off " const" - if ((d[0],clazz2) in callSet): + elif method.endswith(" const"): + method2 = method[:len(method)-6] # strip off " const" + if ((d[0],method2) in callSet): return True - if clazz.endswith(" const") and ("::iterator" in clazz): - clazz2 = clazz[:len(clazz)-6] # strip off " const" - clazz2 = clazz2.replace("::const_iterator", "::iterator") - if ((d[0],clazz2) in callSet): + if method.endswith(" const") and ("::iterator" in method): + method2 = method[:len(method)-6] # strip off " const" + method2 = method2.replace("::const_iterator", "::iterator") + if ((d[0],method2) in callSet): return True # if this method is non-const, and there is a const variant of it, and the const variant is in use, then leave it alone - if (not clazz.endswith(" const")) and ((d[0],"const " + clazz + " const") in callSet): + if (not method.endswith(" const")) and ((d[0],"const " + method + " const") in callSet): return True - if (not clazz.endswith(" const")) and ("::iterator" in clazz): - clazz2 = clazz.replace("::iterator", "::const_iterator") + " const" - if ((d[0],clazz2) in callSet): + if (not method.endswith(" const")) and ("::iterator" in method): + method2 = method.replace("::iterator", "::const_iterator") + " const" + if ((d[0],method2) in callSet): return True return False +# sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely +def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): + return [int(text) if text.isdigit() else text.lower() + for text in re.split(_nsre, s)] +def sort_set_by_natural_key(s): + return sorted(s, key=lambda v: natural_sort_key(v[1])) + -# ------------------------------------------- -# Do the "unused methods" part -# ------------------------------------------- +# -------------------------------------------------------------------------------------------- +# "unused methods" analysis +# -------------------------------------------------------------------------------------------- -tmp1set = set() +tmp1set = set() # set of tuple(method, source_location) +unusedSet = set() # set of tuple(return_type, name_and_params) for d in definitionSet: - clazz = d[0] + " " + d[1] - if clazz in exclusionSet: + method = d[0] + " " + d[1] + if method in unusedMethodsExclusionSet: continue if d in callSet: continue @@ -249,34 +271,30 @@ for d in definitionSet: if d[1].endswith("::CreateDefault()"): continue - tmp1set.add((clazz, definitionToSourceLocationMap[d])) + unusedSet.add(d) # used by the "unused return types" analysis + tmp1set.add((method, definitionToSourceLocationMap[d])) -# sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely -def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): - return [int(text) if text.isdigit() else text.lower() - for text in re.split(_nsre, s)] - -# sort results by name and line number -tmp1list = sorted(tmp1set, key=lambda v: natural_sort_key(v[1])) - -# print out the results +# print out the results, sorted by name and line number with open("unused.methods", "wt") as f: - for t in tmp1list: + for t in sort_set_by_natural_key(tmp1set): f.write(t[1] + "\n") f.write(" " + t[0] + "\n") -# ------------------------------------------- -# Do the "unused return types" part -# ------------------------------------------- +# -------------------------------------------------------------------------------------------- +# "unused return types" analysis +# -------------------------------------------------------------------------------------------- tmp2set = set() for d in definitionSet: - clazz = d[0] + " " + d[1] + method = d[0] + " " + d[1] if d in usedReturnSet: continue + if d in unusedSet: + continue if isOtherConstness(d, usedReturnSet): continue - if d[0] == "void": + # ignore methods with no return type, and constructors + if d[0] == "void" or d[0] == "": continue # ignore bool returns, provides important documentation in the code if d[0] == "_Bool": @@ -299,24 +317,22 @@ for d in definitionSet: # ignore the SfxPoolItem CreateDefault methods for now if d[1].endswith("::CreateDefault()"): continue - tmp2set.add((clazz, definitionToSourceLocationMap[d])) + tmp2set.add((method, definitionToSourceLocationMap[d])) -# sort results by name and line number -tmp2list = sorted(tmp2set, key=lambda v: natural_sort_key(v[1])) - +# print output, sorted by name and line number with open("unused.returns", "wt") as f: - for t in tmp2list: - f.write(t[1]) + for t in sort_set_by_natural_key(tmp2set): + f.write(t[1] + "\n") f.write(" " + t[0] + "\n") -# ------------------------------------------- -# Do the "unnecessary public" part -# ------------------------------------------- +# -------------------------------------------------------------------------------------------- +# "unnecessary public" analysis +# -------------------------------------------------------------------------------------------- tmp3set = set() for d in publicDefinitionSet: - clazz = d[0] + " " + d[1] + method = d[0] + " " + d[1] if d in calledFromOutsideSet: continue if isOtherConstness(d, calledFromOutsideSet): @@ -324,13 +340,11 @@ for d in publicDefinitionSet: # ignore external code if definitionToSourceLocationMap[d].startswith("external/"): continue - tmp3set.add((clazz, definitionToSourceLocationMap[d])) + tmp3set.add((method, definitionToSourceLocationMap[d])) -# sort results by name and line number -tmp3list = sorted(tmp3set, key=lambda v: natural_sort_key(v[1])) - +# print output, sorted by name and line number with open("unused.public", "wt") as f: - for t in tmp3list: + for t in sort_set_by_natural_key(tmp3set): f.write(t[1] + "\n") f.write(" " + t[0] + "\n") 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); }; diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 48787bbab49d..b54e6500b8f2 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1737,12 +1737,12 @@ Size& SVGActionWriter::ImplMap( const Size& rSz, Size& rDstSz ) const } -Rectangle& SVGActionWriter::ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const +void SVGActionWriter::ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const { Point aTL( rRect.TopLeft() ); Size aSz( rRect.GetSize() ); - return( rDstRect = Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) ) ); + rDstRect = Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) ); } diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx index 6b056f743950..e26427542cdd 100644 --- a/filter/source/svg/svgwriter.hxx +++ b/filter/source/svg/svgwriter.hxx @@ -292,7 +292,7 @@ private: long ImplMap( sal_Int32 nVal ) const; Point& ImplMap( const Point& rPt, Point& rDstPt ) const; Size& ImplMap( const Size& rSz, Size& rDstSz ) const; - Rectangle& ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const; + void ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const; tools::Polygon& ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const; tools::PolyPolygon& ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const; diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index 12a1dc769c19..d6adb8d809ad 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -73,13 +73,12 @@ public: p->AddFirstRef(); } - T pop_back() + void pop_back() { T p = base_t::back(); base_t::pop_back(); if( p ) p->ReleaseRef(); - return p; } }; diff --git a/include/oox/core/xmlfilterbase.hxx b/include/oox/core/xmlfilterbase.hxx index c118c227b38b..32f5430f2526 100644 --- a/include/oox/core/xmlfilterbase.hxx +++ b/include/oox/core/xmlfilterbase.hxx @@ -224,10 +224,8 @@ public: /** Write the document properties into into the current OPC package. @param xProperties The document properties to export. - - @return *this */ - XmlFilterBase& exportDocumentProperties( const css::uno::Reference< css::document::XDocumentProperties >& xProperties ); + void exportDocumentProperties( const css::uno::Reference< css::document::XDocumentProperties >& xProperties ); void importDocumentProperties(); diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index b270076cfec7..1d914686e038 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -222,7 +222,7 @@ protected: // Interface to SdrPaintWindow protected: void AppendPaintWindow(SdrPaintWindow& rNew); - SdrPaintWindow* RemovePaintWindow(SdrPaintWindow& rOld); + void RemovePaintWindow(SdrPaintWindow& rOld); void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 ) override; public: diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx index 75724446e993..891d022660a6 100644 --- a/include/vcl/threadex.hxx +++ b/include/vcl/threadex.hxx @@ -45,10 +45,10 @@ namespace vcl virtual ~SolarThreadExecutor(); virtual long doIt() = 0; - long execute() { return impl_execute(); } + void execute() { impl_execute(); } private: - long impl_execute(); + void impl_execute(); }; namespace solarthread { diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 2019f31e26ee..b668cf83b056 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -803,7 +803,7 @@ writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentPropertie pAppProps->endElement( XML_Properties ); } -XmlFilterBase& XmlFilterBase::exportDocumentProperties( const Reference< XDocumentProperties >& xProperties ) +void XmlFilterBase::exportDocumentProperties( const Reference< XDocumentProperties >& xProperties ) { if( xProperties.is() ) { @@ -811,7 +811,6 @@ XmlFilterBase& XmlFilterBase::exportDocumentProperties( const Reference< XDocume writeAppProperties( *this, xProperties ); writeCustomProperties( *this, xProperties ); } - return *this; } // protected ------------------------------------------------------------------ diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 8da500e6241e..e3ab5d702949 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -99,9 +99,9 @@ public: { Py_DECREF(used); } - int setUsed(PyObject *key) + void setUsed(PyObject *key) { - return PyDict_SetItem(used, key, Py_True); + PyDict_SetItem(used, key, Py_True); } void setInitialised(const OUString& key, sal_Int32 pos = -1) { diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 1d695fb7f54b..681785103ddf 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -307,11 +307,10 @@ private: if( pRoot ) pRoot->EnumNodes( LINK( this, RscEnumerateObj, CallBackWriteRc ) ); } - ERRTYPE WriteSrc( RscTop * pCl, ObjNode * pRoot ){ + void WriteSrc( RscTop * pCl, ObjNode * pRoot ){ pClass = pCl; if( pRoot ) pRoot->EnumNodes( LINK( this, RscEnumerateObj, CallBackWriteSrc ) ); - return aError; } public: void WriteRcFile( RscWriteRc & rMem, FILE * fOutput ); diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx index 8ea69de84f71..40ffbdafb80d 100644 --- a/sc/inc/filter.hxx +++ b/sc/inc/filter.hxx @@ -104,7 +104,7 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin { // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) = 0; virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest ) = 0; - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; + virtual void ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; virtual void ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions ) = 0; virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index b2b4edd896b3..a69f624d8a9c 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -95,7 +95,7 @@ public: /** ScSingleRefOpToken with ocMatRef. */ formula::FormulaToken* AddMatrixSingleReference( const ScSingleRefData& rRef ); formula::FormulaToken* AddDoubleReference( const ScComplexRefData& rRef ); - formula::FormulaToken* AddRangeName( sal_uInt16 n, sal_Int16 nSheet ); + void AddRangeName( sal_uInt16 n, sal_Int16 nSheet ); formula::FormulaToken* AddDBRange( sal_uInt16 n ); formula::FormulaToken* AddExternalName( sal_uInt16 nFileId, const OUString& rName ); void AddExternalSingleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef ); diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index e20104b0ad95..d9c2505c6f81 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2070,9 +2070,9 @@ FormulaToken* ScTokenArray::AddMatrix( const ScMatrixRef& p ) return Add( new ScMatrixToken( p ) ); } -FormulaToken* ScTokenArray::AddRangeName( sal_uInt16 n, sal_Int16 nSheet ) +void ScTokenArray::AddRangeName( sal_uInt16 n, sal_Int16 nSheet ) { - return Add( new FormulaIndexToken( ocName, n, nSheet)); + Add( new FormulaIndexToken( ocName, n, nSheet)); } FormulaToken* ScTokenArray::AddDBRange( sal_uInt16 n ) diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index 2f15ebe0bbc6..b5c620f03007 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -46,7 +46,7 @@ void ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc, ScExportDif( rStream, pDoc, ScRange( aStart, aEnd ), eNach ); } -FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, +void ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, const ScRange&rRange, const rtl_TextEncoding eCharSet ) { OSL_ENSURE( rRange.aStart <= rRange.aEnd, "*ScExportDif(): Range not sorted!" ); @@ -90,7 +90,6 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc const sal_Char* pNumData = "0,"; const sal_Char* pNumDataERROR = "0,0\nERROR\n"; - FltError eRet = eERR_OK; OUStringBuffer aOS; OUString aString; SCCOL nEndCol = rRange.aEnd.Col(); @@ -265,8 +264,6 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc // restore original value rOut.SetStreamCharSet( eStreamCharSet ); - - return eRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index 1fb6b03c321d..0b753785b9ef 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -289,7 +289,7 @@ public: // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) override; virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest ) override; - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; + virtual void ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; virtual void ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions ) override; virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 47a796414ce8..104002539744 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2230,7 +2230,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, rtl_TextEncoding ) override { return eERR_INTERN; } virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress&, const rtl_TextEncoding ) override {} - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override { return eERR_INTERN; } + virtual void ScExportDif( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override {} virtual void ScExportHTML( SvStream&, const OUString&, ScDocument*, const ScRange&, const rtl_TextEncoding, bool, const OUString&, OUString&, const OUString& ) override {} virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override {} diff --git a/sd/source/ui/animations/CategoryListBox.cxx b/sd/source/ui/animations/CategoryListBox.cxx index 769f47646f7b..4f66a379b963 100644 --- a/sd/source/ui/animations/CategoryListBox.cxx +++ b/sd/source/ui/animations/CategoryListBox.cxx @@ -34,13 +34,11 @@ CategoryListBox::~CategoryListBox() { } -sal_Int32 CategoryListBox::InsertCategory( const OUString& rStr ) +void CategoryListBox::InsertCategory( const OUString& rStr ) { sal_Int32 n = ListBox::InsertEntry( rStr ); if( n != LISTBOX_ENTRY_NOTFOUND ) ListBox::SetEntryFlags( n, ListBox::GetEntryFlags(n) | ListBoxEntryFlags::DisableSelection ); - - return n; } void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) diff --git a/sd/source/ui/animations/CategoryListBox.hxx b/sd/source/ui/animations/CategoryListBox.hxx index f485673be89d..e0bcad3ae541 100644 --- a/sd/source/ui/animations/CategoryListBox.hxx +++ b/sd/source/ui/animations/CategoryListBox.hxx @@ -33,7 +33,7 @@ public: virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE; - sal_Int32 InsertCategory( const OUString& rStr ); + void InsertCategory( const OUString& rStr ); DECL_LINK_TYPED(implDoubleClickHdl, ListBox&, void); diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx index b18c70e96462..e6a654149d3c 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx @@ -631,7 +631,7 @@ bool ClientBox::Notify( NotifyEvent& rNEvt ) return true; } -long ClientBox::addEntry( const std::shared_ptr<ClientInfo>& pClientInfo ) +void ClientBox::addEntry( const std::shared_ptr<ClientInfo>& pClientInfo ) { long nPos = 0; @@ -664,8 +664,6 @@ long ClientBox::addEntry( const std::shared_ptr<ClientInfo>& pClientInfo ) Invalidate(); m_bNeedsRecalc = true; - - return nPos; } void ClientBox::clearEntries() diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.hxx b/sd/source/ui/dlg/RemoteDialogClientBox.hxx index c125efe040ef..a4b072efb151 100644 --- a/sd/source/ui/dlg/RemoteDialogClientBox.hxx +++ b/sd/source/ui/dlg/RemoteDialogClientBox.hxx @@ -147,7 +147,7 @@ public: void RecalcAll(); void selectEntry( const long nPos ); - long addEntry(const std::shared_ptr<ClientInfo>& pClientInfo); + void addEntry(const std::shared_ptr<ClientInfo>& pClientInfo); void clearEntries(); OUString getPin(); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 47996d76c935..8411d11ec3f5 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -93,19 +93,14 @@ void SdrPaintView::AppendPaintWindow(SdrPaintWindow& rNew) maPaintWindows.push_back(&rNew); } -SdrPaintWindow* SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld) +void SdrPaintView::RemovePaintWindow(SdrPaintWindow& rOld) { - SdrPaintWindow* pRetval = nullptr; const SdrPaintWindowVector::iterator aFindResult = ::std::find(maPaintWindows.begin(), maPaintWindows.end(), &rOld); if(aFindResult != maPaintWindows.end()) { - // remember return value, aFindResult is no longer valid after deletion - pRetval = *aFindResult; maPaintWindows.erase(aFindResult); } - - return pRetval; } OutputDevice* SdrPaintView::GetFirstOutputDevice() const diff --git a/sw/inc/IDocumentListsAccess.hxx b/sw/inc/IDocumentListsAccess.hxx index f53cfa84a3c0..a6bf287b8ccd 100644 --- a/sw/inc/IDocumentListsAccess.hxx +++ b/sw/inc/IDocumentListsAccess.hxx @@ -34,7 +34,7 @@ class IDocumentListsAccess virtual void deleteList( const OUString& rListId ) = 0; virtual SwList* getListByName( const OUString& rListId ) const = 0; - virtual SwList* createListForListStyle( const OUString& rListStyleName ) = 0; + virtual void createListForListStyle( const OUString& rListStyleName ) = 0; virtual SwList* getListForListStyle( const OUString& rListStyleName ) const = 0; virtual void deleteListForListStyle( const OUString& rListStyleName ) = 0; virtual void deleteListsByDefaultListStyle( const OUString& rListStyleName ) = 0; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 47d472b8c942..d918b5696148 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -451,7 +451,7 @@ public: void ApplyAutoMark(); /// Key for managing index. - sal_uInt16 GetTOIKeys( SwTOIKeyType eTyp, std::vector<OUString>& rArr ) const; + void GetTOIKeys( SwTOIKeyType eTyp, std::vector<OUString>& rArr ) const; void SetOutlineNumRule(const SwNumRule&); const SwNumRule* GetOutlineNumRule() const; diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 52e77192384e..edb6ff5d01ae 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -479,7 +479,7 @@ public: rRect contains rect of Fly (for its highlight). */ SwChainRet Chainable( SwRect &rRect, const SwFrameFormat &rSource, const Point &rPt ) const; SwChainRet Chain( SwFrameFormat &rSource, const Point &rPt ); - SwChainRet Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ); + void Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ); void Unchain( SwFrameFormat &rFormat ); void HideChainMarker(); void SetChainMarker(); diff --git a/sw/source/core/doc/DocumentListsManager.cxx b/sw/source/core/doc/DocumentListsManager.cxx index d2b86ae45154..7b071ee397ce 100644 --- a/sw/source/core/doc/DocumentListsManager.cxx +++ b/sw/source/core/doc/DocumentListsManager.cxx @@ -83,25 +83,25 @@ SwList* DocumentListsManager::getListByName( const OUString& sListId ) const return pList; } -SwList* DocumentListsManager::createListForListStyle( const OUString& sListStyleName ) +void DocumentListsManager::createListForListStyle( const OUString& sListStyleName ) { if ( sListStyleName.isEmpty() ) { OSL_FAIL( "<DocumentListsManager::createListForListStyle(..)> - no list style name provided. Serious defect." ); - return nullptr; + return; } if ( getListForListStyle( sListStyleName ) ) { OSL_FAIL( "<DocumentListsManager::createListForListStyle(..)> - a list for the provided list style name already exists. Serious defect." ); - return nullptr; + return; } SwNumRule* pNumRule = m_rDoc.FindNumRulePtr( sListStyleName ); if ( !pNumRule ) { OSL_FAIL( "<DocumentListsManager::createListForListStyle(..)> - for provided list style name no list style is found. Serious defect." ); - return nullptr; + return; } OUString sListId( pNumRule->GetDefaultListId() ); // can be empty String @@ -112,8 +112,6 @@ SwList* DocumentListsManager::createListForListStyle( const OUString& sListStyle SwList* pNewList = createList( sListId, sListStyleName ); maListStyleLists[sListStyleName] = pNewList; pNumRule->SetDefaultListId( pNewList->GetListId() ); - - return pNewList; } SwList* DocumentListsManager::getListForListStyle( const OUString& sListStyleName ) const diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index d52205a968e1..fcb9ec294831 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -217,9 +217,9 @@ const SwTOXType* SwEditShell::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const // manage keys for the alphabetical index -sal_uInt16 SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, std::vector<OUString>& rArr ) const +void SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, std::vector<OUString>& rArr ) const { - return GetDoc()->GetTOIKeys( eTyp, rArr ); + GetDoc()->GetTOIKeys( eTyp, rArr ); } sal_uInt16 SwEditShell::GetTOXCount() const diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index c921e7fd8fc5..35f3421b4e3d 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -2587,9 +2587,9 @@ SwChainRet SwFEShell::Chainable( SwRect &rRect, const SwFrameFormat &rSource, return nRet; } -SwChainRet SwFEShell::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ) +void SwFEShell::Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest ) { - return GetDoc()->Chain(rSource, rDest); + GetDoc()->Chain(rSource, rDest); } SwChainRet SwFEShell::Chain( SwFrameFormat &rSource, const Point &rPt ) diff --git a/sw/source/core/inc/DocumentListsManager.hxx b/sw/source/core/inc/DocumentListsManager.hxx index 0bb6c2f8b33a..5ad855934265 100644 --- a/sw/source/core/inc/DocumentListsManager.hxx +++ b/sw/source/core/inc/DocumentListsManager.hxx @@ -41,7 +41,7 @@ class DocumentListsManager : public IDocumentListsAccess void deleteList( const OUString& rListId ) override; SwList* getListByName( const OUString& rListId ) const override; - SwList* createListForListStyle( const OUString& rListStyleName ) override; + void createListForListStyle( const OUString& rListStyleName ) override; SwList* getListForListStyle( const OUString& rListStyleName ) const override; void deleteListForListStyle( const OUString& rListStyleName ) override; void deleteListsByDefaultListStyle( const OUString& rListStyleName ) override; diff --git a/vcl/inc/unx/printergfx.hxx b/vcl/inc/unx/printergfx.hxx index 6f71cbacc2ad..d22d351346db 100644 --- a/vcl/inc/unx/printergfx.hxx +++ b/vcl/inc/unx/printergfx.hxx @@ -353,7 +353,7 @@ public: const PrinterBmp& rBitmap); // font and text handling - sal_uInt16 SetFont ( + void SetFont ( sal_Int32 nFontID, sal_Int32 nPointHeight, sal_Int32 nPointWidth, diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 3101d98e5ffb..27e432278874 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2248,7 +2248,7 @@ LogicalFontInstance* PdfBuiltinFontFace::CreateFontInstance( FontSelectPattern& } -sal_Int32 PDFWriterImpl::newPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation ) +void PDFWriterImpl::newPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation ) { endPage(); m_nCurrentPage = m_aPages.size(); @@ -2262,8 +2262,6 @@ sal_Int32 PDFWriterImpl::newPage( sal_Int32 nPageWidth, sal_Int32 nPageHeight, P appendDouble( 72.0/double(getReferenceDevice()->GetDPIX()), aBuf ); aBuf.append( " w\n" ); writeBuffer( aBuf.getStr(), aBuf.getLength() ); - - return m_nCurrentPage; } void PDFWriterImpl::endPage() @@ -12204,22 +12202,20 @@ sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const Rectang return m_aDestinationIdTranslation[ nDestId ] = createDest( rRect, nPageNr, eType ); } -sal_Int32 PDFWriterImpl::setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ) +void PDFWriterImpl::setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ) { if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() ) - return -1; + return; if( nDestId < 0 || nDestId >= (sal_Int32)m_aDests.size() ) - return -2; + return; m_aLinks[ nLinkId ].m_nDest = nDestId; - - return 0; } -sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL ) +void PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL ) { if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() ) - return -1; + return; m_aLinks[ nLinkId ].m_nDest = -1; @@ -12237,8 +12233,6 @@ sal_Int32 PDFWriterImpl::setLinkURL( sal_Int32 nLinkId, const OUString& rURL ) m_xTrans->parseStrict( aURL ); m_aLinks[ nLinkId ].m_aURL = aURL.Complete; - - return 0; } void PDFWriterImpl::setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId ) @@ -12260,17 +12254,14 @@ sal_Int32 PDFWriterImpl::createOutlineItem( sal_Int32 nParent, const OUString& r return nNewItem; } -sal_Int32 PDFWriterImpl::setOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent ) +void PDFWriterImpl::setOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent ) { if( nItem < 1 || nItem >= (sal_Int32)m_aOutline.size() ) - return -1; - - int nRet = 0; + return; if( nNewParent < 0 || nNewParent >= (sal_Int32)m_aOutline.size() || nNewParent == nItem ) { nNewParent = 0; - nRet = -2; } // remove item from previous parent sal_Int32 nParentID = m_aOutline[ nItem ].m_nParentID; @@ -12291,27 +12282,23 @@ sal_Int32 PDFWriterImpl::setOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewPa // insert item to new parent's list of children m_aOutline[ nNewParent ].m_aChildren.push_back( nItem ); - - return nRet; } -sal_Int32 PDFWriterImpl::setOutlineItemText( sal_Int32 nItem, const OUString& rText ) +void PDFWriterImpl::setOutlineItemText( sal_Int32 nItem, const OUString& rText ) { if( nItem < 1 || nItem >= (sal_Int32)m_aOutline.size() ) - return -1; + return; m_aOutline[ nItem ].m_aTitle = psp::WhitespaceToSpace( rText ); - return 0; } -sal_Int32 PDFWriterImpl::setOutlineItemDest( sal_Int32 nItem, sal_Int32 nDestID ) +void PDFWriterImpl::setOutlineItemDest( sal_Int32 nItem, sal_Int32 nDestID ) { if( nItem < 1 || nItem >= (sal_Int32)m_aOutline.size() ) // item does not exist - return -1; + return; if( nDestID < 0 || nDestID >= (sal_Int32)m_aDests.size() ) // dest does not exist - return -2; + return; m_aOutline[nItem].m_nDestID = nDestID; - return 0; } const sal_Char* PDFWriterImpl::getStructureTag( PDFWriter::StructElement eType ) diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index c8ebcac959e9..506187fa2e3d 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1014,7 +1014,7 @@ public: OutputDevice* getReferenceDevice(); /* document structure */ - sal_Int32 newPage( sal_Int32 nPageWidth , sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation ); + void newPage( sal_Int32 nPageWidth , sal_Int32 nPageHeight, PDFWriter::Orientation eOrientation ); bool emit(); const std::set< PDFWriter::ErrorCode > & getErrors() const { return m_aErrors;} void insertError( PDFWriter::ErrorCode eErr ) { m_aErrors.insert( eErr ); } @@ -1184,15 +1184,15 @@ public: sal_Int32 createLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 ); sal_Int32 createDest( const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ ); sal_Int32 registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ ); - sal_Int32 setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ); - sal_Int32 setLinkURL( sal_Int32 nLinkId, const OUString& rURL ); - void setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId ); + void setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId ); + void setLinkURL( sal_Int32 nLinkId, const OUString& rURL ); + void setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId ); // outline sal_Int32 createOutlineItem( sal_Int32 nParent = 0, const OUString& rText = OUString(), sal_Int32 nDestID = -1 ); - sal_Int32 setOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent ); - sal_Int32 setOutlineItemText( sal_Int32 nItem, const OUString& rText ); - sal_Int32 setOutlineItemDest( sal_Int32 nItem, sal_Int32 nDestID ); + void setOutlineItemParent( sal_Int32 nItem, sal_Int32 nNewParent ); + void setOutlineItemText( sal_Int32 nItem, const OUString& rText ); + void setOutlineItemDest( sal_Int32 nItem, sal_Int32 nDestID ); // notes void createNote( const Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr = -1 ); diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx index 171b569a70b8..0117d0e0f1a5 100644 --- a/vcl/source/helper/threadex.cxx +++ b/vcl/source/helper/threadex.cxx @@ -46,7 +46,7 @@ IMPL_LINK_NOARG_TYPED(SolarThreadExecutor, worker, void*, void) } } -long SolarThreadExecutor::impl_execute() +void SolarThreadExecutor::impl_execute() { if( ::osl::Thread::getCurrentIdentifier() == Application::GetMainThreadIdentifier() ) { @@ -68,7 +68,6 @@ long SolarThreadExecutor::impl_execute() else osl_waitCondition( m_aFinish, nullptr ); } - return m_nReturn; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx index 93765d2c4078..d78207744085 100644 --- a/vcl/unx/generic/print/text_gfx.cxx +++ b/vcl/unx/generic/print/text_gfx.cxx @@ -100,8 +100,7 @@ PrinterGfx::PSUploadPS1Font (sal_Int32 nFontID) * implement text handling printer routines, */ -sal_uInt16 -PrinterGfx::SetFont( +void PrinterGfx::SetFont( sal_Int32 nFontID, sal_Int32 nHeight, sal_Int32 nWidth, @@ -122,8 +121,6 @@ PrinterGfx::SetFont( maVirtualStatus.mbArtBold = bArtBold; mnTextAngle = nAngle; mbTextVertical = bVertical; - - return 0; } void PrinterGfx::drawGlyphs( |