Kaydet (Commit) 42532d42 authored tarafından Florian Reuter's avatar Florian Reuter Kaydeden (comit) Cédric Bosdonnat

sw-allow-negative-spacing.diff: correctly display linespacing < 100%

n#364534
üst cd954198
...@@ -1746,6 +1746,28 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine ) ...@@ -1746,6 +1746,28 @@ void SwTxtFormatter::CalcRealHeight( sal_Bool bNewLine )
switch( pSpace->GetLineSpaceRule() ) switch( pSpace->GetLineSpaceRule() )
{ {
case SVX_LINE_SPACE_AUTO: case SVX_LINE_SPACE_AUTO:
if (pSpace->GetInterLineSpaceRule()==SVX_INTER_LINE_SPACE_PROP) {
long nTmp = pSpace->GetPropLineSpace();
if (nTmp<100) { // code adaped from fixed line height
nTmp *= nLineHeight;
nTmp /= 100;
if( !nTmp )
++nTmp;
nLineHeight = (KSHORT)nTmp;
/*
//@TODO figure out how WW maps ascent and descent
//in case of prop line spacing <100%
KSHORT nAsc = ( 4 * nLineHeight ) / 5; // 80%
if( nAsc < pCurr->GetAscent() ||
nLineHeight - nAsc < pCurr->Height() -
pCurr->GetAscent() )
pCurr->SetClipping( sal_True );
pCurr->SetAscent( nAsc );
*/
pCurr->Height( nLineHeight );
pInf->GetParaPortion()->SetFixLineHeight();
}
}
break; break;
case SVX_LINE_SPACE_MIN: case SVX_LINE_SPACE_MIN:
{ {
......
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