summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMark Hung <marklh9@gmail.com>2018-06-18 23:16:12 +0800
committerMark Hung <marklh9@gmail.com>2018-06-24 03:51:35 +0200
commit3e768ce8260ed442b02c884c5a6bfac421dbcec9 (patch)
tree462e754781a5a5a3d24e8f56b9f470714aa7ff79 /sd
parent03c14b836ab03735870b36c2388fd88782b97550 (diff)
tdf#45178 notify object rename and update effect description.
Change-Id: Ib63147a9f4dceb35e21bcf0ca5c1afebf5263721 Reviewed-on: https://gerrit.libreoffice.org/56048 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdpage.hxx3
-rw-r--r--sd/source/core/sdpage_animations.cxx12
-rw-r--r--sd/source/ui/view/drviews2.cxx4
3 files changed, 19 insertions, 0 deletions
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 932643014f4a..e8d0d639a01c 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -314,6 +314,9 @@ public:
/** removes all custom animations for the given shape */
void removeAnimations( const SdrObject* pObj );
+ /** Notify that the object has been renamed and the animation effects has to update. */
+ void notifyObjectRenamed(const SdrObject* pObj);
+
/** Set the name of the page and broadcast a model change.
*/
void SetName (const OUString& rName);
diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx
index cdd16e9cb968..c7e35d05dffb 100644
--- a/sd/source/core/sdpage_animations.cxx
+++ b/sd/source/core/sdpage_animations.cxx
@@ -81,6 +81,18 @@ void SdPage::removeAnimations( const SdrObject* pObj )
}
}
+/** Notify that the object has been renamed and the animation effect has to update. */
+void SdPage::notifyObjectRenamed(const SdrObject* pObj)
+{
+ if (pObj && hasAnimationNode())
+ {
+ Reference<XShape> xShape(const_cast<SdrObject*>(pObj)->getUnoShape(), UNO_QUERY);
+
+ if (xShape.is() && getMainSequence()->hasEffect(xShape))
+ getMainSequence()->notify_change();
+ }
+}
+
bool SdPage::hasAnimationNode() const
{
return mxAnimationNode.is();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index c9879eec60ae..c7bd428a3a10 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2506,6 +2506,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
pDlg->GetName(aName);
pSelected->SetName(aName);
+
+ SdPage* pPage = GetActualPage();
+ if (pPage)
+ pPage->notifyObjectRenamed(pSelected);
}
}