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); }
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); } }