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 | 3b8434b00724c0f66ac1de0fe2846a7ae9f7f954 (patch) | |
tree | edfff63a9027473e082c45b4a4ede7f1a49e781b /editeng | |
parent | 7cdffe22320808cd80f6126e4437bb7b9b025846 (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 f6af728d0e..a2546cbfe1 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 ); |