diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-20 13:02:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-20 13:52:17 +0200 |
commit | 7d769f9df5b95d717f3cd045dbd8f82ff2de27a1 (patch) | |
tree | f04de671670a533ccffe20bf3aa0fa9c5f837a5d /starmath | |
parent | 0670872ce0d191cf93481215025cafd2062b8a8f (diff) |
loplugin: defaultparams
Change-Id: Ibf0ea539d2a95073a12f84964759d9c7a94baa7b
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/cursor.cxx | 20 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 22 | ||||
-rw-r--r-- | starmath/source/edit.cxx | 10 | ||||
-rw-r--r-- | starmath/source/visitors.cxx | 8 |
4 files changed, 30 insertions, 30 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index fcd71c4c3214..c8ad785b7c68 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -299,7 +299,7 @@ void SmCursor::InsertNodes(SmNodeList* pNewNodes){ const SmCaretPos pos = position->CaretPos; //Find top most of line that holds position - SmNode* pLine = FindTopMostNodeInLine(pos.pSelectedNode, false); + SmNode* pLine = FindTopMostNodeInLine(pos.pSelectedNode); //Find line parent and line index in parent SmStructureNode* pLineParent = pLine->GetParent(); @@ -501,7 +501,7 @@ void SmCursor::InsertSubSup(SmSubSup eSubSup) { OSL_ENSURE(pSNode != NULL, "There must be a selected node when HasSelection is true!"); pLine = FindTopMostNodeInLine(pSNode, true); } else - pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, false); + pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode); //Find Parent and offset in parent SmStructureNode *pLineParent = pLine->GetParent(); @@ -602,7 +602,7 @@ bool SmCursor::InsertLimit(SmSubSup eSubSup, bool bMoveCaret) { pSubject = static_cast<SmOperNode*>(position->CaretPos.pSelectedNode); else { //If not, check if parent of the current line is a SmOperNode - SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, false); + SmNode *pLineNode = FindTopMostNodeInLine(position->CaretPos.pSelectedNode); if(pLineNode->GetParent() && pLineNode->GetParent()->GetType() == NOPER) pSubject = static_cast<SmOperNode*>(pLineNode->GetParent()); } @@ -672,7 +672,7 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) { OSL_ENSURE(pSNode != NULL, "There must be a selected node if HasSelection()"); pLine = FindTopMostNodeInLine(pSNode, true); } else - pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, false); + pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode); //Find parent and offset in parent SmStructureNode *pLineParent = pLine->GetParent(); @@ -809,7 +809,7 @@ bool SmCursor::InsertRow() { OSL_ENSURE(pSNode != NULL, "There must be a selected node if HasSelection()"); pLine = FindTopMostNodeInLine(pSNode, true); } else - pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, false); + pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode); //Find parent and offset in parent SmStructureNode *pLineParent = pLine->GetParent(); @@ -933,7 +933,7 @@ void SmCursor::InsertFraction() { OSL_ENSURE(pSNode != NULL, "There must be a selected node when HasSelection is true!"); pLine = FindTopMostNodeInLine(pSNode, true); } else - pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode, false); + pLine = FindTopMostNodeInLine(position->CaretPos.pSelectedNode); //Find Parent and offset in parent SmStructureNode *pLineParent = pLine->GetParent(); @@ -1144,14 +1144,14 @@ void SmCursor::InsertCommand(sal_uInt16 nCommand) { InsertRow(); break; case RID_FROMX: - InsertLimit(CSUB, true); + InsertLimit(CSUB); break; case RID_TOX: - InsertLimit(CSUP, true); + InsertLimit(CSUP); break; case RID_FROMXTOY: - if(InsertLimit(CSUB, true)) - InsertLimit(CSUP, true); + if(InsertLimit(CSUB)) + InsertLimit(CSUP); break; default: InsertCommandText(SM_RESSTR(nCommand)); diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 70e7f295bd90..b0503f5f046b 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -608,13 +608,13 @@ void SmFontTypeDialog::WriteTo(SmFormat &rFormat) const pp->GetConfig()->GetFontPickList(FNT_SANS) = *m_pSansFont; pp->GetConfig()->GetFontPickList(FNT_FIXED) = *m_pFixedFont; - rFormat.SetFont( FNT_VARIABLE, m_pVariableFont->Get(0) ); - rFormat.SetFont( FNT_FUNCTION, m_pFunctionFont->Get(0) ); - rFormat.SetFont( FNT_NUMBER, m_pNumberFont->Get(0) ); - rFormat.SetFont( FNT_TEXT, m_pTextFont->Get(0) ); - rFormat.SetFont( FNT_SERIF, m_pSerifFont->Get(0) ); - rFormat.SetFont( FNT_SANS, m_pSansFont->Get(0) ); - rFormat.SetFont( FNT_FIXED, m_pFixedFont->Get(0) ); + rFormat.SetFont( FNT_VARIABLE, m_pVariableFont->Get() ); + rFormat.SetFont( FNT_FUNCTION, m_pFunctionFont->Get() ); + rFormat.SetFont( FNT_NUMBER, m_pNumberFont->Get() ); + rFormat.SetFont( FNT_TEXT, m_pTextFont->Get() ); + rFormat.SetFont( FNT_SERIF, m_pSerifFont->Get() ); + rFormat.SetFont( FNT_SANS, m_pSansFont->Get() ); + rFormat.SetFont( FNT_FIXED, m_pFixedFont->Get() ); rFormat.RequestApplyChanges(); } @@ -876,7 +876,7 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory) m_pMetricField4->Enable( bChecked ); } - m_pMenuButton->GetPopupMenu()->CheckItem(nCategory + 1, true); + m_pMenuButton->GetPopupMenu()->CheckItem(nCategory + 1); m_pFrame->set_label(Categories[nCategory]->GetName()); nActiveCategory = nCategory; @@ -1069,21 +1069,21 @@ void SmAlignDialog::ReadFrom(const SmFormat &rFormat) switch (rFormat.GetHorAlign()) { case AlignLeft: - m_pLeft->Check(true); + m_pLeft->Check(); m_pCenter->Check(false); m_pRight->Check(false); break; case AlignCenter: m_pLeft->Check(false); - m_pCenter->Check(true); + m_pCenter->Check(); m_pRight->Check(false); break; case AlignRight: m_pLeft->Check(false); m_pCenter->Check(false); - m_pRight->Check(true); + m_pRight->Check(); break; } } diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index eb544ad8cdc6..53a2b87a99de 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -551,8 +551,8 @@ void SmEditWindow::CreateEditView() pScrollBox = VclPtr<ScrollBarBox>::Create(this); pVScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl)); pHScrollBar->SetScrollHdl(LINK(this, SmEditWindow, ScrollHdl)); - pVScrollBar->EnableDrag( true ); - pHScrollBar->EnableDrag( true ); + pVScrollBar->EnableDrag(); + pHScrollBar->EnableDrag(); pEditView->SetOutputArea(AdjustScrollBars()); @@ -560,7 +560,7 @@ void SmEditWindow::CreateEditView() pEditView->SetSelection(eSelection); Update(); - pEditView->ShowCursor(true, true); + pEditView->ShowCursor(true); pEditEngine->SetStatusEventHdl( LINK(this, SmEditWindow, EditStatusHdl) ); SetPointer(pEditView->GetPointer()); @@ -700,7 +700,7 @@ void SmEditWindow::GetFocus() // Note: will implicitly send the AccessibleStateType::FOCUSED event ::accessibility::AccessibleTextHelper *pHelper = mxAccessible->GetTextHelper(); if (pHelper) - pHelper->SetFocus(true); + pHelper->SetFocus(); } if (!pEditView) @@ -711,7 +711,7 @@ void SmEditWindow::GetFocus() //Let SmViewShell know we got focus if(GetView() && IsInlineEditEnabled()) - GetView()->SetInsertIntoEditWindow(true); + GetView()->SetInsertIntoEditWindow(); } diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx index 46c9fddd7c41..301a637927dd 100644 --- a/starmath/source/visitors.cxx +++ b/starmath/source/visitors.cxx @@ -574,7 +574,7 @@ SmSetSelectionVisitor::SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos en //If we started a selection in this line and it haven't ended, we do that now! if(IsSelecting) { IsSelecting = false; - SetSelectedOnAll(it.Current(), true); + SetSelectedOnAll(it.Current()); //Set StartPos and EndPos to invalid positions, this ensures that an unused //start or end (because we forced end above), doesn't start a new selection. StartPos = EndPos = SmCaretPos(); @@ -629,9 +629,9 @@ void SmSetSelectionVisitor::DefaultVisit( SmNode* pNode ) { if( pNode->GetType() != NBRACEBODY || !pNode->GetParent() || pNode->GetParent()->GetType() != NBRACE ) - SetSelectedOnAll( pNode, true ); + SetSelectedOnAll( pNode ); else - SetSelectedOnAll( pNode->GetParent(), true ); + SetSelectedOnAll( pNode->GetParent() ); /* If the equation is: sqrt{2 + 4} + 5 * And the selection is: sqrt{2 + [4} +] 5 * Where [ denotes StartPos and ] denotes EndPos @@ -689,7 +689,7 @@ void SmSetSelectionVisitor::Visit( SmTextNode* pNode ) { i2 = EndPos.Index; long start, end; - pNode->SetSelected( true ); + pNode->SetSelected(); if( i1 != -1 && i2 != -1 ) { start = i1 < i2 ? i1 : i2; //MIN end = i1 > i2 ? i1 : i2; //MAX |