officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |    
8 
 sd/Library_sd.mk                                                         |    
1 
 sd/inc/app.hrc                                                           |    
1 
 sd/sdi/drviewsh.sdi                                                      |    
5 
 sd/sdi/sdraw.sdi                                                         |   
17 
 sd/source/ui/func/fuexecuteinteraction.cxx                               |  
236 ++++++++++
 sd/source/ui/inc/fuexecuteinteraction.hxx                                |   
44 +
 sd/source/ui/view/drviews2.cxx                                           |    
9 
 sd/source/ui/view/drviews7.cxx                                           |    
4 
 sd/source/ui/view/drviewsj.cxx                                           |   
19 
 sd/uiconfig/simpress/popupmenu/3dobject.xml                              |    
1 
 sd/uiconfig/simpress/popupmenu/3dscene.xml                               |    
1 
 sd/uiconfig/simpress/popupmenu/3dscene2.xml                              |    
1 
 sd/uiconfig/simpress/popupmenu/connector.xml                             |    
1 
 sd/uiconfig/simpress/popupmenu/curve.xml                                 |    
1 
 sd/uiconfig/simpress/popupmenu/draw.xml                                  |    
1 
 sd/uiconfig/simpress/popupmenu/graphic.xml                               |    
1 
 sd/uiconfig/simpress/popupmenu/group.xml                                 |    
1 
 sd/uiconfig/simpress/popupmenu/line.xml                                  |    
1 
 sd/uiconfig/simpress/popupmenu/measure.xml                               |    
1 
 sd/uiconfig/simpress/popupmenu/media.xml                                 |    
1 
 sd/uiconfig/simpress/popupmenu/multiselect.xml                           |    
1 
 sd/uiconfig/simpress/popupmenu/oleobject.xml                             |    
2 
 sd/uiconfig/simpress/popupmenu/textbox.xml                               |    
1 
 24 files changed, 357 insertions(+), 2 deletions(-)

New commits:
commit a08725165dfefa01dd491b3bd935d7a7d34b1877
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Wed Jun 26 11:17:29 2019 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Fri Jun 28 09:38:48 2019 +0200

    tdf#125748 Add context menu entry to execute interaction
    
    This is a follow-up to commit 5f795576d45988d20aa9.
    This reintroduces the possibility to execute an interaction in edit mode
    by adding a context menu entry for it as discussed in the bug report.
    
    Change-Id: Ibc26c227b592b888129baa2b68590178fdadee98
    Reviewed-on: https://gerrit.libreoffice.org/74731
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Tested-by: Heiko Tietze <heiko.tie...@documentfoundation.org>
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 4239cf258c80..46cfabd4bd2a 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -1060,6 +1060,14 @@
           <value>1</value>
         </prop>
       </node>
+      <node oor:name=".uno:ExecuteAnimationEffect" oor:op="replace">
+        <prop oor:name="Label" oor:type="xs:string">
+          <value xml:lang="en-US">E~xecute Interaction...</value>
+        </prop>
+        <prop oor:name="Properties" oor:type="xs:int">
+          <value>1</value>
+        </prop>
+      </node>
       <node oor:name=".uno:PresentationLayout" oor:op="replace">
         <prop oor:name="Label" oor:type="xs:string">
           <value xml:lang="en-US">Change Slide Master...</value>
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index 87fd3332594f..d777ea177a5d 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -278,6 +278,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
        sd/source/ui/func/fudraw \
        sd/source/ui/func/fudspord \
        sd/source/ui/func/fuediglu \
+       sd/source/ui/func/fuexecuteinteraction \
        sd/source/ui/func/fuexpand \
        sd/source/ui/func/fuformatpaintbrush \
        sd/source/ui/func/fuhhconv \
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 73a974a5f93c..1ca6952d9ba4 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -140,6 +140,7 @@
 #define SID_NOTES_MODE                      (SID_SD_START+69)
 #define SID_HANDOUT_MASTER_MODE             (SID_SD_START+70)
 #define SID_LINEEND_POLYGON                 (SID_SD_START+71)
+#define SID_EXECUTE_ANIMATION_EFFECT        (SID_SD_START+72)
     // FREE
 #define SID_SWITCH_POINTEDIT                (SID_SD_START+74)
     // FREE
diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi
index 931a54ee983d..7ee014de5f76 100644
--- a/sd/sdi/drviewsh.sdi
+++ b/sd/sdi/drviewsh.sdi
@@ -37,6 +37,11 @@ interface ImpressEditView : DrawView
         ExecMethod = FuTemporary ;
         StateMethod = GetMenuState ;
     ]
+    SID_EXECUTE_ANIMATION_EFFECT // ole : no, status : ?
+    [
+        ExecMethod = FuTemporary ;
+        StateMethod = GetMenuState ;
+    ]
     SID_CUSTOM_ANIMATION_PANEL // ole : no, status : ?
     [
         ExecMethod = FuTemporary ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index cedb086080ee..50bb4ce436de 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -51,6 +51,23 @@ SfxVoidItem AnimationEffects SID_ANIMATION_EFFECTS
     GroupId = SfxGroupId::Options;
 ]
 
+SfxVoidItem ExecuteAnimationEffect SID_EXECUTE_ANIMATION_EFFECT
+()
+[
+    AutoUpdate = FALSE,
+    FastCall = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    ToolBoxConfig = TRUE,
+    GroupId = SfxGroupId::Options;
+]
+
 SfxBoolItem AnimationObjects SID_ANIMATION_OBJECTS
 
 [
diff --git a/sd/source/ui/func/fuexecuteinteraction.cxx 
b/sd/source/ui/func/fuexecuteinteraction.cxx
new file mode 100644
index 000000000000..0a0f65186e48
--- /dev/null
+++ b/sd/source/ui/func/fuexecuteinteraction.cxx
@@ -0,0 +1,236 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <fuexecuteinteraction.hxx>
+
+#include <app.hrc>
+#include <avmedia/mediawindow.hxx>
+#include <basic/sbstar.hxx>
+#include <config_features.h>
+#include <sfx2/app.hxx>
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/docfile.hxx>
+#include <sfx2/sfxsids.hrc>
+#include <sfx2/viewfrm.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <svl/urihelper.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/xfillit0.hxx>
+#include <tools/urlobj.hxx>
+
+#include <DrawViewShell.hxx>
+#include <GraphicDocShell.hxx>
+#include <ViewShell.hxx>
+#include <anminfo.hxx>
+#include <drawdoc.hxx>
+#include <drawview.hxx>
+#include <pgjump.hxx>
+
+#include <com/sun/star/media/XPlayer.hpp>
+
+using namespace css;
+
+namespace sd
+{
+FuExecuteInteraction::FuExecuteInteraction(ViewShell* pViewSh, ::sd::Window* 
pWin,
+                                           ::sd::View* pView, SdDrawDocument* 
pDoc,
+                                           SfxRequest& rReq)
+    : FuPoor(pViewSh, pWin, pView, pDoc, rReq)
+{
+}
+
+rtl::Reference<FuPoor> FuExecuteInteraction::Create(ViewShell* pViewSh, 
::sd::Window* pWin,
+                                                    ::sd::View* pView, 
SdDrawDocument* pDoc,
+                                                    SfxRequest& rReq)
+{
+    rtl::Reference<FuPoor> xFunc(new FuExecuteInteraction(pViewSh, pWin, 
pView, pDoc, rReq));
+    xFunc->DoExecute(rReq);
+    return xFunc;
+}
+
+void FuExecuteInteraction::DoExecute(SfxRequest&)
+{
+    const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
+
+    if (rMarkList.GetMarkCount() != 1)
+        return;
+
+    SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+
+    if (dynamic_cast<const GraphicDocShell*>(mpDocSh) != nullptr
+        || dynamic_cast<const DrawView*>(mpView) == nullptr)
+        return;
+
+    SdAnimationInfo* pInfo = SdDrawDocument::GetAnimationInfo(pObj);
+    if (!pInfo)
+        return;
+
+    switch (pInfo->meClickAction)
+    {
+        case presentation::ClickAction_BOOKMARK:
+        {
+            // Jump to Bookmark (Page or Object)
+            SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->GetBookmark());
+            mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+                SID_NAVIGATOR_OBJECT, SfxCallMode::SLOT | SfxCallMode::RECORD, 
{ &aItem });
+        }
+        break;
+
+        case presentation::ClickAction_DOCUMENT:
+        {
+            OUString sBookmark(pInfo->GetBookmark());
+            // Jump to document
+            if (!sBookmark.isEmpty())
+            {
+                SfxStringItem aReferer(SID_REFERER, 
mpDocSh->GetMedium()->GetName());
+                SfxStringItem aStrItem(SID_FILE_NAME, sBookmark);
+                SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
+                SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
+                SfxBoolItem aBrowseItem(SID_BROWSE, true);
+                pFrame->GetDispatcher()->ExecuteList(
+                    SID_OPENDOC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
+                    { &aStrItem, &aFrameItem, &aBrowseItem, &aReferer });
+            }
+        }
+        break;
+
+        case presentation::ClickAction_PREVPAGE:
+        {
+            // Jump to the previous page
+            SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_PREVIOUS);
+            mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+                SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, { 
&aItem });
+        }
+        break;
+
+        case presentation::ClickAction_NEXTPAGE:
+        {
+            // Jump to the next page
+            SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_NEXT);
+            mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+                SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, { 
&aItem });
+        }
+        break;
+
+        case presentation::ClickAction_FIRSTPAGE:
+        {
+            // Jump to the first page
+            SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_FIRST);
+            mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+                SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, { 
&aItem });
+        }
+        break;
+
+        case presentation::ClickAction_LASTPAGE:
+        {
+            // Jump to the last page
+            SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_LAST);
+            mpViewShell->GetViewFrame()->GetDispatcher()->ExecuteList(
+                SID_NAVIGATOR_PAGE, SfxCallMode::SLOT | SfxCallMode::RECORD, { 
&aItem });
+        }
+        break;
+
+        case presentation::ClickAction_SOUND:
+        {
+#if HAVE_FEATURE_AVMEDIA
+            try
+            {
+                
mxPlayer.set(avmedia::MediaWindow::createPlayer(pInfo->GetBookmark(), "" 
/*TODO?*/),
+                             uno::UNO_SET_THROW);
+                mxPlayer->start();
+            }
+            catch (uno::Exception&)
+            {
+            }
+#endif
+        }
+        break;
+
+        case presentation::ClickAction_VERB:
+        {
+            // Assign verb
+            mpView->UnmarkAll();
+            mpView->MarkObj(pObj, mpView->GetSdrPageView());
+            DrawViewShell* pDrViewSh = 
static_cast<DrawViewShell*>(mpViewShell);
+            pDrViewSh->DoVerb(static_cast<sal_Int16>(pInfo->mnVerb));
+        }
+        break;
+
+        case presentation::ClickAction_PROGRAM:
+        {
+            OUString aBaseURL = GetDocSh()->GetMedium()->GetBaseURL();
+            INetURLObject aURL(::URIHelper::SmartRel2Abs(
+                INetURLObject(aBaseURL), pInfo->GetBookmark(), 
URIHelper::GetMaybeFileHdl(), true,
+                false, INetURLObject::EncodeMechanism::WasEncoded,
+                INetURLObject::DecodeMechanism::Unambiguous));
+
+            if (INetProtocol::File == aURL.GetProtocol())
+            {
+                SfxStringItem aUrl(SID_FILE_NAME,
+                                   
aURL.GetMainURL(INetURLObject::DecodeMechanism::NONE));
+                SfxBoolItem aBrowsing(SID_BROWSE, true);
+
+                SfxViewFrame* pViewFrm = SfxViewFrame::Current();
+                if (pViewFrm)
+                    pViewFrm->GetDispatcher()->ExecuteList(
+                        SID_OPENDOC, SfxCallMode::ASYNCHRON | 
SfxCallMode::RECORD,
+                        { &aUrl, &aBrowsing });
+            }
+        }
+        break;
+
+        case presentation::ClickAction_MACRO:
+        {
+            // Execute macro
+            OUString aMacro = pInfo->GetBookmark();
+
+            if (SfxApplication::IsXScriptURL(aMacro))
+            {
+                uno::Any aRet;
+                uno::Sequence<sal_Int16> aOutArgsIndex;
+                uno::Sequence<uno::Any> aParams;
+                uno::Sequence<uno::Any> aOutArgs;
+
+                mpDocSh->CallXScript(aMacro, aParams, aRet, aOutArgsIndex, 
aOutArgs);
+            }
+            else
+            {
+                // aMacro has got following format:
+                // "Macroname.Modulname.Libname.Documentname" or
+                // "Macroname.Modulname.Libname.Applicationname"
+                sal_Int32 nIdx{ 0 };
+                const OUString aMacroName = aMacro.getToken(0, '.', nIdx);
+                const OUString aModulName = aMacro.getToken(0, '.', nIdx);
+
+                // Currently the "Call" method only resolves 
modulename+macroname
+                mpDocSh->GetBasic()->Call(aModulName + "." + aMacroName);
+            }
+        }
+        break;
+
+        default:
+            break;
+    }
+}
+
+} // end of namespace sd
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/fuexecuteinteraction.hxx 
b/sd/source/ui/inc/fuexecuteinteraction.hxx
new file mode 100644
index 000000000000..1fb733b559c9
--- /dev/null
+++ b/sd/source/ui/inc/fuexecuteinteraction.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include "fupoor.hxx"
+
+#include <com/sun/star/media/XPlayer.hpp>
+
+namespace sd
+{
+class FuExecuteInteraction : public FuPoor
+{
+public:
+    static rtl::Reference<FuPoor> Create(ViewShell* pViewSh, ::sd::Window* 
pWin, ::sd::View* pView,
+                                         SdDrawDocument* pDoc, SfxRequest& 
rReq);
+    virtual void DoExecute(SfxRequest& rReq) override;
+
+private:
+    FuExecuteInteraction(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* 
pView,
+                         SdDrawDocument* pDoc, SfxRequest& rReq);
+
+    css::uno::Reference<css::media::XPlayer> mxPlayer;
+};
+
+} // end of namespace sd
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b6933d934182..0c0f17717bf8 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -148,6 +148,7 @@
 #include <fuconnct.hxx>
 #include <fucopy.hxx>
 #include <fudspord.hxx>
