public void AddTextToFrame(ref XTextFrame textFrame, String text, int charWeight = 100, int charHeight = 12) { if (textFrame != null) { XText xText = ((XTextFrame)textFrame).getText(); XTextCursor xFrameTextCurser = xText.createTextCursor(); xFrameTextCurser.gotoEnd(false); OoUtils.SetProperty(xFrameTextCurser, "CharWeight", charWeight); OoUtils.SetProperty(xFrameTextCurser, "CharHeight", charHeight); xText.insertString(xFrameTextCurser, text, false); } }
public void AddTextToFrameAndNewParagraph(ref XTextFrame textFrame, String text, int charWeight = 100, int charHeight = 12) { if (textFrame != null) { XText xText = ((XTextFrame)textFrame).getText(); XTextCursor xFrameTextCurser = xText.createTextCursor(); xFrameTextCurser.gotoEnd(false); OoUtils.SetProperty(xFrameTextCurser, "CharWeight", charWeight); OoUtils.SetProperty(xFrameTextCurser, "CharHeight", charHeight); xText.insertString(xFrameTextCurser, text, false); xText.insertControlCharacter(xFrameTextCurser, ControlCharacter.PARAGRAPH_BREAK, false); } }
public XTextTable AddTableToFrame(ref XTextFrame textFrame, int col, int rows) { var Table = this.xMcFactory.createInstanceWithContext(OO.Services.TEXT_TEXT_TABLE, xContext); if (Table != null) { if (Table is XTextTable) { ((XTextTable)Table).initialize(rows, col); } XText xText = ((XTextFrame)textFrame).getText(); XTextCursor xFrameTextCurser = xText.createTextCursor(); xFrameTextCurser.gotoEnd(false); xText.insertTextContent(xFrameTextCurser, Table as XTextContent, false); xText.insertControlCharacter(xFrameTextCurser, ControlCharacter.PARAGRAPH_BREAK, false); } return(Table as XTextTable); }
public void AddTextToFrameAndNewParagraph(ref XTextFrame textFrame, String text, int charWeight = 100, int charHeight = 12) { if (textFrame != null) { XText xText = ((XTextFrame)textFrame).getText(); XTextCursor xFrameTextCurser = xText.createTextCursor(); xFrameTextCurser.gotoEnd(false); OoUtils.SetProperty(xFrameTextCurser, "CharWeight", charWeight); OoUtils.SetProperty(xFrameTextCurser, "CharHeight", charHeight); xText.insertString(xFrameTextCurser, text, false); xText.insertControlCharacter(xFrameTextCurser, ControlCharacter.PARAGRAPH_BREAK, false); } }
public XTextTable AddTableToFrame(ref XTextFrame textFrame, int col, int rows) { var Table = this.xMcFactory.createInstanceWithContext(OO.Services.TEXT_TEXT_TABLE, xContext); if (Table != null) { if (Table is XTextTable) { ((XTextTable)Table).initialize(rows, col); } XText xText = ((XTextFrame)textFrame).getText(); XTextCursor xFrameTextCurser = xText.createTextCursor(); xFrameTextCurser.gotoEnd(false); xText.insertTextContent(xFrameTextCurser, Table as XTextContent, false); xText.insertControlCharacter(xFrameTextCurser, ControlCharacter.PARAGRAPH_BREAK, false); } return Table as XTextTable; }
public void AddTextToFrame(ref XTextFrame textFrame, String text, int charWeight = 100, int charHeight = 12) { if (textFrame != null) { XText xText = ((XTextFrame)textFrame).getText(); XTextCursor xFrameTextCurser = xText.createTextCursor(); xFrameTextCurser.gotoEnd(false); OoUtils.SetProperty(xFrameTextCurser, "CharWeight", charWeight); OoUtils.SetProperty(xFrameTextCurser, "CharHeight", charHeight); xText.insertString(xFrameTextCurser, text, false); } }