[Libreoffice-commits] core.git: editeng/source include/editeng

Noel Grandin noel at peralex.com
Mon Mar 7 05:57:04 UTC 2016


 editeng/source/accessibility/AccessibleParaManager.cxx |    5 ++---
 editeng/source/editeng/editeng.cxx                     |    9 ++++-----
 editeng/source/editeng/editview.cxx                    |    4 ++--
 editeng/source/editeng/impedit.hxx                     |    6 +++---
 editeng/source/editeng/impedit2.cxx                    |   12 ++++++------
 editeng/source/items/paraitem.cxx                      |    6 +++---
 include/editeng/AccessibleParaManager.hxx              |    3 +--
 include/editeng/editeng.hxx                            |    5 ++---
 include/editeng/editview.hxx                           |    2 +-
 include/editeng/tstpitem.hxx                           |    2 +-
 10 files changed, 25 insertions(+), 29 deletions(-)

New commits:
commit 5f6e5cb695ff4ab1e17653661d8243d836436a7e
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Mar 4 14:28:57 2016 +0200

    loplugin:unuseddefaultparam in editeng
    
    Change-Id: Ifd86b0f6cca5d5d30daeee1c087c0124f2f18f3c
    Reviewed-on: https://gerrit.libreoffice.org/22899
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/editeng/source/accessibility/AccessibleParaManager.cxx b/editeng/source/accessibility/AccessibleParaManager.cxx
index 4fbcd90..9075361 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 d69a1af..aaf41da 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 cfc6a88..eb3a7f2 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 a9f4ba6..fa309f8 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 b96977f..caa34e1 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 c60dff6..ff9315d 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] );
     }
diff --git a/include/editeng/AccessibleParaManager.hxx b/include/editeng/AccessibleParaManager.hxx
index cf527fd..bc20b37 100644
--- a/include/editeng/AccessibleParaManager.hxx
+++ b/include/editeng/AccessibleParaManager.hxx
@@ -130,8 +130,7 @@ namespace accessibility
         void SetFocus( sal_Int32 nChild );
 
         void FireEvent( sal_Int32 nPara,
-                        const sal_Int16 nEventId,
-                        const css::uno::Any& rNewValue = css::uno::Any() ) const;
+                        const sal_Int16 nEventId ) const;
 
         static bool IsReferencable(rtl::Reference<AccessibleEditableTextPara> const & aChild);
         bool IsReferencable( sal_Int32 nChild ) const;
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 1a0078c..9546445 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -286,7 +286,7 @@ public:
     sal_Int32       GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
     void            GetLineBoundaries( /*out*/sal_Int32& rStart, /*out*/sal_Int32& rEnd, sal_Int32 nParagraph, sal_Int32 nLine ) const;
     sal_Int32       GetLineNumberAtIndex( sal_Int32 nPara, sal_Int32 nIndex ) const;
-    sal_uInt32      GetLineHeight( sal_Int32 nParagraph, sal_Int32 nLine = 0 );
+    sal_uInt32      GetLineHeight( sal_Int32 nParagraph );
     ParagraphInfos  GetParagraphInfos( sal_Int32 nPara );
     sal_Int32       FindParagraph( long nDocPosY );
     EPosition       FindDocPosition( const Point& rDocPos ) const;
@@ -558,8 +558,7 @@ public:
     EditPaM CursorRight(
         const EditPaM& rPaM, sal_uInt16 nCharacterIteratorMode = css::i18n::CharacterIteratorMode::SKIPCELL);
 
-    void SeekCursor(
-        ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont, OutputDevice* pOut = nullptr);
+    void SeekCursor(ContentNode* pNode, sal_Int32 nPos, SvxFont& rFont);
 
     EditPaM DeleteSelection(const EditSelection& rSel);
 
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 71a4b64..22fb58c 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -215,7 +215,7 @@ public:
 
     void            TransliterateText( sal_Int32 nTransliterationMode );
 
-    bool            IsCursorAtWrongSpelledWord( bool bMarkIfWrong = false );
+    bool            IsCursorAtWrongSpelledWord();
     bool            IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWrong = false );
     void            ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack = nullptr );
 
diff --git a/include/editeng/tstpitem.hxx b/include/editeng/tstpitem.hxx
index 14dc78a..516ae0b 100644
--- a/include/editeng/tstpitem.hxx
+++ b/include/editeng/tstpitem.hxx
@@ -117,7 +117,7 @@ public:
     // unprivatized:
     sal_uInt16          Count() const { return maTabStops.size(); }
     bool                Insert( const SvxTabStop& rTab );
-    void                Insert( const SvxTabStopItem* pTabs, sal_uInt16 nStart = 0 );
+    void                Insert( const SvxTabStopItem* pTabs );
     void                Remove( const sal_uInt16 nPos, const sal_uInt16 nLen = 1 )
                         { maTabStops.erase( maTabStops.begin() + nPos, maTabStops.begin() + nPos + nLen ); }
 


More information about the Libreoffice-commits mailing list