[Libreoffice-commits] .: Branch 'libreoffice-3-4' - editeng/source
Petr Mladek
pmladek at kemper.freedesktop.org
Wed Apr 27 11:35:01 PDT 2011
editeng/source/editeng/impedit3.cxx | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit 3b8434b00724c0f66ac1de0fe2846a7ae9f7f954
Author: Radek Doulik <rodo at novell.com>
Date: Wed Apr 27 20:34:46 2011 +0200
fix-ppt-linespacing-import-export.diff: fix ppt import (bnc#355302)
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index f6af728..a2546cb 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 );
More information about the Libreoffice-commits
mailing list