sw/source/core/text/pormulti.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-)
New commits: commit fd0e8beee9ce68d833694d7c234252372c17decc Author: Stephan Bergmann <[email protected]> Date: Wed Jan 31 16:58:38 2018 +0100 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<long>. Change-Id: I24cafa7e295b87bf93f4e0ef5fbda5f99834286a Reviewed-on: https://gerrit.libreoffice.org/49034 Tested-by: Jenkins <[email protected]> Reviewed-by: Stephan Bergmann <[email protected]> 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<long>* 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<long>* pVec = pCurr->GetpLLSpaceAdd(); + pVec->insert( pVec->begin(), nMultiSpace ); + bRet = true; } } return bRet; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
