diff options
author | Noel Grandin <noel@peralex.com> | 2016-01-13 13:43:57 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-01-13 13:59:52 +0200 |
commit | 2b4fd256e9f8594c31e7e8045dccae5afdc62e16 (patch) | |
tree | 09d248841a5f0765516a7cf82b72cec529287eb7 /sw/source/uibase | |
parent | 20b0c8fc3bb5bcf4ae8ba81c88aaa5726dbcf9e2 (diff) |
loplugin:unusedmethods unused return value in sw/
Change-Id: Iaec71124b04ed678686d646df3ff0892585d3d50
Diffstat (limited to 'sw/source/uibase')
32 files changed, 113 insertions, 174 deletions
diff --git a/sw/source/uibase/config/caption.cxx b/sw/source/uibase/config/caption.cxx index bdc771779f88..ab56dbccf3f2 100644 --- a/sw/source/uibase/config/caption.cxx +++ b/sw/source/uibase/config/caption.cxx @@ -65,12 +65,4 @@ InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt ) return *this; } -bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const -{ - return (eObjType == rOpt.eObjType && - aOleId == rOpt.aOleId); // So that identical Ole-IDs can't be added multiple - // times, don't compare against anything else. - -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 075a3c047576..5de1b1272e98 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -178,14 +178,14 @@ OUString SwGlossaryHdl::GetGroupName( size_t nId, OUString* pTitle ) return sRet; } -bool SwGlossaryHdl::NewGroup(OUString &rGrpName, const OUString& rTitle) +void SwGlossaryHdl::NewGroup(OUString &rGrpName, const OUString& rTitle) { if (rGrpName.indexOf(GLOS_DELIM)<0) FindGroupName(rGrpName); - return rStatGlossaries.NewGroupDoc(rGrpName, rTitle); + rStatGlossaries.NewGroupDoc(rGrpName, rTitle); } -bool SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle) +void SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle) { bool bRet = false; OUString sOldGroup(rOld); @@ -211,7 +211,6 @@ bool SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt bRet = rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle); rNew = sNewGroup; } - return bRet; } bool SwGlossaryHdl::CopyOrMove( const OUString& rSourceGroupName, OUString& rSourceShortName, diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 12d04664d4d4..0c4e60e0326a 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1021,10 +1021,10 @@ int SwTransferable::Copy( bool bIsCut ) return nRet; } -int SwTransferable::CalculateAndCopy() +void SwTransferable::CalculateAndCopy() { if(!m_pWrtShell) - return 0; + return; SwWait aWait( *m_pWrtShell->GetView().GetDocShell(), true ); OUString aStr( m_pWrtShell->Calculate() ); @@ -1036,8 +1036,6 @@ int SwTransferable::CalculateAndCopy() AddFormat( SotClipboardFormatId::STRING ); CopyToClipboard( &m_pWrtShell->GetView().GetEditWin() ); - - return 1; } int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr ) diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index d376191340fc..08170a20003a 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5589,9 +5589,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) /* i#18686 select the object/cursor at the mouse position of the context menu request */ -bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) +void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { - bool bRet = false; const Point aDocPos( PixelToLogic( rMousePos ) ); const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aDocPos ) ); //create a synthetic mouse event out of the coordinates @@ -5643,7 +5642,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) aSelection.Adjust(); if(!aCompare.IsLess(aSelection) && !aCompare.IsGreater(aSelection)) { - return false; + return; } } @@ -5653,14 +5652,14 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) { pSdrView->MouseButtonUp( aMEvt, this ); rSh.GetView().GetViewFrame()->GetBindings().InvalidateAll(false); - return true; + return; } } rSh.ResetCursorStack(); if ( EnterDrawMode( aMEvt, aDocPos ) ) { - return true; + return; } if ( m_rView.GetDrawFuncPtr() && m_bInsFrame ) { @@ -5689,7 +5688,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( bSelObj ) { - bRet = true; // in case the frame was deselected in the macro // just the cursor has to be displayed again. if( FrameTypeFlags::NONE == rSh.GetSelFrameType() ) @@ -5707,7 +5705,7 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.EnterSelFrameMode( &aDocPos ); g_bFrameDrag = true; UpdatePointer( aDocPos ); - return bRet; + return; } } @@ -5729,7 +5727,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.UnSelectFrame(); rSh.LeaveSelFrameMode(); m_rView.AttrChangedNotify(&rSh); - bRet = true; } bool bSelObj = rSh.SelectObj( aDocPos, nFlag ); @@ -5744,7 +5741,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.LeaveSelFrameMode(); m_rView.LeaveDrawCreate(); m_rView.AttrChangedNotify( &rSh ); - bRet = true; } else { @@ -5762,13 +5758,12 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) m_rView.AttrChangedNotify( &rSh ); } UpdatePointer( aDocPos ); - bRet = true; } } else if ( rSh.IsSelFrameMode() && bIsInsideSelectedObj ) { // Object at the mouse cursor is already selected - do nothing - return false; + return; } if ( rSh.IsGCAttr() ) @@ -5787,7 +5782,6 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) // the query against the content form doesn't work!!! SwMvContext aMvContext( &rSh ); rSh.CallSetCursor(&aDocPos, false); - bRet = true; } } if( !bOverURLGrf ) @@ -5800,10 +5794,8 @@ bool SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) if( !rSh.IsFrameSelected() ) rSh.GotoNextFly(); rSh.EnterSelFrameMode(); - bRet = true; } } - return bRet; } static SfxShell* lcl_GetTextShellFromDispatcher( SwView& rView ) diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index a4891b49626d..beab06be0f12 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -420,9 +420,8 @@ sal_uInt16 SwFieldMgr::GetPos(sal_uInt16 nTypeId) } // localise subtypes of a field -bool SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) +void SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) { - bool bRet = false; SwWrtShell *pSh = pWrtShell ? pWrtShell : lcl_GetShell(); OSL_ENSURE(pSh, "no SwWrtShell found"); if(pSh) @@ -519,9 +518,7 @@ bool SwFieldMgr::GetSubTypes(sal_uInt16 nTypeId, std::vector<OUString>& rToFill) } } } - bRet = true; } - return bRet; } // determine format diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index b6d8ed4f12cb..6f7ca97a60b2 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -159,7 +159,7 @@ void SwFlyFrameAttrMgr::UpdateFlyFrame() } // insert frame -bool SwFlyFrameAttrMgr::InsertFlyFrame() +void SwFlyFrameAttrMgr::InsertFlyFrame() { m_pOwnSh->StartAllAction(); @@ -173,7 +173,6 @@ bool SwFlyFrameAttrMgr::InsertFlyFrame() FrameNotify(m_pOwnSh, FLY_DRAG_START); } m_pOwnSh->EndAllAction(); - return bRet; } // Insert frames of type eAnchorType. Position and size are being set explicitly. diff --git a/sw/source/uibase/inc/caption.hxx b/sw/source/uibase/inc/caption.hxx index 446114af66eb..b1fa6fdfc789 100644 --- a/sw/source/uibase/inc/caption.hxx +++ b/sw/source/uibase/inc/caption.hxx @@ -85,10 +85,7 @@ public: inline bool& CopyAttributes() { return bCopyAttributes; } inline bool CopyAttributes() const { return bCopyAttributes; } - bool operator==( const InsCaptionOpt& rOpt ) const; InsCaptionOpt& operator= ( const InsCaptionOpt& rOpt ); - inline bool operator< ( const InsCaptionOpt & rObj ) const - { return aOleId < rObj.aOleId; } }; #endif diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index ca22dc77a4e4..33cf7dda958d 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -156,7 +156,7 @@ public: OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override; SdrObject* GetDrawingObjectsByContent(const SwContent *pCnt); - bool ToggleToRoot(); + void ToggleToRoot(); void SetRootType(ContentTypeId nType); void Display( bool bActiveView ); void Clear(); diff --git a/sw/source/uibase/inc/dbinsdlg.hxx b/sw/source/uibase/inc/dbinsdlg.hxx index 1313e4e9425a..29f37429b694 100644 --- a/sw/source/uibase/inc/dbinsdlg.hxx +++ b/sw/source/uibase/inc/dbinsdlg.hxx @@ -75,8 +75,6 @@ struct SwInsDBColumn bIsDBFormat(true) {} - bool operator==( const SwInsDBColumn& rCmp ) const - { return sColumn == rCmp.sColumn; } bool operator<( const SwInsDBColumn& rCmp ) const; }; diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 41db7bff8f97..58f2a489a7e4 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -158,7 +158,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, SotExchangeDest GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj = nullptr ); //select the object/cursor at the mouse position of the context menu request - bool SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ); + void SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ); /* * handler for scrolling on when the mousepointer diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx index 9d9972da4300..d73c78d5be94 100644 --- a/sw/source/uibase/inc/fldmgr.hxx +++ b/sw/source/uibase/inc/fldmgr.hxx @@ -181,7 +181,7 @@ public: static sal_uInt16 GetPos(sal_uInt16 nTypeId); // subtypes to a type - bool GetSubTypes(sal_uInt16 nId, std::vector<OUString>& rToFill); + void GetSubTypes(sal_uInt16 nId, std::vector<OUString>& rToFill); // format to a type sal_uInt16 GetFormatCount(sal_uInt16 nTypeId, bool bIsText, bool bHtmlMode = false) const; diff --git a/sw/source/uibase/inc/frmmgr.hxx b/sw/source/uibase/inc/frmmgr.hxx index 4093edc8bdd1..ad228735759a 100644 --- a/sw/source/uibase/inc/frmmgr.hxx +++ b/sw/source/uibase/inc/frmmgr.hxx @@ -103,7 +103,7 @@ public: void UpdateFlyFrame(); // create new frame - bool InsertFlyFrame(); + void InsertFlyFrame(); void InsertFlyFrame(RndStdIds eAnchorType, const Point &rPos, const Size &rSize, diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 03908be3d687..74ab40d760f1 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -160,7 +160,7 @@ class SwFramePage: public SfxTabPage ListBox& _rLB ); // OD 14.11.2003 #i22341# - adjustment to handle maps, that are ambigous // in their string entries. - sal_uLong FillRelLB( const FrameMap* _pMap, + void FillRelLB( const FrameMap* _pMap, const sal_uInt16 _nLBSelPos, const sal_Int16 _nAlign, const sal_Int16 _nRel, diff --git a/sw/source/uibase/inc/gloshdl.hxx b/sw/source/uibase/inc/gloshdl.hxx index 6d23af7f20e1..333c7886f545 100644 --- a/sw/source/uibase/inc/gloshdl.hxx +++ b/sw/source/uibase/inc/gloshdl.hxx @@ -46,9 +46,9 @@ public: size_t GetGroupCnt() const; OUString GetGroupName( size_t, OUString* pTitle = nullptr ); - bool NewGroup(OUString & rGroupName, const OUString& rTitle); + void NewGroup(OUString & rGroupName, const OUString& rTitle); bool DelGroup(const OUString &); - bool RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle); + void RenameGroup(const OUString& rOld, OUString& rNew, const OUString& rNewTitle); void SetCurGroup(const OUString &aGrp, bool bApi = false, bool bAlwaysCreateNew = false); sal_uInt16 GetGlossaryCnt(); diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx index ff440f13050e..0011330c5d30 100644 --- a/sw/source/uibase/inc/gloslst.hxx +++ b/sw/source/uibase/inc/gloslst.hxx @@ -56,7 +56,7 @@ public: SwGlossaryList(); virtual ~SwGlossaryList(); - bool HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames); + void HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames); bool GetShortName(const OUString& rLongName, OUString& rShortName, OUString& rGroupName ); diff --git a/sw/source/uibase/inc/olmenu.hxx b/sw/source/uibase/inc/olmenu.hxx index 1aab51e8b3f0..0ebdfed4e3c5 100644 --- a/sw/source/uibase/inc/olmenu.hxx +++ b/sw/source/uibase/inc/olmenu.hxx @@ -78,7 +78,7 @@ public: const css::uno::Sequence< OUString > &rSuggestions, const OUString & rParaText ); - sal_uInt16 Execute( const Rectangle& rPopupPos, vcl::Window* pWin ); + void Execute( const Rectangle& rPopupPos, vcl::Window* pWin ); void Execute( sal_uInt16 nId ); }; diff --git a/sw/source/uibase/inc/pview.hxx b/sw/source/uibase/inc/pview.hxx index cf198c0a4b15..4537551e87b4 100644 --- a/sw/source/uibase/inc/pview.hxx +++ b/sw/source/uibase/inc/pview.hxx @@ -193,7 +193,7 @@ class SW_DLLPUBLIC SwPagePreview: public SfxViewShell SAL_DLLPRIVATE void Init(const SwViewOption* = nullptr); SAL_DLLPRIVATE Point AlignToPixel(const Point& rPt) const; - SAL_DLLPRIVATE int _CreateScrollbar( bool bHori); + SAL_DLLPRIVATE void _CreateScrollbar( bool bHori); DECL_DLLPRIVATE_LINK_TYPED(ScrollHdl, ScrollBar*, void); DECL_DLLPRIVATE_LINK_TYPED(EndScrollHdl, ScrollBar*, void); SAL_DLLPRIVATE bool ChgPage( int eMvMode, bool bUpdateScrollbar = true ); diff --git a/sw/source/uibase/inc/redlndlg.hxx b/sw/source/uibase/inc/redlndlg.hxx index 3055d5b2188d..ccf15226632a 100644 --- a/sw/source/uibase/inc/redlndlg.hxx +++ b/sw/source/uibase/inc/redlndlg.hxx @@ -51,8 +51,6 @@ struct SwRedlineDataParent SvTreeListEntry* pTLBParent; // corresponding TreeListBox entry OUString sComment; // redline comment - inline bool operator==( const SwRedlineDataParent& rObj ) const - { return (pData && pData->GetSeqNo() == rObj.pData->GetSeqNo()); } inline bool operator< ( const SwRedlineDataParent& rObj ) const { return (pData && pData->GetSeqNo() < rObj.pData->GetSeqNo()); } }; diff --git a/sw/source/uibase/inc/srcview.hxx b/sw/source/uibase/inc/srcview.hxx index 96be7e5ea884..1c3e88410142 100644 --- a/sw/source/uibase/inc/srcview.hxx +++ b/sw/source/uibase/inc/srcview.hxx @@ -44,7 +44,7 @@ class SwSrcView: public SfxViewShell virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; protected: - sal_uInt16 StartSearchAndReplace(const SvxSearchItem& rItem, + void StartSearchAndReplace(const SvxSearchItem& rItem, bool bFromStart, bool bApi, bool bRecursive = false); diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx index b5f5c46743d2..8f9bd43b407b 100644 --- a/sw/source/uibase/inc/swdtflvr.hxx +++ b/sw/source/uibase/inc/swdtflvr.hxx @@ -159,7 +159,7 @@ public: int Cut(); int Copy( bool bIsCut = false ); int PrepareForCopy( bool bIsCut = false ); - int CalculateAndCopy(); // special for Calculator + void CalculateAndCopy(); // special for Calculator int CopyGlossary( SwTextBlocks& rGlossary, const OUString& rStr ); // remove the DDE-Link format promise diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx index 12cfb78b460e..4a367172659c 100644 --- a/sw/source/uibase/inc/toxmgr.hxx +++ b/sw/source/uibase/inc/toxmgr.hxx @@ -274,7 +274,6 @@ public: void PrevTOXMark(bool bSame=false); // get current TOXmarks - sal_uInt16 GetTOXMarks(); sal_uInt16 GetTOXMarkCount(); SwTOXMark* GetTOXMark(sal_uInt16 nId); SwTOXMark* GetCurTOXMark(); diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx index 40f0730d6413..dae1c2cdcf3e 100644 --- a/sw/source/uibase/inc/wrtsh.hxx +++ b/sw/source/uibase/inc/wrtsh.hxx @@ -104,8 +104,8 @@ public: using SwEditShell::Insert; long CallSetCursor(const Point* pPt, bool bProp) { return (this->*m_fnSetCursor)(pPt, bProp); } - long Drag (const Point* pPt, bool bProp) { return (this->*m_fnDrag)(pPt, bProp); } - long EndDrag (const Point* pPt, bool bProp) { return (this->*m_fnEndDrag)(pPt, bProp); } + void Drag (const Point* pPt, bool bProp) { (this->*m_fnDrag)(pPt, bProp); } + void EndDrag (const Point* pPt, bool bProp) { (this->*m_fnEndDrag)(pPt, bProp); } long KillSelection(const Point* pPt, bool bProp) { return (this->*m_fnKillSel)(pPt, bProp); } // reset all selections @@ -138,7 +138,7 @@ public: void EnterAddMode(); void LeaveAddMode(); - bool ToggleAddMode(); + void ToggleAddMode(); bool IsAddMode() const { return m_bAddMode; } void EnterBlockMode(); @@ -193,7 +193,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); sal_uInt16 nCount, bool bBasicCall, bool bVisual = false ); bool Up ( bool bSelect, sal_uInt16 nCount = 1, bool bBasicCall = false ); bool Down ( bool bSelect, sal_uInt16 nCount = 1, bool bBasicCall = false ); - bool NxtWrd ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); } + void NxtWrd ( bool bSelect = false ) { SimpleMove( &SwWrtShell::_NxtWrd, bSelect ); } bool PrvWrd ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::_PrvWrd, bSelect ); } bool LeftMargin ( bool bSelect, bool bBasicCall ); @@ -203,37 +203,37 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); bool EndDoc ( bool bSelect = false ); bool SttNxtPg ( bool bSelect = false ); - bool SttPrvPg ( bool bSelect = false ); - bool EndNxtPg ( bool bSelect = false ); + void SttPrvPg ( bool bSelect = false ); + void EndNxtPg ( bool bSelect = false ); bool EndPrvPg ( bool bSelect = false ); bool SttPg ( bool bSelect = false ); bool EndPg ( bool bSelect = false ); bool SttPara ( bool bSelect = false ); - bool EndPara ( bool bSelect = false ); + void EndPara ( bool bSelect = false ); bool FwdPara ( bool bSelect = false ) { return SimpleMove( &SwWrtShell::_FwdPara, bSelect ); } - bool BwdPara ( bool bSelect = false ) - { return SimpleMove( &SwWrtShell::_BwdPara, bSelect ); } - bool FwdSentence( bool bSelect = false ) - { return SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); } - bool BwdSentence( bool bSelect = false ) - { return SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); } + void BwdPara ( bool bSelect = false ) + { SimpleMove( &SwWrtShell::_BwdPara, bSelect ); } + void FwdSentence( bool bSelect = false ) + { SimpleMove( &SwWrtShell::_FwdSentence, bSelect ); } + void BwdSentence( bool bSelect = false ) + { SimpleMove( &SwWrtShell::_BwdSentence, bSelect ); } // #i20126# Enhanced table selection bool SelectTableRowCol( const Point& rPt, const Point* pEnd = nullptr, bool bRowDrag = false ); - bool SelectTableRow(); - bool SelectTableCol(); - bool SelectTableCell(); + void SelectTableRow(); + void SelectTableCol(); + void SelectTableCell(); bool SelectTextAttr( sal_uInt16 nWhich, const SwTextAttr* pAttr = nullptr ); // per column jumps - bool StartOfColumn ( bool bSelect = false ); - bool EndOfColumn ( bool bSelect = false ); - bool StartOfNextColumn ( bool bSelect = false ); - bool EndOfNextColumn ( bool bSelect = false ); - bool StartOfPrevColumn ( bool bSelect = false ); - bool EndOfPrevColumn ( bool bSelect = false ); + void StartOfColumn ( bool bSelect = false ); + void EndOfColumn ( bool bSelect = false ); + void StartOfNextColumn ( bool bSelect = false ); + void EndOfNextColumn ( bool bSelect = false ); + void StartOfPrevColumn ( bool bSelect = false ); + void EndOfPrevColumn ( bool bSelect = false ); // set the cursor to page "nPage" at the beginning // additionally to a identically named implementation in crsrsh.hxx @@ -259,19 +259,19 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void ChgDBData(const SwDBData& SwDBData); // delete - long DelToEndOfLine(); - long DelToStartOfLine(); - long DelLine(); + void DelToEndOfLine(); + void DelToStartOfLine(); + void DelLine(); long DelLeft(); // also deletes the frame or sets the cursor in the frame when bDelFrame == false long DelRight(); - long DelToEndOfPara(); - long DelToStartOfPara(); + void DelToEndOfPara(); + void DelToStartOfPara(); long DelToEndOfSentence(); - long DelToStartOfSentence(); - long DelNxtWord(); - long DelPrvWord(); + void DelToStartOfSentence(); + void DelNxtWord(); + void DelPrvWord(); // checks whether a word selection exists. // According to the rules for intelligent Cut / Paste @@ -395,9 +395,9 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); virtual void DrawSelChanged( ) override; // jump to bookmark and set the "selections-flags" correctly again - bool GotoMark( const ::sw::mark::IMark* const pMark ); + void GotoMark( const ::sw::mark::IMark* const pMark ); bool GotoMark( const ::sw::mark::IMark* const pMark, bool bSelect, bool bStart ); - bool GotoMark( const OUString& rName ); + void GotoMark( const OUString& rName ); bool GoNextBookmark(); // true when there still was one bool GoPrevBookmark(); @@ -407,7 +407,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); // jump to the next / previous hyperlink - inside text and also // on graphics - bool SelectNextPrevHyperlink( bool bNext = true ); + void SelectNextPrevHyperlink( bool bNext = true ); // determine corresponding SwView const SwView& GetView() const { return m_rView; } @@ -461,7 +461,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)(); void GotoOutline( sal_uInt16 nIdx ); bool GotoOutline( const OUString& rName ); bool GotoRegion( const OUString& rName ); - bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0, + void GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0, sal_uInt16 nSeqNo = 0 ); bool GotoNextTOXBase( const OUString* pName = nullptr); bool GotoTable( const OUString& rName ); @@ -580,8 +580,8 @@ private: // after SSize/Move of a frame update; Point is destination. SAL_DLLPRIVATE long UpdateLayoutFrame(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long SttLeaveSelect(const Point *, bool bProp=false ); - SAL_DLLPRIVATE long AddLeaveSelect(const Point *, bool bProp=false ); + SAL_DLLPRIVATE void SttLeaveSelect(const Point *, bool bProp=false ); + SAL_DLLPRIVATE void AddLeaveSelect(const Point *, bool bProp=false ); SAL_DLLPRIVATE long Ignore(const Point *, bool bProp=false ); SAL_DLLPRIVATE void LeaveExtSel() { m_bSelWrd = m_bSelLn = false;} diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index 6ea8f857f16a..676944636673 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -32,16 +32,10 @@ SwTOXMgr::SwTOXMgr(SwWrtShell* pShell): pSh(pShell) { - GetTOXMarks(); + pSh->GetCurTOXMarks(aCurMarks); SetCurTOXMark(0); } -// handle current TOXMarks -sal_uInt16 SwTOXMgr::GetTOXMarks() -{ - return pSh->GetCurTOXMarks(aCurMarks); -} - SwTOXMark* SwTOXMgr::GetTOXMark(sal_uInt16 nId) { if(!aCurMarks.empty()) diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx index 66cf66f94b18..6270ab0eb4d3 100644 --- a/sw/source/uibase/lingu/olmenu.cxx +++ b/sw/source/uibase/lingu/olmenu.cxx @@ -631,11 +631,10 @@ void SwSpellPopup::checkRedline() } } -sal_uInt16 SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) +void SwSpellPopup::Execute( const Rectangle& rWordPos, vcl::Window* pWin ) { sal_uInt16 nRet = PopupMenu::Execute(pWin, pWin->LogicToPixel(rWordPos)); Execute( nRet ); - return nRet; } void SwSpellPopup::Execute( sal_uInt16 nId ) diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 48ee1ef7cf09..4c6580017954 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1271,7 +1271,7 @@ SwDocShell* SwPagePreview::GetDocShell() return dynamic_cast<SwDocShell*>( GetViewFrame()->GetObjectShell() ); } -int SwPagePreview::_CreateScrollbar( bool bHori ) +void SwPagePreview::_CreateScrollbar( bool bHori ) { vcl::Window *pMDI = &GetViewFrame()->GetWindow(); VclPtr<SwScrollbar>& ppScrollbar = bHori ? pHScrollbar : pVScrollbar; @@ -1288,7 +1288,6 @@ int SwPagePreview::_CreateScrollbar( bool bHori ) InvalidateBorder(); ppScrollbar->ExtendedShow(); - return 1; } bool SwPagePreview::ChgPage( int eMvMode, bool bUpdateScrollbar ) diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 0c55eedca0a4..2cd03e410fe9 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -566,7 +566,7 @@ void SwSrcView::SetSearchItem( const SvxSearchItem& rItem ) pSearchItem = static_cast<SvxSearchItem*>(rItem.Clone()); } -sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, +void SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, bool bFromStart, bool bApi, bool bRecursive) @@ -658,7 +658,6 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, } } } - return nFound; } sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, SfxPrinterChangeFlags nDiffFlags, bool ) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 3feb1f98098d..a037afed86db 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1896,7 +1896,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, // Switch the display to Root -bool SwContentTree::ToggleToRoot() +void SwContentTree::ToggleToRoot() { if(!m_bIsRoot) { @@ -1928,7 +1928,6 @@ bool SwContentTree::ToggleToRoot() } m_pConfig->SetRootType( m_nRootType ); GetParentWindow()->m_aContentToolBox->CheckItem(FN_SHOW_ROOT, m_bIsRoot); - return m_bIsRoot; } // Check if the displayed content is valid. diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index 1bfd535c8965..3af10c9fd928 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -391,7 +391,7 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) // Give back all (not exceeding FIND_MAX_GLOS) found modules // with matching beginning. -bool SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames) +void SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> *pLongNames) { if(!bFilled) Update(); @@ -416,7 +416,6 @@ bool SwGlossaryList::HasLongName(const OUString& rBegin, std::vector<OUString> * } } } - return nFound > 0; } void SwGlossaryList::ClearGroups() diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 725d64271180..340b39a696a8 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -83,7 +83,7 @@ bool SwWrtShell::TryRemoveIndent() /** Description: Erase the line. */ -long SwWrtShell::DelLine() +void SwWrtShell::DelLine() { SwActContext aActContext(this); ResetCursorStack(); @@ -98,25 +98,22 @@ long SwWrtShell::DelLine() Pop(false); if( nRet ) UpdateAttr(); - return nRet; } -long SwWrtShell::DelToStartOfLine() +void SwWrtShell::DelToStartOfLine() { OpenMark(); SwCursorShell::LeftMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); - return nRet; } -long SwWrtShell::DelToEndOfLine() +void SwWrtShell::DelToEndOfLine() { OpenMark(); SwCursorShell::RightMargin(); long nRet = Delete(); CloseMark( 0 != nRet ); - return 1; } long SwWrtShell::DelLeft() @@ -392,7 +389,7 @@ long SwWrtShell::DelRight() return nRet; } -long SwWrtShell::DelToEndOfPara() +void SwWrtShell::DelToEndOfPara() { SwActContext aActContext(this); ResetCursorStack(); @@ -401,16 +398,15 @@ long SwWrtShell::DelToEndOfPara() if( !MovePara(fnParaCurr,fnParaEnd)) { Pop(false); - return 0; + return; } long nRet = Delete(); Pop(false); if( nRet ) UpdateAttr(); - return nRet; } -long SwWrtShell::DelToStartOfPara() +void SwWrtShell::DelToStartOfPara() { SwActContext aActContext(this); ResetCursorStack(); @@ -419,27 +415,25 @@ long SwWrtShell::DelToStartOfPara() if( !MovePara(fnParaCurr,fnParaStart)) { Pop(false); - return 0; + return; } long nRet = Delete(); Pop(false); if( nRet ) UpdateAttr(); - return nRet; } // All erase operations should work with Find instead with // Nxt-/PrvDelim, because the latter works with Wrap Around // -- that's probably not wished. -long SwWrtShell::DelToStartOfSentence() +void SwWrtShell::DelToStartOfSentence() { if(IsStartOfDoc()) - return 0; + return; OpenMark(); long nRet = _BwdSentence() ? Delete() : 0; CloseMark( 0 != nRet ); - return nRet; } long SwWrtShell::DelToEndOfSentence() @@ -476,10 +470,10 @@ long SwWrtShell::DelToEndOfSentence() return nRet; } -long SwWrtShell::DelNxtWord() +void SwWrtShell::DelNxtWord() { if(IsEndOfDoc()) - return 0; + return; SwActContext aActContext(this); ResetCursorStack(); EnterStdMode(); @@ -497,13 +491,12 @@ long SwWrtShell::DelNxtWord() else SwapPam(); ClearMark(); - return nRet; } -long SwWrtShell::DelPrvWord() +void SwWrtShell::DelPrvWord() { if(IsStartOfDoc()) - return 0; + return; SwActContext aActContext(this); ResetCursorStack(); EnterStdMode(); @@ -522,7 +515,6 @@ long SwWrtShell::DelPrvWord() else SwapPam(); ClearMark(); - return nRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index e1070bb27adf..5a663a0ecb03 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -309,16 +309,16 @@ bool SwWrtShell::SttNxtPg( bool bSelect ) return MovePage( fnPageNext, fnPageStart ); } -bool SwWrtShell::SttPrvPg( bool bSelect ) +void SwWrtShell::SttPrvPg( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect ); - return MovePage( fnPagePrev, fnPageStart ); + MovePage( fnPagePrev, fnPageStart ); } -bool SwWrtShell::EndNxtPg( bool bSelect ) +void SwWrtShell::EndNxtPg( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect ); - return MovePage( fnPageNext, fnPageEnd ); + MovePage( fnPageNext, fnPageEnd ); } bool SwWrtShell::EndPrvPg( bool bSelect ) @@ -345,50 +345,50 @@ bool SwWrtShell::SttPara( bool bSelect ) return MovePara( fnParaCurr, fnParaStart ); } -bool SwWrtShell::EndPara( bool bSelect ) +void SwWrtShell::EndPara( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect ); - return MovePara(fnParaCurr,fnParaEnd); + MovePara(fnParaCurr,fnParaEnd); } // Column-by-jumping. // SSelection with or without // returns success or failure -bool SwWrtShell::StartOfColumn( bool bSelect ) +void SwWrtShell::StartOfColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnCurr, fnColumnStart); + MoveColumn(fnColumnCurr, fnColumnStart); } -bool SwWrtShell::EndOfColumn( bool bSelect ) +void SwWrtShell::EndOfColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnCurr, fnColumnEnd); + MoveColumn(fnColumnCurr, fnColumnEnd); } -bool SwWrtShell::StartOfNextColumn( bool bSelect ) +void SwWrtShell::StartOfNextColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn( fnColumnNext, fnColumnStart); + MoveColumn( fnColumnNext, fnColumnStart); } -bool SwWrtShell::EndOfNextColumn( bool bSelect ) +void SwWrtShell::EndOfNextColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnNext, fnColumnEnd); + MoveColumn(fnColumnNext, fnColumnEnd); } -bool SwWrtShell::StartOfPrevColumn( bool bSelect ) +void SwWrtShell::StartOfPrevColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnPrev, fnColumnStart); + MoveColumn(fnColumnPrev, fnColumnStart); } -bool SwWrtShell::EndOfPrevColumn( bool bSelect ) +void SwWrtShell::EndOfPrevColumn( bool bSelect ) { ShellMoveCursor aTmp( this, bSelect); - return MoveColumn(fnColumnPrev, fnColumnEnd); + MoveColumn(fnColumnPrev, fnColumnEnd); } bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect) @@ -629,14 +629,13 @@ bool SwWrtShell::GotoRegion( const OUString& rName ) return bRet; } -bool SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, +void SwWrtShell::GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType, sal_uInt16 nSeqNo ) { SwPosition aPos = *GetCursor()->GetPoint(); bool bRet = SwCursorShell::GotoRefMark(rRefMark, nSubType, nSeqNo); if (bRet) m_aNavigationMgr.addEntry(aPos); - return bRet; } bool SwWrtShell::GotoNextTOXBase( const OUString* pName ) diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 805b075a05d4..3226dd6ff316 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -576,23 +576,21 @@ void SwWrtShell::LeaveExtMode() // End of a selection; if the selection is empty, // ClearMark(). -long SwWrtShell::SttLeaveSelect(const Point *, bool ) +void SwWrtShell::SttLeaveSelect(const Point *, bool ) { if(SwCursorShell::HasSelection() && !IsSelTableCells() && m_bClearMark) { - return 0; + return; } ClearMark(); - return 1; } // Leaving of the selection mode in additional mode -long SwWrtShell::AddLeaveSelect(const Point *, bool ) +void SwWrtShell::AddLeaveSelect(const Point *, bool ) { if(IsTableMode()) LeaveAddMode(); else if(SwCursorShell::HasSelection()) CreateCursor(); - return 1; } // Additional Mode @@ -731,11 +729,10 @@ long SwWrtShell::UpdateLayoutFrame(const Point *pPt, bool ) // Handler for toggling the modes. Returns back the old mode. -bool SwWrtShell::ToggleAddMode() +void SwWrtShell::ToggleAddMode() { m_bAddMode ? LeaveAddMode(): EnterAddMode(); Invalidate(); - return !m_bAddMode; } bool SwWrtShell::ToggleBlockMode() @@ -816,37 +813,31 @@ bool SwWrtShell::SelectTableRowCol( const Point& rPt, const Point* pEnd, bool bR // Description: Selection of a table line or column -bool SwWrtShell::SelectTableRow() +void SwWrtShell::SelectTableRow() { if ( SelTableRow() ) { m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; - return true; } - return false; } -bool SwWrtShell::SelectTableCol() +void SwWrtShell::SelectTableCol() { if ( SelTableCol() ) { m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; - return true; } - return false; } -bool SwWrtShell::SelectTableCell() +void SwWrtShell::SelectTableCell() { if ( SelTableBox() ) { m_fnSetCursor = &SwWrtShell::SetCursorKillSel; m_fnKillSel = &SwWrtShell::ResetSelect; - return true; } - return false; } // Description: Check if a word selection is present. @@ -921,7 +912,7 @@ int SwWrtShell::IntelligentCut(int nSelection, bool bCut) // jump to the next / previous hyperlink - inside text and also // on graphics -bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) +void SwWrtShell::SelectNextPrevHyperlink( bool bNext ) { StartAction(); bool bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); @@ -964,8 +955,6 @@ bool SwWrtShell::SelectNextPrevHyperlink( bool bNext ) if( bCreateXSelection ) SwTransferable::CreateSelection( *this ); - - return bRet; } // For the preservation of the selection the cursor will be moved left diff --git a/sw/source/uibase/wrtsh/wrtsh3.cxx b/sw/source/uibase/wrtsh/wrtsh3.cxx index 49eb3c51c377..2192a32bbd4d 100644 --- a/sw/source/uibase/wrtsh/wrtsh3.cxx +++ b/sw/source/uibase/wrtsh/wrtsh3.cxx @@ -127,16 +127,17 @@ void SwWrtShell::DrawSelChanged( ) g_bNoInterrupt = bOldVal; } -bool SwWrtShell::GotoMark( const OUString& rName ) +void SwWrtShell::GotoMark( const OUString& rName ) { IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName ); - if(ppMark == getIDocumentMarkAccess()->getAllMarksEnd()) return false; - return MoveBookMark( BOOKMARK_INDEX, ppMark->get() ); + if (ppMark == getIDocumentMarkAccess()->getAllMarksEnd()) + return; + MoveBookMark( BOOKMARK_INDEX, ppMark->get() ); } -bool SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) +void SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) { - return MoveBookMark( BOOKMARK_INDEX, pMark ); + MoveBookMark( BOOKMARK_INDEX, pMark ); } bool SwWrtShell::GoNextBookmark() |