From 8f35503fb9273843a0153084e6ec79fead301972 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 30 Jul 2018 15:34:59 +0200 Subject: loplugin:returnconstant in editeng Change-Id: I9e38c1634466e580af29547df554d620b5b7860c Reviewed-on: https://gerrit.libreoffice.org/58336 Tested-by: Jenkins Reviewed-by: Noel Grandin --- starmath/source/accessibility.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'starmath/source') diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 988931c5a540..b55b264182a4 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -1259,8 +1259,10 @@ bool SmTextForwarder::GetWordIndices( sal_Int32 nPara, sal_Int32 nIndex, sal_Int bool SmTextForwarder::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nEndIndex, sal_Int32 nPara, sal_Int32 nIndex, bool bInCell ) const { EditEngine *pEditEngine = rEditAcc.GetEditEngine(); - return pEditEngine && - SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, *pEditEngine, nPara, nIndex, bInCell ); + if (!pEditEngine) + return false; + SvxEditSourceHelper::GetAttributeRun( nStartIndex, nEndIndex, *pEditEngine, nPara, nIndex, bInCell ); + return true; } sal_Int32 SmTextForwarder::GetLineCount( sal_Int32 nPara ) const -- cgit