+#include <fuexecuteinteraction.hxx>
 #include <fuexpand.hxx>
 #include <fuinsert.hxx>
 #include <fuinsfil.hxx>
@@ -1638,6 +1639,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
         }
         break;
 
+        case SID_EXECUTE_ANIMATION_EFFECT:
+        {
+            SetCurrentFunction(FuExecuteInteraction::Create(this, 
GetActiveWindow(),
+                                                            mpDrawView.get(), 
GetDoc(), rReq));
+            Cancel();
+        }
+        break;
+
         case SID_LINEEND_POLYGON:
         {
             SetCurrentFunction( FuLineEnd::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 21884ee6a58e..1e663a8e4b61 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -744,6 +744,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
         rSet.ClearItem(SID_ANIMATION_OBJECTS);
         rSet.DisableItem(SID_ANIMATION_OBJECTS);
         rSet.DisableItem(SID_ANIMATION_EFFECTS);
+        rSet.DisableItem(SID_EXECUTE_ANIMATION_EFFECT);
 
         if (meEditMode == EditMode::MasterPage)
             rSet.DisableItem(SID_MODIFYPAGE);
@@ -761,6 +762,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
         rSet.ClearItem(SID_ANIMATION_OBJECTS);
         rSet.DisableItem(SID_ANIMATION_OBJECTS);
         rSet.DisableItem(SID_ANIMATION_EFFECTS);
+        rSet.DisableItem(SID_EXECUTE_ANIMATION_EFFECT);
         rSet.DisableItem(SID_RENAMEPAGE);
         rSet.DisableItem(SID_RENAMEPAGE_QUICK);
         rSet.DisableItem(SID_INSERTLAYER);
@@ -1289,6 +1291,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
             rSet.ClearItem(SID_OBJECT_ROTATE);
             rSet.ClearItem(SID_FM_CONFIG);
             rSet.ClearItem(SID_ANIMATION_EFFECTS);
+            rSet.ClearItem(SID_EXECUTE_ANIMATION_EFFECT);
             rSet.ClearItem(SID_ANIMATION_OBJECTS);
             rSet.ClearItem(SID_3D_WIN);
 
@@ -1309,6 +1312,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
             rSet.DisableItem(SID_POSITION);
             rSet.DisableItem(SID_FM_CONFIG);
             rSet.DisableItem(SID_ANIMATION_EFFECTS);
+            rSet.DisableItem(SID_EXECUTE_ANIMATION_EFFECT);
             rSet.DisableItem(SID_ANIMATION_OBJECTS);
             rSet.DisableItem(SID_3D_WIN);
         }
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 7a5eeb2f4dfd..32e05aefa4da 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -20,6 +20,7 @@
 #include <DrawViewShell.hxx>
 #include <com/sun/star/embed/EmbedMisc.hpp>
 #include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/presentation/ClickAction.hpp>
 #include <svl/aeitem.hxx>
 #include <svx/svxids.hrc>
 #include <svx/globl3d.hxx>
@@ -41,6 +42,7 @@
 
 #include <app.hrc>
 
+#include <anminfo.hxx>
 #include <Outliner.hxx>
 #include <sdpage.hxx>
 #include <fupoor.hxx>
@@ -103,11 +105,14 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
             SfxItemState::DEFAULT == rSet.GetItemState( SID_ORIGINAL_SIZE ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_SAVE_GRAPHIC ) ||
             SfxItemState::DEFAULT == rSet.GetItemState( SID_COMPRESS_GRAPHIC ) 
||
-            SfxItemState::DEFAULT == rSet.GetItemState( SID_TEXTATTR_DLG ) )
+            SfxItemState::DEFAULT == rSet.GetItemState( SID_TEXTATTR_DLG ) ||
+            SfxItemState::DEFAULT == rSet.GetItemState( 
SID_EXECUTE_ANIMATION_EFFECT ))
         {
             const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
             const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* 
>(pObj);
             const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* 
>(pObj);
+            const SdAnimationInfo* pAnimationInfo
+                = 
SdDrawDocument::GetAnimationInfo(rMarkList.GetMark(0)->GetMarkedSdrObj());
             SdrInventor nInv = pObj->GetObjInventor();
             sal_uInt16  nId  = pObj->GetObjIdentifier();
             SdrObjTransformInfoRec aInfoRec;
@@ -127,6 +132,17 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
                 rSet.DisableItem(SID_COMPRESS_GRAPHIC);
             }
 
