ooo-build r12240 - in branches/ooo-build-2-4: . patches/src680
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12240 - in branches/ooo-build-2-4: . patches/src680
- Date: Mon, 21 Apr 2008 10:33:32 +0100 (BST)
Author: thorstenb
Date: Mon Apr 21 09:33:31 2008
New Revision: 12240
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12240&view=rev
Log:
* patches/src680/apply: enabled sd-custom-animation-fixes.diff
again, now with the right patch file committed
* 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-custom-animation-fixes.diff
Removed:
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 Mon Apr 21 09:33:31 2008
@@ -1637,7 +1637,7 @@
# 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
+sd-custom-animation-fixes.diff, n#380036, i#69364, thorsten
#[ OOXSTLport5 ]
#
Added: branches/ooo-build-2-4/patches/src680/sd-custom-animation-fixes.diff
==============================================================================
--- (empty file)
+++ branches/ooo-build-2-4/patches/src680/sd-custom-animation-fixes.diff Mon Apr 21 09:33:31 2008
@@ -0,0 +1,486 @@
+--- 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/CustomAnimationCreateDialog.cxx
++++ sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+@@ -253,6 +253,8 @@ public:
+ bool getIsPreview() const;
+ void setIsPreview( bool bIsPreview );
+
++ bool select( const OUString& rsPresetId );
++
+ private:
+ DECL_LINK( implSelectHdl, Control* );
+ DECL_LINK( implDoubleClickHdl, Control* );
+@@ -544,13 +546,33 @@ void CustomAnimationCreateTabPage::setIsPreview( bool bIsPreview )
+ mpCBXPReview->Check( bIsPreview ? TRUE : FALSE );
+ }
+
++bool CustomAnimationCreateTabPage::select( const OUString& rsPresetId )
++{
++ USHORT nPos = mpLBEffects->GetEntryCount();
++ while( nPos-- )
++ {
++ void* pEntryData = mpLBEffects->GetEntryData( nPos );
++ if( pEntryData )
++ {
++ CustomAnimationPresetPtr& pPtr = *static_cast< CustomAnimationPresetPtr* >(pEntryData);
++ if( pPtr.get() && pPtr->getPresetId() == rsPresetId )
++ {
++ mpLBEffects->SelectEntryPos( nPos );
++ return true;
++ }
++ }
++ }
++
++ return false;
++}
++
+ // --------------------------------------------------------------------
+
+-CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, CustomAnimationPane* pPane, const std::vector< ::com::sun::star::uno::Any >& rTargets, bool bHasText )
+-: TabDialog( pParent, SdResId( DLG_CUSTOMANIMATION_CREATE ) ),
+- mpPane( pPane ),
+- mrTargets( rTargets ),
+- mfDuration( 2.0f )
++CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, CustomAnimationPane* pPane, const std::vector< ::com::sun::star::uno::Any >& rTargets, bool bHasText, const ::rtl::OUString& rsPresetId, double fDuration )
++: TabDialog( pParent, SdResId( DLG_CUSTOMANIMATION_CREATE ) )
++, mpPane( pPane )
++, mrTargets( rTargets )
++, mfDuration( fDuration )
+ {
+ mpTabControl = new TabControl( this, SdResId( 1 ) );
+ mpOKButton = new OKButton(this, SdResId( 1 ) ) ;
+@@ -583,6 +605,19 @@ CustomAnimationCreateDialog::CustomAnimationCreateDialog( Window* pParent, Custo
+ mpTabControl->SetDeactivatePageHdl( LINK( this, CustomAnimationCreateDialog, implDeactivatePagekHdl ) );
+
+ setPosition();
++
++ // select current preset if available
++ if( rsPresetId.getLength() != 0 )
++ {
++ for( sal_uInt16 i = ENTRANCE; i <= MOTIONPATH; i++ )
++ {
++ if( mpTabPages[i]->select( rsPresetId ) )
++ {
++ mpTabControl->SetCurPageId( RID_TP_CUSTOMANIMATION_ENTRANCE + i );
++ break;
++ }
++ }
++ }
+ }
+
+ CustomAnimationCreateDialog::~CustomAnimationCreateDialog()
+diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.hrc b/sd/source/ui/animations/CustomAnimationCreateDialog.hrc
+index 424a53c..d24a51a 100644
+--- sd/source/ui/animations/CustomAnimationCreateDialog.hxx
++++ sd/source/ui/animations/CustomAnimationCreateDialog.hxx
+@@ -62,7 +62,7 @@ class CustomAnimationCreateDialog : public TabDialog
+ {
+ friend class CustomAnimationCreateTabPage;
+ public:
+- CustomAnimationCreateDialog( ::Window* pParent, CustomAnimationPane* pPane, const std::vector< ::com::sun::star::uno::Any >& rTargets, bool bHasText );
++ CustomAnimationCreateDialog( ::Window* pParent, CustomAnimationPane* pPane, const std::vector< ::com::sun::star::uno::Any >& rTargets, bool bHasText, const ::rtl::OUString& rsPresetId, double fDuration );
+ ~CustomAnimationCreateDialog();
+
+ PathKind getCreatePathKind() const;
+diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.src b/sd/source/ui/animations/CustomAnimationCreateDialog.src
+index d6bfb9a..6dc89c7 100644
+--- sd/source/ui/animations/CustomAnimationDialog.cxx
++++ sd/source/ui/animations/CustomAnimationDialog.cxx
+@@ -2381,6 +2377,8 @@ private:
+ CheckBox maCBXReverse;
+
+ const STLPropertySet* mpSet;
++
++ bool mbHasVisibleShapes;
+ };
+
+ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent, const ResId& rResId, const STLPropertySet* pSet)
+@@ -2391,7 +2389,8 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
+ maMFGroupAuto( this, SdResId( MF_GROUP_AUTO ) ),
+ maCBXAnimateForm( this, SdResId( CBX_ANIMATE_FORM ) ),
+ maCBXReverse( this, SdResId( CBX_REVERSE ) ),
+- mpSet( pSet )
++ mpSet( pSet ),
++ mbHasVisibleShapes(true)
+ {
+ FreeResource();
+
+@@ -2404,6 +2403,9 @@ CustomAnimationTextAnimTabPage::CustomAnimationTextAnimTabPage(Window* pParent,
+ maLBGroupText.SelectEntryPos( (USHORT)(nTextGrouping + 1) );
+ }
+
++ if( pSet->getPropertyState( nHandleHasVisibleShape ) != STLPropertyState_AMBIGUOUS )
++ pSet->getPropertyValue( nHandleHasVisibleShape ) >>= mbHasVisibleShapes;
++
+ if( pSet->getPropertyState( nHandleTextGroupingAuto ) != STLPropertyState_AMBIGUOUS )
+ {
+ double fTextGroupingAuto = 0.0;
+@@ -2516,6 +2518,16 @@ void CustomAnimationTextAnimTabPage::updateControlStates()
+ maCBXGroupAuto.Enable( nPos > 1 );
+ maMFGroupAuto.Enable( nPos > 1 );
+ maCBXReverse.Enable( nPos > 0 );
++
++ if( !mbHasVisibleShapes && nPos > 0 )
++ {
++ maCBXAnimateForm.Check(FALSE);
++ maCBXAnimateForm.Enable(FALSE);
++ }
++ else
++ {
++ maCBXAnimateForm.Enable(TRUE);
++ }
+ }
+
+ IMPL_LINK( CustomAnimationTextAnimTabPage, implSelectHdl, Control*, EMPTYARG )
+@@ -2622,6 +2634,7 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
+ pSet->setPropertyDefaultValue( nHandleTrigger, aEmpty );
+
+ pSet->setPropertyDefaultValue( nHandleHasText, makeAny( sal_False ) );
++ pSet->setPropertyDefaultValue( nHandleHasVisibleShape, makeAny( sal_False ) );
+ pSet->setPropertyDefaultValue( nHandleTextGrouping, makeAny( (sal_Int32)-1 ) );
+ pSet->setPropertyDefaultValue( nHandleAnimateForm, makeAny( sal_True ) );
+ pSet->setPropertyDefaultValue( nHandleTextGroupingAuto, makeAny( (double)-1.0 ) );
+diff --git a/sd/source/ui/animations/CustomAnimationDialog.hrc b/sd/source/ui/animations/CustomAnimationDialog.hrc
+index 3315156..47bb690 100644
+--- sd/source/ui/animations/CustomAnimationDialog.hxx
++++ sd/source/ui/animations/CustomAnimationDialog.hxx
+@@ -98,6 +98,8 @@ const sal_Int32 nHandleSoundEndAfterSlide = 30;
+
+ const sal_Int32 nHandleCommand = 31;
+
++const sal_Int32 nHandleHasVisibleShape = 32;
++
+ const sal_Int32 nPropertyTypeNone = 0;
+ const sal_Int32 nPropertyTypeDirection = 1;
+ const sal_Int32 nPropertyTypeSpokes = 2;
+diff --git a/sd/source/ui/animations/CustomAnimationDialog.src b/sd/source/ui/animations/CustomAnimationDialog.src
+index c52dae9..77dcf0b 100644
+--- sd/source/ui/animations/CustomAnimationList.cxx
++++ sd/source/ui/animations/CustomAnimationList.cxx
+@@ -569,14 +569,14 @@ void CustomAnimationList::KeyInput( const KeyEvent& rKEvt )
+ const int nKeyCode = rKEvt.GetKeyCode().GetCode();
+ switch( nKeyCode )
+ {
+- case KEY_DELETE: mpController->onContextMenu( CM_REMOVE ); break;
+- case KEY_INSERT: mpController->onContextMenu( CM_CREATE ); break;
++ case KEY_DELETE: mpController->onContextMenu( CM_REMOVE ); return;
++ case KEY_INSERT: mpController->onContextMenu( CM_CREATE ); return;
+ case KEY_SPACE:
+ {
+ const Point aPos;
+ const CommandEvent aCEvt( aPos, COMMAND_CONTEXTMENU );
+ Command( aCEvt );
+- break;
++ return;
+ }
+
+ }
+--- 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;
+@@ -422,6 +415,12 @@ void CustomAnimationPane::StateChanged( StateChangedType nStateChange )
+ updateMotionPathTags();
+ }
+
++void CustomAnimationPane::KeyInput( const KeyEvent& rKEvt )
++{
++ if( mpCustomAnimationList )
++ mpCustomAnimationList->KeyInput( rKEvt );
++}
++
+ void CustomAnimationPane::addListener()
+ {
+ Link aLink( LINK(this,CustomAnimationPane,EventMultiplexerListener) );
+@@ -1362,6 +1361,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 +1442,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 +1466,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 +1774,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 +1816,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
+ {
+ if( (pTextGroup->getTextGrouping() != nTextGrouping) )
+ {
+- pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping );
++ pEffectSequence->setTextGrouping( pTextGroup, nTextGrouping, bAnimateForm );
+ bChanged = true;
+ }
+ }
+@@ -1796,7 +1834,7 @@ void CustomAnimationPane::changeSelection( STLPropertySet* pResultSet, STLProper
+ {
+ if( pTextGroup->getTextGroupingAuto() != fTextGroupingAuto )
+ {
+- pEffectSequence->setTextGroupingAuto( pTextGroup, fTextGroupingAuto );
++ pEffectSequence->setTextGroupingAuto( pTextGroup, fTextGroupingAuto, bAnimateForm );
+ bChanged = true;
+ }
+ }
+@@ -1926,6 +1964,9 @@ void CustomAnimationPane::onChange( bool bCreate )
+
+ // first create vector of targets for dialog preview
+ std::vector< Any > aTargets;
++ OUString sPresetId;
++ double fDuration = 2.0f;
++
+ if( bCreate )
+ {
+ // gather shapes from the selection
+@@ -1992,15 +2033,22 @@ void CustomAnimationPane::onChange( bool bCreate )
+ {
+ if( !bHasText || !(*aIter)->hasText() )
+ bHasText = false;
++
++ if( sPresetId.getLength() == 0 )
++ {
++ sPresetId = (*aIter)->getPresetId();
++ fDuration = (*aIter)->getDuration();
++ }
++
+ aTargets.push_back( (*aIter++)->getTarget() );
+ }
+ }
+
+- CustomAnimationCreateDialog* pDlg = new CustomAnimationCreateDialog( this, this, aTargets, bHasText );
++ CustomAnimationCreateDialog* pDlg = new CustomAnimationCreateDialog( this, this, aTargets, bHasText, sPresetId, fDuration );
+ if( pDlg->Execute() )
+ {
+ addUndo();
+- double fDuration = pDlg->getSelectedDuration();
++ fDuration = pDlg->getSelectedDuration();
+ CustomAnimationPresetPtr pDescriptor = pDlg->getSelectedPreset();
+ if( pDescriptor.get() )
+ {
+--- sd/source/ui/animations/CustomAnimationPane.hxx
++++ sd/source/ui/animations/CustomAnimationPane.hxx
+@@ -111,6 +111,7 @@ public:
+ // Control
+ virtual void Resize();
+ virtual void StateChanged( StateChangedType nStateChange );
++ virtual void KeyInput( const KeyEvent& rKEvt );
+
+ // ICustomAnimationListController
+ virtual void onSelect();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]