diff options
author | Radek Doulik <rodo@novell.com> | 2011-04-27 20:34:46 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-04-27 20:34:46 +0200 |
commit | 482ed10800b91b8e43f1a7175082e968a75ff2fd (patch) | |
tree | d8d4315afa2c76df08e4ea01b2f5ef0fd59bde67 /editeng | |
parent | 53412d6a34b35b13fa51c00fbb2327e47188eb27 (diff) |
fix-ppt-linespacing-import-export.diff: fix ppt import (bnc#355302)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit3.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index f6af728d0e66..a2546cbfe1c9 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1308,6 +1308,13 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY ) pLine->SetHeight( nMinHeight, nTxtHeight ); } } + else if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_FIX ) + { + sal_uInt16 nFixHeight = GetYValue( rLSItem.GetLineHeight() ); + sal_uInt16 nTxtHeight = pLine->GetHeight(); + pLine->SetMaxAscent( (sal_uInt16)(pLine->GetMaxAscent() + ( nFixHeight - nTxtHeight ) ) ); + pLine->SetHeight( nFixHeight, nTxtHeight ); + } else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { if ( nPara || IsFixedCellHeight() || pLine->GetStartPortion() ) // Not the very first line @@ -1636,6 +1643,14 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn pTmpLine->SetHeight( nMinHeight, nTxtHeight ); } } + else if ( rLSItem.GetLineSpaceRule() == SVX_LINE_SPACE_FIX ) + { + sal_uInt16 nFixHeight = rLSItem.GetLineHeight(); + sal_uInt16 nTxtHeight = pTmpLine->GetHeight(); + + pTmpLine->SetMaxAscent( (sal_uInt16)(pTmpLine->GetMaxAscent() + ( nFixHeight - nTxtHeight ) ) ); + pTmpLine->SetHeight( nFixHeight, nTxtHeight ); + } else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { sal_uInt16 nPara = GetParaPortions().GetPos( pParaPortion ); |