diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-22 12:24:48 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-23 09:13:13 +0200 |
commit | b4e3f5e9a733694ea0b810984c54ef9aca5e432a (patch) | |
tree | 082fb4b9dfc240f505aeb7248f46cb08460032a1 /starmath | |
parent | 28d53e1a5fe5c84f6dea9793e8cc819e58fee684 (diff) |
loplugin:constantparam in starmath
Change-Id: I7a1b83ec51565f56b07ae77177e064c04f703d5f
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/cursor.hxx | 2 | ||||
-rw-r--r-- | starmath/source/cursor.cxx | 17 |
2 files changed, 9 insertions, 10 deletions
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx index 1194967bb959..0c0adbb0d2de 100644 --- a/starmath/inc/cursor.hxx +++ b/starmath/inc/cursor.hxx @@ -299,7 +299,7 @@ private: * * @returns false on failure to find the position in pGraph. */ - bool SetCaretPosition(SmCaretPos pos, bool moveAnchor = false); + bool SetCaretPosition(SmCaretPos pos); /** Set selected on nodes of the tree */ void AnnotateSelection(); diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 34dd19fbe836..47144abad9cc 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -145,13 +145,12 @@ void SmCursor::BuildGraph(){ OSL_ENSURE(mpAnchor->CaretPos.IsValid(), "Anchor must be valid"); } -bool SmCursor::SetCaretPosition(SmCaretPos pos, bool moveAnchor){ +bool SmCursor::SetCaretPosition(SmCaretPos pos){ SmCaretPosGraphIterator it = mpGraph->GetIterator(); while(it.Next()){ if(it->CaretPos == pos){ mpPosition = it.Current(); - if(moveAnchor) - mpAnchor = it.Current(); + mpAnchor = it.Current(); return true; } } @@ -218,8 +217,8 @@ void SmCursor::DeletePrev(OutputDevice* pDev){ BuildGraph(); AnnotateSelection(); //Set caret position - if(!SetCaretPosition(PosAfterDelete, true)) - SetCaretPosition(SmCaretPos(pLine, 0), true); + if(!SetCaretPosition(PosAfterDelete)) + SetCaretPosition(SmCaretPos(pLine, 0)); //Finish editing EndEdit(); @@ -644,8 +643,8 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup) { AnnotateSelection(); //Set caret position - if(!SetCaretPosition(PosAfterLimit, true)) - SetCaretPosition(SmCaretPos(pLine, 0), true); + if(!SetCaretPosition(PosAfterLimit)) + SetCaretPosition(SmCaretPos(pLine, 0)); EndEdit(); @@ -1403,8 +1402,8 @@ void SmCursor::FinishEdit(SmNodeList* pLineList, AnnotateSelection(); //Update selection annotation! //Set caret position - if(!SetCaretPosition(PosAfterEdit, true)) - SetCaretPosition(SmCaretPos(pStartLine, 0), true); + if(!SetCaretPosition(PosAfterEdit)) + SetCaretPosition(SmCaretPos(pStartLine, 0)); //End edit section EndEdit(); |