diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-14 16:32:07 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-15 09:36:42 +0200 |
commit | 098462c6f69c40422c74cef8f052b7b1ff0c90e8 (patch) | |
tree | b8d3e6f848b18753c9fbd91468b8094b029af742 | |
parent | f19e32b101d56ceb7215a6a9d45d39a2cd264189 (diff) |
loplugin:unusedmethods unused return value in sc
Change-Id: I3ccc98d2e042120093e2e8508518681588692393
104 files changed, 190 insertions, 580 deletions
diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index 8ac565c2ac65..3aa0ba1f1157 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -426,14 +426,6 @@ struct ScAddressHashFunctor } }; -struct ScAddressEqualFunctor -{ - bool operator()( const ScAddress & rAdr1, const ScAddress & rAdr2 ) const - { - return rAdr1 == rAdr2; - } -}; - inline bool ValidAddress( const ScAddress& rAddress ) { return ValidCol(rAddress.Col()) && ValidRow(rAddress.Row()) && ValidTab(rAddress.Tab()); @@ -506,7 +498,7 @@ public: const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); SC_DLLPUBLIC sal_uInt16 ParseCols( const OUString&, ScDocument* = nullptr, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); - SC_DLLPUBLIC sal_uInt16 ParseRows( const OUString&, ScDocument* = nullptr, + SC_DLLPUBLIC void ParseRows( const OUString&, ScDocument* = nullptr, const ScAddress::Details& rDetails = ScAddress::detailsOOOa1 ); /** Parse an Excel style reference up to and including the sheet name @@ -682,22 +674,6 @@ inline size_t ScRange::hashStartColumn() const static_cast<size_t>(aEnd.Row()); } -struct ScRangeHashAreaFunctor -{ - size_t operator()( const ScRange & rRange ) const - { - return rRange.hashArea(); - } -}; - -struct ScRangeEqualFunctor -{ - bool operator()( const ScRange & rRange1, const ScRange & rRange2 ) const - { - return rRange1 == rRange2; - } -}; - inline bool ValidRange( const ScRange& rRange ) { return ValidAddress(rRange.aStart) && ValidAddress(rRange.aEnd); diff --git a/sc/inc/attarray.hxx b/sc/inc/attarray.hxx index 6dd84817b134..bf6a916ee304 100644 --- a/sc/inc/attarray.hxx +++ b/sc/inc/attarray.hxx @@ -125,7 +125,7 @@ public: void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, ScStyleSheet* pStyle ); void ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCache* pCache, ScEditDataArray* pDataArray = nullptr ); - bool SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize); + void SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize); void ApplyLineStyleArea( SCROW nStartRow, SCROW nEndRow, const ::editeng::SvxBorderLine* pLine, bool bColorOnly ); @@ -154,11 +154,11 @@ public: bool Search( SCROW nRow, SCSIZE& nIndex ) const; bool HasAttrib( SCROW nRow1, SCROW nRow2, sal_uInt16 nMask ) const; - bool IsMerged( SCROW nRow ) const; + bool IsMerged( SCROW nRow ) const; bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL& rPaintCol, SCROW& rPaintRow, bool bRefresh ); - bool RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow ); + void RemoveAreaMerge( SCROW nStartRow, SCROW nEndRow ); void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset ); bool IsStyleSheetUsed( const ScStyleSheet& rStyle, bool bGatherAllStyles ) const; diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index 0b403d663989..070f1f04a7de 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -126,13 +126,13 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override; bool GetProtection() const { return bProtection; } - bool SetProtection( bool bProtect); + void SetProtection( bool bProtect); bool GetHideFormula() const { return bHideFormula; } - bool SetHideFormula( bool bHFormula); + void SetHideFormula( bool bHFormula); bool GetHideCell() const { return bHideCell; } - bool SetHideCell( bool bHCell); + void SetHideCell( bool bHCell); bool GetHidePrint() const { return bHidePrint; } - bool SetHidePrint( bool bHPrint); + void SetHidePrint( bool bHPrint); inline ScProtectionAttr& operator=(const ScProtectionAttr& rProtection) { bProtection = rProtection.bProtection; diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx index 9a03d91c213c..11d4295bb556 100644 --- a/sc/inc/autoform.hxx +++ b/sc/inc/autoform.hxx @@ -327,7 +327,7 @@ public: ScAutoFormat(); ScAutoFormat(const ScAutoFormat& r); ~ScAutoFormat(); - bool Load(); + void Load(); bool Save(); void SetSaveLater( bool bSet ); diff --git a/sc/inc/callform.hxx b/sc/inc/callform.hxx index 584c1d17634b..409c95db46c1 100644 --- a/sc/inc/callform.hxx +++ b/sc/inc/callform.hxx @@ -76,13 +76,13 @@ public: sal_uInt16 GetParamCount() const { return nParamCount; } ParamType GetParamType(sal_uInt16 nIndex) const { return eParamType[nIndex]; } ParamType GetAsyncType() const { return eAsyncType; } - bool Call(void** ppParam) const; - bool Unadvice(double nHandle); + void Call(void** ppParam) const; + void Unadvice(double nHandle); /** name and description of parameter nParam. nParam==0 => Desc := function description, Name := n/a */ - bool getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam ) const; + void getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam ) const; }; class LegacyFuncCollection diff --git a/sc/inc/chartarr.hxx b/sc/inc/chartarr.hxx index 0cd54ede3892..0e2c255b4312 100644 --- a/sc/inc/chartarr.hxx +++ b/sc/inc/chartarr.hxx @@ -104,8 +104,6 @@ public: bool empty() const; ScChartArray* operator[](size_t nIndex); const ScChartArray* operator[](size_t nIndex) const; - - bool operator==(const ScChartCollection& rCmp) const; }; #endif diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 8671f182e5e8..fcbc1339f3bd 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -193,7 +193,6 @@ public: void UpdateChartsContainingTab( SCTAB nTab ); bool operator==( const ScChartListenerCollection& r ) const; - bool operator!=( const ScChartListenerCollection& r ) const; /** * Start listening on hide/show change within specified cell range. A diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index 2cdc14b2d1c2..a7b85b9ac3df 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -256,14 +256,12 @@ protected: ScBigRange& GetBigRange() { return aBigRange; } - ScChangeActionLinkEntry* AddLink( - ScChangeAction* p, ScChangeActionLinkEntry* pL ) + void AddLink( ScChangeAction* p, ScChangeActionLinkEntry* pL ) { ScChangeActionLinkEntry* pLnk = new ScChangeActionLinkEntry( &pLinkAny, p ); pLnk->SetLink( pL ); - return pLnk; } void RemoveAllAnyLinks(); diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 5c0615cd8ad5..0aaaeaf641fd 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -266,7 +266,7 @@ public: void CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDestCol ); bool InitBlockPosition( sc::ColumnBlockPosition& rBlockPos ); - bool InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const; + void InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const; void DeleteBeforeCopyFromClip( sc::CopyFromClipContext& rCxt, const ScColumn& rClipCol, sc::ColumnSpanSet& rBroadcastSpans ); @@ -331,7 +331,7 @@ public: ScFormulaCell* SetFormulaCell( SCROW nRow, ScFormulaCell* pCell, sc::StartListeningType eListenType = sc::SingleCellListening ); - ScFormulaCell* SetFormulaCell( + void SetFormulaCell( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, ScFormulaCell* pCell, sc::StartListeningType eListenType = sc::SingleCellListening ); diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index d33ecc6fd8aa..5114bd2d2c91 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -362,8 +362,6 @@ public: virtual void SetParent( ScConditionalFormat* ) override {} - bool operator==( const ScFormatEntry& ) const; - virtual void startRendering() override; virtual void endRendering() override; @@ -433,8 +431,6 @@ public: bool MarkUsedExternalReferences() const; // sorted (via std::set) by Index - // operator== only for sorting - bool operator ==( const ScConditionalFormat& r ) const { return nKey == r.nKey; } bool operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; } void startRendering(); @@ -484,8 +480,6 @@ public: void SourceChanged( const ScAddress& rAddr ); - bool operator==( const ScConditionalFormatList& r ) const; // for Ref-Undo - typedef ConditionalFormatContainer::iterator iterator; typedef ConditionalFormatContainer::const_iterator const_iterator; diff --git a/sc/inc/defaultsoptions.hxx b/sc/inc/defaultsoptions.hxx index 466503fbfd7a..0ea046cafec5 100644 --- a/sc/inc/defaultsoptions.hxx +++ b/sc/inc/defaultsoptions.hxx @@ -36,7 +36,6 @@ public: ScDefaultsOptions& operator= ( const ScDefaultsOptions& rCpy ); bool operator== ( const ScDefaultsOptions& rOpt ) const; - bool operator!= ( const ScDefaultsOptions& rOpt ) const; }; diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx index 271b936bba0e..665acbd635c9 100644 --- a/sc/inc/detdata.hxx +++ b/sc/inc/detdata.hxx @@ -51,9 +51,6 @@ public: // for UpdateRef: void SetPos(const ScAddress& rNew) { aPos=rNew; } - - bool operator== ( const ScDetOpData& r ) const - { return eOperation == r.eOperation && aPos == r.aPos; } }; // list of operators diff --git a/sc/inc/detfunc.hxx b/sc/inc/detfunc.hxx index 7792b5a82373..14fb1b19f779 100644 --- a/sc/inc/detfunc.hxx +++ b/sc/inc/detfunc.hxx @@ -116,7 +116,7 @@ class SC_DLLPUBLIC ScDetectiveFunc sal_uInt16 FindSuccLevel( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uInt16 nLevel, sal_uInt16 nDeleteLevel ); - bool FindFrameForObject( SdrObject* pObject, ScRange& rRange ); + void FindFrameForObject( SdrObject* pObject, ScRange& rRange ); void Modified(); diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 37a71a7d172b..f334e3fdab53 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -989,17 +989,17 @@ public: bool IsMerged( const ScAddress& rPos ) const; - bool ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, + void ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark, bool bRefresh = false ); SC_DLLPUBLIC bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, SCTAB nTab, bool bRefresh = false ); bool ExtendMerge( ScRange& rRange, bool bRefresh = false ); - bool ExtendTotalMerge( ScRange& rRange ) const; - SC_DLLPUBLIC bool ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, + void ExtendTotalMerge( ScRange& rRange ) const; + SC_DLLPUBLIC void ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const; - SC_DLLPUBLIC bool ExtendOverlapped( ScRange& rRange ) const; + SC_DLLPUBLIC void ExtendOverlapped( ScRange& rRange ) const; bool RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ); @@ -1653,7 +1653,7 @@ public: // returns whether to export a Default style for this col or not // nDefault is setted to one position in the current row where the Default style is - bool GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); + void GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault); bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, SCTAB nTab, bool bShow ); bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bShow ); @@ -1746,17 +1746,17 @@ public: * data range to use to populate the filter entries is inferred from the * database range that contains the specified cell position. */ - bool GetFilterEntries( + void GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<ScTypedStrData>& rStrings, bool& rHasDates); - SC_DLLPUBLIC bool GetFilterEntriesArea( + SC_DLLPUBLIC void GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, std::vector<ScTypedStrData>& rStrings, bool& rHasDates); - bool GetDataEntries( + void GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens, std::vector<ScTypedStrData>& rStrings, bool bLimit = false ); - bool GetFormulaEntries( ScTypedCaseStrSet& rStrings ); + void GetFormulaEntries( ScTypedCaseStrSet& rStrings ); bool HasAutoFilter( SCCOL nCol, SCROW nRow, SCTAB nTab ); @@ -1773,7 +1773,7 @@ public: bool GetNextSpellingCell(SCCOL& nCol, SCROW& nRow, SCTAB nTab, bool bInSel, const ScMarkData& rMark) const; - bool ReplaceStyle(const SvxSearchItem& rSearchItem, + void ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, ScMarkData& rMark, bool bIsUndo); @@ -2215,7 +2215,7 @@ private: SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol ) const; SCSIZE GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const; - bool ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve ); + void ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve ); void SharePooledResources( ScDocument* pSrcDoc ); diff --git a/sc/inc/documentlinkmgr.hxx b/sc/inc/documentlinkmgr.hxx index d500214acf01..a724cbe29dc5 100644 --- a/sc/inc/documentlinkmgr.hxx +++ b/sc/inc/documentlinkmgr.hxx @@ -57,7 +57,7 @@ public: bool updateDdeLinks( vcl::Window* pWin ); - bool updateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem ); + void updateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem ); size_t getDdeLinkCount() const; diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx index 2329f76a2f78..0926ba25c317 100644 --- a/sc/inc/dpcache.hxx +++ b/sc/inc/dpcache.hxx @@ -156,7 +156,7 @@ public: const IndexArrayType* GetFieldIndexArray( size_t nDim ) const; const ScDPItemDataVec& GetDimMemberValues( SCCOL nDim ) const; - bool InitFromDoc(ScDocument* pDoc, const ScRange& rRange); + void InitFromDoc(ScDocument* pDoc, const ScRange& rRange); bool InitFromDataBase(DBConnector& rDB); /** diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx index 1b586060627d..224421058fa0 100644 --- a/sc/inc/dpitemdata.hxx +++ b/sc/inc/dpitemdata.hxx @@ -42,11 +42,6 @@ public: sal_Int32 mnValue; }; - struct Hash - { - size_t operator() (const ScDPItemData& rVal) const; - }; - private: union { @@ -83,7 +78,6 @@ public: // exact equality bool operator==(const ScDPItemData& r) const; - bool operator!=(const ScDPItemData& r) const; bool operator< (const ScDPItemData& r) const; ScDPItemData& operator= (const ScDPItemData& r); diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 610cf8e89a70..a2fd066349bf 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -193,12 +193,12 @@ public: void ToggleDetails(const css::sheet::DataPilotTableHeaderData& rElemDesc, ScDPObject* pDestObj); - bool FillOldParam(ScPivotParam& rParam) const; - bool FillLabelData(sal_Int32 nDim, ScDPLabelData& Labels); - bool FillLabelData(ScPivotParam& rParam); + void FillOldParam(ScPivotParam& rParam) const; + void FillLabelData(sal_Int32 nDim, ScDPLabelData& Labels); + void FillLabelData(ScPivotParam& rParam); bool GetHierarchiesNA( sal_Int32 nDim, css::uno::Reference< css::container::XNameAccess >& xHiers ); - bool GetHierarchies( sal_Int32 nDim, css::uno::Sequence< OUString >& rHiers ); + void GetHierarchies( sal_Int32 nDim, css::uno::Sequence< OUString >& rHiers ); sal_Int32 GetUsedHierarchy( sal_Int32 nDim ); diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index a80a56ae69f5..14f2a2b83faa 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -513,11 +513,10 @@ public: /** * Mark all tables as referenced that are used by any LinkListener, used * only during store-to-file. - * @returns <TRUE/> if ALL tables of ALL external documents are marked. */ - bool markUsedByLinkListeners(); + void markUsedByLinkListeners(); - bool markUsedExternalRefCells(); + void markUsedExternalRefCells(); /** * Set a table as referenced, used only during store-to-file. diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx index 9de700bf76e0..d7fc6b6f8445 100644 --- a/sc/inc/filter.hxx +++ b/sc/inc/filter.hxx @@ -103,13 +103,13 @@ class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin { // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) = 0; - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest, + virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) = 0; - virtual FltError ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll, + 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 FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; + virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) = 0; virtual ScOrcusFilters* GetOrcusFilters() = 0; diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 5424cb48252f..b98be9677039 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -273,7 +273,7 @@ public: void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ); void UpdateInsertTabAbs(SCTAB nTable); - bool UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ); + void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ); void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ); bool TestTabRefAbs(SCTAB nTable); void UpdateCompile( bool bForceIfNameInUse = false ); diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx index 2e18cced06ec..7ee6d596e30b 100644 --- a/sc/inc/formulagroup.hxx +++ b/sc/inc/formulagroup.hxx @@ -73,7 +73,6 @@ struct FormulaGroupContext : boost::noncopyable ColKey( SCTAB nTab, SCCOL nCol ); bool operator== ( const ColKey& r ) const; - bool operator!= ( const ColKey& r ) const; }; struct ColArray diff --git a/sc/inc/optutil.hxx b/sc/inc/optutil.hxx index deb2d2d8b0ab..17e752e5fbbb 100644 --- a/sc/inc/optutil.hxx +++ b/sc/inc/optutil.hxx @@ -51,9 +51,9 @@ public: css::uno::Sequence< css::uno::Any> GetProperties(const css::uno::Sequence< OUString >& rNames) { return ConfigItem::GetProperties( rNames ); } - bool PutProperties( const css::uno::Sequence< OUString >& rNames, + void PutProperties( const css::uno::Sequence< OUString >& rNames, const css::uno::Sequence< css::uno::Any>& rValues) - { return ConfigItem::PutProperties( rNames, rValues ); } + { ConfigItem::PutProperties( rNames, rValues ); } using ConfigItem::EnableNotification; using ConfigItem::GetNodeNames; diff --git a/sc/inc/orcusfilters.hxx b/sc/inc/orcusfilters.hxx index 2df40a6f6fb5..58e6fcb18361 100644 --- a/sc/inc/orcusfilters.hxx +++ b/sc/inc/orcusfilters.hxx @@ -52,9 +52,9 @@ class ScOrcusXMLContext public: virtual ~ScOrcusXMLContext() {} - virtual bool loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) = 0; + virtual void loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) = 0; - virtual bool importXML(const ScOrcusImportXMLParam& rParam) = 0; + virtual void importXML(const ScOrcusImportXMLParam& rParam) = 0; }; #endif diff --git a/sc/inc/pagepar.hxx b/sc/inc/pagepar.hxx index 881dc4d3859d..23ba00169d7d 100644 --- a/sc/inc/pagepar.hxx +++ b/sc/inc/pagepar.hxx @@ -51,7 +51,6 @@ struct ScPageTableParam ScPageTableParam(); ~ScPageTableParam(); - bool operator== ( const ScPageTableParam& r ) const; void Reset (); }; @@ -67,7 +66,6 @@ struct ScPageAreaParam ScPageAreaParam(); ~ScPageAreaParam(); - bool operator== ( const ScPageAreaParam& r ) const; void Reset (); }; diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index 4080e76fab2b..fb07b5a9d7ae 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -163,8 +163,6 @@ public: return *this; } - operator FontToSubsFontConverter() const - { return h; } }; #endif diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx index 073fab2f9e4d..a3583a7ac4b0 100644 --- a/sc/inc/pivot.hxx +++ b/sc/inc/pivot.hxx @@ -151,7 +151,6 @@ struct ScPivotParam ~ScPivotParam(); ScPivotParam& operator= ( const ScPivotParam& r ); - bool operator== ( const ScPivotParam& r ) const; void SetLabelData(const ScDPLabelDataVector& r); }; @@ -166,8 +165,6 @@ struct ScPivotFuncData explicit ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask ); - bool operator== (const ScPivotFuncData& r) const; - #if DEBUG_PIVOT_TABLE void Dump() const; #endif diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index 7c363a8cd209..baf68850a66d 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -47,7 +47,6 @@ public: const ScPrintOptions& operator= ( const ScPrintOptions& rCpy ); bool operator== ( const ScPrintOptions& rOpt ) const; - bool operator!= ( const ScPrintOptions& rOpt ) const; }; // item for the dialog / options page diff --git a/sc/inc/progress.hxx b/sc/inc/progress.hxx index 4b6acb861e44..113467697c1b 100644 --- a/sc/inc/progress.hxx +++ b/sc/inc/progress.hxx @@ -124,13 +124,12 @@ public: return SetState( nVal ); return true; } - bool SetStateCountDownOnPercent( sal_uLong nVal ) + void SetStateCountDownOnPercent( sal_uLong nVal ) { /// only if percentage increased if ( nGlobalRange && ((nGlobalRange - nVal) * 100 / nGlobalRange) > nGlobalPercent ) - return SetStateCountDown( nVal ); - return true; + SetStateCountDown( nVal ); } sal_uLong GetState() { diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 9eae5b95e80f..7d19174cbe43 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -115,16 +115,15 @@ public: maPairs.push_back( pR ); } void Join( const ScRangePair&, bool bIsInList = false ); - bool UpdateReference( UpdateRefMode, ScDocument*, + void UpdateReference( UpdateRefMode, ScDocument*, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); void DeleteOnTab( SCTAB nTab ); ScRangePair* Find( const ScAddress& ) const; ScRangePair* Find( const ScRange& ) const; ScRangePair** CreateNameSortedArray( size_t& nCount, ScDocument* ) const; - bool operator==( const ScRangePairList& ) const; - ScRangePair* Remove(size_t nPos); + void Remove(size_t nPos); ScRangePair* Remove(ScRangePair* pAdr); size_t size() const; diff --git a/sc/inc/rangenam.hxx b/sc/inc/rangenam.hxx index 4db3e39d320a..f6afd6b292b0 100644 --- a/sc/inc/rangenam.hxx +++ b/sc/inc/rangenam.hxx @@ -164,8 +164,6 @@ inline bool ScRangeData::HasType( RangeType nType ) const extern "C" int SAL_CALL ScRangeData_QsortNameCompare( const void*, const void* ); -bool operator< (const ScRangeData& left, const ScRangeData& right); - class ScRangeName { private: diff --git a/sc/inc/rangeutl.hxx b/sc/inc/rangeutl.hxx index fb129017b5a8..4b6ca43c82ff 100644 --- a/sc/inc/rangeutl.hxx +++ b/sc/inc/rangeutl.hxx @@ -256,7 +256,6 @@ public: ScArea& operator= ( const ScArea& r ); bool operator== ( const ScArea& r ) const; - bool operator!= ( const ScArea& r ) const { return !( operator==(r) ); } public: SCTAB nTab; diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 285a3feee9de..69ee32e81c92 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -251,8 +251,8 @@ public: void SetInSharedDocSaving( bool bNew ) { mbIsInSharedDocSaving = bNew; } bool IsInSharedDocSaving() const { return mbIsInSharedDocSaving; } - SC_DLLPUBLIC bool RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ); - SC_DLLPUBLIC bool UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ); + SC_DLLPUBLIC void RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ); + SC_DLLPUBLIC void UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ); SC_DLLPUBLIC vcl::Window * Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAncestor ); }; diff --git a/sc/inc/spellcheckcontext.hxx b/sc/inc/spellcheckcontext.hxx index 00f5673337ba..fcc873f3294a 100644 --- a/sc/inc/spellcheckcontext.hxx +++ b/sc/inc/spellcheckcontext.hxx @@ -36,7 +36,6 @@ struct SpellCheckContext bool isValid() const; void reset(); - bool operator< (const CellPos& r) const; bool operator== (const CellPos& r) const; }; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 0efff488773c..d2672fe3ff36 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -801,7 +801,7 @@ public: bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const; bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const; bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden); - bool SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden); + void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden); void CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol); void CopyRowHidden(ScTable& rTable, SCROW nStartRow, SCROW nEndRow); void CopyRowHeight(ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset); @@ -1071,7 +1071,7 @@ private: bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel, const ScMarkData& rMark) const; bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) const; - bool TestTabRefAbs(SCTAB nTable) const; + void TestTabRefAbs(SCTAB nTable) const; void CompileDBFormula( sc::CompileFormulaContext& rCxt ); void CompileColRowNameFormula( sc::CompileFormulaContext& rCxt ); diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 1644264fdc0f..26d6ca48b0bf 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -98,7 +98,7 @@ public: formula::FormulaToken* AddRangeName( sal_uInt16 n, bool bGlobal ); formula::FormulaToken* AddDBRange( sal_uInt16 n ); formula::FormulaToken* AddExternalName( sal_uInt16 nFileId, const OUString& rName ); - formula::FormulaToken* AddExternalSingleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef ); + void AddExternalSingleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef ); formula::FormulaToken* AddExternalDoubleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef ); formula::FormulaToken* AddMatrix( const ScMatrixRef& p ); /** ScSingleRefOpToken with ocColRowName. */ @@ -106,10 +106,8 @@ public: virtual formula::FormulaToken* MergeArray( ) override; /** Merge very last SingleRef+ocRange+SingleRef combination into DoubleRef - and adjust pCode array, or do nothing if conditions not met. - Unconditionally returns last token from the resulting pCode array, or - NULL if there is no pCode (which actually would be caller's fault). */ - formula::FormulaToken* MergeRangeReference( const ScAddress & rPos ); + and adjust pCode array, or do nothing if conditions not met. */ + void MergeRangeReference( const ScAddress & rPos ); /// Assign XML string placeholder to the array void AssignXMLString( const OUString &rText, const OUString &rFormulaNmsp ); diff --git a/sc/inc/typedstrdata.hxx b/sc/inc/typedstrdata.hxx index 523c8e7bc3d6..22173f7377c3 100644 --- a/sc/inc/typedstrdata.hxx +++ b/sc/inc/typedstrdata.hxx @@ -57,7 +57,6 @@ public: bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const; }; - bool operator== (const ScTypedStrData& r) const; bool operator< (const ScTypedStrData& r) const; private: diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index f27bf34bb862..34f42bc0cd14 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -143,8 +143,6 @@ public: bool EqualEntries( const ScValidationData& r ) const; // for undo // sort (using std::set) by index - // operator== only for sorting - bool operator ==( const ScValidationData& r ) const { return nKey == r.nKey; } bool operator < ( const ScValidationData& r ) const { return nKey < r.nKey; } private: @@ -205,8 +203,6 @@ public: void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ); void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ); - bool operator==( const ScValidationDataList& r ) const; // for ref-undo - void clear(); }; diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index 12cb38626eb3..88394447a0f4 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -855,7 +855,7 @@ void ScAttrArray::ApplyCacheArea( SCROW nStartRow, SCROW nEndRow, SfxItemPoolCac #endif } -bool ScAttrArray::SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize) +void ScAttrArray::SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize) { ScDocumentPool* pDocPool = pDocument->GetPool(); for (SCSIZE i=0; i<nCount; i++) @@ -865,7 +865,6 @@ bool ScAttrArray::SetAttrEntries(ScAttrEntry* pNewData, SCSIZE nSize) pData = pNewData; nCount = nLimit = nSize; - return true; } static void lcl_MergeDeep( SfxItemSet& rMergeSet, const SfxItemSet& rSource ) @@ -1407,9 +1406,8 @@ bool ScAttrArray::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, return bFound; } -bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow) +void ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow) { - bool bFound = false; const ScPatternAttr* pPattern; const ScMergeAttr* pItem; SCSIZE nIndex; @@ -1462,8 +1460,6 @@ bool ScAttrArray::RemoveAreaMerge(SCROW nStartRow, SCROW nEndRow) else nThisStart = MAXROW+1; // End } - - return bFound; } /** diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx index 9072410caece..36936057cb05 100644 --- a/sc/source/core/data/attrib.cxx +++ b/sc/source/core/data/attrib.cxx @@ -353,28 +353,24 @@ SfxPoolItem* ScProtectionAttr::Create( SvStream& rStream, sal_uInt16 /* n */ ) c return new ScProtectionAttr(bProtect,bHFormula,bHCell,bHPrint); } -bool ScProtectionAttr::SetProtection( bool bProtect) +void ScProtectionAttr::SetProtection( bool bProtect) { bProtection = bProtect; - return true; } -bool ScProtectionAttr::SetHideFormula( bool bHFormula) +void ScProtectionAttr::SetHideFormula( bool bHFormula) { bHideFormula = bHFormula; - return true; } -bool ScProtectionAttr::SetHideCell( bool bHCell) +void ScProtectionAttr::SetHideCell( bool bHCell) { bHideCell = bHCell; - return true; } -bool ScProtectionAttr::SetHidePrint( bool bHPrint) +void ScProtectionAttr::SetHidePrint( bool bHPrint) { bHidePrint = bHPrint; - return true; } /** diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 5a596576ca2e..516453dd2dc1 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -720,13 +720,12 @@ bool ScColumn::InitBlockPosition( sc::ColumnBlockPosition& rBlockPos ) return true; } -bool ScColumn::InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const +void ScColumn::InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const { rBlockPos.miBroadcasterPos = maBroadcasters.begin(); rBlockPos.miCellNotePos = maCellNotes.begin(); rBlockPos.miCellTextAttrPos = maCellTextAttrs.begin(); rBlockPos.miCellPos = maCells.begin(); - return true; } namespace { @@ -1892,7 +1891,7 @@ ScFormulaCell* ScColumn::SetFormulaCell( return pCell; } -ScFormulaCell* ScColumn::SetFormulaCell( +void ScColumn::SetFormulaCell( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, ScFormulaCell* pCell, sc::StartListeningType eListenType ) { @@ -1907,7 +1906,6 @@ ScFormulaCell* ScColumn::SetFormulaCell( CellStorageModified(); AttachNewFormulaCell(rBlockPos.miCellPos, nRow, *pCell, true, eListenType); - return pCell; } bool ScColumn::SetFormulaCells( SCROW nRow, std::vector<ScFormulaCell*>& rCells ) diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index e27a533f4ac0..d2402a339cad 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1781,19 +1781,6 @@ ScFormatEntry* ScCondDateFormatEntry::Clone( ScDocument* pDoc ) const return new ScCondDateFormatEntry( pDoc, *this ); } -bool ScCondDateFormatEntry::operator==( const ScFormatEntry& r ) const -{ - if(r.GetType() != condformat::DATE) - return false; - - const ScCondDateFormatEntry& rEntry = static_cast<const ScCondDateFormatEntry&>(r); - - if(rEntry.meType != meType) - return false; - - return rEntry.maStyleName == maStyleName; -} - void ScCondDateFormatEntry::startRendering() { mpCache.reset(); @@ -2171,19 +2158,6 @@ void ScConditionalFormatList::InsertNew( ScConditionalFormat* pNew ) m_ConditionalFormats.insert(std::unique_ptr<ScConditionalFormat>(pNew)); } -bool ScConditionalFormatList::operator==( const ScConditionalFormatList& r ) const -{ - // For Ref Undo - internal variables are not compared - sal_uInt16 nCount = size(); - bool bEqual = ( nCount == r.size() ); - const_iterator locIterator = begin(); - for(const_iterator itr = r.begin(); itr != r.end() && bEqual; ++itr, ++locIterator) - if (!(*locIterator)->EqualEntries(**itr)) // Entries differ? - bEqual = false; - - return bEqual; -} - ScConditionalFormat* ScConditionalFormatList::GetFormat( sal_uInt32 nKey ) { //FIXME: Binary search diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index c96eb592c6be..48f01cf2c401 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1467,7 +1467,7 @@ bool ScDocument::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, /** * Entries for AutoFilter listbox */ -bool ScDocument::GetFilterEntries( +void ScDocument::GetFilterEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bFilter, std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] && pDBCollection ) @@ -1514,17 +1514,14 @@ bool ScDocument::GetFilterEntries( } sortAndRemoveDuplicates(rStrings, aParam.bCaseSens); - return true; } } - - return false; } /** * Entries for Filter dialog */ -bool ScDocument::GetFilterEntriesArea( +void ScDocument::GetFilterEntriesArea( SCCOL nCol, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bCaseSens, std::vector<ScTypedStrData>& rStrings, bool& rHasDates) { @@ -1532,16 +1529,13 @@ bool ScDocument::GetFilterEntriesArea( { maTabs[nTab]->GetFilterEntries( nCol, nStartRow, nEndRow, rStrings, rHasDates ); sortAndRemoveDuplicates(rStrings, bCaseSens); - return true; } - - return false; } /** * Entries for selection list listbox (no numbers/formulas) */ -bool ScDocument::GetDataEntries( +void ScDocument::GetDataEntries( SCCOL nCol, SCROW nRow, SCTAB nTab, bool bCaseSens, std::vector<ScTypedStrData>& rStrings, bool bLimit ) { @@ -1559,29 +1553,27 @@ bool ScDocument::GetDataEntries( if (pData->GetListType() == css::sheet::TableValidationVisibility::SORTEDASCENDING) sortAndRemoveDuplicates(rStrings, bCaseSens); - return true; + return; } } } if (!ValidTab(nTab) || nTab >= static_cast<SCTAB>(maTabs.size())) - return false; + return; if (!maTabs[nTab]) - return false; + return; std::set<ScTypedStrData> aStrings; - bool bRet = maTabs[nTab]->GetDataEntries(nCol, nRow, aStrings, bLimit); + maTabs[nTab]->GetDataEntries(nCol, nRow, aStrings, bLimit); rStrings.insert(rStrings.end(), aStrings.begin(), aStrings.end()); sortAndRemoveDuplicates(rStrings, bCaseSens); - - return bRet; } /** * Entries for Formula auto input */ -bool ScDocument::GetFormulaEntries( ScTypedCaseStrSet& rStrings ) +void ScDocument::GetFormulaEntries( ScTypedCaseStrSet& rStrings ) { // Range name @@ -1626,8 +1618,6 @@ bool ScDocument::GetFormulaEntries( ScTypedCaseStrSet& rStrings ) } } } - - return true; } void ScDocument::GetEmbedded( ScRange& rRange ) const @@ -2037,12 +2027,10 @@ SCSIZE ScDocument::GetPatternCount( SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW n return 0; } -bool ScDocument::ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve ) +void ScDocument::ReservePatternCount( SCTAB nTab, SCCOL nCol, SCSIZE nReserve ) { if( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] ) - return maTabs[nTab]->ReservePatternCount( nCol, nReserve ); - else - return false; + maTabs[nTab]->ReservePatternCount( nCol, nReserve ); } void ScDocument::GetSortParam( ScSortParam& rParam, SCTAB nTab ) diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index afe6469e44a2..adf38d32d657 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -530,15 +530,13 @@ bool ScDocument::GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, SCTAB nTab, return false; } -bool ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem, +void ScDocument::ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL nCol, SCROW nRow, SCTAB nTab, ScMarkData& rMark, bool bIsUndoP) { if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) - return maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP); - else - return false; + maTabs[nTab]->ReplaceStyle(rSearchItem, nCol, nRow, rMark, bIsUndoP); } void ScDocument::CompileDBFormula() diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index b8206422c46f..7abd034ed484 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -4506,9 +4506,8 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa return MAXROW+1; } -bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault) +void ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& nDefault) { - bool bRet(false); nDefault = 0; ScDocAttrIterator aDocAttrItr(this, nTab, nCol, 0, nCol, nLastRow); SCCOL nColumn; @@ -4551,11 +4550,7 @@ bool ScDocument::GetColDefault( SCTAB nTab, SCCOL nCol, SCROW nLastRow, SCROW& n ++aItr; } nDefault = aDefaultItr->nFirst; - bRet = true; } - else - bRet = true; - return bRet; } void ScDocument::StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2, SCTAB nTab ) @@ -5316,10 +5311,9 @@ bool ScDocument::GetMatrixFormulaRange( const ScAddress& rCellPos, ScRange& rMat return true; } -bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, +void ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab ) const { - bool bFound = false; if ( ValidColRow(rStartCol,rStartRow) && ValidColRow(nEndCol,nEndRow) && ValidTab(nTab) ) { if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) @@ -5366,17 +5360,14 @@ bool ScDocument::ExtendOverlapped( SCCOL& rStartCol, SCROW& rStartRow, { OSL_FAIL("ExtendOverlapped: invalid range"); } - - return bFound; } -bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, +void ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW& rEndRow, const ScMarkData& rMark, bool bRefresh ) { // use all selected sheets from rMark - bool bFound = false; SCCOL nOldEndCol = rEndCol; SCROW nOldEndRow = rEndRow; @@ -5387,15 +5378,12 @@ bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, { SCCOL nThisEndCol = nOldEndCol; SCROW nThisEndRow = nOldEndRow; - if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, *itr, bRefresh ) ) - bFound = true; + ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, *itr, bRefresh ); if ( nThisEndCol > rEndCol ) rEndCol = nThisEndCol; if ( nThisEndRow > rEndRow ) rEndRow = nThisEndRow; } - - return bFound; } bool ScDocument::ExtendMerge( SCCOL nStartCol, SCROW nStartRow, @@ -5448,10 +5436,9 @@ bool ScDocument::ExtendMerge( ScRange& rRange, bool bRefresh ) return bFound; } -bool ScDocument::ExtendTotalMerge( ScRange& rRange ) const +void ScDocument::ExtendTotalMerge( ScRange& rRange ) const { // Extend range to merged cells without including any new non-overlapped cells - bool bRet = false; ScRange aExt = rRange; // ExtendMerge() is non-const, but called withouth refresh. if (const_cast<ScDocument*>(this)->ExtendMerge( aExt )) @@ -5471,15 +5458,12 @@ bool ScDocument::ExtendTotalMerge( ScRange& rRange ) const aExt.aEnd.SetCol(rRange.aEnd.Col()); } - bRet = ( aExt.aEnd != rRange.aEnd ); rRange = aExt; } - return bRet; } -bool ScDocument::ExtendOverlapped( ScRange& rRange ) const +void ScDocument::ExtendOverlapped( ScRange& rRange ) const { - bool bFound = false; SCTAB nStartTab = rRange.aStart.Tab(); SCTAB nEndTab = rRange.aEnd.Tab(); SCCOL nStartCol = rRange.aStart.Col(); @@ -5495,19 +5479,15 @@ bool ScDocument::ExtendOverlapped( ScRange& rRange ) const if (nExtendCol < nStartCol) { nStartCol = nExtendCol; - bFound = true; } if (nExtendRow < nStartRow) { nStartRow = nExtendRow; - bFound = true; } } rRange.aStart.SetCol(nStartCol); rRange.aStart.SetRow(nStartRow); - - return bFound; } bool ScDocument::RefreshAutoFilter( SCCOL nStartCol, SCROW nStartRow, diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 0ba46d436c10..be366b90635b 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -290,7 +290,7 @@ void processBuckets(std::vector<Bucket>& aBuckets, ScDPCache::Field& rField) } -bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) +void ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) { Clear(); @@ -305,7 +305,7 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) // Sanity check if (!ValidRow(nStartRow) || !ValidRow(nEndRow) || nEndRow <= nStartRow) - return false; + return; sal_uInt16 nStartCol = rRange.aStart.Col(); sal_uInt16 nEndCol = rRange.aEnd.Col(); @@ -329,7 +329,7 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) // possible that the new end row becomes lower than the start row // after the shrinkage. Clear(); - return false; + return; } maFields.reserve(mnColumnCount); @@ -379,7 +379,6 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange& rRange) } PostInit(); - return true; } bool ScDPCache::InitFromDataBase(DBConnector& rDB) diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx index 6bd1f736cc14..fa8021f62d4a 100644 --- a/sc/source/core/data/dpitemdata.cxx +++ b/sc/source/core/data/dpitemdata.cxx @@ -29,33 +29,6 @@ const sal_Int32 ScDPItemData::DateFirst = -1; const sal_Int32 ScDPItemData::DateLast = 10000; -size_t ScDPItemData::Hash::operator() (const ScDPItemData& rVal) const -{ - switch (rVal.GetType()) - { - case GroupValue: - case Value: - case RangeStart: - return (size_t)(rVal.mfValue); - case String: - case Error: - { - if (!rVal.mpString) - return 0; - - if (rVal.mbStringInterned) - return reinterpret_cast<size_t>(rVal.mpString); - - OUStringHash aStrHasher; - return aStrHasher(*rVal.mpString); - } - default: - ; - } - - return 0; -} - sal_Int32 ScDPItemData::Compare(const ScDPItemData& rA, const ScDPItemData& rB) { if (rA.meType != rB.meType) @@ -252,11 +225,6 @@ bool ScDPItemData::operator== (const ScDPItemData& r) const return GetString() == r.GetString(); } -bool ScDPItemData::operator!= (const ScDPItemData& r) const -{ - return !operator== (r); -} - bool ScDPItemData::operator< (const ScDPItemData& r) const { return Compare(*this, r) == -1; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 4effa69d84ff..bff5524d9957 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2194,12 +2194,12 @@ void lcl_FillOldFields( ScPivotFieldVector& rFields, rFields.swap(aFields); } -bool ScDPObject::FillOldParam(ScPivotParam& rParam) const +void ScDPObject::FillOldParam(ScPivotParam& rParam) const { const_cast<ScDPObject*>(this)->CreateObjects(); // xSource is needed for field numbers if (!xSource.is()) - return false; + return; rParam.nCol = aOutRange.aStart.Col(); rParam.nRow = aOutRange.aStart.Row(); @@ -2237,7 +2237,6 @@ bool ScDPObject::FillOldParam(ScPivotParam& rParam) const // no error } } - return true; } static void lcl_FillLabelData( ScDPLabelData& rData, const uno::Reference< beans::XPropertySet >& xDimProp ) @@ -2353,34 +2352,34 @@ bool ScDPObject::FillLabelDataForDimension( return true; } -bool ScDPObject::FillLabelData(sal_Int32 nDim, ScDPLabelData& rLabels) +void ScDPObject::FillLabelData(sal_Int32 nDim, ScDPLabelData& rLabels) { CreateObjects(); if (!xSource.is()) - return false; + return; uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions(); uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName ); sal_Int32 nDimCount = xDims->getCount(); if (nDimCount <= 0 || nDim >= nDimCount) - return false; + return; - return FillLabelDataForDimension(xDims, nDim, rLabels); + FillLabelDataForDimension(xDims, nDim, rLabels); } -bool ScDPObject::FillLabelData(ScPivotParam& rParam) +void ScDPObject::FillLabelData(ScPivotParam& rParam) { rParam.maLabelArray.clear(); CreateObjects(); if (!xSource.is()) - return false; + return; uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions(); uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName ); sal_Int32 nDimCount = xDims->getCount(); if (nDimCount <= 0) - return false; + return; for (sal_Int32 nDim = 0; nDim < nDimCount; ++nDim) { @@ -2388,8 +2387,6 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam) FillLabelDataForDimension(xDims, nDim, *pNewLabel); rParam.maLabelArray.push_back(std::unique_ptr<ScDPLabelData>(pNewLabel)); } - - return true; } bool ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XNameAccess >& xHiers ) @@ -2409,16 +2406,13 @@ bool ScDPObject::GetHierarchiesNA( sal_Int32 nDim, uno::Reference< container::XN return bRet; } -bool ScDPObject::GetHierarchies( sal_Int32 nDim, uno::Sequence< OUString >& rHiers ) +void ScDPObject::GetHierarchies( sal_Int32 nDim, uno::Sequence< OUString >& rHiers ) { - bool bRet = false; uno::Reference< container::XNameAccess > xHiersNA; if( GetHierarchiesNA( nDim, xHiersNA ) ) { rHiers = xHiersNA->getElementNames(); - bRet = true; } - return bRet; } sal_Int32 ScDPObject::GetUsedHierarchy( sal_Int32 nDim ) diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index f4110f5f31d1..c954b97e2dcc 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -3391,7 +3391,7 @@ void ScFormulaCell::UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ) // no StartListeningTo because the new sheets have not been inserted yet. } -bool ScFormulaCell::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) +void ScFormulaCell::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) { // Adjust tokens only when it's not grouped or grouped top cell. bool bAdjustCode = !mxGroup || mxGroup->mpTopCell == this; @@ -3400,7 +3400,7 @@ bool ScFormulaCell::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) { if (bPosChanged) aPos.IncTab(-1*rCxt.mnSheets); - return false; + return; } EndListeningTo( pDocument ); @@ -3410,14 +3410,12 @@ bool ScFormulaCell::UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) aPos.IncTab(-1*rCxt.mnSheets); if (!bAdjustCode) - return false; + return; sc::RefUpdateResult aRes = pCode->AdjustReferenceOnDeletedTab(rCxt, aOldPos); if (aRes.mbNameModified) // Re-compile after sheet(s) have been deleted. bCompile = true; - - return aRes.mbReferenceModified; } void ScFormulaCell::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo ) diff --git a/sc/source/core/data/pagepar.cxx b/sc/source/core/data/pagepar.cxx index 18b04dd7b210..cfa5333029e6 100644 --- a/sc/source/core/data/pagepar.cxx +++ b/sc/source/core/data/pagepar.cxx @@ -44,11 +44,6 @@ void ScPageTableParam::Reset() nFirstPageNo = 1; } -bool ScPageTableParam::operator==( const ScPageTableParam& r ) const -{ - return ( memcmp( this, &r, sizeof(ScPageTableParam) ) == 0 ); -} - // struct ScPageAreaParam: ScPageAreaParam::ScPageAreaParam() @@ -69,24 +64,5 @@ void ScPageAreaParam::Reset() memset( &aRepeatCol, 0, sizeof(ScRange) ); } -bool ScPageAreaParam::operator==( const ScPageAreaParam& r ) const -{ - bool bEqual = - bPrintArea == r.bPrintArea - && bRepeatRow == r.bRepeatRow - && bRepeatCol == r.bRepeatCol; - - if ( bEqual ) - if ( bPrintArea ) - bEqual = bEqual && ( aPrintArea == r.aPrintArea ); - if ( bEqual ) - if ( bRepeatRow ) - bEqual = bEqual && ( aRepeatRow == r.aRepeatRow ); - if ( bEqual ) - if ( bRepeatCol ) - bEqual = bEqual && ( aRepeatCol == r.aRepeatCol ); - - return bEqual; -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx index 6b578daec482..801afbeb6173 100644 --- a/sc/source/core/data/pivot2.cxx +++ b/sc/source/core/data/pivot2.cxx @@ -191,23 +191,6 @@ ScPivotParam& ScPivotParam::operator=( const ScPivotParam& rPivotParam ) return *this; } -bool ScPivotParam::operator==( const ScPivotParam& rPivotParam ) const -{ - bool bEqual = (nCol == rPivotParam.nCol && - nRow == rPivotParam.nRow && - nTab == rPivotParam.nTab && - bIgnoreEmptyRows == rPivotParam.bIgnoreEmptyRows && - bDetectCategories == rPivotParam.bDetectCategories && - bMakeTotalCol == rPivotParam.bMakeTotalCol && - bMakeTotalRow == rPivotParam.bMakeTotalRow && - maLabelArray.size() == rPivotParam.maLabelArray.size() && - maPageFields == rPivotParam.maPageFields && - maColFields == rPivotParam.maColFields && - maRowFields == rPivotParam.maRowFields && - maDataFields == rPivotParam.maDataFields); - return bEqual; -} - // ScPivotFuncData ScPivotFuncData::ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask ) : @@ -217,18 +200,6 @@ ScPivotFuncData::ScPivotFuncData( SCCOL nCol, sal_uInt16 nFuncMask ) : mnDupCount(0) {} -bool ScPivotFuncData::operator== (const ScPivotFuncData& rFuncData) const -{ - if (mnCol != rFuncData.mnCol || - mnOriginalDim != rFuncData.mnOriginalDim || - mnFuncMask != rFuncData.mnFuncMask || - mnDupCount != rFuncData.mnDupCount) - { - return false; - } - return equals(maFieldRef, rFuncData.maFieldRef); -} - #if DEBUG_PIVOT_TABLE void ScPivotFuncData::Dump() const { diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 7c001dee077a..3c4cb8a956a1 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -2206,12 +2206,11 @@ bool ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel, return false; } -bool ScTable::TestTabRefAbs(SCTAB nTable) const +void ScTable::TestTabRefAbs(SCTAB nTable) const { for (SCCOL i=0; i <= MAXCOL; i++) if (aCol[i].TestTabRefAbs(nTable)) - return true; - return false; + return; } void ScTable::CompileDBFormula( sc::CompileFormulaContext& rCxt ) diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index cd846b6f7a3c..eb18a2ca1121 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -600,7 +600,7 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden) return bChanged; } -bool ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden) +void ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden) { bool bChanged = false; if (bHidden) @@ -613,8 +613,6 @@ bool ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden) if (IsStreamValid()) SetStreamValid(false); } - - return bChanged; } void ScTable::CopyColHidden(ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol) diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index 437434a3f221..baf4110d16bc 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -973,19 +973,6 @@ void ScValidationDataList::UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) (*it)->UpdateMoveTab(rCxt); } -bool ScValidationDataList::operator==( const ScValidationDataList& r ) const -{ - // for Ref-Undo - internal variables can not be compared - - size_t nCount = maData.size(); - bool bEqual = ( nCount == r.maData.size() ); - for( const_iterator it1 = begin(), it2 = r.begin(); it1 != end() && bEqual; ++it1, ++it2 ) // Entries are sorted - if ( !(*it1)->EqualEntries(**it2) ) // different entries ? - bEqual = false; - - return bEqual; -} - ScValidationDataList::iterator ScValidationDataList::begin() { return maData.begin(); diff --git a/sc/source/core/inc/adiasync.hxx b/sc/source/core/inc/adiasync.hxx index 337b5767c33f..237470d134ed 100644 --- a/sc/source/core/inc/adiasync.hxx +++ b/sc/source/core/inc/adiasync.hxx @@ -66,7 +66,6 @@ public: // Comparators for PtrArrSort bool operator< ( const ScAddInAsync& r ) const { return nHandle < r.nHandle; } - bool operator==( const ScAddInAsync& r ) const { return nHandle == r.nHandle; } }; struct CompareScAddInAsync diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index f3df92328b5e..2229fb018c8f 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1670,11 +1670,11 @@ sal_uInt16 ScRange::ParseCols( const OUString& rStr, ScDocument* pDoc, } // Parse only full row references -sal_uInt16 ScRange::ParseRows( const OUString& rStr, ScDocument* pDoc, +void ScRange::ParseRows( const OUString& rStr, ScDocument* pDoc, const ScAddress::Details& rDetails ) { if (rStr.isEmpty()) - return 0; + return; const sal_Unicode* p = rStr.getStr(); sal_uInt16 nRes = 0, ignored = 0; @@ -1724,8 +1724,6 @@ sal_uInt16 ScRange::ParseRows( const OUString& rStr, ScDocument* pDoc, } break; } - - return (p != nullptr && *p == '\0') ? nRes : 0; } template<typename T > static inline void lcl_ScColToAlpha( T& rBuf, SCCOL nCol ) diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 3e6cc33c05a4..46db04a9c451 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -1002,7 +1002,7 @@ ScAutoFormat::iterator ScAutoFormat::end() return m_Data.end(); } -bool ScAutoFormat::Load() +void ScAutoFormat::Load() { INetURLObject aURL; SvtPathOptions aPathOpt; @@ -1060,7 +1060,6 @@ bool ScAutoFormat::Load() } } mbSaveLater = false; - return bRet; } bool ScAutoFormat::Save() diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index d3de9e652b2d..af2143938a0a 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -243,13 +243,11 @@ void ExitExternalFunc() aModuleCollection.clear(); } -bool LegacyFuncData::Call(void** ppParam) const +void LegacyFuncData::Call(void** ppParam) const { #ifdef DISABLE_DYNLOADING (void) ppParam; - return false; #else - bool bRet = false; osl::Module* pLib = pModuleData->GetInstance(); oslGenericFunction fProc = pLib->getFunctionSymbol(aFuncName); if (fProc != nullptr) @@ -258,104 +256,83 @@ bool LegacyFuncData::Call(void** ppParam) const { case 1 : (*reinterpret_cast<ExFuncPtr1>(fProc))(ppParam[0]); - bRet = true; break; case 2 : (*reinterpret_cast<ExFuncPtr2>(fProc))(ppParam[0], ppParam[1]); - bRet = true; break; case 3 : (*reinterpret_cast<ExFuncPtr3>(fProc))(ppParam[0], ppParam[1], ppParam[2]); - bRet = true; break; case 4 : (*reinterpret_cast<ExFuncPtr4>(fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3]); - bRet = true; break; case 5 : (*reinterpret_cast<ExFuncPtr5>(fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4]); - bRet = true; break; case 6 : (*reinterpret_cast<ExFuncPtr6>(fProc))(ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5]); - bRet = true; break; case 7 : (*reinterpret_cast<ExFuncPtr7>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6]); - bRet = true; break; case 8 : (*reinterpret_cast<ExFuncPtr8>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7]); - bRet = true; break; case 9 : (*reinterpret_cast<ExFuncPtr9>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8]); - bRet = true; break; case 10 : (*reinterpret_cast<ExFuncPtr10>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9]); - bRet = true; break; case 11 : (*reinterpret_cast<ExFuncPtr11>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10]); - bRet = true; break; case 12: (*reinterpret_cast<ExFuncPtr12>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11]); - bRet = true; break; case 13: (*reinterpret_cast<ExFuncPtr13>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11], ppParam[12]); - bRet = true; break; case 14 : (*reinterpret_cast<ExFuncPtr14>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11], ppParam[12], ppParam[13]); - bRet = true; break; case 15 : (*reinterpret_cast<ExFuncPtr15>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11], ppParam[12], ppParam[13], ppParam[14]); - bRet = true; break; case 16 : (*reinterpret_cast<ExFuncPtr16>(fProc))( ppParam[0], ppParam[1], ppParam[2], ppParam[3], ppParam[4], ppParam[5], ppParam[6], ppParam[7], ppParam[8], ppParam[9], ppParam[10], ppParam[11], ppParam[12], ppParam[13], ppParam[14], ppParam[15]); - bRet = true; break; default : break; } } - return bRet; #endif } -bool LegacyFuncData::Unadvice( double nHandle ) +void LegacyFuncData::Unadvice( double nHandle ) { #ifdef DISABLE_DYNLOADING (void) nHandle; - return false; #else - bool bRet = false; osl::Module* pLib = pModuleData->GetInstance(); oslGenericFunction fProc = pLib->getFunctionSymbol(UNADVICE); if (fProc != nullptr) { reinterpret_cast< ::Unadvice>(fProc)(nHandle); - bRet = true; } - return bRet; #endif } @@ -364,13 +341,12 @@ const OUString& LegacyFuncData::GetModuleName() const return pModuleData->GetName(); } -bool LegacyFuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam ) const +void LegacyFuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 nParam ) const { #ifdef DISABLE_DYNLOADING (void) aName; (void) aDesc; (void) nParam; - return false; #else bool bRet = false; if ( nParam <= nParamCount ) @@ -394,7 +370,6 @@ bool LegacyFuncData::getParamDesc( OUString& aName, OUString& aDesc, sal_uInt16 aName.clear(); aDesc.clear(); } - return bRet; #endif } diff --git a/sc/source/core/tool/chartarr.cxx b/sc/source/core/tool/chartarr.cxx index 69135abba5bf..543889504c4c 100644 --- a/sc/source/core/tool/chartarr.cxx +++ b/sc/source/core/tool/chartarr.cxx @@ -464,9 +464,4 @@ const ScChartArray* ScChartCollection::operator[](size_t nIndex) const return m_Data[nIndex].get(); } -bool ScChartCollection::operator==(const ScChartCollection& rCmp) const -{ - return ::comphelper::ContainerUniquePtrEquals(m_Data, rCmp.m_Data); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index d2e50bd0e90a..4731d1e2de91 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -730,11 +730,6 @@ bool ScChartListenerCollection::operator==( const ScChartListenerCollection& r ) return true; } -bool ScChartListenerCollection::operator!=( const ScChartListenerCollection& r ) const -{ - return !operator==(r); -} - void ScChartListenerCollection::StartListeningHiddenRange( const ScRange& rRange, ScChartHiddenRangeListener* pListener ) { maHiddenListeners.insert(std::make_pair<>(pListener, rRange)); diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx index 1e8c981a4e91..337b16aff0d0 100644 --- a/sc/source/core/tool/defaultsoptions.cxx +++ b/sc/source/core/tool/defaultsoptions.cxx @@ -55,11 +55,6 @@ bool ScDefaultsOptions::operator==( const ScDefaultsOptions& rOpt ) const && rOpt.aInitTabPrefix == aInitTabPrefix; } -bool ScDefaultsOptions::operator!=( const ScDefaultsOptions& rOpt ) const -{ - return !(operator==(rOpt)); -} - ScTpDefaultsItem::ScTpDefaultsItem( sal_uInt16 nWhichP, const ScDefaultsOptions& rOpt ) : SfxPoolItem ( nWhichP ), theOptions ( rOpt ) diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 11810e3cb018..d7896ecd5829 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -1519,17 +1519,17 @@ void ScDetectiveFunc::UpdateAllArrowColors() } } -bool ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange ) +void ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange ) { // find the rectangle for an arrow (always the object directly before the arrow) // rRange must be initialized to the source cell of the arrow (start of area) ScDrawLayer* pModel = pDoc->GetDrawLayer(); - if (!pModel) return false; + if (!pModel) return; SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); OSL_ENSURE(pPage,"Page ?"); - if (!pPage) return false; + if (!pPage) return; // test if the object is a direct page member if( pObject && pObject->GetPage() && (pObject->GetPage() == pObject->GetObjList()) ) @@ -1547,12 +1547,11 @@ bool ScDetectiveFunc::FindFrameForObject( SdrObject* pObject, ScRange& rRange ) if ( pPrevData && pPrevData->maStart.IsValid() && pPrevData->maEnd.IsValid() && (pPrevData->maStart == rRange.aStart) ) { rRange.aEnd = pPrevData->maEnd; - return true; + return; } } } } - return false; } ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject, SCTAB nObjTab, diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 4cbddf3db929..e382e7a6ab60 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -55,11 +55,6 @@ bool FormulaGroupContext::ColKey::operator== ( const ColKey& r ) const return mnTab == r.mnTab && mnCol == r.mnCol; } -bool FormulaGroupContext::ColKey::operator!= ( const ColKey& r ) const -{ - return !operator==(r); -} - FormulaGroupContext::ColArray::ColArray( NumArrayType* pNumArray, StrArrayType* pStrArray ) : mpNumArray(pNumArray), mpStrArray(pStrArray), mnSize(0) { diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx index 54d880ec8cef..9e9bc1c4c6ba 100644 --- a/sc/source/core/tool/printopt.cxx +++ b/sc/source/core/tool/printopt.cxx @@ -66,11 +66,6 @@ bool ScPrintOptions::operator==( const ScPrintOptions& rOpt ) const && bForceBreaks == rOpt.bForceBreaks; } -bool ScPrintOptions::operator!=( const ScPrintOptions& rOpt ) const -{ - return !(operator==(rOpt)); -} - ScTpPrintItem::ScTpPrintItem( sal_uInt16 nWhichP, const ScPrintOptions& rOpt ) : SfxPoolItem ( nWhichP ), theOptions ( rOpt ) diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 10e7952397ec..97edca29dc3d 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -1214,17 +1214,15 @@ ScRangePairList::~ScRangePairList() maPairs.clear(); } -ScRangePair* ScRangePairList::Remove(size_t nPos) +void ScRangePairList::Remove(size_t nPos) { if (maPairs.size() <= nPos) // Out-of-bound condition. Bail out. - return nullptr; + return; vector<ScRangePair*>::iterator itr = maPairs.begin(); advance(itr, nPos); - ScRangePair* p = *itr; maPairs.erase(itr); - return p; } ScRangePair* ScRangePairList::Remove( ScRangePair* Adr) @@ -1244,20 +1242,6 @@ ScRangePair* ScRangePairList::Remove( ScRangePair* Adr) return p; } -bool ScRangePairList::operator==( const ScRangePairList& r ) const -{ - if ( this == &r ) - return true; // identical reference - if ( maPairs.size() != r.size() ) - return false; - for ( size_t nIdx = 0, nCnt = maPairs.size(); nIdx < nCnt; ++nIdx ) - { - if ( *maPairs[ nIdx ] != *r[ nIdx ] ) - return false; // auch andere Reihenfolge ist ungleich - } - return true; -} - ScRangePair* ScRangePairList::operator [](size_t idx) { return maPairs[idx]; @@ -1273,11 +1257,10 @@ size_t ScRangePairList::size() const return maPairs.size(); } -bool ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, +void ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, ScDocument* pDoc, const ScRange& rWhere, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { - bool bChanged = false; if ( !maPairs.empty() ) { SCCOL nCol1; @@ -1306,14 +1289,12 @@ bool ScRangePairList::UpdateReference( UpdateRefMode eUpdateRefMode, theCol1, theRow1, theTab1, theCol2, theRow2, theTab2 ) != UR_NOTHING ) { - bChanged = true; rRange.aStart.Set( theCol1, theRow1, theTab1 ); rRange.aEnd.Set( theCol2, theRow2, theTab2 ); } } } } - return bChanged; } // Delete entries that have the labels (first range) on nTab diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index ee6e305aa583..f6d37a0519e4 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -2008,10 +2008,10 @@ FormulaToken* ScTokenArray::MergeArray( ) return AddMatrix( pArray ); } -FormulaToken* ScTokenArray::MergeRangeReference( const ScAddress & rPos ) +void ScTokenArray::MergeRangeReference( const ScAddress & rPos ) { if (!pCode || !nLen) - return nullptr; + return; sal_uInt16 nIdx = nLen; FormulaToken *p1, *p2, *p3; // ref, ocRange, ref // The actual types are checked in extendRangeReference(). @@ -2030,7 +2030,6 @@ FormulaToken* ScTokenArray::MergeRangeReference( const ScAddress & rPos ) pCode[ nLen-1 ] = p.get(); } } - return pCode[ nLen-1 ]; } FormulaToken* ScTokenArray::AddOpCode( OpCode e ) @@ -2075,9 +2074,9 @@ FormulaToken* ScTokenArray::AddExternalName( sal_uInt16 nFileId, const OUString& return Add( new ScExternalNameToken(nFileId, rName) ); } -FormulaToken* ScTokenArray::AddExternalSingleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef ) +void ScTokenArray::AddExternalSingleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef ) { - return Add( new ScExternalSingleRefToken(nFileId, rTabName, rRef) ); + Add( new ScExternalSingleRefToken(nFileId, rTabName, rRef) ); } FormulaToken* ScTokenArray::AddExternalDoubleReference( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef ) diff --git a/sc/source/core/tool/typedstrdata.cxx b/sc/source/core/tool/typedstrdata.cxx index 700e68b78569..97f571b88436 100644 --- a/sc/source/core/tool/typedstrdata.cxx +++ b/sc/source/core/tool/typedstrdata.cxx @@ -72,13 +72,6 @@ bool ScTypedStrData::EqualCaseInsensitive::operator() (const ScTypedStrData& lef left.maStrValue, right.maStrValue) == 0; } -bool ScTypedStrData::operator== (const ScTypedStrData& r) const -{ - // Case insensitive comparison by default. - EqualCaseInsensitive aHdl; - return aHdl(*this, r); -} - bool ScTypedStrData::operator< (const ScTypedStrData& r) const { // Case insensitive comparison by default. diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index 702ee1a8613b..eb5167491fa0 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -32,7 +32,7 @@ #include <rtl/strbuf.hxx> #include <osl/diagnose.h> -FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc, +void ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc, const ScAddress& rOutPos, const rtl_TextEncoding eNach, sal_uInt32 nDifOption ) { SCCOL nEndCol; @@ -43,7 +43,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* p aStart.PutInOrder( aEnd ); - return ScExportDif( rStream, pDoc, ScRange( aStart, aEnd ), eNach, nDifOption ); + ScExportDif( rStream, pDoc, ScRange( aStart, aEnd ), eNach, nDifOption ); } FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 47d7a85204a4..201b5c922b92 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -1354,18 +1354,16 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal return eRet; } -ConvErr ExcelToSc::ConvertExternName( const ScTokenArray*& /*rpArray*/, XclImpStream& /*rStrm*/, sal_Size /*nFormulaLen*/, +void ExcelToSc::ConvertExternName( const ScTokenArray*& /*rpArray*/, XclImpStream& /*rStrm*/, sal_Size /*nFormulaLen*/, const OUString& /*rUrl*/, const vector<OUString>& /*rTabNames*/ ) { - // not implemented ... - return ConvErrNi; } -bool ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) +void ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) { OSL_ENSURE_BIFF( GetBiff() == EXC_BIFF5 ); if( GetBiff() != EXC_BIFF5 ) - return false; + return; sal_uInt8 nOp; sal_uInt16 nRow1, nRow2; @@ -1574,8 +1572,6 @@ bool ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Si rStrm.Ignore( nSeek ); } rStrm.Seek( nEndPos ); - - return !rRangeList.empty(); } void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz ) diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx index 32e1932c6c22..ca1cc606cde7 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -1299,11 +1299,11 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa return eRet; } -ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, +void ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const OUString& rUrl, const vector<OUString>& rTabNames ) { if( !GetDocShell() ) - return ConvErrNi; + return; OUString aFileUrl = ScGlobal::GetAbsDocName(rUrl, GetDocShell()); @@ -1316,7 +1316,7 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea if (eStatus != ConvOK) { rStrm.Ignore(nFormulaLen); - return eStatus; + return; } if (nFormulaLen == 0) @@ -1324,7 +1324,7 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea aPool.Store(OUString("-/-")); aPool >> aStack; rpArray = aPool[aStack.Get()]; - return ConvOK; + return; } ScExternalRefManager* pRefMgr = GetDoc().GetExternalRefManager(); @@ -1451,7 +1451,6 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea } rStrm.Seek(nEndPos); - return eRet; } void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData &rSRD, const bool bName ) @@ -1509,7 +1508,7 @@ void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData } // stream seeks to first byte after <nLen> -bool ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) +void ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) { sal_uInt8 nOp; sal_uInt16 nRow1, nRow2, nCol1, nCol2; @@ -1687,8 +1686,6 @@ bool ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) aIn.Ignore( nSeek ); } aIn.Seek( nEndPos ); - - return !r.empty(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx index 821a8fcf0158..888e005128ea 100644 --- a/sc/source/filter/excel/namebuff.cxx +++ b/sc/source/filter/excel/namebuff.cxx @@ -167,19 +167,17 @@ bool ExtSheetBuffer::IsLink( const sal_uInt16 nExcIndex ) const return maEntries[ nExcIndex -1 ].bLink; } -bool ExtSheetBuffer::GetLink( const sal_uInt16 nExcIndex, OUString& rAppl, OUString& rDoc ) const +void ExtSheetBuffer::GetLink( const sal_uInt16 nExcIndex, OUString& rAppl, OUString& rDoc ) const { OSL_ENSURE( nExcIndex > 0, "*ExtSheetBuffer::GetLink(): Index has to be >0!" ); if (!nExcIndex || nExcIndex > maEntries.size() ) - return false; + return; const Cont &rRet = maEntries[ nExcIndex -1 ]; rAppl = rRet.aFile; rDoc = rRet.aTab; - - return true; } void ExtSheetBuffer::Reset() diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx index a65b3e586e98..607eb0c9829c 100644 --- a/sc/source/filter/excel/xltoolbar.cxx +++ b/sc/source/filter/excel/xltoolbar.cxx @@ -402,10 +402,10 @@ ScCTB* ScCTBWrapper::GetCustomizationData( const OUString& sTBName ) return pCTB; } -bool ScCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) +void ScCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) { if(rCTB.empty()) - return true; + return; uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::theModuleUIConfigurationManagerSupplier::get(xContext) ); @@ -424,10 +424,9 @@ bool ScCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) if ( !(*it).IsMenuToolbar() ) { if ( !(*it).ImportCustomToolBar( *this, helper ) ) - return false; + return; } } - return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/excel/xltoolbar.hxx b/sc/source/filter/excel/xltoolbar.hxx index 03dfaceaff37..5f03ef06a2e3 100644 --- a/sc/source/filter/excel/xltoolbar.hxx +++ b/sc/source/filter/excel/xltoolbar.hxx @@ -101,7 +101,7 @@ public: #if OSL_DEBUG_LEVEL > 1 virtual void Print( FILE* ) override; #endif - bool ImportCustomToolBar( SfxObjectShell& rDocSh ); + void ImportCustomToolBar( SfxObjectShell& rDocSh ); ScCTB* GetCustomizationData( const OUString& name ); }; diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index 0f17a3e2c541..e874405f7e54 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -323,20 +323,18 @@ bool ScfPropSetHelper::ReadValue( Any& rAny ) return pAny != nullptr; } -bool ScfPropSetHelper::ReadValue( Color& rColor ) +void ScfPropSetHelper::ReadValue( Color& rColor ) { sal_Int32 nApiColor(0); - bool bRet = ReadValue( nApiColor ); + ReadValue( nApiColor ); rColor = ScfApiHelper::ConvertFromApiColor( nApiColor ); - return bRet; } -bool ScfPropSetHelper::ReadValue( bool& rbValue ) +void ScfPropSetHelper::ReadValue( bool& rbValue ) { Any aAny; - bool bRet = ReadValue( aAny ); + ReadValue( aAny ); rbValue = ScUnoHelpFunctions::GetBoolFromAny( aAny ); - return bRet; } // write properties ----------------------------------------------------------- diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 12ce2a120229..7b06e985225d 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -131,14 +131,13 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = #define GLOBSTR(id) ScGlobal::GetRscString( id ) -FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc, +void ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc, const ScRange& rRange, const rtl_TextEncoding /*eNach*/, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars, const OUString& rFilterOptions ) { ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath, rFilterOptions ); - FltError nErr = aEx.Write(); + aEx.Write(); rNonConvertibleChars = aEx.GetNonConvertibleChars(); - return nErr; } static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth) @@ -1287,7 +1286,7 @@ bool ScHTMLExport::WriteFieldText( const EditTextObject* pData ) return bFields; } -bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, +void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, const OUString& rTargetNm, bool bFileToFile ) { bool bRet = false; @@ -1307,7 +1306,7 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, if( it != pFileNameMap->end() ) { rFileNm = it->second; - return true; + return; } } else @@ -1352,8 +1351,6 @@ bool ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm, rFileNm = aDest; } } - - return bRet; } void ScHTMLExport::MakeCIdURL( OUString& rURL ) diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index b68159a3b7ec..8e4867690173 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -2434,16 +2434,14 @@ bool ScHTMLTable::PushEntry( const ImportInfo& rInfo, bool bLastInCell ) return bPushed; } -bool ScHTMLTable::PushTableEntry( ScHTMLTableId nTableId ) +void ScHTMLTable::PushTableEntry( ScHTMLTableId nTableId ) { OSL_ENSURE( nTableId != SC_HTML_GLOBAL_TABLE, "ScHTMLTable::PushTableEntry - cannot push global table" ); - bool bPushed = false; if( nTableId != SC_HTML_GLOBAL_TABLE ) { ScHTMLEntryPtr xEntry( new ScHTMLEntry( maTableItemSet, nTableId ) ); - bPushed = PushEntry( xEntry ); + PushEntry( xEntry ); } - return bPushed; } ScHTMLTable* ScHTMLTable::GetExistingTable( ScHTMLTableId nTableId ) const diff --git a/sc/source/filter/inc/biffinputstream.hxx b/sc/source/filter/inc/biffinputstream.hxx index d048da1ad631..d2a068290d6e 100644 --- a/sc/source/filter/inc/biffinputstream.hxx +++ b/sc/source/filter/inc/biffinputstream.hxx @@ -327,7 +327,7 @@ class BiffInputStreamPos public: explicit BiffInputStreamPos( BiffInputStream& rStrm ); - bool restorePosition(); + void restorePosition(); private: BiffInputStream& mrStrm; diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx index 9648e9277500..ebc6db0d8f0e 100644 --- a/sc/source/filter/inc/excform.hxx +++ b/sc/source/filter/inc/excform.hxx @@ -53,10 +53,10 @@ public: virtual ConvErr Convert( _ScRangeListTabs&, XclImpStream& rStrm, sal_Size nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override; - virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, + virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const OUString& rUrl, const ::std::vector<OUString>& rTabNames ); - virtual bool GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ); + virtual void GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ); void GetDummy( const ScTokenArray*& ); const ScTokenArray* GetBoolErr( XclBoolError ); @@ -126,12 +126,12 @@ public: virtual ConvErr Convert( _ScRangeListTabs&, XclImpStream& rStrm, sal_Size nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT = FT_CellFormula ) override; - virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, + virtual void ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const OUString& rUrl, const ::std::vector<OUString>& rTabNames ) override; static inline bool IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 ); - virtual bool GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) override; + virtual void GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) override; }; inline bool ExcelToSc8::IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 ) diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index 547fdb144b57..08f206552030 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -231,9 +231,9 @@ public: /** Reads an Any from the value sequence. */ bool ReadValue( css::uno::Any& rAny ); /** Reads a color value from the value sequence. */ - bool ReadValue( Color& rColor ); + void ReadValue( Color& rColor ); /** Reads a C++ boolean value from the value sequence. */ - bool ReadValue( bool& rbValue ); + void ReadValue( bool& rbValue ); // write properties ------------------------------------------------------- diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx index 76c8a81bd048..de32e549593d 100644 --- a/sc/source/filter/inc/formel.hxx +++ b/sc/source/filter/inc/formel.hxx @@ -114,7 +114,7 @@ class LotusConverterBase : public ConverterBase { protected: SvStream& aIn; - sal_Int32 nBytesLeft; + sal_Int32 nBytesLeft; inline void Ignore( const long nSeekRel ); inline void Read( sal_uInt8& nByte ); @@ -129,7 +129,7 @@ protected: public: void Reset( const ScAddress& rEingPos ); - virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, + virtual void Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, const FORMULA_TYPE eFT = FT_CellFormula ) = 0; protected: diff --git a/sc/source/filter/inc/formulabase.hxx b/sc/source/filter/inc/formulabase.hxx index 8fa5bbb42bd2..4f83fe9ff448 100644 --- a/sc/source/filter/inc/formulabase.hxx +++ b/sc/source/filter/inc/formulabase.hxx @@ -308,7 +308,6 @@ public: explicit ApiTokenIterator( const ApiTokenSequence& rTokens, sal_Int32 nSpacesOpCode, bool bSkipSpaces ); inline bool is() const { return mpToken != mpTokenEnd; } inline const ApiToken* operator->() const { return mpToken; } - inline const ApiToken& operator*() const { return *mpToken; } ApiTokenIterator& operator++(); diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index 51eeedca4fca..92aee8f30a93 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -288,13 +288,13 @@ public: // various export filters virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, rtl_TextEncoding eDest ) override; - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest, + virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const rtl_TextEncoding eDest, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) override; virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ) override; - virtual FltError ScExportHTML( SvStream&, const OUString& rBaseURL, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest, bool bAll, + 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 FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; + virtual void ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const rtl_TextEncoding eDest ) override; virtual ScOrcusFilters* GetOrcusFilters() override; }; diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx index 3e147e0f51d8..c53c6e1cd0b5 100644 --- a/sc/source/filter/inc/htmlexp.hxx +++ b/sc/source/filter/inc/htmlexp.hxx @@ -144,7 +144,7 @@ class ScHTMLExport : public ScExportBase bool WriteFieldText( const EditTextObject* pData ); // copy a local file to internet if needed - bool CopyLocalFileToINet( OUString& rFileNm, const OUString& rTargetNm, bool bFileToFile = false ); + void CopyLocalFileToINet( OUString& rFileNm, const OUString& rTargetNm, bool bFileToFile = false ); bool HasCId() { return !aCId.isEmpty(); diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index a22be4e5d412..9a162a56f340 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -478,9 +478,8 @@ private: @param bLastInCell true = If cell is still empty, put this entry always. @return true = Entry as been pushed into the current cell; false = Entry dropped. */ bool PushEntry( const ImportInfo& rInfo, bool bLastInCell = false ); - /** Pushes a new entry into current cell which references a nested table. - @return true = Entry as been pushed into the current cell; false = Entry dropped. */ - bool PushTableEntry( ScHTMLTableId nTableId ); + /** Pushes a new entry into current cell which references a nested table.*/ + void PushTableEntry( ScHTMLTableId nTableId ); /** Tries to find a table from the table container. @descr Assumes that the table is located in the current container or diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx index 455a50907573..80f0307a8399 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -76,10 +76,6 @@ private: ENTRY (ScPatternAttr* p); ~ENTRY (); - - inline bool operator == (const ENTRY &r) const { return nHash0 == r.nHash0; } - - inline bool operator == (const sal_uInt32 &r) const { return nHash0 == r; } }; inline static void MakeHash( const LotAttrWK3& rAttr, sal_uInt32& rOut ) diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx index bcde57911709..77c10010b3dc 100644 --- a/sc/source/filter/inc/lotform.hxx +++ b/sc/source/filter/inc/lotform.hxx @@ -89,7 +89,7 @@ private: public: LotusToSc(LotusContext &rContext, SvStream& aStr, svl::SharedStringPool& rSPool, rtl_TextEncoding eSrc, bool b); - virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, + virtual void Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, const FORMULA_TYPE eFT = FT_CellFormula ) override; void Reset( const ScAddress& rEingPos ); diff --git a/sc/source/filter/inc/lotimpop.hxx b/sc/source/filter/inc/lotimpop.hxx index f0cfccc7ae4f..0cae6aa8b31d 100644 --- a/sc/source/filter/inc/lotimpop.hxx +++ b/sc/source/filter/inc/lotimpop.hxx @@ -51,7 +51,7 @@ private: void Labelcell(); // 0x0016 22 void Numbercell(); // 0x0017 23 void Smallnumcell(); // 0x0018 24 - ScFormulaCell* Formulacell( sal_uInt16 nRecLen ); // 0x0019 25 + void Formulacell( sal_uInt16 nRecLen ); // 0x0019 25 // 0x001b 27 special void NamedSheet(); // 14000 void RowPresentation( sal_uInt16 nRecLen ); // 2007 diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx index 1e01f357796f..254c88c64772 100644 --- a/sc/source/filter/inc/lotrange.hxx +++ b/sc/source/filter/inc/lotrange.hxx @@ -47,7 +47,6 @@ public: LotusRange( const LotusRange& ); inline LotusRange &operator =( const LotusRange& ); inline bool operator ==( const LotusRange& ) const; - inline bool operator !=( const LotusRange& ) const; inline bool IsSingle() const; }; @@ -79,13 +78,6 @@ inline bool LotusRange::operator ==( const LotusRange& rRef ) const nRowEnd == rRef.nRowEnd ); } -inline bool LotusRange::operator !=( const LotusRange& rRef ) const -{ - return ( nHash != rRef.nHash || nColStart != rRef.nColStart || - nRowStart != rRef.nRowStart || nColEnd != rRef.nColEnd || - nRowEnd != rRef.nRowEnd ); -} - inline bool LotusRange::IsSingle() const { return ( nColStart == nColEnd && nRowStart == nRowEnd ); diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx index 511b2333b140..c1bba3693f8d 100644 --- a/sc/source/filter/inc/namebuff.hxx +++ b/sc/source/filter/inc/namebuff.hxx @@ -228,7 +228,7 @@ public: bool GetScTabIndex( sal_uInt16 nExcSheetIndex, sal_uInt16& rIn_LastTab_Out_ScIndex ); bool IsLink( const sal_uInt16 nExcSheetIndex ) const; - bool GetLink( const sal_uInt16 nExcSheetIndex, OUString &rAppl, OUString &rDoc ) const; + void GetLink( const sal_uInt16 nExcSheetIndex, OUString &rAppl, OUString &rDoc ) const; void Reset(); }; diff --git a/sc/source/filter/inc/numberformatsbuffer.hxx b/sc/source/filter/inc/numberformatsbuffer.hxx index c3928de80750..4f477a2d779a 100644 --- a/sc/source/filter/inc/numberformatsbuffer.hxx +++ b/sc/source/filter/inc/numberformatsbuffer.hxx @@ -68,7 +68,7 @@ public: sal_Int16 nPredefId ); /** Final processing after import of all style settings. Returns the API format index. */ - sal_Int32 finalizeImport( + void finalizeImport( const css::uno::Reference< css::util::XNumberFormats >& rxNumFmts, const css::lang::Locale& rFromLocale ); sal_uLong fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs = false ) const; diff --git a/sc/source/filter/inc/orcusfiltersimpl.hxx b/sc/source/filter/inc/orcusfiltersimpl.hxx index ce909d7af7d0..042fad27cbc3 100644 --- a/sc/source/filter/inc/orcusfiltersimpl.hxx +++ b/sc/source/filter/inc/orcusfiltersimpl.hxx @@ -39,9 +39,9 @@ public: ScOrcusXMLContextImpl(ScDocument& rDoc, const OUString& rPath); virtual ~ScOrcusXMLContextImpl(); - virtual bool loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) override; + virtual void loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) override; - virtual bool importXML(const ScOrcusImportXMLParam& rParam) override; + virtual void importXML(const ScOrcusImportXMLParam& rParam) override; }; #endif diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx index eb0011c5e209..233e32015a37 100644 --- a/sc/source/filter/inc/orcusinterface.hxx +++ b/sc/source/filter/inc/orcusinterface.hxx @@ -349,7 +349,7 @@ private: public: ScOrcusStyles(ScDocument& rDoc); - bool applyXfToItemSet(SfxItemSet& rSet, size_t xfId); + void applyXfToItemSet(SfxItemSet& rSet, size_t xfId); // font diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 14647408e680..1f55d05a51aa 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -369,7 +369,7 @@ LotusToSc::LotusToSc(LotusContext &rContext, SvStream &rStream, svl::SharedStrin typedef FUNC_TYPE ( FuncType1 ) ( sal_uInt8 ); typedef DefTokenId ( FuncType2 ) ( sal_uInt8 ); -ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest, +void LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest, const FORMULA_TYPE /*eFT*/ ) { sal_uInt8 nOc; @@ -425,7 +425,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest, if( nBytesLeft < 0 ) { rpErg = aPool[ aStack.Get() ]; - return ConvErrCount; + return; } eType = ( pIndexToType )( nOc ); @@ -654,8 +654,6 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest, aIn.SeekRel( nBytesLeft ); // eventuellen Rest/Ueberlauf korrigieren rRest = 0; - - return ConvOK; } FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex ) diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index d51c7a8aaadc..586ca37f6bac 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -263,7 +263,7 @@ void ImportLotus::Smallnumcell() pD->SetValue(aAddr, SnumToDouble(nVal)); } -ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n ) +void ImportLotus::Formulacell( sal_uInt16 n ) { OSL_ENSURE( pIn, "-ImportLotus::Formulacell(): Null-Stream!" ); @@ -285,8 +285,6 @@ ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n ) pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE ); pD->EnsureTable(aAddr.Tab()); pD->SetFormulaCell(aAddr, pCell); - - return nullptr; } void ImportLotus::Read( OUString &r ) diff --git a/sc/source/filter/oox/biffinputstream.cxx b/sc/source/filter/oox/biffinputstream.cxx index f03204482230..cd5a1cc46f1c 100644 --- a/sc/source/filter/oox/biffinputstream.cxx +++ b/sc/source/filter/oox/biffinputstream.cxx @@ -490,12 +490,11 @@ BiffInputStreamPos::BiffInputStreamPos( BiffInputStream& rStrm ) : { } -bool BiffInputStreamPos::restorePosition() +void BiffInputStreamPos::restorePosition() { bool bValidRec = mrStrm.startRecordByHandle( mnRecHandle ); if( bValidRec ) mrStrm.seek( mnRecPos ); - return bValidRec && !mrStrm.isEof(); } BiffInputStreamPosGuard::BiffInputStreamPosGuard( BiffInputStream& rStrm ) : diff --git a/sc/source/filter/oox/numberformatsbuffer.cxx b/sc/source/filter/oox/numberformatsbuffer.cxx index 167e3117adfe..c92bd2959b87 100644 --- a/sc/source/filter/oox/numberformatsbuffer.cxx +++ b/sc/source/filter/oox/numberformatsbuffer.cxx @@ -1903,13 +1903,12 @@ void NumberFormat::setPredefinedId( const Locale& rLocale, sal_Int16 nPredefId ) maModel.mnPredefId = nPredefId; } -sal_Int32 NumberFormat::finalizeImport( const Reference< XNumberFormats >& rxNumFmts, const Locale& rFromLocale ) +void NumberFormat::finalizeImport( const Reference< XNumberFormats >& rxNumFmts, const Locale& rFromLocale ) { if( rxNumFmts.is() && !maModel.maFmtCode.isEmpty() ) maApiData.mnIndex = lclCreateFormat( rxNumFmts, maModel.maFmtCode, maModel.maLocale, rFromLocale ); else maApiData.mnIndex = lclCreatePredefinedFormat( rxNumFmts, maModel.mnPredefId, maModel.maLocale ); - return maApiData.mnIndex; } sal_uLong NumberFormat::fillToItemSet( SfxItemSet& rItemSet, bool bSkipPoolDefs ) const diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index 12a1b7d36a05..cc24444865f0 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -904,18 +904,17 @@ void ScOrcusStyles::applyXfToItemSet(SfxItemSet& rSet, const xf& rXf) rFormat.applyToItemSet(rSet); } -bool ScOrcusStyles::applyXfToItemSet(SfxItemSet& rSet, size_t xfId) +void ScOrcusStyles::applyXfToItemSet(SfxItemSet& rSet, size_t xfId) { SAL_INFO("sc.orcus.style", "applyXfToitemSet: " << xfId); if (maCellXfs.size() <= xfId) { SAL_WARN("sc.orcus.style", "invalid xf id"); - return false; + return; } const xf& rXf = maCellXfs[xfId]; applyXfToItemSet(rSet, rXf); - return true; } void ScOrcusStyles::set_font_count(size_t /*n*/) diff --git a/sc/source/filter/orcus/xmlcontext.cxx b/sc/source/filter/orcus/xmlcontext.cxx index 63a10fb94b1b..083972067468 100644 --- a/sc/source/filter/orcus/xmlcontext.cxx +++ b/sc/source/filter/orcus/xmlcontext.cxx @@ -170,7 +170,7 @@ ScOrcusXMLContextImpl::ScOrcusXMLContextImpl(ScDocument& rDoc, const OUString& r ScOrcusXMLContextImpl::~ScOrcusXMLContextImpl() {} -bool ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) +void ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXMLTreeParam& rParam) { rParam.maUserDataStore.clear(); @@ -178,7 +178,7 @@ bool ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXM loadContentFromURL(maPath, aStrm); if (aStrm.empty()) - return false; + return; orcus::xmlns_context cxt = maNsRepo.create_context(); orcus::xml_structure_tree aXmlTree(cxt); @@ -200,10 +200,7 @@ bool ScOrcusXMLContextImpl::loadXMLStructure(SvTreeListBox& rTreeCtrl, ScOrcusXM catch (const std::exception&) { // Parsing of this XML file failed. - return false; } - - return true; } namespace { @@ -229,7 +226,7 @@ public: } -bool ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam) +void ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam) { ScOrcusFactory aFactory(mrDoc); OString aSysPath = ScOrcusFiltersImpl::toSystemPath(maPath); @@ -280,9 +277,7 @@ bool ScOrcusXMLContextImpl::importXML(const ScOrcusImportXMLParam& rParam) } catch (const std::exception&) { - return false; } - return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index 96e000d17cb2..057b9a543f02 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -41,11 +41,11 @@ #include "stlpool.hxx" #include "ftools.hxx" -FltError ScFormatFilterPluginImpl::ScExportRTF( SvStream& rStrm, ScDocument* pDoc, +void ScFormatFilterPluginImpl::ScExportRTF( SvStream& rStrm, ScDocument* pDoc, const ScRange& rRange, const rtl_TextEncoding /*eNach*/ ) { ScRTFExport aEx( rStrm, pDoc, rRange ); - return aEx.Write(); + aEx.Write(); } ScRTFExport::ScRTFExport( SvStream& rStrmP, ScDocument* pDocP, const ScRange& rRangeP ) diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index ebdd2fe2dfe7..6fbbf926882b 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2182,39 +2182,35 @@ IMPL_LINK_TYPED( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void ) } } -bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ) +void ScModule::RegisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ) { std::list<VclPtr<vcl::Window> > & rlRefWindow = m_mapRefWindow[nSlotId]; if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() ) { rlRefWindow.push_back( pWnd ); - return true; } - return false; } -bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ) +void ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, vcl::Window *pWnd ) { auto iSlot = m_mapRefWindow.find( nSlotId ); if( iSlot == m_mapRefWindow.end() ) - return false; + return; std::list<VclPtr<vcl::Window> > & rlRefWindow = iSlot->second; auto i = std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ); if( i == rlRefWindow.end() ) - return false; + return; rlRefWindow.erase( i ); if( rlRefWindow.empty() ) m_mapRefWindow.erase( nSlotId ); - - return true; } vcl::Window * ScModule::Find1RefWindow( sal_uInt16 nSlotId, vcl::Window *pWndAncestor ) diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx index 24e156a4b456..322c1bbddc78 100644 --- a/sc/source/ui/docshell/documentlinkmgr.cxx +++ b/sc/source/ui/docshell/documentlinkmgr.cxx @@ -173,15 +173,14 @@ bool DocumentLinkManager::updateDdeLinks( vcl::Window* pWin ) return bAny; } -bool DocumentLinkManager::updateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem ) +void DocumentLinkManager::updateDdeLink( const OUString& rAppl, const OUString& rTopic, const OUString& rItem ) { if (!mpImpl->mpLinkManager) - return false; + return; sfx2::LinkManager* pMgr = mpImpl->mpLinkManager.get(); const sfx2::SvBaseLinks& rLinks = pMgr->GetLinks(); - bool bFound = false; for (size_t i = 0, n = rLinks.size(); i < n; ++i) { ::sfx2::SvBaseLink* pBase = rLinks[i].get(); @@ -194,11 +193,9 @@ bool DocumentLinkManager::updateDdeLink( const OUString& rAppl, const OUString& OUString(pDdeLink->GetItem()) == rItem ) { pDdeLink->TryUpdate(); - bFound = true; // Could be multiple (Mode), so continue searching + // Could be multiple (Mode), so continue searching } } - - return bFound; } size_t DocumentLinkManager::getDdeLinkCount() const diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 17fa01e642f2..699ac2793488 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -1665,7 +1665,7 @@ sal_uInt16 ScExternalRefManager::getExternalFileCount() const return static_cast< sal_uInt16 >( maSrcFiles.size() ); } -bool ScExternalRefManager::markUsedByLinkListeners() +void ScExternalRefManager::markUsedByLinkListeners() { bool bAllMarked = false; for (LinkListenerMap::const_iterator itr = maLinkListeners.begin(); @@ -1677,10 +1677,9 @@ bool ScExternalRefManager::markUsedByLinkListeners() * As is, listening to one table will mark all tables of the document * being referenced. */ } - return bAllMarked; } -bool ScExternalRefManager::markUsedExternalRefCells() +void ScExternalRefManager::markUsedExternalRefCells() { RefCellMap::iterator itr = maRefCells.begin(), itrEnd = maRefCells.end(); for (; itr != itrEnd; ++itr) @@ -1692,10 +1691,9 @@ bool ScExternalRefManager::markUsedExternalRefCells() bool bUsed = pCell->MarkUsedExternalReferences(); if (bUsed) // Return true when at least one cell references external docs. - return true; + return; } } - return false; } bool ScExternalRefManager::setCacheTableReferenced( sal_uInt16 nFileId, const OUString& rTabName, size_t nSheets ) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 1f84bdcf1da6..0b3072836fb4 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2222,11 +2222,11 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual OUString GetHTMLRangeNameList( ScDocument*, const OUString& ) override { return OUString(); } virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, rtl_TextEncoding ) override { return eERR_INTERN; } - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const rtl_TextEncoding, sal_uInt32 ) override { return eERR_INTERN; } + virtual void ScExportDif( SvStream&, ScDocument*, const ScAddress&, const rtl_TextEncoding, sal_uInt32 ) override {} virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding, sal_uInt32 ) override { return eERR_INTERN; } - virtual FltError ScExportHTML( SvStream&, const OUString&, ScDocument*, const ScRange&, const rtl_TextEncoding, bool, - const OUString&, OUString&, const OUString& ) override { return eERR_INTERN; } - virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) override { return eERR_INTERN; } + 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 {} virtual ScOrcusFilters* GetOrcusFilters() override { return nullptr; } }; diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx index a01df2221058..ac615fdbe52e 100644 --- a/sc/source/ui/view/spellcheckcontext.cxx +++ b/sc/source/ui/view/spellcheckcontext.cxx @@ -39,14 +39,6 @@ void SpellCheckContext::CellPos::reset() mnRow = 0; } -bool SpellCheckContext::CellPos::operator< (const CellPos& r) const -{ - if (mnCol != r.mnCol) - return mnCol < r.mnCol; - - return mnRow < r.mnRow; -} - bool SpellCheckContext::CellPos::operator== (const CellPos& r) const { return mnCol == r.mnCol && mnRow == r.mnRow; |