private void CreateCalloutAndCompare(Shape selectedShape, int testSlideNo, int expectedSlideNo) { PowerPointSlide currentSlide = PowerPointSlide.FromSlideFactory(PpOperations.GetCurrentSlide()); Shape callout = CreateTooltip.GenerateCalloutWithReferenceTriggerShape(currentSlide, selectedShape); ConvertToTooltip.AddTriggerAnimation(currentSlide, selectedShape, callout); AssertIsSame(testSlideNo, expectedSlideNo); }
private void CreateMultipleTriggerAndCompare(ShapeRange selectedShapes, int testSlideNo, int expectedSlideNo) { PowerPointSlide currentSlide = PowerPointSlide.FromSlideFactory(PpOperations.GetCurrentSlide()); foreach (Shape shape in selectedShapes) { Shape triggerShape = CreateTooltip.GenerateTriggerShapeWithReferenceCallout(currentSlide, shape); ConvertToTooltip.AddTriggerAnimation(currentSlide, triggerShape, shape); } AssertIsSame(testSlideNo, expectedSlideNo); }
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); } }
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); } }