ooo-build r12224 - in trunk: . patches/dev300



Author: thorstenb
Date: Fri Apr 18 13:44:16 2008
New Revision: 12224
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12224&view=rev

Log:
	* patches/dev300/apply: added sd-animate-form-default.diff

	* patches/dev300/sd-animate-form-default.diff: make the "Animate
	attached Shape" checkbox in the text animation options behave
	sensible (i.e. disables it for outline text). Removes a few more
	quirks in this area.



Added:
   trunk/patches/dev300/sd-animate-form-default.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Fri Apr 18 13:44:16 2008
@@ -15,7 +15,7 @@
 	 Icons, Branding, CalcFixes, WriterFixes, EasterEgg, \
 	 GStreamer, CWSBackports, WPG, Cleanups, WMF, GnomeVFS, \
 	 Layout, VBABits, VBAObjects, CalcErrors, Store, CJK, GCJ, Lwp, \
-	 OOXML, SVGImport, AutoCorrectCapsLock, UnitTesting
+	 OOXML, ImpressFixes, SVGImport, AutoCorrectCapsLock, UnitTesting
 
 LinuxCommon : Common, LayoutDialogs, Defaults, TangoIcons, FontConfigTemporaryHacks, \
 	      FedoraFixes, LinuxOnly, SystemBits, \
@@ -1504,6 +1504,12 @@
 # navigating through cells.
 sc-skip-overlapped-cells.diff, i#86943, n#362674, kohei
 
+[ ImpressFixes ]
+
+# make the "Animate attached Shape" checkbox in the text animation
+# options behave sensible (i.e. disables it for outline text)
+sd-animate-form-default.diff, n#380036, thorsten
+
 #[ OOXSTLport5 ]
 #
 ## oox devs, please reconsider operator[] use,

