From fd0e8beee9ce68d833694d7c234252372c17decc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 31 Jan 2018 16:58:38 +0100 Subject: [PATCH] Check of nMultiSpace is probably no longer relevant The original code introduced with 1d10fb1197ea93f3532726c55ddd5a0eaa9ed944 "New: Text adjustment in multiportions" read + if( nMultiSpace < KSHRT_MAX ) + { + pCurr->GetpSpaceAdd()->Insert(KSHORT(nMultiSpace),0); + bRet = sal_True; + } so needed nMulitSpace to fit into KSHORT (an alias for USHORT back then), whereas today nMultiSpace is inserted into a std::vector. Change-Id: I24cafa7e295b87bf93f4e0ef5fbda5f99834286a Reviewed-on: https://gerrit.libreoffice.org/49034 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/source/core/text/pormulti.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 8c92618e7c88..99f32ec611d0 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -515,15 +515,12 @@ bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr, if( nMyBlank ) nMultiSpace /= nMyBlank; - if( nMultiSpace < USHRT_MAX * SPACING_PRECISION_FACTOR ) - { -// pCurr->SetLLSpaceAdd( nMultiSpace, 0 ); - // #i65711# SetLLSpaceAdd replaces the first value, - // instead we want to insert a new first value: - std::vector* pVec = pCurr->GetpLLSpaceAdd(); - pVec->insert( pVec->begin(), nMultiSpace ); - bRet = true; - } +// pCurr->SetLLSpaceAdd( nMultiSpace, 0 ); + // #i65711# SetLLSpaceAdd replaces the first value, + // instead we want to insert a new first value: + std::vector* pVec = pCurr->GetpLLSpaceAdd(); + pVec->insert( pVec->begin(), nMultiSpace ); + bRet = true; } } return bRet;