+            if (!pAnimationInfo
+                || pAnimationInfo->meClickAction == 
presentation::ClickAction::ClickAction_NONE
+                // Sound does not work in edit mode
+                || pAnimationInfo->meClickAction == 
presentation::ClickAction::ClickAction_SOUND
+                // No point in exiting the presentation in edit mode
+                || pAnimationInfo->meClickAction
+                       == 
presentation::ClickAction::ClickAction_STOPPRESENTATION)
+            {
+                rSet.DisableItem(SID_EXECUTE_ANIMATION_EFFECT);
+            }
+
             /* If it is not a group object or 3D object, we disable "enter
                group". */
             if( !( ( dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr && 
nInv == SdrInventor::Default ) ||
@@ -486,6 +502,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
         rSet.DisableItem(SID_EQUALIZEHEIGHT);
         rSet.DisableItem( SID_CONNECT );
         rSet.DisableItem( SID_ANIMATION_EFFECTS );
+        rSet.DisableItem( SID_EXECUTE_ANIMATION_EFFECT );
         rSet.DisableItem( SID_MODIFY_FIELD );
         rSet.DisableItem (SID_OBJECT_SHEAR);
     }
diff --git a/sd/uiconfig/simpress/popupmenu/3dobject.xml 
b/sd/uiconfig/simpress/popupmenu/3dobject.xml
index 39a6d907153e..5356cb0a80ba 100644
--- a/sd/uiconfig/simpress/popupmenu/3dobject.xml
+++ b/sd/uiconfig/simpress/popupmenu/3dobject.xml
@@ -63,5 +63,6 @@
   <menu:menuitem menu:id=".uno:LeaveGroup"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/3dscene.xml 
b/sd/uiconfig/simpress/popupmenu/3dscene.xml
index adb15e5b83fa..e372150e1819 100644
--- a/sd/uiconfig/simpress/popupmenu/3dscene.xml
+++ b/sd/uiconfig/simpress/popupmenu/3dscene.xml
@@ -57,4 +57,5 @@
   <menu:menuitem menu:id=".uno:EnterGroup"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/3dscene2.xml 
b/sd/uiconfig/simpress/popupmenu/3dscene2.xml
index f302e9cad1f3..7b8303f114ef 100644
--- a/sd/uiconfig/simpress/popupmenu/3dscene2.xml
+++ b/sd/uiconfig/simpress/popupmenu/3dscene2.xml
@@ -58,4 +58,5 @@
   <menu:menuitem menu:id=".uno:Window3D"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/connector.xml 
b/sd/uiconfig/simpress/popupmenu/connector.xml
index ee990bdae252..d74c3e12550b 100644
--- a/sd/uiconfig/simpress/popupmenu/connector.xml
+++ b/sd/uiconfig/simpress/popupmenu/connector.xml
@@ -59,5 +59,6 @@
   <menu:menuitem menu:id=".uno:Dismantle"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/curve.xml 
b/sd/uiconfig/simpress/popupmenu/curve.xml
index e92d4f7bbcc9..42e240c0288e 100644
--- a/sd/uiconfig/simpress/popupmenu/curve.xml
+++ b/sd/uiconfig/simpress/popupmenu/curve.xml
@@ -70,5 +70,6 @@
   <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/draw.xml 
b/sd/uiconfig/simpress/popupmenu/draw.xml
index 3f561d2e7dca..30f30e9aa66b 100644
--- a/sd/uiconfig/simpress/popupmenu/draw.xml
+++ b/sd/uiconfig/simpress/popupmenu/draw.xml
@@ -66,5 +66,6 @@
   <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/graphic.xml 
b/sd/uiconfig/simpress/popupmenu/graphic.xml
index c067b5e07858..6a6176e080b2 100644
--- a/sd/uiconfig/simpress/popupmenu/graphic.xml
+++ b/sd/uiconfig/simpress/popupmenu/graphic.xml
@@ -75,5 +75,6 @@
   <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/group.xml 
b/sd/uiconfig/simpress/popupmenu/group.xml
index 12e5c6c68061..ff06b667c015 100644
--- a/sd/uiconfig/simpress/popupmenu/group.xml
+++ b/sd/uiconfig/simpress/popupmenu/group.xml
@@ -62,4 +62,5 @@
   <menu:menuitem menu:id=".uno:EnterGroup"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/line.xml 
b/sd/uiconfig/simpress/popupmenu/line.xml
index b27476bde8ac..e7d7e51c9a2b 100644
--- a/sd/uiconfig/simpress/popupmenu/line.xml
+++ b/sd/uiconfig/simpress/popupmenu/line.xml
@@ -63,5 +63,6 @@
   <menu:menuitem menu:id=".uno:Dismantle"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/measure.xml 
b/sd/uiconfig/simpress/popupmenu/measure.xml
index a243c3d3e861..4c309e501ccc 100644
--- a/sd/uiconfig/simpress/popupmenu/measure.xml
+++ b/sd/uiconfig/simpress/popupmenu/measure.xml
@@ -70,5 +70,6 @@
   <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
   <menu:menuitem menu:id=".uno:EditStyle"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/media.xml 
b/sd/uiconfig/simpress/popupmenu/media.xml
index 44f2eff073d3..90500a5db217 100644
--- a/sd/uiconfig/simpress/popupmenu/media.xml
+++ b/sd/uiconfig/simpress/popupmenu/media.xml
@@ -43,4 +43,5 @@
   <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/multiselect.xml 
b/sd/uiconfig/simpress/popupmenu/multiselect.xml
index 14d619ec4fa9..a326620e50a5 100644
--- a/sd/uiconfig/simpress/popupmenu/multiselect.xml
+++ b/sd/uiconfig/simpress/popupmenu/multiselect.xml
@@ -78,4 +78,5 @@
   <menu:menuitem menu:id=".uno:LeaveGroup"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/oleobject.xml 
b/sd/uiconfig/simpress/popupmenu/oleobject.xml
index ddfb12f574d0..da68eab8c76a 100644
--- a/sd/uiconfig/simpress/popupmenu/oleobject.xml
+++ b/sd/uiconfig/simpress/popupmenu/oleobject.xml
@@ -65,5 +65,5 @@
   <menu:menuitem menu:id=".uno:ObjectTitleDescription"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
-  <menu:menuseparator/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
diff --git a/sd/uiconfig/simpress/popupmenu/textbox.xml 
b/sd/uiconfig/simpress/popupmenu/textbox.xml
index 04f8fa65288f..cde7d9234f48 100644
--- a/sd/uiconfig/simpress/popupmenu/textbox.xml
+++ b/sd/uiconfig/simpress/popupmenu/textbox.xml
@@ -64,4 +64,5 @@
   <menu:menuitem menu:id=".uno:EditStyle"/>
   <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:AnimationEffects"/>
+  <menu:menuitem menu:id=".uno:ExecuteAnimationEffect"/>
 </menu:menupopup>
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to