public MockShape(Microsoft.Office.Core.MsoShapeType type = Microsoft.Office.Core.MsoShapeType.msoTextBox,int z = 1) { this.textEffect = new MockTextEffectFormat(); this.textFrame = new MockTextFrame2(); this.fill = new MockFillFormat(); this.type = type; //default = tb this.z = 1; this.id = Int32.Parse(Settings.NextRandomValue().Split('-')[0]); }
public MockShape(Microsoft.Office.Core.MsoShapeType type = Microsoft.Office.Core.MsoShapeType.msoTextBox, int z = 1) { this.textEffect = new MockTextEffectFormat(); this.textFrame = new MockTextFrame2(); this.fill = new MockFillFormat(); this.type = type; //default = tb this.z = 1; this.id = Int32.Parse(Settings.NextRandomValue().Split('-')[0]); }
public static TextRange ConvertTextRange2ToTextRange(TextRange2 textRange2) { TextFrame2 textFrame2 = textRange2.Parent as TextFrame2; if (textFrame2 == null) { return(null); } Shape shape = textFrame2.Parent as Shape; return(shape == null ? null : shape.TextFrame.TextRange); }
public void extractIndentLevels(PPT.Shape shape) { List <int> indentlevelList = new List <int>(); PPT.TextFrame2 Textframe2 = shape.TextFrame2; foreach (Microsoft.Office.Core.TextRange2 text in Textframe2.TextRange.Lines) { int i = text.ParagraphFormat.IndentLevel; if (indentlevelList.IndexOf(i) == -1) { indentlevelList.Add(i); } } if (indentlevelList.Count > MaxIndentLevel) { MaxIndentLevel = indentlevelList.Count; } }