incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suny...@apache.org
Subject svn commit: r1387482 - in /incubator/ooo/trunk/main: editeng/source/outliner/outliner.cxx filter/source/msfilter/svdfppt.cxx
Date Wed, 19 Sep 2012 08:09:21 GMT
Author: sunying
Date: Wed Sep 19 08:09:20 2012
New Revision: 1387482

URL: http://svn.apache.org/viewvc?rev=1387482&view=rev
Log:
#119477# fix bullet's start with error when save .ppt file
Reported by: Liu Ping Tan
Patch by: Ying Sun
Review by: Steve Yin.

Modified:
    incubator/ooo/trunk/main/editeng/source/outliner/outliner.cxx
    incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx

Modified: incubator/ooo/trunk/main/editeng/source/outliner/outliner.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/editeng/source/outliner/outliner.cxx?rev=1387482&r1=1387481&r2=1387482&view=diff
==============================================================================
--- incubator/ooo/trunk/main/editeng/source/outliner/outliner.cxx (original)
+++ incubator/ooo/trunk/main/editeng/source/outliner/outliner.cxx Wed Sep 19 08:09:20 2012
@@ -1913,10 +1913,16 @@ sal_uInt16 Outliner::ImplGetNumbering( s
         if( pFmt == 0 )
             continue; // ignore paragraphs without bullets
             
-        // check if numbering is the same
-        if( !isSameNumbering( *pFmt, *pParaFmt ) )
+        // check if numbering less than or equal to pParaFmt
+        if( !isSameNumbering( *pFmt, *pParaFmt ) || ( pFmt->GetStart() < pParaFmt->GetStart()
) )
             break;
 
+        if (  pFmt->GetStart() > pParaFmt->GetStart() ) 
+        { 
+           nNumber += pFmt->GetStart() - pParaFmt->GetStart();
+           pParaFmt = pFmt;
+        }
+
         const SfxBoolItem& rBulletState = (const SfxBoolItem&) pEditEngine->GetParaAttrib(
nPara, EE_PARA_BULLETSTATE );
 
         if( rBulletState.GetValue() )

Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1387482&r1=1387481&r2=1387482&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Wed Sep 19 08:09:20 2012
@@ -2512,19 +2512,6 @@ SdrObject* SdrPowerPointImport::ApplyTex
 				if ( !nIsBullet2 )
 					aParagraphAttribs.Put( SfxBoolItem( EE_PARA_BULLETSTATE, sal_False ) );
 
-				if ( oStartNumbering )
-				{
-					if ( *oStartNumbering != nLastStartNumbering )
-						rOutliner.SetNumberingStartValue( nParaIndex, *oStartNumbering );
-					else
-						rOutliner.SetNumberingStartValue( nParaIndex, -1 );		
-					nLastStartNumbering = *oStartNumbering;
-				}
-				else
-				{
-					nLastStartNumbering = -1;
-					rOutliner.SetNumberingStartValue( nParaIndex, nLastStartNumbering );
-				}
 
 				pPreviousParagraph = pPara;
 				if ( !aSelection.nStartPos )	// in PPT empty paragraphs never gets a bullet
@@ -3910,6 +3897,13 @@ sal_Bool PPTNumberFormatCreator::ImplGet
 			break;
 		}
 		rStartNumbering = boost::optional< sal_Int16 >( nAnmScheme >> 16 );
+		sal_Int16 nBuStart = *rStartNumbering;
+		//The Seventh bit of nBuFlags that specifies whether fBulletHasAutoNumber exists,
+		//and fBulletHasAutoNumber that specifies whether this paragraph has an automatic numbering
scheme.  
+		if ( ( nBuFlags & 0x02000000 ) && ( nBuStart != 1 ))
+		{
+			rNumberFormat.SetStart( static_cast<sal_uInt16>(nBuStart) );
+		}
 	}
 	return bHardAttribute;
 }



Mime
View raw message