[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - editeng/source sd/qa
editeng/source/editeng/impedit3.cxx |4 ++-- sd/qa/unit/data/xml/n593612_0.xml |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit bc273b24f0ae1959fc4b962e3f6ad736bd99b60d Author: Matúš Kukan matus.ku...@collabora.com Date: Mon Jun 23 11:37:47 2014 +0200 bnc#882631: Do not hide top of the first row when editing text in table cells. This can happen when proportional line spacing is less than 100% and FontIndependentLineSpacing is set, so just keep the height of the very first line in case of IsFixedCellHeight() too. Change-Id: Id231fc1f2373645e5420f877e8c2568ce8a1f099 (cherry picked from commit 9388c45c0263a0090f9cb4be9c42b93b5f7985d0) Reviewed-on: https://gerrit.libreoffice.org/9890 Reviewed-by: Andras Timar andras.ti...@collabora.com Tested-by: Andras Timar andras.ti...@collabora.com diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 2881a81..d717b1a 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -1340,7 +1340,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) } else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { -if ( nPara || IsFixedCellHeight() || pLine-GetStartPortion() ) // Not the very first line +if ( nPara || pLine-GetStartPortion() ) // Not the very first line { // There are documents with PropLineSpace 0, why? // (cmc: re above question :-) such documents can be seen by importing a .ppt @@ -1670,7 +1670,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn else if ( rLSItem.GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP ) { sal_Int32 nPara = GetParaPortions().GetPos( pParaPortion ); -if ( nPara || IsFixedCellHeight() || pTmpLine-GetStartPortion() ) // Not the very first line +if ( nPara || pTmpLine-GetStartPortion() ) // Not the very first line { // There are documents with PropLineSpace 0, why? // (cmc: re above question :-) such documents can be seen by importing a .ppt diff --git a/sd/qa/unit/data/xml/n593612_0.xml b/sd/qa/unit/data/xml/n593612_0.xml index 5d5189b..5d03e58 100644 --- a/sd/qa/unit/data/xml/n593612_0.xml +++ b/sd/qa/unit/data/xml/n593612_0.xml @@ -1,6 +1,6 @@ ?xml version=1.0? XShapes - XShape positionX=11429 positionY=1324 sizeX=2259 sizeY=15192 type=com.sun.star.drawing.CustomShape name=Rectangle 52 text=#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10; fontHeight=24.00 fontColor= textAutoGrowHeight=true textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE textHorizontalAdjust=CENTER textVerticalAdjust=TOP textLeftDistance=254 textRightDistance=254 textUpperDistance=127 textLowerDistance=127 textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE textAnimationStartInside=false textAnimationStopInside=false textWritingMode=LR_TB fillStyle=SOLID fillColor=3c8c93 fillTransparence=0 fillTran sparenceGradientName= + XShape positionX=11429 positionY=1324 sizeX=2259 sizeY=15209 type=com.sun.star.drawing.CustomShape name=Rectangle 52 text=#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10; fontHeight=24.00 fontColor= textAutoGrowHeight=true textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE textHorizontalAdjust=CENTER textVerticalAdjust=TOP textLeftDistance=254 textRightDistance=254 textUpperDistance=127 textLowerDistance=127 textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE textAnimationStartInside=false textAnimationStopInside=false textWritingMode=LR_TB fillStyle=SOLID fillColor=3c8c93 fillTransparence=0 fillTran sparenceGradientName= FillTransparenceGradient style=LINEAR startColor=00 endColor=ff angle=0 border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 stepCount=0/ FillGradient style=LINEAR startColor=3465a4 endColor=ff angle=0 border=0 xOffset=50 yOffset=50 startIntensity=100 endIntensity=100 stepCount=0/ FillHatch style=SINGLE color=3465a4 distance=20 angle=0/ @@ -10,7 +10,7 @@ LineEnd/ Transformation Line1 column1=2260.00 column2=0.00 column3=11429.00/ - Line2 column1=0.00 column2=15193.00 column3=1324.00/ + Line2
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - editeng/source sd/qa
editeng/source/editeng/impedit2.cxx |6 ++ editeng/source/editeng/impedit3.cxx |7 --- sd/qa/unit/data/xml/n593612_0.xml |4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) New commits: commit 5bbde0844fb35f8af4605b8139bf0c93e936e7bd Author: Matúš Kukan matus.ku...@collabora.com Date: Fri Jun 20 14:21:24 2014 +0200 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 diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 8cf1d74..3140c16 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 7678ef1..2881a81 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; } diff --git a/sd/qa/unit/data/xml/n593612_0.xml b/sd/qa/unit/data/xml/n593612_0.xml index b55385b..5d5189b 100644 --- a/sd/qa/unit/data/xml/n593612_0.xml +++ b/sd/qa/unit/data/xml/n593612_0.xml @@ -1,6 +1,6 @@ ?xml version=1.0? XShapes - XShape positionX=11429 positionY=1324 sizeX=2259 sizeY=15821 type=com.sun.star.drawing.CustomShape name=Rectangle 52 text=#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10; fontHeight=24.00 fontColor= textAutoGrowHeight=true textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE textHorizontalAdjust=CENTER textVerticalAdjust=TOP textLeftDistance=254 textRightDistance=254 textUpperDistance=127 textLowerDistance=127 textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE textAnimationStartInside=false textAnimationStopInside=false textWritingMode=LR_TB fillStyle=SOLID fillColor=3c8c93 fillTransparence=0 fillTran sparenceGradientName= + XShape positionX=11429 positionY=1324 sizeX=2259 sizeY=15192 type=com.sun.star.drawing.CustomShape name=Rectangle 52 text=#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10;#10; fontHeight=24.00 fontColor= textAutoGrowHeight=true textAutoGrowWidth=false textContourFrame=false textFitToSize=NONE textHorizontalAdjust=CENTER textVerticalAdjust=TOP textLeftDistance=254 textRightDistance=254 textUpperDistance=127 textLowerDistance=127 textMaximumFrameHeight=0 textMaximumFrameWidth=0 textMinimumFrameHeight=0 textMinimumFrameWidth=0 textAnimationAmount=0 textAnimationCount=0 textAnimationDelay=0 textAnimationDirection=LEFT textAnimationKind=NONE textAnimationStartInside=false textAnimationStopInside=false