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

Sun Ying sunying at apache.org
Wed Jun 5 08:41:45 PDT 2013


 sd/source/filter/eppt/epptso.cxx |   28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

New commits:
commit f3d27c66e14745632f83ca4d1b80473e70b85c96
Author: Sun Ying <sunying at apache.org>
Date:   Tue Sep 25 01:41:00 2012 +0000

    Resolves: #i120967# table's virtual box becomes too small...
    
    when saved as .ppt file
    
    Reported by: Liu Ping Tan
    Patch by: Ying Sun
    Review by: Jian Yuan Li
    
    (cherry picked from commit 36453dd6be67717b2a2385449f10141fcc3fac35)
    
    Conflicts:
    	sd/source/filter/eppt/epptso.cxx
    
    Change-Id: I66ec5b8569c538e3571fa08670d053130939dc02

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 53c609a..03026ec 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -3627,18 +3627,6 @@ void PPTWriter::WriteCString( SvStream& rSt, const String& rString, sal_uInt32 n
 void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, EscherSolverContainer& aSolverContainer,
                                 EscherPropertyContainer& aPropOpt )
 {
-    mpPptEscherEx->OpenContainer( ESCHER_SpgrContainer );
-    mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
-    mpPptEscherEx->AddAtom( 16, ESCHER_Spgr, 1 );
-    *mpStrm     << (sal_Int32)maRect.Left() // Bounding box for the grouped shapes to which they are attached
-                << (sal_Int32)maRect.Top()
-                << (sal_Int32)maRect.Right()
-                << (sal_Int32)maRect.Bottom();
-
-    sal_uInt32 nShapeId = mpPptEscherEx->GenerateShapeId();
-    mpPptEscherEx->AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId );     // Flags: Group | Patriarch
-    aSolverContainer.AddShape( rXShape, nShapeId );
-    EscherPropertyContainer aPropOpt2;
     try
     {
         static const OUString  sModel( "Model" );
@@ -3667,6 +3655,8 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
                 awt::Size aM( MapSize( aS ) );
                 aColumns.push_back( std::pair< sal_Int32, sal_Int32 >( nPosition, aM.Width ) );
                 nPosition += aM.Width;
+                if ( x == nColumnCount - 1  && nPosition != maRect.Right() )
+                    maRect.Right() = nPosition;
             }
 
             nPosition = aPosition.Y;
@@ -3678,7 +3668,21 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
                 awt::Size aM( MapSize( aS ) );
                 aRows.push_back( std::pair< sal_Int32, sal_Int32 >( nPosition, aM.Height ) );
                 nPosition += aM.Height;
+                if ( y == nRowCount - 1 && nPosition != maRect.Bottom())
+                    maRect.Bottom() = nPosition;
             }
+            mpPptEscherEx->OpenContainer( ESCHER_SpgrContainer );
+            mpPptEscherEx->OpenContainer( ESCHER_SpContainer );
+            mpPptEscherEx->AddAtom( 16, ESCHER_Spgr, 1 );
+            *mpStrm     << (sal_Int32)maRect.Left() // Bounding box for the grouped shapes to which they are attached
+                        << (sal_Int32)maRect.Top()
+                        << (sal_Int32)maRect.Right()
+                        << (sal_Int32)maRect.Bottom();
+
+            sal_uInt32 nShapeId = mpPptEscherEx->GenerateShapeId();
+            mpPptEscherEx->AddShape( ESCHER_ShpInst_Min, 0x201, nShapeId );     // Flags: Group | Patriarch
+            aSolverContainer.AddShape( rXShape, nShapeId );
+            EscherPropertyContainer aPropOpt2;
 
             if ( nRowCount )
             {


More information about the Libreoffice-commits mailing list