summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-31 10:45:50 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-31 10:45:50 +0200
commitca39c0ee5fb571693f96fe32f55b814d74e5b756 (patch)
tree61059dca291da35c9eac7e275d0866598eeff2ee /editeng
parent9e1f58bf469984c19cd60031074eb60da56453a2 (diff)
parentd974d2ada8a61acf48fb0a9e3e4fa4744016dcda (diff)
Merge commit 'libreoffice-3.4.0.2'
Conflicts: basic/source/app/app.cxx basic/source/runtime/iosys.cxx desktop/unx/source/start.c sfx2/source/appl/appdata.cxx sfx2/source/appl/appinit.cxx sfx2/source/inc/appdata.hxx svx/AllLangResTarget_svx.mk sysui/desktop/productversion.mk sysui/desktop/share/makefile.mk
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx17
2 files changed, 17 insertions, 2 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 5185dcd12ad0..64591310d7dd 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -113,7 +113,7 @@ SV_IMPL_VARARR( EECharAttribArray, EECharAttrib );
static SfxItemPool* pGlobalPool=0;
- // ----------------------------------------------------------------------
+// ----------------------------------------------------------------------
// EditEngine
// ----------------------------------------------------------------------
EditEngine::EditEngine( SfxItemPool* pItemPool )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 16738e029819..b43444d4efda 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -934,7 +934,7 @@ sal_Bool ImpEditEngine::CreateLines( sal_uInt16 nPara, sal_uInt32 nStartPosY )
long nCurPos = nTmpWidth+nStartX;
// consider scaling
if ( aStatus.DoStretch() && ( nStretchX != 100 ) )
- nCurPos = nCurPos*100/nStretchX;
+ nCurPos = nCurPos*100/std::max(static_cast<sal_Int32>(nStretchX), static_cast<sal_Int32>(1));
short nAllSpaceBeforeText = static_cast< short >(rLRItem.GetTxtLeft()/* + rLRItem.GetTxtLeft()*/ + nSpaceBeforeAndMinLabelWidth);
aCurrentTab.aTabStop = pNode->GetContentAttribs().FindTabStop( nCurPos - nAllSpaceBeforeText /*rLRItem.GetTxtLeft()*/, aEditDoc.GetDefTab() );
@@ -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 );