summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2011-04-27 20:34:46 +0200
committerPetr Mladek <pmladek@suse.cz>2011-04-27 20:34:46 +0200
commit3b8434b00724c0f66ac1de0fe2846a7ae9f7f954 (patch)
treeedfff63a9027473e082c45b4a4ede7f1a49e781b /editeng
parent7cdffe22320808cd80f6126e4437bb7b9b025846 (diff)
fix-ppt-linespacing-import-export.diff: fix ppt import (bnc#355302)
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit3.cxx15
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 );