Check of nMultiSpace is probably no longer relevant
The original code introduced with 1d10fb1197
"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 <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user