63 :
FuPoor(pViewSh, pWin, pView, pDoc, rReq)
70 xFunc->DoExecute(rReq);
100 presentation::AnimationEffect eEffect = presentation::AnimationEffect_NONE;
101 presentation::AnimationEffect eTextEffect = presentation::AnimationEffect_NONE;
102 presentation::AnimationSpeed eSpeed = presentation::AnimationSpeed_MEDIUM;
103 bool bActive =
false;
104 bool bFadeOut =
false;
106 bool bInvisible =
false;
107 bool bSoundOn =
false;
109 bool bPlayFull =
false;
110 presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
113 presentation::AnimationEffect eSecondEffect = presentation::AnimationEffect_NONE;
114 presentation::AnimationSpeed eSecondSpeed = presentation::AnimationSpeed_MEDIUM;
115 bool bSecondSoundOn =
false;
116 bool bSecondPlayFull =
false;
176 for(
size_t nObject = 1; nObject <
nCount; ++nObject )
178 pMark = rMarkList.
GetMark( nObject );
233 if (nAnimationSet ==
ATTR_SET && bActive)
236 if (nEffectSet ==
ATTR_SET && eEffect != presentation::AnimationEffect_NONE)
239 if (nTextEffectSet ==
ATTR_SET && eTextEffect != presentation::AnimationEffect_NONE)
245 if (nFadeOutSet ==
ATTR_SET && bFadeOut)
251 if (nInvisibleSet ==
ATTR_SET && bInvisible)
254 if (nSoundOnSet ==
ATTR_SET && bSoundOn)
260 if (nPlayFullSet ==
ATTR_SET && bPlayFull)
263 if (nClickActionSet ==
ATTR_SET && eClickAction != presentation::ClickAction_NONE)
269 if (nSecondEffectSet ==
ATTR_SET && eSecondEffect != presentation::AnimationEffect_NONE)
275 if (nSecondSoundOnSet ==
ATTR_SET && bSecondSoundOn)
278 if (nSecondPlayFullSet ==
ATTR_SET && bSecondPlayFull)
296 ((eKind1 == SdrObjKind::Line) ||
297 (eKind1 == SdrObjKind::PolyLine) ||
298 (eKind1 == SdrObjKind::PathLine)) &&
299 (pInfo2 && pInfo2->
meEffect == presentation::AnimationEffect_PATH))
305 ((eKind2 == SdrObjKind::Line) ||
306 (eKind2 == SdrObjKind::PolyLine) ||
307 (eKind2 == SdrObjKind::PathLine)) &&
308 (pInfo1 && pInfo1->
meEffect == presentation::AnimationEffect_PATH))
350 aSet.
Put(
SfxUInt16Item(ATTR_ANIMATION_EFFECT,
static_cast<sal_uInt16
>(eEffect)));
354 aSet.
Put(
SfxUInt16Item(ATTR_ANIMATION_EFFECT, sal_uInt16(presentation::AnimationEffect_NONE)));
357 aSet.
Put(
SfxUInt16Item(ATTR_ANIMATION_TEXTEFFECT,
static_cast<sal_uInt16
>(eTextEffect)));
361 aSet.
Put(
SfxUInt16Item(ATTR_ANIMATION_TEXTEFFECT, sal_uInt16(presentation::AnimationEffect_NONE)));
364 aSet.
Put(
SfxUInt16Item(ATTR_ANIMATION_SPEED,
static_cast<sal_uInt16
>(eSpeed)));
409 aSet.
Put(
SfxUInt16Item(ATTR_ACTION,
static_cast<sal_uInt16
>(eClickAction)));
413 aSet.
Put(
SfxUInt16Item(ATTR_ACTION, sal_uInt16(presentation::ClickAction_NONE)));
421 aSet.
Put(
SfxUInt16Item(ATTR_ACTION_EFFECT,
static_cast<sal_uInt16
>(eSecondEffect)));
425 aSet.
Put(
SfxUInt16Item(ATTR_ACTION_EFFECT, sal_uInt16(presentation::AnimationEffect_NONE)));
428 aSet.
Put(
SfxUInt16Item(ATTR_ACTION_EFFECTSPEED,
static_cast<sal_uInt16
>(eSecondSpeed)));
449 short nResult = pDlg->Execute();
454 rReq.
Done( *( pDlg->GetOutputItemSet() ) );
459 if (pArgs->
GetItemState(ATTR_ANIMATION_ACTIVE) == SfxItemState::SET)
467 if (pArgs->
GetItemState(ATTR_ANIMATION_EFFECT) == SfxItemState::SET)
469 eEffect =
static_cast<presentation::AnimationEffect
>( pArgs->
470 Get(ATTR_ANIMATION_EFFECT).GetValue());
476 if (pArgs->
GetItemState(ATTR_ANIMATION_TEXTEFFECT) == SfxItemState::SET)
478 eTextEffect =
static_cast<presentation::AnimationEffect
>(
static_cast<const SfxUInt16Item&
>( pArgs->
485 if (pArgs->
GetItemState(ATTR_ANIMATION_SPEED) == SfxItemState::SET)
487 eSpeed =
static_cast<presentation::AnimationSpeed
>( pArgs->
488 Get(ATTR_ANIMATION_SPEED).GetValue());
494 if (pArgs->
GetItemState(ATTR_ANIMATION_FADEOUT) == SfxItemState::SET)
502 if (pArgs->
GetItemState(ATTR_ANIMATION_INVISIBLE) == SfxItemState::SET)
510 if (pArgs->
GetItemState(ATTR_ANIMATION_SOUNDON) == SfxItemState::SET)
518 if (pArgs->
GetItemState(ATTR_ANIMATION_SOUNDFILE) == SfxItemState::SET)
520 aSound = pArgs->
Get(ATTR_ANIMATION_SOUNDFILE).GetValue();
526 if (pArgs->
GetItemState(ATTR_ANIMATION_COLOR) == SfxItemState::SET)
534 if (pArgs->
GetItemState(ATTR_ANIMATION_PLAYFULL) == SfxItemState::SET)
542 if (pArgs->
GetItemState(ATTR_ACTION) == SfxItemState::SET)
544 eClickAction =
static_cast<presentation::ClickAction
>(pArgs->
545 Get(ATTR_ACTION).GetValue());
551 if (pArgs->
GetItemState(ATTR_ACTION_FILENAME) == SfxItemState::SET)
553 aBookmark = pArgs->
Get(ATTR_ACTION_FILENAME).GetValue();
559 if (pArgs->
GetItemState(ATTR_ACTION_EFFECT) == SfxItemState::SET)
561 eSecondEffect =
static_cast<presentation::AnimationEffect
>( pArgs->
562 Get(ATTR_ACTION_EFFECT).GetValue());
568 if (pArgs->
GetItemState(ATTR_ACTION_EFFECTSPEED) == SfxItemState::SET)
570 eSecondSpeed =
static_cast<presentation::AnimationSpeed
>( pArgs->
571 Get(ATTR_ACTION_EFFECTSPEED).GetValue());
577 if (pArgs->
GetItemState(ATTR_ACTION_SOUNDON) == SfxItemState::SET)
585 if (pArgs->
GetItemState(ATTR_ACTION_PLAYFULL) == SfxItemState::SET)
613 OUString aComment(
SdResId(STR_UNDO_ANIMATION));
621 pUndoGroup->SetComment(aComment);
625 if (eEffect == presentation::AnimationEffect_PATH && nEffectSet ==
ATTR_SET)
635 ((eKind1 == SdrObjKind::Line) ||
636 (eKind1 == SdrObjKind::PolyLine) ||
637 (eKind1 == SdrObjKind::PathLine)))
640 pRunningObj = pObject2;
644 ((eKind2 == SdrObjKind::Line) ||
645 (eKind2 == SdrObjKind::PolyLine) ||
646 (eKind2 == SdrObjKind::PathLine)))
649 pRunningObj = pObject1;
652 assert(pRunningObj && pPath &&
"no curve found");
659 const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->
GetPathPoly();
660 sal_uInt32 nNoOfPolygons(rPolyPolygon.count());
661 const ::basegfx::B2DPolygon& aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1));
662 sal_uInt32 nPoints(aPolygon.count());
663 const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1));
664 const Point aNewCenter(
FRound(aNewB2DCenter.getX()),
FRound(aNewB2DCenter.getY()));
665 Size aDistance(aNewCenter.
X() - aCurCenter.
X(), aNewCenter.
Y() - aCurCenter.
Y());
672 for (
size_t nObject = 0; nObject <
nCount; ++nObject)
678 bool bCreated =
false;
686 if (eEffect == presentation::AnimationEffect_PATH &&
pObject == pPath)
707 pUndoGroup->AddAction(pAction);
733 pUndoGroup->AddAction(pAction);
784 if (eClickAction == presentation::ClickAction_VERB)
785 pInfo->
mnVerb =
static_cast<sal_uInt16
>(aBookmark.toInt32());
constexpr tools::Long Y() const
constexpr tools::Long X() const
virtual VclPtr< SfxAbstractDialog > CreatSdActionDialog(weld::Window *pParent, const SfxItemSet *pAttr, ::sd::View *pView)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
bool mbPlayFull
play sound completely.
css::presentation::AnimationEffect meTextEffect
Animation effect for text content.
bool mbDimHide
hide rather than dim
css::presentation::AnimationEffect meEffect
Animation effect.
void SetBookmark(const OUString &rBookmark)
css::presentation::ClickAction meClickAction
Action at mouse click.
Color maDimColor
for fading the object
sal_uInt16 mnVerb
for OLE object
css::presentation::AnimationEffect meSecondEffect
for object fading.
bool mbSecondSoundOn
for object fading.
OUString GetBookmark() const
OUString maSoundFile
Path to the sound file in MS DOS notation.
css::presentation::AnimationSpeed meSpeed
Speed of the animation.
bool mbDimPrevious
Object fade out.
bool mbSoundOn
Sound on / off.
bool mbSecondPlayFull
for object fading.
css::presentation::AnimationSpeed meSecondSpeed
for object fading.
void SetTextEffect(css::presentation::AnimationEffect eTheOldEffect, css::presentation::AnimationEffect eTheNewEffect)
void SetEffect(css::presentation::AnimationEffect eTheOldEffect, css::presentation::AnimationEffect eTheNewEffect)
void SetClickAction(css::presentation::ClickAction eTheOldAction, css::presentation::ClickAction eTheNewAction)
void SetSecondPlayFull(bool bTheOldPlayFull, bool bTheNewPlayFull)
void SetDimHide(bool bTheOldDimHide, bool bTheNewDimHide)
void SetVerb(sal_uInt16 nTheOldVerb, sal_uInt16 nTheNewVerb)
void SetSecondEffect(css::presentation::AnimationEffect eTheOldEffect, css::presentation::AnimationEffect eTheNewEffect)
void SetSound(const OUString &aTheOldSound, const OUString &aTheNewSound)
void SetPlayFull(bool bTheOldPlayFull, bool bTheNewPlayFull)
void SetActive(bool bTheOldActive, bool bTheNewActive)
void SetDim(bool bTheOldDim, bool bTheNewDim)
void SetSpeed(css::presentation::AnimationSpeed eTheOldSpeed, css::presentation::AnimationSpeed eTheNewSpeed)
void SetSecondSoundOn(bool bTheOldSoundOn, bool bTheNewSoundOn)
void SetDimColor(Color aTheOldDimColor, Color aTheNewDimColor)
void SetBookmark(const OUString &aTheOldBookmark, const OUString &aTheNewBookmark)
void SetSoundOn(bool bTheOldSoundOn, bool bTheNewSoundOn)
void SetSecondSpeed(css::presentation::AnimationSpeed eTheOldSpeed, css::presentation::AnimationSpeed eTheNewSpeed)
static SdAnimationInfo * GetShapeUserData(SdrObject &rObject, bool bCreate=false)
SAL_DLLPRIVATE SfxItemPool & GetPool()
static SAL_DLLPRIVATE SdAnimationInfo * GetAnimationInfo(SdrObject *pObject)
deprecated
virtual SAL_DLLPRIVATE void SetChanged(bool bFlag=true) override
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
const SdrMarkList & GetMarkedObjectList() const
SdrObject * GetMarkedSdrObj() const
SdrUndoFactory & GetSdrUndoFactory() const
virtual SdrInventor GetObjInventor() const
virtual void Move(const Size &rSiz)
virtual SdrObjKind GetObjIdentifier() const
virtual const tools::Rectangle & GetLogicRect() const
const basegfx::B2DPolyPolygon & GetPathPoly() const
virtual std::unique_ptr< SdrUndoAction > CreateUndoMoveObject(SdrObject &rObject, const Size &rDist)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void InvalidateItem(sal_uInt16 nWhich)
const SfxItemSet * GetArgs() const
void Done(bool bRemove=false)
virtual SfxUndoManager * GetUndoManager()
virtual void EnterListAction(const OUString &rComment, const OUString &rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
virtual SfxObjectShell * GetObjectShell() override
ViewShellId GetViewShellId() const override
virtual void DoExecute(SfxRequest &rReq) override
FuObjectAnimationParameters(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Base class for all functions.
Base class of the stacked shell hierarchy.
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
An SdWindow contains the actual working area of ViewShell.
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
#define DBG_ASSERT(sCon, aError)
EmbeddedObjectRef * pObject
#define ATTR_MISSING
Attribute missing.
#define ATTR_MIXED
Attribute ambiguous (on multi-selection)
#define ATTR_SET
Attribute unique.
tools::Long FRound(double fVal)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
OUString SdResId(TranslateId aId)
o3tl::enumarray< SvxBoxItemLine, sal_uInt16 > aDistance