diff options
Diffstat (limited to 'sc/source/ui')
40 files changed, 94 insertions, 218 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index a4cf3efbfe5c..68db271254ab 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -3246,10 +3246,8 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false return bUsed; } -bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) +void ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) { - bool bUsed = false; - if ( rCEvt.GetCommand() == CommandEventId::CursorPos ) { // For CommandEventId::CursorPos, do as little as possible, because @@ -3263,7 +3261,6 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) pTableView->Command( rCEvt ); else if (pTopView) // call only once pTopView->Command( rCEvt ); - bUsed = true; } } } @@ -3278,7 +3275,6 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) pTableView->Command( rCEvt ); else if (pTopView) // call only once pTopView->Command( rCEvt ); - bUsed = true; } } } @@ -3304,9 +3300,7 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) UpdateActiveView(); bool bNewView = DataChanging( 0, true ); - if (bProtected) // cell protected - bUsed = true; // event is used - else // changes allowed + if (!bProtected) // changes allowed { if (bNewView) // create new edit view { @@ -3338,8 +3332,6 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) if (pTopView) pTopView->Command( rCEvt ); - bUsed = true; - if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput ) { // AutoInput after ext text input @@ -3364,8 +3356,6 @@ bool ScInputHandler::InputCommand( const CommandEvent& rCEvt, bool bForce ) if (pTopView && eMode != SC_INPUT_NONE) SyncViews(); } - - return bUsed; } void ScInputHandler::NotifyChange( const ScInputHdlState* pState, diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 8f7a3a9ec771..a167c130d933 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1563,7 +1563,7 @@ void ScCheckListBox::ShowCheckEntry( const OUString& sName, SvTreeListEntry* pPa RemoveParentKeepChildren( pEntry ); } -SvTreeListEntry* ScCheckListBox::CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const +void ScCheckListBox::CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const { if ( pParent && GetCheckButtonState( pParent ) == SV_BUTTON_CHECKED ) nCount++; @@ -1574,7 +1574,6 @@ SvTreeListEntry* ScCheckListBox::CountCheckedEntries( SvTreeListEntry* pParent, CountCheckedEntries( pEntry, nCount ); pEntry = NextSibling( pEntry ); } - return nullptr; } sal_uInt16 ScCheckListBox::GetCheckedEntryCount() const diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 4b01bf9a175a..83beb7ecf05a 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -484,7 +484,7 @@ void ScPivotLayoutDialog::UpdateSourceRange() FillValuesToListBoxes(); } -bool ScPivotLayoutDialog::ApplyChanges() +void ScPivotLayoutDialog::ApplyChanges() { ScDPSaveData aSaveData; ApplySaveData(aSaveData); @@ -494,7 +494,7 @@ bool ScPivotLayoutDialog::ApplyChanges() bool bToNewSheet = false; if (!GetDestination(aDestinationRange, bToNewSheet)) - return false; + return; SetDispatcherLock(false); SwitchToDocument(); @@ -512,12 +512,11 @@ bool ScPivotLayoutDialog::ApplyChanges() const SfxBoolItem* pItem = reinterpret_cast<const SfxBoolItem*>(pResult); if (pItem) { - return pItem->GetValue(); + return; } } SetDispatcherLock(true); - return true; } void ScPivotLayoutDialog::ApplySaveData(ScDPSaveData& rSaveData) diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index fe3bfb40a098..3447b98e35c0 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -139,30 +139,6 @@ ScAsciiOptions& ScAsciiOptions::operator=( const ScAsciiOptions& rCpy ) return *this; } -bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const -{ - if ( bFixedLen == rCmp.bFixedLen && - aFieldSeps == rCmp.aFieldSeps && - bMergeFieldSeps == rCmp.bMergeFieldSeps && - bQuotedFieldAsText == rCmp.bQuotedFieldAsText && - cTextSep == rCmp.cTextSep && - eCharSet == rCmp.eCharSet && - bCharSetSystem == rCmp.bCharSetSystem && - nStartRow == rCmp.nStartRow && - nInfoCount == rCmp.nInfoCount ) - { - OSL_ENSURE( !nInfoCount || (pColStart && pColFormat && rCmp.pColStart && rCmp.pColFormat), - "NULL pointer in ScAsciiOptions::operator==() column info" ); - for (sal_uInt16 i=0; i<nInfoCount; i++) - if ( pColStart[i] != rCmp.pColStart[i] || - pColFormat[i] != rCmp.pColFormat[i] ) - return false; - - return true; - } - return false; -} - static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeFieldSeps ) { OUString aFieldSeps; diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 89b2d26f493f..54a5b9750b56 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -194,9 +194,8 @@ bool ScDBDocFunc::RenameDBRange( const OUString& rOld, const OUString& rNew ) return bDone; } -bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData ) +void ScDBDocFunc::ModifyDBData( const ScDBData& rNewData ) { - bool bDone = false; ScDocument& rDoc = rDocShell.GetDocument(); ScDBCollection* pDocColl = rDoc.GetDBCollection(); bool bUndo = rDoc.IsUndoEnabled(); @@ -236,10 +235,7 @@ bool ScDBDocFunc::ModifyDBData( const ScDBData& rNewData ) } aModificator.SetDocumentModified(); - bDone = true; } - - return bDone; } void ScDBDocFunc::ModifyAllDBData( const ScDBCollection& rNewColl, const std::vector<ScRange>& rDelAreaList ) @@ -948,7 +944,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, return true; } -bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, +void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, const ScSortParam* pForceNewSort, bool bRecord, bool bApi ) { //! auch fuer ScDBFunc::DoSubTotals benutzen! @@ -957,7 +953,6 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, // - SelectionChanged (?) bool bDo = !rParam.bRemoveOnly; // sal_False = nur loeschen - bool bRet = false; ScDocument& rDoc = rDocShell.GetDocument(); if (bRecord && !rDoc.IsUndoEnabled()) @@ -967,7 +962,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (!pDBData) { OSL_FAIL( "SubTotals: keine DBData" ); - return false; + return; } ScEditableTester aTester( &rDoc, nTab, 0,rParam.nRow1+1, MAXCOL,MAXROW ); @@ -975,7 +970,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return false; + return; } if (rDoc.HasAttrib( rParam.nCol1, rParam.nRow1+1, nTab, @@ -983,7 +978,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, { if (!bApi) rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); // nicht in zusammengefasste einfuegen - return false; + return; } bool bOk = true; @@ -1105,10 +1100,7 @@ bool ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, rDocShell.PostPaint(ScRange(0, 0, nTab, MAXCOL,MAXROW,nTab), PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE); aModificator.SetDocumentModified(); - - bRet = bSuccess; } - return bRet; } namespace { @@ -1536,16 +1528,16 @@ bool ScDBDocFunc::UpdatePivotTable(ScDPObject& rDPObj, bool bRecord, bool bApi) return true; } -sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi) +void ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi) { ScDPCollection* pDPs = rDocShell.GetDocument().GetDPCollection(); if (!pDPs) - return 0; + return; std::set<ScDPObject*> aRefs; sal_uLong nErrId = pDPs->ReloadCache(pDPObj, aRefs); if (nErrId) - return nErrId; + return; std::set<ScDPObject*>::iterator it = aRefs.begin(), itEnd = aRefs.end(); for (; it != itEnd; ++it) @@ -1555,8 +1547,6 @@ sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi) // This action is intentionally not undoable since it modifies cache. UpdatePivotTable(*pObj, false, bApi); } - - return 0; } void ScDBDocFunc::RefreshPivotTableGroups(ScDPObject* pDPObj) diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index adc7f2bf6f00..d5d0ccb0a49c 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -861,13 +861,13 @@ bool ScDocFunc::SetValueCell( const ScAddress& rPos, double fVal, bool bInteract return true; } -bool ScDocFunc::SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ) +void ScDocFunc::SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ) { // Check for invalid range. SCROW nLastRow = rPos.Row() + aVals.size() - 1; if (nLastRow > MAXROW) // out of bound. - return false; + return; ScRange aRange(rPos); aRange.aEnd.SetRow(nLastRow); @@ -892,8 +892,6 @@ bool ScDocFunc::SetValueCells( const ScAddress& rPos, const std::vector<double>& // #103934#; notify editline and cell in edit mode if (!bInteraction) NotifyInputHandler(rPos); - - return true; } bool ScDocFunc::SetStringCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ) @@ -1062,7 +1060,7 @@ void ScDocFunc::NotifyInputHandler( const ScAddress& rPos ) typedef ::std::list<ScMyRememberItem*> ScMyRememberItemList; -bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ) +void ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ) { // PutData ruft PutCell oder SetNormalString @@ -1151,8 +1149,6 @@ bool ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, ApplyAttributes( aMark, aPattern, true, bApi ); } } - - return bRet; } static ScTokenArray* lcl_ScDocFunc_CreateTokenArrayXML( const OUString& rText, const OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) @@ -1231,7 +1227,7 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow ) return true; } -bool ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool bApi ) +void ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -1241,7 +1237,7 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return false; + return; } OUString aNewText = convertLineEnd(rText, GetSystemLineEnd()); //! ist das noetig ??? @@ -1256,14 +1252,10 @@ bool ScDocFunc::SetNoteText( const ScAddress& rPos, const OUString& rText, bool rDocShell.PostPaintCell( rPos ); aModificator.SetDocumentModified(); - - return true; } -bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi ) +void ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi ) { - bool bDone = false; - ScDocShellModificator aModificator( rDocShell ); ScDocument& rDoc = rDocShell.GetDocument(); ScEditableTester aTester( &rDoc, rPos.Tab(), rPos.Col(),rPos.Row(), rPos.Col(),rPos.Row() ); @@ -1310,14 +1302,11 @@ bool ScDocFunc::ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, c rDoc.SetStreamValid(rPos.Tab(), false); aModificator.SetDocumentModified(); - bDone = true; } else if (!bApi) { rDocShell.ErrorMessage(aTester.GetMessageId()); } - - return bDone; } bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, @@ -3142,18 +3131,18 @@ bool ScDocFunc::DeleteTable( SCTAB nTab, bool bRecord, bool /* bApi */ ) return bSuccess; } -bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ) +void ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ) { ScDocument& rDoc = rDocShell.GetDocument(); bool bUndo(rDoc.IsUndoEnabled()); if ( rDoc.IsVisible( nTab ) == bVisible ) - return true; // nichts zu tun - ok + return; // nichts zu tun - ok if ( !rDoc.IsDocEditable() ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); - return false; + return; } ScDocShellModificator aModificator( rDocShell ); @@ -3172,7 +3161,7 @@ bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ) { if (!bApi) rDocShell.ErrorMessage(STR_PROTECTIONERR); //! eigene Meldung? - return false; + return; } } @@ -3191,8 +3180,6 @@ bool ScDocFunc::SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ) SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); rDocShell.PostPaint(0,0,0,MAXCOL,MAXROW,MAXTAB, PAINT_EXTRAS); aModificator.SetDocumentModified(); - - return true; } bool ScDocFunc::SetLayoutRTL( SCTAB nTab, bool bRTL, bool /* bApi */ ) @@ -3826,7 +3813,7 @@ bool ScDocFunc::Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ) return true; } -bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi ) +void ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi ) { ScDocShellModificator aModificator( rDocShell ); @@ -3837,7 +3824,7 @@ bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, b { if (!bApi) rDocShell.ErrorMessage(aTester.GetMessageId()); - return false; + return; } // #i12940# ClearItems is called (from setPropertyToDefault) directly with uno object's cached @@ -3869,8 +3856,6 @@ bool ScDocFunc::ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, b aModificator.SetDocumentModified(); //! Bindings-Invalidate etc.? - - return true; } bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bApi ) @@ -5165,7 +5150,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi ) return bDone; } -bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi ) +void ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi ) { ScDocument& rDoc = rDocShell.GetDocument(); SCCOL nStartCol = rOldRange.aStart.Col(); @@ -5204,11 +5189,9 @@ bool ScDocFunc::ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd if (bUndo) rDocShell.GetUndoManager()->LeaveListAction(); } - - return bRet; } -bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, +void ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, const OUString& rOptions, const OUString& rSource, const ScRange& rDestRange, sal_uLong nRefresh, bool bFitBlock, bool bApi ) @@ -5292,8 +5275,6 @@ bool ScDocFunc::InsertAreaLink( const OUString& rFile, const OUString& rFilter, pBindings->Invalidate( SID_LINKS ); SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator - - return true; } void ScDocFunc::ReplaceConditionalFormat( sal_uLong nOldFormat, ScConditionalFormat* pFormat, SCTAB nTab, const ScRangeList& rRanges ) diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 8e459373cefa..732cfbb0db27 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -406,7 +406,7 @@ void ScDocShell::UpdateLinks() } } -bool ScDocShell::ReloadTabLinks() +void ScDocShell::ReloadTabLinks() { sfx2::LinkManager* pLinkManager = aDocument.GetLinkManager(); @@ -437,8 +437,6 @@ bool ScDocShell::ReloadTabLinks() SetDocumentModified(); } - - return true; //! Fehler erkennen } void ScDocShell::SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading ) diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index 875f126b899d..076590274291 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -73,9 +73,8 @@ static void lcl_PaintWidthHeight( ScDocShell& rDocShell, SCTAB nTab, rDocShell.PostPaint( nStartCol,nStartRow,nTab, MAXCOL,MAXROW,nTab, nParts ); } -bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ) +void ScOutlineDocFunc::MakeOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ) { - bool bSuccess = false; SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); @@ -125,7 +124,6 @@ bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, bool bColumns, bool b rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, nParts ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - bSuccess = true; } else { @@ -133,11 +131,9 @@ bool ScOutlineDocFunc::MakeOutline( const ScRange& rRange, bool bColumns, bool b rDocShell.ErrorMessage(STR_MSSG_MAKEOUTLINE_0); // "Gruppierung nicht moeglich" delete pUndoTab; } - - return bSuccess; } -bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ) +void ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ) { bool bDone = false; @@ -201,8 +197,6 @@ bool ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, bool bColumns, bool if (!bDone && !bApi) rDocShell.ErrorMessage(STR_MSSG_REMOVEOUTLINE_0); // "Aufheben nicht moeglich" - - return bDone; } bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord ) @@ -258,7 +252,7 @@ bool ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, bool bRecord ) return bSuccess; } -bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord ) +void ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord ) { SCCOL nStartCol = rRange.aStart.Col(); SCROW nStartRow = rRange.aStart.Row(); @@ -318,8 +312,6 @@ bool ScOutlineDocFunc::AutoOutline( const ScRange& rRange, bool bRecord ) rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); - - return true; } bool ScOutlineDocFunc::SelectLevel( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index df4e901afee6..0ca732efb1cd 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -122,7 +122,7 @@ public: void UpdateSourceRange(); - bool ApplyChanges(); + void ApplyChanges(); void ApplySaveData(ScDPSaveData& rSaveData); void ApplyLabelData(ScDPSaveData& rSaveData); diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index dd5da2a6d6cb..637a5d60ae4d 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -89,7 +89,7 @@ public: void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ); inline void SetWindow(vcl::Window* _pWindow) { m_pWindow = _pWindow; } - bool DoClose( sal_uInt16 nId ); + void DoClose( sal_uInt16 nId ); static void SetDispatcherLock( bool bLock ); static void EnableSpreadsheets( bool bFlag = true, bool bChildren = true ); static void ViewShellChanged(); @@ -109,7 +109,6 @@ class SC_DLLPUBLIC ScRefHandler : public: operator vcl::Window *(){ return m_rWindow.get(); } - vcl::Window* operator ->() { return static_cast<vcl::Window *>(*this); } friend class formula::RefButton; friend class formula::RefEdit; diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx index 03e5bcfd371e..551b5f277990 100644 --- a/sc/source/ui/inc/asciiopt.hxx +++ b/sc/source/ui/inc/asciiopt.hxx @@ -51,8 +51,6 @@ public: ScAsciiOptions& operator=( const ScAsciiOptions& rCpy ); - bool operator==( const ScAsciiOptions& rCmp ) const; - void ReadFromString( const OUString& rString ); OUString WriteToString() const; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index c6717110e988..bf8281f90f1b 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -193,7 +193,7 @@ private: class ScCheckListBox : public SvTreeListBox { SvLBoxButtonData* mpCheckButton; - SvTreeListEntry* CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const; + void CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& nCount ) const; void CheckAllChildren( SvTreeListEntry* pEntry, bool bCheck = true ); public: diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx index ba8b6face8c6..2353f154e6ec 100644 --- a/sc/source/ui/inc/content.hxx +++ b/sc/source/ui/inc/content.hxx @@ -127,7 +127,7 @@ public: OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override; void ObjectFresh( ScContentId nType, SvTreeListEntry* pEntry = nullptr); - bool SetNavigatorDlgFlag(bool isInNavigatoeDlg){ return bisInNavigatoeDlg=isInNavigatoeDlg;}; + void SetNavigatorDlgFlag(bool isInNavigateDlg){ bisInNavigatoeDlg=isInNavigateDlg;}; virtual void MouseButtonDown( const MouseEvent& rMEvt ) override; virtual void KeyInput( const KeyEvent& rKEvt ) override; diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx index 4b47afed54df..fc58a571222d 100644 --- a/sc/source/ui/inc/dbdocfun.hxx +++ b/sc/source/ui/inc/dbdocfun.hxx @@ -76,14 +76,14 @@ public: SC_DLLPUBLIC bool Query( SCTAB nTab, const ScQueryParam& rQueryParam, const ScRange* pAdvSource, bool bRecord, bool bApi ); - bool DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, + void DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, const ScSortParam* pForceNewSort, bool bRecord, bool bApi ); bool AddDBRange( const OUString& rName, const ScRange& rRange, bool bApi ); bool DeleteDBRange( const OUString& rName ); bool RenameDBRange( const OUString& rOld, const OUString& rNew ); - bool ModifyDBData( const ScDBData& rNewData ); // Name unveraendert + void ModifyDBData( const ScDBData& rNewData ); // Name unveraendert void ModifyAllDBData( const ScDBCollection& rNewColl, const std::vector<ScRange>& rDelAreaList ); @@ -100,7 +100,7 @@ public: * Reload the referenced pivot cache, and refresh all pivot tables that * reference the cache. */ - sal_uLong RefreshPivotTables(ScDPObject* pDPObj, bool bApi); + void RefreshPivotTables(ScDPObject* pDPObj, bool bApi); /** * Refresh the group dimensions of all pivot tables referencing the same diff --git a/sc/source/ui/inc/dbfunc.hxx b/sc/source/ui/inc/dbfunc.hxx index e21194815ef3..d8b2be5890a9 100644 --- a/sc/source/ui/inc/dbfunc.hxx +++ b/sc/source/ui/inc/dbfunc.hxx @@ -86,7 +86,7 @@ public: void UngroupDataPilot(); void DataPilotInput( const ScAddress& rPos, const OUString& rString ); - bool DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = nullptr ); + void DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId = nullptr ); bool DataPilotMove( const ScRange& rSource, const ScAddress& rDest ); bool HasSelectionForDrillDown( sal_uInt16& rOrientation ); diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx index 2d3864728ece..bf5788351311 100644 --- a/sc/source/ui/inc/docfunc.hxx +++ b/sc/source/ui/inc/docfunc.hxx @@ -96,7 +96,7 @@ public: bool SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, const OUString& rText, bool bApi ); bool SetValueCell( const ScAddress& rPos, double fVal, bool bInteraction ); - bool SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ); + void SetValueCells( const ScAddress& rPos, const std::vector<double>& aVals, bool bInteraction ); bool SetStringCell( const ScAddress& rPos, const OUString& rStr, bool bInteraction ); bool SetEditCell( const ScAddress& rPos, const EditTextObject& rStr, bool bInteraction ); @@ -107,15 +107,15 @@ public: * must not delete it after passing it to this call. */ bool SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, bool bInteraction ); - bool PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ); + void PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine, bool bApi ); bool SetCellText( const ScAddress& rPos, const OUString& rText, bool bInterpret, bool bEnglish, bool bApi, const formula::FormulaGrammar::Grammar eGrammar ); bool ShowNote( const ScAddress& rPos, bool bShow = true ); - bool SetNoteText( const ScAddress& rPos, const OUString& rNoteText, bool bApi ); - bool ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi ); + void SetNoteText( const ScAddress& rPos, const OUString& rNoteText, bool bApi ); + void ReplaceNote( const ScAddress& rPos, const OUString& rNoteText, const OUString* pAuthor, const OUString* pDate, bool bApi ); bool ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& rPattern, bool bRecord, bool bApi ); @@ -138,7 +138,7 @@ public: bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi ); bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi ); - bool SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ); + void SetTableVisible( SCTAB nTab, bool bVisible, bool bApi ); bool SetLayoutRTL( SCTAB nTab, bool bRTL, bool bApi ); @@ -156,7 +156,7 @@ public: bool Protect( SCTAB nTab, const OUString& rPassword, bool bApi ); bool Unprotect( SCTAB nTab, const OUString& rPassword, bool bApi ); - bool ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi ); + void ClearItems( const ScMarkData& rMark, const sal_uInt16* pWhich, bool bApi ); bool ChangeIndent( const ScMarkData& rMark, bool bIncrement, bool bApi ); bool AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark, sal_uInt16 nFormatNo, bool bRecord, bool bApi ); @@ -185,7 +185,7 @@ public: bool FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir eDir, sal_uLong nCount, bool bRecord, bool bApi ); - bool ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi ); + void ResizeMatrix( const ScRange& rOldRange, const ScAddress& rNewEnd, bool bApi ); bool MergeCells( const ScCellMergeOption& rOption, bool bContents, bool bRecord, bool bApi ); @@ -205,7 +205,7 @@ public: bool CreateNames( const ScRange& rRange, sal_uInt16 nFlags, bool bApi, SCTAB nTab = -1 ); // -1 for global range names bool InsertNameList( const ScAddress& rStartPos, bool bApi ); - bool InsertAreaLink( const OUString& rFile, const OUString& rFilter, + void InsertAreaLink( const OUString& rFile, const OUString& rFilter, const OUString& rOptions, const OUString& rSource, const ScRange& rDestRange, sal_uLong nRefresh, bool bFitBlock, bool bApi ); diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index d01de8693c99..e50e2386d7aa 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -306,7 +306,7 @@ public: virtual void ReconnectDdeLink(SfxObjectShell& rServer) override; void UpdateLinks() override; - bool ReloadTabLinks(); + void ReloadTabLinks(); void SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading = false ); void SetCalcConfig( const ScCalcConfig& rConfig ); diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx index 0705153de94c..9548292786af 100644 --- a/sc/source/ui/inc/drawview.hxx +++ b/sc/source/ui/inc/drawview.hxx @@ -89,7 +89,7 @@ public: void InvalidateAttribs(); void InvalidateDrawTextAttrs(); - bool BeginDrag( vcl::Window* pWindow, const Point& rStartPos ); + void BeginDrag( vcl::Window* pWindow, const Point& rStartPos ); void DoCut(); void DoCopy(); @@ -114,7 +114,7 @@ public: bool HasMarkedControl() const; bool HasMarkedInternal() const; - bool InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE); + void InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE); /** Returns the selected object, if it is the caption object of a cell note. @param ppCaptData (out-param) If not null, returns the pointer to the caption object data. */ @@ -141,7 +141,7 @@ public: SdrObject* GetObjectByName(const OUString& rName); bool GetObjectIsMarked( SdrObject * pObject ); - bool SelectCurrentViewObject( const OUString& rName ); + void SelectCurrentViewObject( const OUString& rName ); // #i123922# helper which checks if a Graphic may be applied to an existing // SdrObject; if it's a SdrGrafObj the fill will be replaced. If it's a diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx index 261b3c4ea78a..44d31c1b0332 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -73,18 +73,6 @@ public: return *this; } - bool operator==( const ScImportOptions& rCmp ) - { - return - nFieldSepCode == rCmp.nFieldSepCode - && nTextSepCode == rCmp.nTextSepCode - && eCharSet == rCmp.eCharSet - && aStrFont == rCmp.aStrFont - && bFixedWidth == rCmp.bFixedWidth - && bSaveAsShown == rCmp.bSaveAsShown - && bQuoteAllText == rCmp.bQuoteAllText - && bSaveFormulas == rCmp.bSaveFormulas; - } OUString BuildString() const; void SetTextEncoding( rtl_TextEncoding nEnc ); diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index f643b64b25b4..5532f52ed6c7 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -185,7 +185,7 @@ public: void SetReference( const ScRange& rRef, ScDocument* pDoc ); void AddRefEntry(); - bool InputCommand( const CommandEvent& rCEvt, bool bForce ); + void InputCommand( const CommandEvent& rCEvt, bool bForce ); void InsertFunction( const OUString& rFuncName, bool bAddPar = true ); void ClearText(); @@ -281,8 +281,6 @@ public: ScInputHdlState& operator= ( const ScInputHdlState& r ); bool operator==( const ScInputHdlState& r ) const; - bool operator!=( const ScInputHdlState& r ) const - { return !operator==( r ); } const ScAddress& GetPos() const { return aCursorPos; } const ScAddress& GetStartPos() const { return aStartPos; } diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index f0c008411307..6466bf731fdf 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -90,7 +90,7 @@ private: ScRangeName* GetRangeName(const OUString& rScope); - bool AddPushed(); + void AddPushed(); void RemovePushed(); void CancelPushed(); void ScopeChanged(); diff --git a/sc/source/ui/inc/olinefun.hxx b/sc/source/ui/inc/olinefun.hxx index 3695934b4ee2..56c1efba205e 100644 --- a/sc/source/ui/inc/olinefun.hxx +++ b/sc/source/ui/inc/olinefun.hxx @@ -34,10 +34,10 @@ public: ScOutlineDocFunc( ScDocShell& rDocSh ): rDocShell(rDocSh) {} ~ScOutlineDocFunc() {} - bool MakeOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ); - bool RemoveOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ); + void MakeOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ); + void RemoveOutline( const ScRange& rRange, bool bColumns, bool bRecord, bool bApi ); bool RemoveAllOutlines( SCTAB nTab, bool bRecord ); - bool AutoOutline( const ScRange& rRange, bool bRecord ); + void AutoOutline( const ScRange& rRange, bool bRecord ); bool SelectLevel( SCTAB nTab, bool bColumns, sal_uInt16 nLevel, bool bRecord, bool bPaint ); diff --git a/sc/source/ui/inc/prevloc.hxx b/sc/source/ui/inc/prevloc.hxx index 2e22cbf0fa3e..56a5326635bb 100644 --- a/sc/source/ui/inc/prevloc.hxx +++ b/sc/source/ui/inc/prevloc.hxx @@ -138,7 +138,7 @@ public: // Check if any cells (including column/row headers) are in the visible area bool HasCellsInRange( const Rectangle& rVisiblePixel ) const; - bool GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const; + void GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const; // returns the rectangle where the EditEngine draws the text of a Header Cell // if bColHeader is true it returns the rectangle of the header of the column in rCellPos diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx index 29b15a83529c..35e350cfc686 100644 --- a/sc/source/ui/inc/redcom.hxx +++ b/sc/source/ui/inc/redcom.hxx @@ -51,7 +51,7 @@ public: ScDocShell *pShell, ScChangeAction *pAction, bool bPrevNext = false); ~ScRedComDialog(); - short Execute(); + void Execute(); }; #endif diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index ec6f22622b5e..41d7e181dc3b 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -328,7 +328,7 @@ public: virtual VclPtr<SfxTabPage> CreatePrintOptionsPage( vcl::Window *pParent, const SfxItemSet &rOptions ) override; void ConnectObject( SdrOle2Obj* pObj ); - bool ActivateObject( SdrOle2Obj* pObj, long nVerb ); + void ActivateObject( SdrOle2Obj* pObj, long nVerb ); void DeactivateOle(); diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index d39b99b12bac..2ef7738323f2 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -49,25 +49,19 @@ public: typedef void (ScRefHandlerCaller::*PCOMMONHDLTYPE)(); typedef void (ScRefHandlerCaller::*PINPUTSTARTDLTYPE)( formula::RefEdit* pEdit, formula::RefButton* pButton ); - PFUNCSETREFHDLTYPE SetSetRefHdl( PFUNCSETREFHDLTYPE pNewHdl ) + void SetSetRefHdl( PFUNCSETREFHDLTYPE pNewHdl ) { - PFUNCSETREFHDLTYPE pOldHdl = m_pSetReferenceHdl; m_pSetReferenceHdl = pNewHdl; - return pOldHdl; } - PCOMMONHDLTYPE SetSetActHdl( PCOMMONHDLTYPE pNewHdl ) + void SetSetActHdl( PCOMMONHDLTYPE pNewHdl ) { - PCOMMONHDLTYPE pOldHdl = m_pSetActiveHdl; m_pSetActiveHdl = pNewHdl; - return pOldHdl; } - ScRefHandlerCaller *SetHandler( ScRefHandlerCaller *pNewHandler ) + void SetHandler( ScRefHandlerCaller *pNewHandler ) { - ScRefHandlerCaller *pOldHandler = m_pHandler; m_pHandler = pNewHandler; - return pOldHandler; } void SetRefInputStartPreHdl( PINPUTSTARTDLTYPE pNewHdl ){ m_pRefInputStartPreHdl = pNewHdl; } void SetRefInputDonePostHdl( void (ScRefHandlerCaller::*pNewHdl)() ){ m_pRefInputDonePostHdl = pNewHdl; } diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index ea119050865a..f6026fb863e5 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -347,7 +347,7 @@ public: // TRUE: Cell is merged bool GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& rSizeYPix ) const; - bool GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, + void GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, SCsCOL& rPosX, SCsROW& rPosY, bool bTestMerge = true, bool bRepair = false, bool bNextIfLarge = true ); diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index a527787bbe91..a2fb0a78db5c 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -247,13 +247,13 @@ public: void TabOp( const ScTabOpParam& rParam, bool bRecord = true ); bool InsertTable( const OUString& rName, SCTAB nTabNr, bool bRecord = true ); - bool InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SCTAB nCount, bool bRecord = true); + void InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SCTAB nCount, bool bRecord = true); bool AppendTable( const OUString& rName, bool bRecord = true ); - bool DeleteTable( SCTAB nTabNr, bool bRecord = true ); + void DeleteTable( SCTAB nTabNr, bool bRecord = true ); bool DeleteTables(const std::vector<SCTAB>& TheTabs, bool bRecord = true ); - bool DeleteTables(SCTAB nTab, SCTAB nSheets); + void DeleteTables(SCTAB nTab, SCTAB nSheets); bool RenameTable( const OUString& rName, SCTAB nTabNr ); void MoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr ); diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 690095acce51..f843f00ecf4e 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -612,7 +612,7 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula } } -bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId ) +void ScFormulaReferenceHelper::DoClose( sal_uInt16 nId ) { SfxApplication* pSfxApp = SfxGetpApp(); @@ -647,9 +647,8 @@ bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId ) ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); if ( pScViewShell ) pScViewShell->UpdateInputHandler(true); - - return true; } + void ScFormulaReferenceHelper::SetDispatcherLock( bool bLock ) { // lock / unlock only the dispatchers of Calc documents diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx index 8d38287f303e..02d6ec9dc68f 100644 --- a/sc/source/ui/miscdlgs/redcom.cxx +++ b/sc/source/ui/miscdlgs/redcom.cxx @@ -121,7 +121,7 @@ void ScRedComDialog::ReInit(ScChangeAction *pAction) } } -short ScRedComDialog::Execute() +void ScRedComDialog::Execute() { short nRet=pDlg->Execute(); @@ -130,8 +130,6 @@ short ScRedComDialog::Execute() if ( pDocShell!=nullptr && pDlg->GetNote() != aComment ) pDocShell->SetChangeComment( pChangeAction, pDlg->GetNote()); } - - return nRet; } void ScRedComDialog::SelectCell() diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index 5426964f11f5..3d5f0aafa665 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -338,12 +338,11 @@ void ScNameDlg::ShowOptions(const ScRangeNameLine& rLine) } } -bool ScNameDlg::AddPushed() +void ScNameDlg::AddPushed() { mbCloseWithoutUndo = true; ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); pViewSh->SwitchBetweenRefDialogs(this); - return false; } void ScNameDlg::SetEntry(const OUString& rName, const OUString& rScope) diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx index eecd6f568079..8ecf3f6b5fc0 100644 --- a/sc/source/ui/vba/vbaborders.cxx +++ b/sc/source/ui/vba/vbaborders.cxx @@ -55,7 +55,7 @@ private: uno::Reference< beans::XPropertySet > m_xProps; sal_Int32 m_LineType; ScVbaPalette m_Palette; - bool setBorderLine( table::BorderLine& rBorderLine ) + void setBorderLine( table::BorderLine& rBorderLine ) { table::TableBorder aTableBorder; m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder; @@ -93,10 +93,9 @@ private: // nice to investigate what we can do here break; default: - return false; + return; } m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) ); - return true; } bool getBorderLine( table::BorderLine& rBorderLine ) diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index ad2ddbf7a00e..2fceedd72e5f 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -575,7 +575,7 @@ public: return true; } - bool setNumberFormat( sal_Int16 nType ) + void setNumberFormat( sal_Int16 nType ) { uno::Reference< beans::XPropertySet > xNumberProps = getNumberProps(); lang::Locale aLocale; @@ -585,9 +585,7 @@ public: { sal_Int32 nNewIndex = xTypes->getStandardFormat( nType, aLocale ); mxRangeProps->setPropertyValue( "NumberFormat", uno::makeAny( nNewIndex ) ); - return true; } - return false; } }; diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index aadea8b5b31f..f2172a4b9afe 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -1609,12 +1609,12 @@ struct ScOUStringCollate } }; -bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId ) +void ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16* pUserListId ) { ScDocument* pDoc = GetViewData().GetDocument(); ScDPObject* pDPObj = pDoc->GetDPAtCursor(rPos.Col(), rPos.Row(), rPos.Tab()); if (!pDPObj) - return false; + return; // We need to run this to get all members later. if ( pUserListId ) @@ -1624,18 +1624,18 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16 long nDimIndex = pDPObj->GetHeaderDim(rPos, nOrientation); if (nDimIndex < 0) // Invalid dimension index. Bail out. - return false; + return; ScDPSaveData* pSaveData = pDPObj->GetSaveData(); if (!pSaveData) - return false; + return; ScDPSaveData aNewSaveData(*pSaveData); bool bDataLayout; OUString aDimName = pDPObj->GetDimName(nDimIndex, bDataLayout); ScDPSaveDimension* pSaveDim = aNewSaveData.GetDimensionByName(aDimName); if (!pSaveDim) - return false; + return; // manual evaluation of sort order is only needed if a user list id is given if ( pUserListId ) @@ -1667,12 +1667,12 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16 { ScUserList* pUserList = ScGlobal::GetUserList(); if (!pUserList) - return false; + return; { size_t n = pUserList->size(); if (!n || *pUserListId >= static_cast<sal_uInt16>(n)) - return false; + return; } const ScUserListData& rData = (*pUserList)[*pUserListId]; @@ -1746,7 +1746,7 @@ bool ScDBFunc::DataPilotSort( const ScAddress& rPos, bool bAscending, sal_uInt16 pNewObj->SetSaveData(aNewSaveData); ScDBDocFunc aFunc(*GetViewData().GetDocShell()); - return aFunc.DataPilotUpdate(pDPObj, pNewObj.get(), true, false); + aFunc.DataPilotUpdate(pDPObj, pNewObj.get(), true, false); } bool ScDBFunc::DataPilotMove( const ScRange& rSource, const ScAddress& rDest ) diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 9264b857a4e9..8f4a2e0aa207 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -86,10 +86,8 @@ void ScDrawView::CheckOle( const SdrMarkList& rMarkList, bool& rAnyOle, bool& rO } } -bool ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos ) +void ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos ) { - bool bReturn = false; - if ( AreObjectsMarked() ) { BrkAction(); @@ -134,8 +132,6 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos ) SC_MOD()->SetDragObject( nullptr, pTransferObj ); // for internal D&D pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK ); } - - return bReturn; } namespace { diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index a4827144b7f5..78d7925e6c5f 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -654,7 +654,7 @@ SdrObject* ScDrawView::GetObjectByName(const OUString& rName) //realize multi-selection of objects -bool ScDrawView::SelectCurrentViewObject( const OUString& rName ) +void ScDrawView::SelectCurrentViewObject( const OUString& rName ) { sal_uInt16 nObjectTab = 0; SdrObject* pFound = nullptr; @@ -701,10 +701,9 @@ bool ScDrawView::SelectCurrentViewObject( const OUString& rName ) SetLayerLocked( pLayer->GetName(), false ); } SdrPageView* pPV = GetSdrPageView(); - bUnMark = IsObjMarked(pFound); - MarkObj( pFound, pPV, bUnMark); + bUnMark = IsObjMarked(pFound); + MarkObj( pFound, pPV, bUnMark); } - return bUnMark; } bool ScDrawView::SelectObject( const OUString& rName ) @@ -779,7 +778,7 @@ bool ScDrawView::GetObjectIsMarked( SdrObject* pObject ) return bisMarked; } -bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, SdrInsertFlags nOptions) +void ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, SdrInsertFlags nOptions) { // Do not change marks when the ole object is active // (for Drop from ole object would otherwise be deactivated in the middle of ExecuteDrag!) @@ -791,7 +790,7 @@ bool ScDrawView::InsertObjectSafe(SdrObject* pObj, SdrPageView& rPV, SdrInsertFl nOptions |= SdrInsertFlags::DONTMARK; } - return InsertObjectAtView( pObj, rPV, nOptions ); + InsertObjectAtView( pObj, rPV, nOptions ); } SdrObject* ScDrawView::GetMarkedNoteCaption( ScDrawObjData** ppCaptData ) diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx index aa65184d4aca..2a562262997c 100644 --- a/sc/source/ui/view/prevloc.cxx +++ b/sc/source/ui/view/prevloc.cxx @@ -308,7 +308,7 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel ); } -bool ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const +void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const { ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( m_Entries, rCellPos, SC_PLOC_CELLRANGE ); if ( pEntry ) @@ -318,9 +318,7 @@ bool ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangl aOffsetRect.Top() + pEntry->aPixelRect.Top(), aOffsetRect.Right() + pEntry->aPixelRect.Left(), aOffsetRect.Bottom() + pEntry->aPixelRect.Top() ); - return true; } - return false; } bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index c2356aafed1f..8aa8c4b62bbb 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -98,7 +98,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) } } -bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) +void ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) { // Do not leave the hint message box on top of the object RemoveHintWindow(); @@ -209,8 +209,6 @@ bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) //! SetDocumentName should already happen in Sfx ??? //TODO/LATER: how "SetDocumentName"? //xIPObj->SetDocumentName( GetViewData().GetDocShell()->GetTitle() ); - - return ( !(nErr & ERRCODE_ERROR_MASK) ); } ErrCode ScTabViewShell::DoVerb(long nVerb) diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 95b9573b0d29..c1889e02d4af 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1740,7 +1740,7 @@ bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r } } -bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, +void ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, SCsCOL& rPosX, SCsROW& rPosY, bool bTestMerge, bool bRepair, bool bNextIfLarge ) { @@ -1844,8 +1844,6 @@ bool ScViewData::GetPosFromPixel( long nClickX, long nClickY, ScSplitPos eWhich, } } } - - return false; } void ScViewData::GetMouseQuadrant( const Point& rClickPos, ScSplitPos eWhich, diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 0fa78cb12c76..3beb225e8f9d 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -2064,7 +2064,7 @@ bool ScViewFunc::InsertTable( const OUString& rName, SCTAB nTab, bool bRecord ) // Insert tables -bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, +void ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, SCTAB nCount, bool bRecord ) { ScDocShell* pDocSh = GetViewData().GetDocShell(); @@ -2103,11 +2103,6 @@ bool ScViewFunc::InsertTables(std::vector<OUString>& aNames, SCTAB nTab, pDocSh->PostPaintExtras(); pDocSh->SetDocumentModified(); SfxGetpApp()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); - return true; - } - else - { - return false; } } @@ -2142,7 +2137,7 @@ bool ScViewFunc::AppendTable( const OUString& rName, bool bRecord ) } } -bool ScViewFunc::DeleteTable( SCTAB nTab, bool bRecord ) +void ScViewFunc::DeleteTable( SCTAB nTab, bool bRecord ) { ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocument& rDoc = pDocSh->GetDocument(); @@ -2155,12 +2150,11 @@ bool ScViewFunc::DeleteTable( SCTAB nTab, bool bRecord ) --nNewTab; SetTabNo( nNewTab, true ); } - return bSuccess; } //only use this method for undo for now, all sheets must be connected //this method doesn't support undo for now, merge it when it with the other method later -bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets ) +void ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets ) { ScDocShell* pDocSh = GetViewData().GetDocShell(); ScDocument& rDoc = pDocSh->GetDocument(); @@ -2196,9 +2190,7 @@ bool ScViewFunc::DeleteTables( const SCTAB nTab, SCTAB nSheets ) pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) ); pSfxApp->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); - return true; } - return false; } bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord ) |