[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-1' - editeng/source

2013-02-26 Thread Armin Le Grand
 editeng/source/editeng/impedit3.cxx |   64 +++-
 1 file changed, 35 insertions(+), 29 deletions(-)

New commits:
commit 1071c81719e7113ce5699be989596bbed59c5b18
Author: Armin Le Grand a...@apache.org
Date:   Fri Jun 8 09:24:39 2012 +

Fix i#119756 Safer take care of empty paragraphs in EditEngine layouting

This fixes fdo#59629 on our side.

Conflicts:
editeng/source/editeng/impedit3.cxx
and moved sal_uInt16 nIndex back up in scope.

(cherry picked from commit b57cb5326713da9e926bb2ad5a56dce90ac00a87)

Change-Id: Ie2b5dac48b10ff8c031f481f0a7ddde644694975
Signed-off-by: Thorsten Behrens tbehr...@suse.com
Reviewed-on: https://gerrit.libreoffice.org/2405
Reviewed-by: Michael Meeks michael.me...@suse.com
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 098fd92..b45c826 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2880,6 +2880,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
Rectangle aClipRec, Point aSta
 pPDFExtOutDevData-BeginStructureElement( 
vcl::PDFWriter::Paragraph );
 
 long nParaHeight = pPortion-GetHeight();
+sal_uInt16 nIndex = 0;
 if ( pPortion-IsVisible()  (
 ( !IsVertical()  ( ( aStartPos.Y() + nParaHeight )  
aClipRec.Top() ) ) ||
 ( IsVertical()  ( ( aStartPos.X() - nParaHeight )  
aClipRec.Right() ) ) ) )
@@ -2891,6 +2892,9 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
Rectangle aClipRec, Point aSta
 sal_uInt16 nLines = pPortion-GetLines().Count();
 sal_uInt16 nLastLine = nLines-1;
 
+// #108052#
+bool bEndOfParagraphWritten(false);
+
 if ( !IsVertical() )
 aStartPos.Y() += pPortion-GetFirstLineOffset();
 else
@@ -2901,9 +2905,12 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
Rectangle aClipRec, Point aSta
 const SvxLineSpacingItem rLSItem = ((const 
SvxLineSpacingItem)pPortion-GetNode()-GetContentAttribs().GetItem( 
EE_PARA_SBL ));
 sal_uInt16 nSBL = ( rLSItem.GetInterLineSpaceRule() == 
SVX_INTER_LINE_SPACE_FIX )
 ? GetYValue( rLSItem.GetInterLineSpace() ) : 0;
+bool bPaintBullet (false);
+
 for ( sal_uInt16 nLine = 0; nLine  nLines; nLine++ )
 {
 pLine = pPortion-GetLines()[nLine];
+nIndex = pLine-GetStart();
 DBG_ASSERT( pLine, NULL-Pointer in the line iterator in 
UpdateViews );
 aTmpPos = aStartPos;
 if ( !IsVertical() )
@@ -2926,7 +2933,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
Rectangle aClipRec, Point aSta
 if ( ( !IsVertical()  ( aStartPos.Y()  aClipRec.Top() ) )
 || ( IsVertical()  aStartPos.X()  aClipRec.Right() ) )
 {
-bool bPaintBullet (false);
+bPaintBullet = false;
 
 // Why not just also call when stripping portions? This 
will give the correct values
 // and needs no position corrections in 
OutlinerEditEng::DrawingText which tries to call
@@ -2945,37 +2952,9 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, 
Rectangle aClipRec, Point aSta
 // --
 // Over the Portions of the line ...
 // --
-sal_uInt16 nIndex = pLine-GetStart();
 bool bParsingFields = false;
 ::std::vector sal_Int32 ::iterator itSubLines;
 
-// #i108052# When stripping a callback for empty 
paragraphs is needed. This
-// was somehow lost/removed/killed by making the 
TextPortions with empty
-// paragraph to type PORTIONKIND_TAB instead of 
PORTIONKIND_TEXT. Adding here
-
-   // since I could not find out who and 
why this has
-   // changed.
-// #i118881#: Do not include the empty paragraph
-// after a bullet.  Otherwise the wrong paragraph
-// indices will eventually find their way into
-// metafiles and break the association between
-// paragraphs and Impress animations.
-   if(!bPaintBullet  bStripOnly  
pLine-GetStartPortion() == pLine-GetEndPortion())
-{
-const Color 
aOverlineColor(pOutDev-GetOverlineColor());
-const Color 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-0-1' - editeng/source

2013-02-25 Thread Jan Holesovsky
 editeng/source/editeng/impedit3.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 3728944078e53e8dfef08eb445e741a59979b23e
Author: Jan Holesovsky ke...@suse.cz
Date:   Mon Feb 25 14:46:21 2013 +0100

fdo#55931, fdo#57956: Fix both autofit and stretched width.

This rewrites commit fa694a21b806ed7837c1337ec49a4b299c478393 (fix of
fdo#55931), and fixes it a better way.

Change-Id: I9ac0c78294e6a9c510c12b22547564b736416131
Reviewed-on: https://gerrit.libreoffice.org/2389
Reviewed-by: Thorsten Behrens tbehr...@suse.com
Tested-by: Thorsten Behrens tbehr...@suse.com

diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 964579c..098fd92 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2643,7 +2643,13 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, 
sal_uInt16 nPos, SvxFont rF
 // ugly on the screen!
 OutputDevice* pDev = pOut ? pOut : GetRefDevice();
 rFont.SetPhysFont( pDev );
-Size aRealSz( rFont.GetSize().Width(), rFont.GetSize().Height() );
+FontMetric aMetric( pDev-GetFontMetric() );
+
+// Set the font as we want it to look like  reset the Propr attribute
+// so that it is not counted twice.
+Size aRealSz( aMetric.GetSize() );
+rFont.SetPropr( 100 );
+
 if ( aStatus.DoStretch() )
 {
 if ( nStretchY != 100 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits