Kaydet (Commit) fd0e8bee authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Check of nMultiSpace is probably no longer relevant

The original code introduced with 1d10fb11 "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/49034Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst ad39f63d
...@@ -515,15 +515,12 @@ bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr, ...@@ -515,15 +515,12 @@ bool SwDoubleLinePortion::ChgSpaceAdd( SwLineLayout* pCurr,
if( nMyBlank ) if( nMyBlank )
nMultiSpace /= nMyBlank; nMultiSpace /= nMyBlank;
if( nMultiSpace < USHRT_MAX * SPACING_PRECISION_FACTOR ) // pCurr->SetLLSpaceAdd( nMultiSpace, 0 );
{ // #i65711# SetLLSpaceAdd replaces the first value,
// pCurr->SetLLSpaceAdd( nMultiSpace, 0 ); // instead we want to insert a new first value:
// #i65711# SetLLSpaceAdd replaces the first value, std::vector<long>* pVec = pCurr->GetpLLSpaceAdd();
// instead we want to insert a new first value: pVec->insert( pVec->begin(), nMultiSpace );
std::vector<long>* pVec = pCurr->GetpLLSpaceAdd(); bRet = true;
pVec->insert( pVec->begin(), nMultiSpace );
bRet = true;
}
} }
} }
return bRet; return bRet;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment