private void CreateMultipleCalloutAndCompare(ShapeRange selectedShapes, int testSlideNo, int expectedSlideNo)
        {
            PowerPointSlide currentSlide = PowerPointSlide.FromSlideFactory(PpOperations.GetCurrentSlide());

            foreach (Shape shape in selectedShapes)
            {
                Shape callout = CreateTooltip.GenerateCalloutWithReferenceTriggerShape(currentSlide, shape);
                ConvertToTooltip.AddTriggerAnimation(currentSlide, shape, callout);
            }

            AssertIsSame(testSlideNo, expectedSlideNo);
        }
Esempio n. 2
0
        protected override void ExecuteAction(string ribbonId)
        {
            this.StartNewUndoEntry();

            PowerPointSlide currentSlide = this.GetCurrentSlide();

            if (currentSlide == null)
            {
                return;
            }

            PowerPoint.Shape triggerShape = CreateTooltip.GenerateTriggerShape(currentSlide);
            PowerPoint.Shape callout      = CreateTooltip.GenerateCalloutWithReferenceTriggerShape(currentSlide, triggerShape);
            ConvertToTooltip.AddTriggerAnimation(currentSlide, triggerShape, callout);

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