summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-06-20 14:21:24 +0200
committerMatúš Kukan <matus.kukan@collabora.com>2014-06-21 09:38:34 +0200
commit5bbde0844fb35f8af4605b8139bf0c93e936e7bd (patch)
treeaea18aae1271f80193ce686d90bc36e17b0d0c2d /editeng/source
parent2964d490f6aa824c2029351c327a2109978eae2b (diff)
Revert "bnc#882631: keep line visible if proportional line spacing is < 100%."
This reverts commit 339e5d44a2afa0f5309a970f1ff11968103e336a and commit d1987a3eaccfc3add35e6b9f8307ede857c5468e "fix sd_import_tests after e42c05c1f96832572e525d85d89590f56f5a29dd". It would need more work and understanding, so just revert. Also, the problem with bnc#882631 is somewhere else, though this helped too. Change-Id: I2221b6bd2b71edabff17ac83b014fae79bb73aaf
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/impedit2.cxx6
-rw-r--r--editeng/source/editeng/impedit3.cxx7
2 files changed, 2 insertions, 11 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 8cf1d7492ea8..3140c16a22ab 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -4028,9 +4028,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
{
OSL_ENSURE( pPortion->GetLines().Count(), "Paragraph with no lines in ParaPortion::CalcHeight" );
for (sal_Int32 nLine = 0; nLine < pPortion->GetLines().Count(); ++nLine)
- // Use GetTxtHeight() for first line, otherwise height is small
- // if the paragraph has proportional line spacing less than 100%.
- pPortion->nHeight += nLine ? pPortion->GetLines()[nLine]->GetHeight() : pPortion->GetLines()[nLine]->GetTxtHeight();
+ pPortion->nHeight += pPortion->GetLines()[nLine]->GetHeight();
if ( !aStatus.IsOutliner() )
{
@@ -4173,7 +4171,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex,
Rectangle aEditCursor;
aEditCursor.Top() = nY;
- nY += pLine->GetTxtHeight();
+ nY += pLine->GetHeight();
aEditCursor.Bottom() = nY-1;
// Search within the line...
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 7678ef1ff89b..2881a81cae52 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2924,13 +2924,6 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
aTmpPos.X() += pLine->GetStartPosX();
aTmpPos.Y() += pLine->GetMaxAscent();
aStartPos.Y() += pLine->GetHeight();
- if (nLine == 0)
- {
- // First line needs to be visible, so add more space if text height is bigger.
- const sal_Int32 nDiff = pLine->GetTxtHeight() - pLine->GetHeight();
- aTmpPos.Y() += nDiff;
- aStartPos.Y() += nDiff;
- }
if (nLine != nLastLine)
aStartPos.Y() += nVertLineSpacing;
}