diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:23:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:23:50 +0100 |
commit | 11e93c64c33ed17e2286bf3be7a473df43425012 (patch) | |
tree | 1e79bc4343ce9807388e67d878075b2a5e3dd91b /formula/source | |
parent | 867d0f5f7b1fb4c487aaee1ae6ab707971a9b8d1 (diff) |
More loplugin:cstylecast: formula
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I924954aefd471386805082f11a2d33db2746c49a
Diffstat (limited to 'formula/source')
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 8 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/parawin.cxx | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index b0dca4d0864f..1866fa53201b 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -2198,7 +2198,7 @@ const FormulaToken* FormulaCompiler::CreateStringFromToken( OUStringBuffer& rBuf else rBuffer.append( mxSymbols->getSymbol( eOp)); } - else if( (sal_uInt16) eOp < mxSymbols->getSymbolCount()) // Keyword: + else if( static_cast<sal_uInt16>(eOp) < mxSymbols->getSymbolCount()) // Keyword: rBuffer.append( mxSymbols->getSymbol( eOp)); else { diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 1a7505ac06f8..5dd5ad1f67cc 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -372,9 +372,9 @@ void FormulaDlg_Impl::StoreFormEditData(FormEditData* pData) pData->SetSelection(m_pMEdit->GetSelection()); if (m_pTabCtrl->GetCurPageId() == TP_FUNCTION) - pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA ); + pData->SetMode( sal_uInt16(FORMULA_FORMDLG_FORMULA) ); else - pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_EDIT ); + pData->SetMode( sal_uInt16(FORMULA_FORMDLG_EDIT) ); pData->SetUndoStr(m_pMEdit->GetText()); pData->SetMatrixFlag(m_pBtnMatrix->IsChecked()); } @@ -1314,7 +1314,7 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin&, rPtr, void ) sal_Int32 n1 = m_aFormulaHelper.GetArgStart( aFormula, nFormulaStrPos, nEdFocus + pData->GetOffset() ); pData->SaveValues(); - pData->SetMode( (sal_uInt16) FORMULA_FORMDLG_FORMULA ); + pData->SetMode( sal_uInt16(FORMULA_FORMDLG_FORMULA) ); pData->SetFStart( n1 ); pData->SetUndoStr( aUndoStr ); ClearAllParas(); @@ -1501,7 +1501,7 @@ void FormulaDlg_Impl::UpdateSelection() sal_Int32 nLength = (nPos < m_aArguments.size()) ? m_aArguments[nPos].getLength() : 0; Selection aSel( nArgPos, nArgPos+nLength); - m_pHelper->setSelection( (sal_uInt16)nArgPos,(sal_uInt16)(nArgPos+nLength)); + m_pHelper->setSelection( static_cast<sal_uInt16>(nArgPos),static_cast<sal_uInt16>(nArgPos+nLength)); m_pMEdit->SetSelection(aSel); m_pMEFormula->UpdateOldSel(); } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 598b33f3e5ad..9a8412c39e9e 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -93,7 +93,7 @@ void ArgEdit::KeyInput( const KeyEvent& rKEvt ) if ( !pEdNext ) { nThumb++; - bDoScroll = ( nThumb+3 < (long)nArgs ); + bDoScroll = ( nThumb+3 < static_cast<long>(nArgs) ); } else { diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx index e78adcc99bee..10493bd9fd33 100644 --- a/formula/source/ui/dlg/parawin.cxx +++ b/formula/source/ui/dlg/parawin.cxx @@ -269,14 +269,14 @@ void ParaWin::SetActiveLine(sal_uInt16 no) { long nOffset = GetSliderPos(); nActiveLine=no; - long nNewEdPos=(long)nActiveLine-nOffset; + long nNewEdPos=static_cast<long>(nActiveLine)-nOffset; if(nNewEdPos<0 || nNewEdPos>3) { nOffset+=nNewEdPos; - SetSliderPos((sal_uInt16) nOffset); + SetSliderPos(static_cast<sal_uInt16>(nOffset)); nOffset=GetSliderPos(); } - nEdFocus=no-(sal_uInt16)nOffset; + nEdFocus=no-static_cast<sal_uInt16>(nOffset); UpdateArgDesc( nEdFocus ); } } @@ -481,7 +481,7 @@ void ParaWin::UpdateParas() sal_uInt16 ParaWin::GetSliderPos() { - return (sal_uInt16) m_pSlider->GetThumbPos(); + return static_cast<sal_uInt16>(m_pSlider->GetThumbPos()); } void ParaWin::SetSliderPos(sal_uInt16 nSliderPos) |