ooo-build r12227 - in branches/ooo-build-2-4: . patches/src680
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12227 - in branches/ooo-build-2-4: . patches/src680
- Date: Fri, 18 Apr 2008 17:09:37 +0100 (BST)
Author: thorstenb
Date: Fri Apr 18 16:09:36 2008
New Revision: 12227
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12227&view=rev
Log:
* patches/src680/apply: added sd-custom-animation-fixes.diff
* patches/src680/sd-custom-animation-fixes.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, backported related fixes from upstream
DEV300.
Added:
branches/ooo-build-2-4/patches/src680/sd-animate-form-default.diff
Modified:
branches/ooo-build-2-4/ChangeLog
branches/ooo-build-2-4/patches/src680/apply
Modified: branches/ooo-build-2-4/patches/src680/apply
==============================================================================
--- branches/ooo-build-2-4/patches/src680/apply (original)
+++ branches/ooo-build-2-4/patches/src680/apply Fri Apr 18 16:09:36 2008
@@ -14,7 +14,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, \
@@ -1632,6 +1632,13 @@
# 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). Also
+# backports fix for #i69364 and #i67343 from upstream
+sd-custom-animation-fixes.diff, n#380036, i#69364, thorsten
+
#[ OOXSTLport5 ]
#
## oox devs, please reconsider operator[] use,
Added: branches/ooo-build-2-4/patches/src680/sd-animate-form-default.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4/patches/src680/sd-animate-form-default.diff Fri Apr 18 16:09:36 2008
@@ -0,0 +1,252 @@
+--- sd/inc/CustomAnimationEffect.hxx
++++ sd/inc/CustomAnimationEffect.hxx
+@@ -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
++++ sd/source/core/CustomAnimationEffect.cxx
+@@ -2694,16 +2694,14 @@ CustomAnimationTextGroupPtr EffectSequenceHelper::createTextGroup( CustomAnimati
+ 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 EffectSequenceHelper::createTextGroup( CustomAnimati
+ pEffect->setGroupId( nGroupId );
+
+ pTextGroup->addEffect( pEffect );
+- bUsed = true;
++ bPrevEffect = true;
+ }
+
+ pTextGroup->mnTextGrouping = nTextGrouping;
+@@ -2719,7 +2717,7 @@ CustomAnimationTextGroupPtr EffectSequenceHelper::createTextGroup( CustomAnimati
+ 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 EffectSequenceHelper::createTextGroup( CustomAnimati
+
+ // --------------------------------------------------------------------
+
+-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::createTextGroupParagraphEffects( CustomAnimationTextG
+ 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::createTextGroupParagraphEffects( CustomAnimationTextG
+
+ // --------------------------------------------------------------------
+
+-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::setTextGrouping( CustomAnimationTextGroupPtr pTextGro
+ 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::setTextGrouping( CustomAnimationTextGroupPtr pTextGro
+ 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::setAnimateForm( CustomAnimationTextGroupPtr pTextGrou
+
+ // --------------------------------------------------------------------
+
+-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::setTextGroupingAuto( CustomAnimationTextGroupPtr pTex
+ 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
++++ sd/source/ui/animations/CustomAnimationPane.cxx
+@@ -80,6 +80,8 @@
+ #ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
+ #include <com/sun/star/awt/XWindow.hpp>
+ #endif
++#include <com/sun/star/drawing/LineStyle.hpp>
++#include <com/sun/star/drawing/FillStyle.hpp>
+
+ #ifndef _COMPHELPER_PROCESSFACTORY_HXX_
+ #include <comphelper/processfactory.hxx>
+@@ -201,23 +203,14 @@ using namespace ::com::sun::star::presentation;
+ using namespace ::com::sun::star::text;
+
+ using ::rtl::OUString;
+-using ::com::sun::star::uno::UNO_QUERY;
+-using ::com::sun::star::uno::UNO_QUERY_THROW;
+-using ::com::sun::star::uno::Any;
+-using ::com::sun::star::uno::makeAny;
+-using ::com::sun::star::uno::Sequence;
+-using ::com::sun::star::uno::Reference;
+-using ::com::sun::star::uno::Exception;
++using namespace ::com::sun::star::uno;
++using namespace ::com::sun::star::drawing;
+ using ::com::sun::star::view::XSelectionSupplier;
+ using ::com::sun::star::view::XSelectionChangeListener;
+ using ::com::sun::star::frame::XController;
+ using ::com::sun::star::frame::XModel;
+ using ::com::sun::star::beans::XPropertySet;
+ using ::com::sun::star::beans::XPropertyChangeListener;
+-using ::com::sun::star::drawing::XDrawView;
+-using ::com::sun::star::drawing::XShape;
+-using ::com::sun::star::drawing::XShapes;
+-using ::com::sun::star::drawing::XDrawPage;
+ using ::com::sun::star::container::XIndexAccess;
+ using ::com::sun::star::container::XEnumerationAccess;
+ using ::com::sun::star::container::XEnumeration;
+@@ -1362,6 +1355,36 @@ bool CustomAnimationPane::setProperty1Value( sal_Int32 nType, CustomAnimationEff
+ return bEffectChanged;
+ }
+
++static sal_Bool hasVisibleShape( const Reference< XShape >& xShape )
++{
++ try
++ {
++ const OUString sShapeType( xShape->getShapeType() );
++
++ if( sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.TitleTextShape") ) ||
++ sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.OutlinerShape") ) ||
++ sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.presentation.SubtitleShape") ) ||
++ sShapeType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TextShape") ) )
++ {
++ const OUString sFillStyle( RTL_CONSTASCII_USTRINGPARAM("FillStyle" ) );
++ const OUString sLineStyle( RTL_CONSTASCII_USTRINGPARAM("LineStyle" ) );
++ Reference< XPropertySet > xSet( xShape, UNO_QUERY_THROW );
++
++ FillStyle eFillStyle;
++ xSet->getPropertyValue( sFillStyle ) >>= eFillStyle;
++
++ ::com::sun::star::drawing::LineStyle eLineStyle;
++ xSet->getPropertyValue( sLineStyle ) >>= eLineStyle;
++
++ return eFillStyle != FillStyle_NONE || eLineStyle != ::com::sun::star::drawing::LineStyle_NONE;
++ }
++ }
++ catch( Exception& e )
++ {
++ (void)e;
++ }
++ return sal_True;
++}
+
+ STLPropertySet* CustomAnimationPane::createSelectionSet()
+ {
+@@ -1413,6 +1436,9 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
+ addValue( pSet, nHandlePresetId, makeAny( pEffect->getPresetId() ) );
+
+ addValue( pSet, nHandleHasText, makeAny( (sal_Bool)pEffect->hasText() ) );
++
++ const bool bHasVisibleShape = hasVisibleShape( pEffect->getTargetShape() );
++ addValue( pSet, nHandleHasVisibleShape, Any( bHasVisibleShape ) );
+
+ Any aSoundSource;
+ if( pEffect->getAudio().is() )
+@@ -1434,7 +1460,9 @@ STLPropertySet* CustomAnimationPane::createSelectionSet()
+ 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 ) );
+
+@@ -1740,6 +1768,10 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
+ 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;
+
+@@ -1778,7 +1810,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
+ {
+ if( (pTextGroup->getTextGrouping() != nTextGrouping) )
+ {
+- pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping );
++ pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping, bAnimateForm );
+ bChanged = true;
+ }
+ }
+@@ -1796,7 +1828,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
+ {
+ 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]