Added: trunk/patches/dev300/sd-animate-form-default.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/sd-animate-form-default.diff	Fri Apr 18 13:44:16 2008
@@ -0,0 +1,180 @@
+--- sd/inc/CustomAnimationEffect.hxx	6 Jul 2007 13:09:19 -0000	1.12
++++ sd/inc/CustomAnimationEffect.hxx	18 Apr 2008 13:18:30 -0000
+@@ -359,9 +359,9 @@ public:
+ 
+ 	CustomAnimationTextGroupPtr findGroup( sal_Int32 nGroupId );
+ 	CustomAnimationTextGroupPtr	createTextGroup( CustomAnimationEffectPtr pEffect, sal_Int32 nTextGrouping, double fTextGroupingAuto, sal_Bool bAnimateForm, sal_Bool bTextReverse );
+-	void setTextGrouping( CustomAnimationTextGroupPtr pTextGroup, sal_Int32 nTextGrouping );
++	void setTextGrouping( CustomAnimationTextGroupPtr pTextGroup, sal_Int32 nTextGrouping, bool bPrevEffect );
+ 	void setAnimateForm( CustomAnimationTextGroupPtr pTextGroup, sal_Bool bAnimateForm );
+-	void setTextGroupingAuto( CustomAnimationTextGroupPtr pTextGroup, double fTextGroupingAuto );
++	void setTextGroupingAuto( CustomAnimationTextGroupPtr pTextGroup, double fTextGroupingAuto, bool bPrevEffect );
+ 	void setTextReverse( CustomAnimationTextGroupPtr pTextGroup, sal_Bool bAnimateForm );
+ 
+ 	sal_Int32 getSequenceType() const { return mnSequenceType; }
+@@ -376,7 +376,7 @@ protected:
+ 	virtual void implRebuild();
+ 	virtual void reset();
+ 
+-	void createTextGroupParagraphEffects( CustomAnimationTextGroupPtr pTextGroup, CustomAnimationEffectPtr pEffect, bool bUsed );
++	void createTextGroupParagraphEffects( CustomAnimationTextGroupPtr pTextGroup, CustomAnimationEffectPtr pEffect, bool bPrevEffect, bool bUsed );
+ 
+ 	void notify_listeners();
+ 
+--- sd/source/core/CustomAnimationEffect.cxx	6 Jul 2007 13:10:13 -0000	1.16
++++ sd/source/core/CustomAnimationEffect.cxx	18 Apr 2008 13:18:31 -0000
+@@ -2694,16 +2694,14 @@ CustomAnimationTextGroupPtr	EffectSequen
+ 	CustomAnimationTextGroupPtr	pTextGroup( new CustomAnimationTextGroup( xTarget, nGroupId ) );
+ 	maGroupMap[nGroupId] = pTextGroup;
+ 
+-	bool bUsed = false;
++	bool bPrevEffect = false;
+ 
+ 	// do we need to target the shape?
+-	if( (nTextGrouping == 0) || bAnimateForm )
++	if( bAnimateForm )
+ 	{
+-		sal_Int16 nSubItem;
+-		if( nTextGrouping == 0) 
+-			nSubItem = bAnimateForm ? ShapeAnimationSubType::AS_WHOLE : ShapeAnimationSubType::ONLY_TEXT;
+-		else
+-			nSubItem = ShapeAnimationSubType::ONLY_BACKGROUND;
++		const sal_Int16 nSubItem( nTextGrouping == 0 ?
++                                  ShapeAnimationSubType::AS_WHOLE :
++                                  ShapeAnimationSubType::ONLY_BACKGROUND );
+ 
+ 		pEffect->setTarget( makeAny( xTarget ) );
+ 		pEffect->setTargetSubItem( nSubItem );
+@@ -2711,7 +2709,7 @@ CustomAnimationTextGroupPtr	EffectSequen
+ 		pEffect->setGroupId( nGroupId );
+ 
+ 		pTextGroup->addEffect( pEffect );
+-		bUsed = true;
++		bPrevEffect = true;
+ 	}
+ 
+ 	pTextGroup->mnTextGrouping = nTextGrouping;
+@@ -2719,7 +2717,7 @@ CustomAnimationTextGroupPtr	EffectSequen
+ 	pTextGroup->mbTextReverse = bTextReverse;
+ 
+ 	// now add an effect for each paragraph
+-	createTextGroupParagraphEffects( pTextGroup, pEffect, bUsed );
++	createTextGroupParagraphEffects( pTextGroup, pEffect, bPrevEffect, bPrevEffect );
+ 
+ 	notify_listeners();
+ 
+@@ -2728,7 +2726,7 @@ CustomAnimationTextGroupPtr	EffectSequen
+ 
+ // --------------------------------------------------------------------
+ 
+-void EffectSequenceHelper::createTextGroupParagraphEffects( CustomAnimationTextGroupPtr pTextGroup, CustomAnimationEffectPtr pEffect, bool bUsed )
++void EffectSequenceHelper::createTextGroupParagraphEffects( CustomAnimationTextGroupPtr pTextGroup, CustomAnimationEffectPtr pEffect, bool bPrevEffect, bool bUsed )
+ {
+ 	Reference< XShape > xTarget( pTextGroup->maTarget );
+ 
+@@ -2793,7 +2791,7 @@ void EffectSequenceHelper::createTextGro
+ 			pNewEffect->setEffectSequence( this );
+ 
+ 			// set correct node type
+-			if( pNewEffect->getParaDepth() < nTextGrouping )
++			if( pNewEffect->getParaDepth() < nTextGrouping || !bPrevEffect )
+ 			{
+ 				if( fTextGroupingAuto == -1.0 )
+ 				{
+@@ -2825,7 +2823,7 @@ void EffectSequenceHelper::createTextGro
+ 
+ // --------------------------------------------------------------------
+ 
+-void EffectSequenceHelper::setTextGrouping( CustomAnimationTextGroupPtr pTextGroup, sal_Int32 nTextGrouping )
++void EffectSequenceHelper::setTextGrouping( CustomAnimationTextGroupPtr pTextGroup, sal_Int32 nTextGrouping, bool bPrevEffect )
+ {
+ 	if( pTextGroup->mnTextGrouping == nTextGrouping )
+ 	{
+@@ -2838,7 +2836,7 @@ void EffectSequenceHelper::setTextGroupi
+ 		CustomAnimationEffectPtr pEffect( pTextGroup->maEffects.front() );
+ 
+ 		pTextGroup->mnTextGrouping = nTextGrouping;
+-		createTextGroupParagraphEffects( pTextGroup, pEffect, true );
++		createTextGroupParagraphEffects( pTextGroup, pEffect, bPrevEffect, true );
+ 		notify_listeners();
+ 	}
+ 	else if( (pTextGroup->mnTextGrouping >= 0) && (nTextGrouping == -1 ) )
+@@ -2878,7 +2876,7 @@ void EffectSequenceHelper::setTextGroupi
+ 			if( pEffect->getTarget().getValueType() == ::getCppuType((const ParagraphTarget*)0) )
+ 			{
+ 				// set correct node type
+-				if( pEffect->getParaDepth() < nTextGrouping )
++				if( pEffect->getParaDepth() < nTextGrouping || !bPrevEffect )
+ 				{
+ 					if( fTextGroupingAuto == -1.0 )
+ 					{
+@@ -2976,7 +2974,7 @@ void EffectSequenceHelper::setAnimateFor
+ 
+ // --------------------------------------------------------------------
+ 
+-void EffectSequenceHelper::setTextGroupingAuto( CustomAnimationTextGroupPtr pTextGroup, double fTextGroupingAuto )
++void EffectSequenceHelper::setTextGroupingAuto( CustomAnimationTextGroupPtr pTextGroup, double fTextGroupingAuto, bool bPrevEffect )
+ {
+ 	sal_Int32 nTextGrouping = pTextGroup->mnTextGrouping;
+ 
+@@ -2992,7 +2990,7 @@ void EffectSequenceHelper::setTextGroupi
+ 		if( pEffect->getTarget().getValueType() == ::getCppuType((const ParagraphTarget*)0) )
+ 		{
+ 			// set correct node type
+-			if( pEffect->getParaDepth() < nTextGrouping )
++			if( pEffect->getParaDepth() < nTextGrouping || !bPrevEffect )
+ 			{
+ 				if( fTextGroupingAuto == -1.0 )
+ 				{
+--- sd/source/ui/animations/CustomAnimationPane.cxx	3 Apr 2008 13:25:20 -0000	1.31
++++ sd/source/ui/animations/CustomAnimationPane.cxx	18 Apr 2008 13:18:34 -0000
+@@ -1443,7 +1443,8 @@ STLPropertySet* CustomAnimationPane::cre
+ 
+ 		addValue( pSet, nHandleHasText, makeAny( (sal_Bool)pEffect->hasText() ) );
+ 		
+-		addValue( pSet, nHandleHasVisibleShape, Any( hasVisibleShape( pEffect->getTargetShape() ) ) );
++        const bool bHasVisibleShape = hasVisibleShape( pEffect->getTargetShape() );
++		addValue( pSet, nHandleHasVisibleShape, Any( bHasVisibleShape ) );
+ 
+ 		Any aSoundSource;
+ 		if( pEffect->getAudio().is() )
+@@ -1465,7 +1466,9 @@ STLPropertySet* CustomAnimationPane::cre
+ 			pTextGroup = pEffectSequence->findGroup( nGroupId );
+ 
+ 		addValue( pSet, nHandleTextGrouping, makeAny( pTextGroup.get() ? pTextGroup->getTextGrouping() : (sal_Int32)-1 ) );
+-		addValue( pSet, nHandleAnimateForm, makeAny( pTextGroup.get() ? (sal_Bool)pTextGroup->getAnimateForm() : sal_True ) );
++        // only default to separate geometry animation for shapes that
++        // usually _have_ non-textual content
++		addValue( pSet, nHandleAnimateForm, makeAny( pTextGroup.get() ? (sal_Bool)pTextGroup->getAnimateForm() : (sal_Bool)bHasVisibleShape ) );
+ 		addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup.get() ? pTextGroup->getTextGroupingAuto() : (double)-1.0 ) );
+ 		addValue( pSet, nHandleTextReverse, makeAny( pTextGroup.get() ? (sal_Bool)pTextGroup->getTextReverse() : sal_False ) );
+ 
+@@ -1771,6 +1774,10 @@ void CustomAnimationPane::changeSelectio
+ 		if( bHasTextGrouping )
+ 			pResultSet->getPropertyValue(nHandleTextGrouping) >>= nTextGrouping;
+ 
++        // determine default value for animate form - if no visible
++        // shape, default to false
++        pResultSet->getPropertyValue(nHandleHasVisibleShape) >>= bAnimateForm;
++
+ 		if( bHasAnimateForm )
+ 			pResultSet->getPropertyValue(nHandleAnimateForm) >>= bAnimateForm;
+ 
+@@ -1809,7 +1816,7 @@ void CustomAnimationPane::changeSelectio
+ 			{
+ 				if( (pTextGroup->getTextGrouping() != nTextGrouping) )
+ 				{
+-					pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping );
++					pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping, bAnimateForm );
+ 					bChanged = true;
+ 				}
+ 			}
+@@ -1827,7 +1834,7 @@ void CustomAnimationPane::changeSelectio
+ 			{
+ 				if( pTextGroup->getTextGroupingAuto() != fTextGroupingAuto )
+ 				{
+-					pEffectSequence->setTextGroupingAuto( pTextGroup, fTextGroupingAuto );
++					pEffectSequence->setTextGroupingAuto( pTextGroup, fTextGroupingAuto, bAnimateForm );
+ 					bChanged = true;
+ 				}
+ 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]