[Libreoffice-commits] core.git: 2 commits - sd/source svx/source

Caolán McNamara caolanm at redhat.com
Wed May 15 07:18:44 PDT 2013


 sd/source/filter/eppt/epptso.cxx                  |   57 +++++-----------------
 svx/source/customshapes/EnhancedCustomShape2d.cxx |   14 +++--
 2 files changed, 23 insertions(+), 48 deletions(-)

New commits:
commit d6bebd18b3b25af0024ec3ae5bde17836b0085e3
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed May 15 15:17:16 2013 +0100

    Revert "Resolves: #i119551# Avoid grouping shapes on import from PPT..."
    
    This reverts commit 8c23e31acc61406103c1565960e4c5b391902754.
    
    wrong one

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 65c5b33..356ddfb 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2242,10 +2242,7 @@ void PPTWriter::ImplCreateTextShape( EscherPropertyContainer& rPropOpt, EscherSo
 
 void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& aSolverContainer, PageType ePageType, sal_Bool bMasterPage, int nPageNumber )
 {
-    // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-    // sal_uInt32  nGroupLevel = 0;
-
-    sal_uInt32  nInstance, nGroups, nShapes, nShapeCount, nPer, nLastPer, nIndices, nOlePictureId;
+    sal_uInt32  nInstance, nGroups, nShapes, nShapeCount, nPer, nLastPer, nIndices, nGroupLevel = 0, nOlePictureId;
     sal_uInt16  nEffectCount;
     ::com::sun::star::awt::Point   aTextRefPoint;
 
@@ -2500,9 +2497,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                         aPolygon.Rotate( aRect.TopLeft(), (sal_uInt16)( mnAngle / 10 ) );
                         if ( ImplGetText() )
                         {
-                            // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                            // mpPptEscherEx->EnterGroup( 0,0 );
-                            // nGroupLevel = mpPptEscherEx->GetGroupLevel();
+                            mpPptEscherEx->EnterGroup( 0,0 );
+                            nGroupLevel = mpPptEscherEx->GetGroupLevel();
                             bNeedText = sal_False;
                             bAdditionalText = sal_True;
                             mnTextSize = 0;
@@ -2697,8 +2693,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                     aTextRefPoint = ::com::sun::star::awt::Point( maRect.Left(), maRect.Top() );
                     mnTextSize = 0;
                     bAdditionalText = sal_True;
-                    // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                    // mpPptEscherEx->EnterGroup( &maRect,0 );
+                    mpPptEscherEx->EnterGroup( &maRect,0 );
                 }
                 mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
                 sal_uInt32 nFlags = 0xa00;                                  // Flags: Connector | HasSpt
@@ -2716,9 +2711,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
             {
                 if ( ImplGetText() )
                 {
-                    // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                    // mpPptEscherEx->EnterGroup( 0,0 );
-                    // nGroupLevel = mpPptEscherEx->GetGroupLevel();
+                    mpPptEscherEx->EnterGroup( 0,0 );
+                    nGroupLevel = mpPptEscherEx->GetGroupLevel();
                     bAdditionalText = sal_True;
                     mnTextSize = 0;
                 }
@@ -2736,9 +2730,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
             {
                 if ( ImplGetText() )
                 {
-                    // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                    // mpPptEscherEx->EnterGroup( 0,0 );
-                    // nGroupLevel = mpPptEscherEx->GetGroupLevel();
+                    mpPptEscherEx->EnterGroup( 0,0 );
+                    nGroupLevel = mpPptEscherEx->GetGroupLevel();
                     bAdditionalText = sal_True;
                     mnTextSize = 0;
                 }
@@ -2756,9 +2749,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
             {
                 if ( ImplGetText() )
                 {
-                    // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                    // mpPptEscherEx->EnterGroup( 0,0 );
-                    // nGroupLevel = mpPptEscherEx->GetGroupLevel();
+                    mpPptEscherEx->EnterGroup( 0,0 );
+                    nGroupLevel = mpPptEscherEx->GetGroupLevel();
                     bAdditionalText = sal_True;
                     mnTextSize = 0;
                 }
@@ -2776,9 +2768,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
             {
                 if ( ImplGetText() )
                 {
-                    // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                    // mpPptEscherEx->EnterGroup( 0,0 );
-                    // nGroupLevel = mpPptEscherEx->GetGroupLevel();
+                    mpPptEscherEx->EnterGroup( 0,0 );
+                    nGroupLevel = mpPptEscherEx->GetGroupLevel();
                     bAdditionalText = sal_True;
                     mnTextSize = 0;
                 }
@@ -2835,22 +2826,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                     else
                     {
                         ImplCreateShape( ESCHER_ShpInst_PictureFrame, 0xa00, aSolverContainer );
-                        const Rectangle aOldRect100thmm(aRect100thmm);
-
                         if ( aPropOpt.CreateGraphicProperties( mXPropSet, OUString( "GraphicURL" ), sal_False, sal_True ) )
-                        {
                             aPropOpt.AddOpt( ESCHER_Prop_LockAgainstGrouping, 0x800080 );
-
-                            if(aOldRect100thmm != aRect100thmm)
-                            {
-                                // #119536# graphic has been adapted (rotated) so that it can be saved without angle,
-                                // adapt local values as needed
-                                maPosition = ImplMapPoint( ::com::sun::star::awt::Point( aRect100thmm.Left(), aRect100thmm.Top() ) );
-                                maSize = ImplMapSize( ::com::sun::star::awt::Size ( aRect100thmm.GetWidth(), aRect100thmm.GetHeight() ) );
-                                maRect = Rectangle( Point( maPosition.X, maPosition.Y ), Size( maSize.Width, maSize.Height ) );
-                                mnAngle = 0;
-                            }
-                        }
                     }
                 }
             }
@@ -3516,10 +3493,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
                 mnAngle += 0x8000;
                 mnAngle &=~0xffff;  // round nAngle to full grad
                 aPropOpt.AddOpt( ESCHER_Prop_Rotation, mnAngle );
-
-                // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-                // mpPptEscherEx->SetGroupSnapRect( nGroupLevel, maRect );
-                // mpPptEscherEx->SetGroupLogicRect( nGroupLevel, maRect );
+                mpPptEscherEx->SetGroupSnapRect( nGroupLevel, maRect );
+                mpPptEscherEx->SetGroupLogicRect( nGroupLevel, maRect );
             }
             if ( !pClientTextBox )
                 pClientTextBox = new SvMemoryStream( 0x200, 0x200 );
@@ -3541,9 +3516,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
             delete pClientTextBox, pClientTextBox = NULL;
 
             mpPptEscherEx->CloseContainer();  // ESCHER_SpContainer
-
-            // #i119551# PPT does not support groups of polygons and text (MS patch KB2289187)
-            // mpPptEscherEx->LeaveGroup();
+            mpPptEscherEx->LeaveGroup();
         }
     }
     ClearGroupTable();                              // storing groups if any are still open, which should not be the case
