private void CreateTriggerAndCompare(Shape selectedShape, int testSlideNo, int expectedSlideNo)
        {
            PowerPointSlide currentSlide = PowerPointSlide.FromSlideFactory(PpOperations.GetCurrentSlide());

            Shape triggerShape = CreateTooltip.GenerateTriggerShapeWithReferenceCallout(currentSlide, selectedShape);

            ConvertToTooltip.AddTriggerAnimation(currentSlide, triggerShape, selectedShape);
            AssertIsSame(testSlideNo, expectedSlideNo);
        }
Beispiel #2
0
        protected override void ExecuteAction(string ribbonId)
        {
            this.StartNewUndoEntry();
            PowerPointSlide currentSlide = this.GetCurrentSlide();
            Selection       selection    = this.GetCurrentSelection();

            if (currentSlide == null || !ShapeUtil.IsSelectionShape(selection))
            {
                return;
            }

            foreach (PowerPoint.Shape selectedShape in selection.ShapeRange)
            {
                PowerPoint.Shape triggerShape = CreateTooltip.GenerateTriggerShapeWithReferenceCallout(currentSlide, selectedShape);
                ConvertToTooltip.AddTriggerAnimation(currentSlide, triggerShape, selectedShape);
            }

            if (!this.GetApplication().CommandBars.GetPressedMso(TooltipsLabConstants.AnimationPaneName))
            {
                this.GetApplication().CommandBars.ExecuteMso(TooltipsLabConstants.AnimationPaneName);
            }
        }