diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-04 14:28:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-07 05:56:43 +0000 |
commit | 5f6e5cb695ff4ab1e17653661d8243d836436a7e (patch) | |
tree | 83257515559766153bdf522c53ed560d9840660d /editeng | |
parent | b89feb8018bf3610faf01e73995d576f6566e20b (diff) |
loplugin:unuseddefaultparam in editeng
Change-Id: Ifd86b0f6cca5d5d30daeee1c087c0124f2f18f3c
Reviewed-on: https://gerrit.libreoffice.org/22899
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/accessibility/AccessibleParaManager.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 9 | ||||
-rw-r--r-- | editeng/source/editeng/editview.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 12 | ||||
-rw-r--r-- | editeng/source/items/paraitem.cxx | 6 |
6 files changed, 20 insertions, 22 deletions
diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx index 4fbcd90109a9..907536153e0d 100644 --- a/editeng/source/accessibility/AccessibleParaManager.cxx +++ b/editeng/source/accessibility/AccessibleParaManager.cxx @@ -95,8 +95,7 @@ namespace accessibility } void AccessibleParaManager::FireEvent( sal_Int32 nPara, - const sal_Int16 nEventId, - const uno::Any& rNewValue ) const + const sal_Int16 nEventId ) const { DBG_ASSERT( 0 <= nPara && maChildren.size() > static_cast<size_t>(nPara), "AccessibleParaManager::FireEvent: invalid index" ); @@ -105,7 +104,7 @@ namespace accessibility { auto maChild( GetChild( nPara ).first.get() ); if( maChild.is() ) - maChild->FireEvent( nEventId, rNewValue, css::uno::Any() ); + maChild->FireEvent( nEventId, css::uno::Any(), css::uno::Any() ); } } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index d69a1af45f82..aaf41daefea9 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -595,12 +595,12 @@ sal_Int32 EditEngine::GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) return pImpEditEngine->GetLineNumberAtIndex( nPara, nIndex ); } -sal_uInt32 EditEngine::GetLineHeight( sal_Int32 nParagraph, sal_Int32 nLine ) +sal_uInt32 EditEngine::GetLineHeight( sal_Int32 nParagraph ) { // If someone calls GetLineHeight() with an empty Engine. if ( !pImpEditEngine->IsFormatted() ) pImpEditEngine->FormatDoc(); - return pImpEditEngine->GetLineHeight( nParagraph, nLine ); + return pImpEditEngine->GetLineHeight( nParagraph, 0 ); } sal_uInt32 EditEngine::GetTextHeight( sal_Int32 nParagraph ) const @@ -872,10 +872,9 @@ const ParaPortionList& EditEngine::GetParaPortions() const return pImpEditEngine->GetParaPortions(); } -void EditEngine::SeekCursor( - ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut) +void EditEngine::SeekCursor(ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont) { - pImpEditEngine->SeekCursor(pNode, nPos, rFont, pOut); + pImpEditEngine->SeekCursor(pNode, nPos, rFont); } EditPaM EditEngine::DeleteSelection(const EditSelection& rSel) diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index cfc6a88dd75c..eb3a7f2417b7 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -737,13 +737,13 @@ sal_Int32 EditView::StartSearchAndReplace( const SvxSearchItem& rSearchItem ) return pImpEditView->pEditEngine->pImpEditEngine->StartSearchAndReplace( this, rSearchItem ); } -bool EditView::IsCursorAtWrongSpelledWord( bool bMarkIfWrong ) +bool EditView::IsCursorAtWrongSpelledWord() { bool bIsWrong = false; if ( !HasSelection() ) { EditPaM aPaM = pImpEditView->GetEditSelection().Max(); - bIsWrong = pImpEditView->IsWrongSpelledWord( aPaM, bMarkIfWrong ); + bIsWrong = pImpEditView->IsWrongSpelledWord( aPaM, false/*bMarkIfWrong*/ ); } return bIsWrong; } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index a9f4ba69fcdc..fa309f881e9a 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -563,7 +563,7 @@ private: EditPaM ImpConnectParagraphs( ContentNode* pLeft, ContentNode* pRight, bool bBackward = false ); EditPaM ImpDeleteSelection(const EditSelection& rCurSel); EditPaM ImpInsertParaBreak( EditPaM& rPaM, bool bKeepEndingAttribs = true ); - EditPaM ImpInsertParaBreak( const EditSelection& rEditSelection, bool bKeepEndingAttribs = true ); + EditPaM ImpInsertParaBreak( const EditSelection& rEditSelection ); EditPaM ImpInsertText(const EditSelection& aCurEditSelection, const OUString& rStr); EditPaM ImpInsertFeature(const EditSelection& rCurSel, const SfxPoolItem& rItem); void ImpRemoveChars( const EditPaM& rPaM, sal_Int32 nChars ); @@ -600,7 +600,7 @@ private: EditPaM WordLeft( const EditPaM& rPaM ); EditPaM WordRight( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); EditPaM StartOfWord( const EditPaM& rPaM ); - EditPaM EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + EditPaM EndOfWord( const EditPaM& rPaM ); EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, bool bAcceptStartOfWord = true ); EditSelection SelectSentence( const EditSelection& rCurSel ) const; EditPaM CursorVisualLeftRight( EditView* pEditView, const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode, bool bToLeft ); @@ -752,7 +752,7 @@ public: void Command( const CommandEvent& rCEvt, EditView* pView ); EditSelectionEngine& GetSelEngine() { return aSelEngine; } - OUString GetSelected( const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF ) const; + OUString GetSelected( const EditSelection& rSel ) const; const SfxItemSet& GetEmptyItemSet(); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index b96977f6fc7d..caa34e176ac7 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -268,13 +268,13 @@ EditPaM ImpEditEngine::DeleteSelected(const EditSelection& rSel) return aPaM; } -OUString ImpEditEngine::GetSelected( const EditSelection& rSel, const LineEnd eEnd ) const +OUString ImpEditEngine::GetSelected( const EditSelection& rSel ) const { OUString aText; if ( !rSel.HasRange() ) return aText; - OUString aSep = EditDoc::GetSepStr( eEnd ); + OUString aSep = EditDoc::GetSepStr( LINEEND_LF ); EditSelection aSel( rSel ); aSel.Adjust( aEditDoc ); @@ -1483,7 +1483,7 @@ EditPaM ImpEditEngine::StartOfWord( const EditPaM& rPaM ) return aNewPaM; } -EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType ) +EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM ) { EditPaM aNewPaM( rPaM ); @@ -1496,7 +1496,7 @@ EditPaM ImpEditEngine::EndOfWord( const EditPaM& rPaM, sal_Int16 nWordType ) uno::Reference < i18n::XBreakIterator > _xBI( ImplGetBreakIterator() ); i18n::Boundary aBoundary = _xBI->getWordBoundary( - rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, nWordType, true); + rPaM.GetNode()->GetString(), rPaM.GetIndex(), aLocale, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true); aNewPaM.SetIndex( aBoundary.endPos ); return aNewPaM; @@ -2773,7 +2773,7 @@ EditPaM ImpEditEngine::ImpInsertFeature(const EditSelection& rCurSel, const SfxP return aPaM; } -EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, bool bKeepEndingAttribs ) +EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel ) { EditPaM aPaM; if ( rCurSel.HasRange() ) @@ -2781,7 +2781,7 @@ EditPaM ImpEditEngine::ImpInsertParaBreak( const EditSelection& rCurSel, bool bK else aPaM = rCurSel.Max(); - return ImpInsertParaBreak( aPaM, bKeepEndingAttribs ); + return ImpInsertParaBreak( aPaM ); } EditPaM ImpEditEngine::ImpInsertParaBreak( EditPaM& rPaM, bool bKeepEndingAttribs ) diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index c60dff652299..ff9315d8a0d0 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -1130,16 +1130,16 @@ bool SvxTabStopItem::Insert( const SvxTabStop& rTab ) return maTabStops.insert( rTab ).second; } -void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart ) +void SvxTabStopItem::Insert( const SvxTabStopItem* pTabs ) { - for( sal_uInt16 i = nStart; i < pTabs->Count(); i++ ) + for( sal_uInt16 i = 0; i < pTabs->Count(); i++ ) { const SvxTabStop& rTab = (*pTabs)[i]; sal_uInt16 nTabPos = GetPos(rTab); if(SVX_TAB_NOTFOUND != nTabPos) Remove(nTabPos); } - for( sal_uInt16 i = nStart; i < pTabs->Count(); i++ ) + for( sal_uInt16 i = 0; i < pTabs->Count(); i++ ) { maTabStops.insert( (*pTabs)[i] ); } |