summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2018-03-23 19:51:37 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2018-03-29 16:59:55 +0200
commit596fd41b9b19e28bab0c84e3821f79cb5d468f24 (patch)
treeca252bec20b22ead449d250b6174938224c7e3c5 /editeng/source
parent7b1eb6313c0d2621c364df1724c69d28f8267841 (diff)
tdf#116536 Fix bullet position with linespacing > 100
Change-Id: I862246d9c69e754bdd883787fe42c7d61a1a53d3 Reviewed-on: https://gerrit.libreoffice.org/51790 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/impedit3.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 4e077450c5ef..7364bb1dea34 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1459,14 +1459,11 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
else if ( rLSItem.GetPropLineSpace() && ( rLSItem.GetPropLineSpace() != 100 ) )
{
sal_uInt16 nTxtHeight = pLine->GetHeight();
- sal_Int32 nTxtHeightProp = nTxtHeight * rLSItem.GetPropLineSpace() / 100;
- sal_Int32 nHeightProp = pLine->GetHeight() * rLSItem.GetPropLineSpace() / 100;
+ sal_Int32 nPropTextHeight = nTxtHeight * rLSItem.GetPropLineSpace() / 100;
// The Ascent has to be adjusted for the difference:
- long nDiff = ( pLine->GetHeight() - nTxtHeightProp ) * 4 / 5;
- if ( nDiff > pLine->GetMaxAscent() )
- nDiff = pLine->GetMaxAscent() * 4 / 5;
- pLine->SetMaxAscent( static_cast<sal_uInt16>( pLine->GetMaxAscent() - nDiff ) ); // 80%
- pLine->SetHeight( static_cast<sal_uInt16>( nHeightProp ), nTxtHeightProp );
+ long nDiff = pLine->GetHeight() - nPropTextHeight;
+ pLine->SetMaxAscent( static_cast<sal_uInt16>( pLine->GetMaxAscent() - nDiff ) );
+ pLine->SetHeight( static_cast<sal_uInt16>( nPropTextHeight ), nTxtHeight );
}
}
}