diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-01 12:22:42 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-01 11:11:04 +0000 |
commit | 88e5fa24eab7b89e946a340e9cf75951cbbffd79 (patch) | |
tree | 4e76bfae2a8482f1f37625d8fbbe08fbb6486a1d /sw | |
parent | 73480e7a18536b62d314929fbfe27a8f2c0a03cc (diff) |
loplugin:constantparam in sw
Change-Id: I68f1594ca3f647d055f5087def74452452f86910
Reviewed-on: https://gerrit.libreoffice.org/23718
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
35 files changed, 72 insertions, 104 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index f3bf55a0d2ba..2a1af0a0d57f 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -419,9 +419,8 @@ public: void NormalizePam(bool bPointFirst = true); void SwapPam(); - bool ChgCurrPam( const Point & rPt, - bool bTstOnly = true, // test only, don't set - bool bTstHit = false ); // only exact matches + bool TestCurrPam( const Point & rPt, + bool bTstHit = false); // only exact matches void KillPams(); // story a copy of the cursor in the stack diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index 3e996288f038..ef00108213e1 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -247,7 +247,7 @@ public: class SW_DLLPUBLIC SwDBNameField : public SwDBNameInfField { public: - SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, sal_uLong nFormat = 0); + SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData); virtual OUString Expand() const override; virtual SwField* Copy() const override; diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index a2d280ab594d..df1d070208de 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -75,8 +75,7 @@ public: SwDocStyleSheet( SwDoc& rDoc, const OUString& rName, SwDocStyleSheetPool* pPool, - SfxStyleFamily eFam, - sal_uInt16 nMask); + SfxStyleFamily eFam); SwDocStyleSheet( const SwDocStyleSheet& ); diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 7f6ed41f03bb..cf86fa05669b 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -539,7 +539,6 @@ public: in case a list style is found, <sListId> holds the list id, to which the text node belongs, which applies the found list style. */ const SwNumRule * SearchNumRule(const bool bNum, - int nNonEmptyAllowed, OUString& sListId ); /** Undo. diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index e11eba207bfb..9b6cf4f612ca 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -341,7 +341,7 @@ public: long BeginDrag( const Point *pPt, bool bProp ); long Drag ( const Point *pPt, bool bProp ); - void EndDrag ( const Point *pPt, bool bProp ); + void EndDrag ( const Point *pPt ); void BreakDrag(); /// Methods for status line. diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index a5e9942087a0..1c2d2aed4a7c 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -86,8 +86,7 @@ public: if no layout exists. If pPoint is given, look for the frame closest to it. */ SwRect FindLayoutRect( const bool bPrtArea = false, - const Point* pPoint = nullptr, - const bool bCalcFrame = false ) const; + const Point* pPoint = nullptr ) const; /** Searches SdrObject. SdrObjUserCall is client of the format. The UserCall knows its SdrObject. */ @@ -173,8 +172,7 @@ public: /// Creates the views. virtual void MakeFrames() override; - SwFlyFrame* GetFrame( const Point* pDocPos = nullptr, - const bool bCalcFrame = false ) const; + SwFlyFrame* GetFrame( const Point* pDocPos = nullptr ) const; SwAnchoredObject* GetAnchoredObj() const; diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx index 12f00c861f47..5de822c98b10 100644 --- a/sw/inc/swabstdlg.hxx +++ b/sw/inc/swabstdlg.hxx @@ -390,7 +390,6 @@ public: SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame = true, - bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr) = 0; /// @param nSlot diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 464adbdcc209..e137bc612541 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -954,23 +954,20 @@ void SwCursorShell::SwapPam() //TODO: provide documentation /** Search in the selected area for a Selection that covers the given point. - If only a test run is made, then it checks if a SSelection exists but does - not move the current cursor. In a normal run the cursor will be moved to the - chosen SSelection. + It checks if a Selection exists but does + not move the current cursor. @param rPt The point to search at. - @param bTstOnly Should I only do a test run? If true so do not move cursor. @param bTstHit ??? */ -bool SwCursorShell::ChgCurrPam( +bool SwCursorShell::TestCurrPam( const Point & rPt, - bool bTstOnly, bool bTstHit ) { SET_CURR_SHELL( this ); // check if the SPoint is in a table selection - if( bTstOnly && m_pTableCursor ) + if( m_pTableCursor ) return m_pTableCursor->IsInside( rPt ); SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed @@ -989,12 +986,7 @@ bool SwCursorShell::ChgCurrPam( if( pCmp && pCmp->HasMark() && *pCmp->Start() <= aPtPos && *pCmp->End() > aPtPos ) { - if( bTstOnly || m_pCurrentCursor == pCmp ) // is the current - return true; // return without update - - m_pCurrentCursor = pCmp; - UpdateCursor(); // cursor is already at the right position - return true; + return true; // return without update } } while( m_pCurrentCursor != ( pCmp = dynamic_cast<SwShellCursor*>(pCmp->GetNext()) ) ); diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 7dfdd8e52aa4..e2b8af4894d1 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -1498,7 +1498,7 @@ namespace //local functions originally from docfmt.cxx // Reset all attributes from the set! if( pCharSet && pCharSet->Count() && !( SetAttrMode::DONTREPLACE & nFlags ) ) { - ::sw::DocumentContentOperationsManager::ParaRstFormat aPara( pStt, pEnd, pHistory, 0, pCharSet ); + ::sw::DocumentContentOperationsManager::ParaRstFormat aPara( pStt, pEnd, pHistory, pCharSet ); pDoc->GetNodes().ForEach( aSt, aEnd, ::sw::DocumentContentOperationsManager::lcl_RstTextAttr, &aPara ); } diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index fd92763ad523..0f578ff25222 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -263,14 +263,13 @@ struct _CpyPara sal_uInt8 nDelBorderFlag; bool bCpyContent; - _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrames& rFrameArr, - bool bCopyContent = true ) + _CpyPara( SwTableNode* pNd, sal_uInt16 nCopies, _CpyTabFrames& rFrameArr ) : pDoc( pNd->GetDoc() ), pTableNd( pNd ), rTabFrameArr(rFrameArr), pInsLine(nullptr), pInsBox(nullptr), nOldSize(0), nNewSize(0), nMinLeft(ULONG_MAX), nMaxRight(0), nCpyCnt(nCopies), nInsPos(0), nLnIdx(0), nBoxIdx(0), - nDelBorderFlag(0), bCpyContent( bCopyContent ) + nDelBorderFlag(0), bCpyContent( true ) {} _CpyPara( const _CpyPara& rPara, SwTableLine* pLine ) : pWidths( rPara.pWidths ), pDoc(rPara.pDoc), pTableNd(rPara.pTableNd), @@ -2034,7 +2033,7 @@ bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTableNd ) } _CpyTabFrames aCpyFormat; - _CpyPara aPara( &rTableNd, 1, aCpyFormat, true ); + _CpyPara aPara( &rTableNd, 1, aCpyFormat ); aPara.nNewSize = aPara.nOldSize = rTableNd.GetTable().GetFrameFormat()->GetFrameSize().GetWidth(); // Copy if( IsNewModel() ) @@ -2129,7 +2128,7 @@ bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos, pNewTable->GetFrameFormat()->SetName( GetFrameFormat()->GetName() ); _CpyTabFrames aCpyFormat; - _CpyPara aPara( pTableNd, 1, aCpyFormat, true/*bCpyNds*/ ); + _CpyPara aPara( pTableNd, 1, aCpyFormat ); aPara.nNewSize = aPara.nOldSize = GetFrameFormat()->GetFrameSize().GetWidth(); if( IsNewModel() ) diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index b5bb25a42101..1ca81b2017b9 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -856,11 +856,10 @@ sal_uInt16 SwEditShell::GetNodeNumStart( SwPaM* pPaM ) const } const SwNumRule * SwEditShell::SearchNumRule( const bool bNum, - int nNonEmptyAllowed, OUString& sListId ) { return GetDoc()->SearchNumRule( *(GetCursor()->Start()), - false/*bForward*/, bNum, false/*bOutline*/, nNonEmptyAllowed, + false/*bForward*/, bNum, false/*bOutline*/, -1/*nNonEmptyAllowe*/, sListId ); } diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 919ca2064638..55b80d73a6f7 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -763,8 +763,8 @@ SwFieldType* SwDBNameFieldType::Copy() const // name of the connected database -SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData, sal_uLong nFormat) - : SwDBNameInfField(pTyp, rDBData, nFormat) +SwDBNameField::SwDBNameField(SwDBNameFieldType* pTyp, const SwDBData& rDBData) + : SwDBNameInfField(pTyp, rDBData, 0) {} OUString SwDBNameField::Expand() const diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index ead6558aaf89..a9da13be41c1 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -43,8 +43,8 @@ class SwIntrnlRefLink : public SwBaseLink { SwDDEFieldType& rFieldType; public: - SwIntrnlRefLink( SwDDEFieldType& rType, SfxLinkUpdateMode nUpdateType, SotClipboardFormatId nFormat ) - : SwBaseLink( nUpdateType, nFormat ), + SwIntrnlRefLink( SwDDEFieldType& rType, SfxLinkUpdateMode nUpdateType ) + : SwBaseLink( nUpdateType, SotClipboardFormatId::STRING ), rFieldType( rType ) {} @@ -233,7 +233,7 @@ SwDDEFieldType::SwDDEFieldType(const OUString& rName, aName( rName ), pDoc( nullptr ), nRefCnt( 0 ) { bCRLFFlag = bDeleted = false; - refLink = new SwIntrnlRefLink( *this, nUpdateType, SotClipboardFormatId::STRING ); + refLink = new SwIntrnlRefLink( *this, nUpdateType ); SetCmd( rCmd ); } diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 0a47026cfbbb..a4215e05b5db 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -684,7 +684,7 @@ long SwFEShell::Drag( const Point *pPt, bool ) return 0; } -void SwFEShell::EndDrag( const Point *, bool ) +void SwFEShell::EndDrag( const Point * ) { OSL_ENSURE( Imp()->HasDrawView(), "EndDrag without DrawView?" ); SdrView *pView = Imp()->GetDrawView(); diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx index 670c2a245383..71c40d94fe9c 100644 --- a/sw/source/core/inc/DocumentContentOperationsManager.hxx +++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx @@ -127,13 +127,13 @@ public: bool bExactRange; ParaRstFormat(const SwPosition* pStt, const SwPosition* pEnd, - SwHistory* pHst, sal_uInt16 nWhch = 0, const SfxItemSet* pSet = nullptr) + SwHistory* pHst, const SfxItemSet* pSet = nullptr) : pFormatColl(nullptr) , pHistory(pHst) , pSttNd(pStt) , pEndNd(pEnd) , pDelSet(pSet) - , nWhich(nWhch) + , nWhich(0) , bReset(false) // #i62675# , bResetListAttrs(false) , bResetAll(true) diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx index ffcc8201bc7d..0554017ba969 100644 --- a/sw/source/core/inc/layfrm.hxx +++ b/sw/source/core/inc/layfrm.hxx @@ -95,7 +95,6 @@ public: */ const SwContentFrame* GetContentPos( Point &rPoint, const bool bDontLeave, const bool bBodyOnly = false, - const bool bCalc = false, const SwCursorMoveState *pCMS = nullptr, const bool bDefaultExpand = true ) const; diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 8ca9b78af87a..6190be784b1d 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2650,8 +2650,7 @@ void SwFrameFormat::MakeFrames() OSL_ENSURE( false, "Sorry not implemented." ); } -SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint, - const bool bCalcFrame ) const +SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint ) const { SwRect aRet; SwFrame *pFrame = nullptr; @@ -2685,8 +2684,7 @@ SwRect SwFrameFormat::FindLayoutRect( const bool bPrtArea, const Point* pPoint, else { const SwFrameType nFrameType = RES_FLYFRMFMT == Which() ? SwFrameType::Fly : FRM_ALL; - pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrameType, pPoint, - nullptr, bCalcFrame ); + pFrame = ::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), nFrameType, pPoint); } if( pFrame ) @@ -3035,10 +3033,10 @@ void SwFlyFrameFormat::MakeFrames() } } -SwFlyFrame* SwFlyFrameFormat::GetFrame( const Point* pPoint, const bool bCalcFrame ) const +SwFlyFrame* SwFlyFrameFormat::GetFrame( const Point* pPoint ) const { return static_cast<SwFlyFrame*>(::GetFrameOfModify( nullptr, *const_cast<SwModify*>(static_cast<SwModify const *>(this)), SwFrameType::Fly, - pPoint, nullptr, bCalcFrame )); + pPoint )); } SwAnchoredObject* SwFlyFrameFormat::GetAnchoredObj() const diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index c46247f41854..a1598d821141 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -214,7 +214,7 @@ bool SwPageFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, static_cast<SwCursorMoveState*>(pCMS)->m_bStop = true; return false; } - const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, false, pCMS, false ); + const SwContentFrame *pCnt = GetContentPos( aPoint, false, false, pCMS, false ); if ( pCMS && pCMS->m_bStop ) return false; @@ -592,7 +592,7 @@ bool SwFlyFrame::GetCursorOfst( SwPosition *pPos, Point &rPoint, { const bool bFill = pCMS && pCMS->m_pFill; Point aPoint( rPoint ); - const SwContentFrame *pCnt = GetContentPos( rPoint, true, false, false, pCMS ); + const SwContentFrame *pCnt = GetContentPos( rPoint, true, false, pCMS ); if ( pCMS && pCMS->m_bStop ) return false; if( bFill && pCnt->IsTextFrame() ) @@ -1178,11 +1178,9 @@ static const SwLayoutFrame* lcl_Inside( const SwContentFrame *pCnt, Point& rPt ) const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, const bool bDontLeave, const bool bBodyOnly, - const bool bCalc, const SwCursorMoveState *pCMS, const bool bDefaultExpand ) const { - vcl::RenderContext* pRenderContext = getRootFrame()->GetCurrShell()->GetOut(); //Determine the first ContentFrame. const SwLayoutFrame *pStart = (!bDontLeave && bDefaultExpand && GetPrev()) ? static_cast<const SwLayoutFrame*>(GetPrev()) : this; @@ -1207,7 +1205,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, ((!bDontLeave || IsAnLower( pContent )) && (pContent->GetPhyPageNum() <= nMaxPage)) ) { - if ( ( bCalc || pContent->Frame().Width() ) && + if ( pContent->Frame().Width() && ( !bBodyOnly || pContent->IsInDocBody() ) ) { //If the Content lies in a protected area (cell, Footnote, section), @@ -1220,9 +1218,6 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, if ( !pContent->IsTextFrame() || !static_cast<const SwTextFrame*>(pContent)->IsHiddenNow() ) { - if ( bCalc ) - pContent->Calc(pRenderContext); - SwRect aContentFrame( pContent->UnionFrame() ); if ( aContentFrame.IsInside( rPoint ) ) { @@ -1361,8 +1356,6 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint, } //Bring the Point in to the PrtArea - if ( bCalc ) - pActual->Calc(pRenderContext); const SwRect aRect( pActual->Frame().Pos() + pActual->Prt().Pos(), aActualSize ); if ( aPoint.Y() < aRect.Top() ) diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 84a0622aed69..ba607ed812c9 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -535,7 +535,7 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet, } } -void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) +void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc ) { m_bFirstCSS1Rule = true; @@ -604,8 +604,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) { const SwTextFormatColl* pColl = (*pDoc->GetTextFormatColls())[i]; sal_uInt16 nPoolId = pColl->GetPoolFormatId(); - if( !bUsed || nPoolId == RES_POOLCOLL_TEXT || - pDoc->IsUsed( *pColl ) ) + if( nPoolId == RES_POOLCOLL_TEXT || pDoc->IsUsed( *pColl ) ) OutCSS1_SwFormat( *this, *pColl, &pDoc->getIDocumentStylePoolAccess(), m_pTemplate ); } @@ -615,7 +614,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed ) { const SwCharFormat *pCFormat = (*pDoc->GetCharFormats())[i]; sal_uInt16 nPoolId = pCFormat->GetPoolFormatId(); - if( !bUsed || nPoolId == RES_POOLCHR_INET_NORMAL || + if( nPoolId == RES_POOLCHR_INET_NORMAL || nPoolId == RES_POOLCHR_INET_VISIT || pDoc->IsUsed( *pCFormat ) ) OutCSS1_SwFormat( *this, *pCFormat, &pDoc->getIDocumentStylePoolAccess(), m_pTemplate ); diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 70e6be45cd3b..2c8e2fde17e2 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -434,7 +434,7 @@ public: void OutAndSetDefList( sal_uInt16 nNewLvl ); - void OutStyleSheet( const SwPageDesc& rPageDesc, bool bUsed=true ); + void OutStyleSheet( const SwPageDesc& rPageDesc ); inline void OutCSS1_PropertyAscii( const sal_Char *pProp, const sal_Char *pVal ); diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index d810c719935f..6c6e1c611924 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -927,11 +927,10 @@ SfxAbstractTabDialog* SwAbstractDialogFactory_Impl::CreateFrameTabDialog(const O SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame, - bool bFormat, const OString& sDefPage, const OUString* pFormatStr ) { - VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrameDlg>::Create(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, bFormat, sDefPage, pFormatStr); + VclPtr<SfxTabDialog> pDlg = VclPtr<SwFrameDlg>::Create(pFrame, pParent, rCoreSet, bNewFrame, rDialogType, false/*bFormat*/, sDefPage, pFormatStr); return new AbstractTabDialog_Impl(pDlg); } diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index 62d0ccb1caa6..aafd58c5b167 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -431,7 +431,6 @@ public: SfxViewFrame *pFrame, vcl::Window *pParent, const SfxItemSet& rCoreSet, bool bNewFrame = true, - bool bFormat = false, const OString& sDefPage = OString(), const OUString* pFormatStr = nullptr) override; virtual SfxAbstractApplyTabDialog* CreateTemplateDialog( diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index b0ffb27d3e72..9d79e9e9fe8f 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -174,7 +174,7 @@ void SwIndexMarkPane::InitControls() { OSL_ENSURE(pSh && pTOXMgr, "no shell?"); // contents index - const SwTOXType* pType = pTOXMgr->GetTOXType(TOX_CONTENT, 0); + const SwTOXType* pType = pTOXMgr->GetTOXType(TOX_CONTENT); OSL_ENSURE(pType, "Kein Verzeichnistyp !!"); OUString sTmpTypeSelection; if(m_pTypeDCB->GetSelectEntryCount()) @@ -183,7 +183,7 @@ void SwIndexMarkPane::InitControls() m_pTypeDCB->InsertEntry(pType->GetTypeName()); // keyword index - pType = pTOXMgr->GetTOXType(TOX_INDEX, 0); + pType = pTOXMgr->GetTOXType(TOX_INDEX); OSL_ENSURE(pType, "Kein Verzeichnistyp !!"); m_pTypeDCB->InsertEntry(pType->GetTypeName()); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 74cb5591f81a..bc9da29d82d6 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -377,10 +377,9 @@ void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, const OUString& rName, SwDocStyleSheetPool* _rPool, - SfxStyleFamily eFam, - sal_uInt16 _nMask) : + SfxStyleFamily eFam) : - SfxStyleSheetBase( rName, _rPool, eFam, _nMask ), + SfxStyleSheetBase( rName, _rPool, eFam, 0 ), pCharFormat(nullptr), pColl(nullptr), pFrameFormat(nullptr), @@ -2267,7 +2266,7 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId ) // methods for DocStyleSheetPool SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, bool bOrg ) : SfxStyleSheetBasePool( rDocument.GetAttrPool() ) -, mxStyleSheet( new SwDocStyleSheet( rDocument, OUString(), this, SFX_STYLE_FAMILY_CHAR, 0 ) ) +, mxStyleSheet( new SwDocStyleSheet( rDocument, OUString(), this, SFX_STYLE_FAMILY_CHAR ) ) , rDoc( rDocument ) { bOrganizer = bOrg; @@ -2517,8 +2516,8 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, SfxStyleFamily eFam, sal_uInt16 n ) : SfxStyleSheetIterator( pBase, eFam, n ), - mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ), - mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase, SFX_STYLE_FAMILY_CHAR, 0 ) ) + mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase, SFX_STYLE_FAMILY_CHAR ) ), + mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), OUString(), pBase, SFX_STYLE_FAMILY_CHAR ) ) { bFirstCalled = false; nLastPos = 0; diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 6c1be51f9bb6..6f2bf1a6497b 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -3371,7 +3371,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, } //not in selections or selected frames - if( rSh.ChgCurrPam( rDragPt ) || + if( rSh.TestCurrPam( rDragPt ) || ( rSh.IsSelFrameMode() && rSh.IsInsideSelectedObj( rDragPt )) ) return false; @@ -3441,7 +3441,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSh.GoPrevCursor(); rSh.SwCursorShell::SetCursor( aSttPt, true ); rSh.SelectTextAttr( RES_TXTATR_INETFMT ); - if( rSh.ChgCurrPam( rDragPt ) ) + if( rSh.TestCurrPam( rDragPt ) ) { // don't copy/move inside of yourself rSh.DestroyCursor(); diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx index d43c4eee9fbd..9afd4249cf16 100644 --- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx +++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx @@ -62,7 +62,6 @@ public: AnchorState aAnchorState, const basegfx::BColor& rColor, double fDiscreteLineWidth, - bool bShadow, bool bLineSolid ) : drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(), maTriangle(rTriangle), @@ -71,7 +70,7 @@ public: maAnchorState(aAnchorState), maColor(rColor), mfDiscreteLineWidth(fDiscreteLineWidth), - mbShadow(bShadow), + mbShadow(false), mbLineSolid(bLineSolid) {} @@ -346,7 +345,6 @@ drawinglayer::primitive2d::Primitive2DContainer AnchorOverlayObject::createOverl GetAnchorState(), getBaseColor().getBColor(), ANCHORLINE_WIDTH * aDiscreteLineWidth, - false, getLineSolid()) ); return drawinglayer::primitive2d::Primitive2DContainer { aReference }; diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.cxx b/sw/source/uibase/docvw/ShadowOverlayObject.cxx index f95efcf22937..7dd471181984 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.cxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.cxx @@ -180,8 +180,7 @@ ImplPrimitive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE) { pShadowOverlayObject = new ShadowOverlayObject( basegfx::B2DPoint(0,0), basegfx::B2DPoint(0,0), - Color(0,0,0), - SS_NORMAL ); + Color(0,0,0) ); xOverlayManager->add(*pShadowOverlayObject); } } @@ -204,11 +203,10 @@ ImplPrimitive2DIDBlock(ShadowPrimitive, PRIMITIVE2D_ID_SWSIDEBARSHADOWPRIMITIVE) ShadowOverlayObject::ShadowOverlayObject( const basegfx::B2DPoint& rBasePos, const basegfx::B2DPoint& rSecondPosition, - Color aBaseColor, - ShadowState aState ) + Color aBaseColor ) : OverlayObjectWithBasePosition(rBasePos, aBaseColor) , maSecondPosition(rSecondPosition) - , mShadowState(aState) + , mShadowState(SS_NORMAL) { } diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.hxx b/sw/source/uibase/docvw/ShadowOverlayObject.hxx index 68481aa401c0..c320aaa47273 100644 --- a/sw/source/uibase/docvw/ShadowOverlayObject.hxx +++ b/sw/source/uibase/docvw/ShadowOverlayObject.hxx @@ -45,8 +45,7 @@ private: ShadowOverlayObject( const basegfx::B2DPoint& rBasePos, const basegfx::B2DPoint& rSecondPosition, - Color aBaseColor, - ShadowState aState ); + Color aBaseColor ); virtual ~ShadowOverlayObject(); public: diff --git a/sw/source/uibase/docvw/edtdd.cxx b/sw/source/uibase/docvw/edtdd.cxx index d95c4c81cf2f..d97da84390d8 100644 --- a/sw/source/uibase/docvw/edtdd.cxx +++ b/sw/source/uibase/docvw/edtdd.cxx @@ -84,7 +84,7 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) bool bStart = false, bDelSelect = false; SdrObject *pObj = nullptr; Point aDocPos( PixelToLogic( rPosPixel ) ); - if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, true, true)) + if ( !rSh.IsInSelect() && rSh.TestCurrPam( aDocPos, true)) //We are not selecting and aren't at a selection bStart = true; else if ( !g_bFrameDrag && rSh.IsSelFrameMode() && @@ -245,7 +245,7 @@ SotExchangeDest SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject * { SwWrtShell &rSh = m_rView.GetWrtShell(); const Point aDocPt( PixelToLogic( rPixPnt ) ); - if( rSh.ChgCurrPam( aDocPt ) + if( rSh.TestCurrPam( aDocPt ) || rSh.IsOverReadOnlyPos( aDocPt ) || rSh.DocPtInsideInputField( aDocPt ) ) return SotExchangeDest::NONE; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 7df99e62e88c..5ee9dd2a605f 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3681,7 +3681,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } } - bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = false; + bool bOverSelect = rSh.TestCurrPam( aDocPos ); + bool bOverURLGrf = false; if( !bOverSelect ) bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos ); @@ -3722,7 +3723,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } else if ( MOUSE_RIGHT == rMEvt.GetButtons() && !rMEvt.GetModifier() && static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4) == 1 - && !rSh.ChgCurrPam( aDocPos ) ) + && !rSh.TestCurrPam( aDocPos ) ) { SwContentAtPos aFieldAtPos(SwContentAtPos::SW_FIELD); @@ -4129,7 +4130,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) } if ( !rSh.IsSelFrameMode() && !g_bDDINetAttr && (IsMinMove( m_aStartPos,aPixPt ) || m_bIsInMove) && - (rSh.IsInSelect() || !rSh.ChgCurrPam( aDocPt )) ) + (rSh.IsInSelect() || !rSh.TestCurrPam( aDocPt )) ) { if ( pSdrView ) { @@ -4562,7 +4563,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) else { SwContentAtPos aFieldAtPos ( SwContentAtPos::SW_FIELD ); - if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPt ) && !rSh.GetContentAtPos( aDocPt, aFieldAtPos ) ) + if ( !rSh.IsInSelect() && rSh.TestCurrPam( aDocPt ) && + !rSh.GetContentAtPos( aDocPt, aFieldAtPos ) ) { const bool bTmpNoInterrupt = g_bNoInterrupt; g_bNoInterrupt = false; @@ -5815,7 +5817,8 @@ void SwEditWin::SelectMenuPosition(SwWrtShell& rSh, const Point& rMousePos ) rSh.ClearGCAttr(); } - bool bOverSelect = rSh.ChgCurrPam( aDocPos ), bOverURLGrf = false; + bool bOverSelect = rSh.TestCurrPam( aDocPos ); + bool bOverURLGrf = false; if( !bOverSelect ) bOverURLGrf = bOverSelect = nullptr != rSh.IsURLGrfAtPos( aDocPos ); diff --git a/sw/source/uibase/inc/toxmgr.hxx b/sw/source/uibase/inc/toxmgr.hxx index 4a367172659c..528a564d8877 100644 --- a/sw/source/uibase/inc/toxmgr.hxx +++ b/sw/source/uibase/inc/toxmgr.hxx @@ -283,7 +283,7 @@ public: bool UpdateOrInsertTOX(const SwTOXDescription& rDesc, SwTOXBase** ppBase = nullptr, const SfxItemSet* pSet = nullptr); - const SwTOXType* GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const; + const SwTOXType* GetTOXType(TOXTypes eTyp) const; const SwTOXBase* GetCurTOX(); }; diff --git a/sw/source/uibase/index/toxmgr.cxx b/sw/source/uibase/index/toxmgr.cxx index eba05c80ae07..042f228c7d36 100644 --- a/sw/source/uibase/index/toxmgr.cxx +++ b/sw/source/uibase/index/toxmgr.cxx @@ -260,9 +260,9 @@ const SwTOXBase* SwTOXMgr::GetCurTOX() { return pSh->GetCurTOX(); } -const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp, sal_uInt16 nId) const +const SwTOXType* SwTOXMgr::GetTOXType(TOXTypes eTyp) const { - return pSh->GetTOXType(eTyp, nId); + return pSh->GetTOXType(eTyp, 0); } void SwTOXMgr::SetCurTOXMark(sal_uInt16 nId) diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 01b10e995a90..95f31c96f8e8 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -471,7 +471,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) OUString("FrameDialog"), GetView().GetViewFrame(), GetView().GetWindow(), - aSet, false, + aSet, false, sDefPage)); assert(pDlg); diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index c61f88ad1329..ffa42b4147ee 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1119,12 +1119,12 @@ void SwTextShell::Execute(SfxRequest &rReq) { OUString sContinuedListId; const SwNumRule* pRule = - rWrtSh.SearchNumRule( true, -1, sContinuedListId ); + rWrtSh.SearchNumRule( true, sContinuedListId ); // #i86492# // Search also for bullet list if ( !pRule ) { - pRule = rWrtSh.SearchNumRule( false, -1, sContinuedListId ); + pRule = rWrtSh.SearchNumRule( false, sContinuedListId ); } if ( pRule ) { @@ -1881,10 +1881,10 @@ void SwTextShell::GetState( SfxItemSet &rSet ) // Search also for bullet list OUString aDummy; const SwNumRule* pRule = - rSh.SearchNumRule( true, -1, aDummy ); + rSh.SearchNumRule( true, aDummy ); if ( !pRule ) { - pRule = rSh.SearchNumRule( false, -1, aDummy ); + pRule = rSh.SearchNumRule( false, aDummy ); } if ( !pRule ) rSet.DisableItem(nWhich); diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 823cef83601b..1dd165c71cb3 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -308,7 +308,7 @@ long SwWrtShell::SetCursor(const Point *pPt, bool bTextOnly) // Remove a possibly present selection at the position // of the mouseclick - if(!IsInSelect() && ChgCurrPam(*pPt)) { + if(!IsInSelect() && TestCurrPam(*pPt)) { ClearMark(); } @@ -721,7 +721,7 @@ IMPL_LINK_TYPED( SwWrtShell, ExecFlyMac, const SwFlyFrameFormat*, pFlyFormat, vo long SwWrtShell::UpdateLayoutFrame(const Point *pPt, bool ) { // still a dummy - SwFEShell::EndDrag( pPt, false ); + SwFEShell::EndDrag( pPt ); m_fnDrag = &SwWrtShell::BeginFrameDrag; return 1; } |