public void TestStartBoxingWithTextWrapping() { PpOperations.SelectSlide(2); Microsoft.Office.Interop.PowerPoint.ShapeRange shapes = PpOperations.SelectShapesByPrefix("TextBox"); TextBoxes textBoxes = new TextBoxes(shapes, Pres.PageSetup.SlideWidth, Pres.PageSetup.SlideHeight); textBoxes.StartTextWrapping(); textBoxes .SetAlignment(Alignment.Centre) .SetPosition(Position.Left) .StartBoxing(); TextBoxInfo textBoxInfo = textBoxes.GetTextBoxesInfo(); Assert.IsTrue(SlideUtil.IsRoughlySame(105.040009f, textBoxInfo.Height)); Assert.IsTrue(SlideUtil.IsRoughlySame(25.00004f, textBoxInfo.Left)); Assert.IsTrue(SlideUtil.IsRoughlySame(217.480042f, textBoxInfo.Top)); // aft text wrapping, width is smaller (originally should be 710) Assert.IsTrue(SlideUtil.IsRoughlySame(365.47f, textBoxInfo.Width)); }
public void TestStartBoxingWithTextWrapping() { PpOperations.SelectSlide(2); var shapes = PpOperations.SelectShapesByPrefix("TextBox"); var textBoxes = new TextBoxes(shapes, Pres.PageSetup.SlideWidth, Pres.PageSetup.SlideHeight); textBoxes.StartTextWrapping(); textBoxes .SetAlignment(Alignment.Centre) .SetPosition(Position.Left) .StartBoxing(); var textBoxInfo = textBoxes.GetTextBoxesInfo(); Assert.IsTrue(SlideUtil.IsRoughlySame(349.440033f, textBoxInfo.Height)); Assert.IsTrue(SlideUtil.IsRoughlySame(25f, textBoxInfo.Left)); Assert.IsTrue(SlideUtil.IsRoughlySame(95.27996f, textBoxInfo.Top)); // aft text wrapping, width is smaller (originally should be 710) Assert.IsTrue(SlideUtil.IsRoughlySame(448.355042f, textBoxInfo.Width)); }