commit d7c7624024f1da26165869921f340f53026a423d
Author: Andre Fischer <af at apache.org>
Date:   Mon Jul 9 11:25:28 2012 +0000

    Resolves: #i119519# Fixed import of closed borders from PPT...
    
    when an ellipse is involved.
    
    Reported by: liupingtan
    Patch by: Jianyuan Li
    Review by: Andre Fischer
    (cherry picked from commit da2c3ed52ae631dba11821f201a2fce49bf18c86)
    
    Change-Id: Iff8195365823b60a70641b9efeb9c9f6c86d5341

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index f74e938..210f55b 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1564,14 +1564,16 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
 
                 case ANGLEELLIPSE :
                 {
-                    if(aNewB2DPolygon.count() > 1L)
+                    if ( nPntCount )
                     {
-                        // #i76201# Add conversion to closed polygon when first and last points are equal
-                        basegfx::tools::checkClosed(aNewB2DPolygon);
-                        aNewB2DPolyPolygon.append(aNewB2DPolygon);
+                        if(aNewB2DPolygon.count() > 1L)
+                        {
+                            // #i76201# Add conversion to closed polygon when first and last points are equal
+                            basegfx::tools::checkClosed(aNewB2DPolygon);
+                            aNewB2DPolyPolygon.append(aNewB2DPolygon);
+                        }
+                        aNewB2DPolygon.clear();
                     }
-
-                    aNewB2DPolygon.clear();
                 }
                 case ANGLEELLIPSETO :
                 {


More information about the Libreoffice-commits mailing list