/// <summary> /// Initializes a new instance of the <see cref="Table"/> class. /// </summary> /// <param name="document">The document.</param> /// <param name="node">The node.</param> public Table(IDocument document, XElement node) { Document = document; Node = node; Rows = new RowCollection(); ColumnCollection = new ColumnCollection(); Forms = new ODFFormCollection(); _forms.Clearing += FormsCollection_Clear; _forms.Removed += FormCollection_Removed; }
/// <summary> /// Initializes a new instance of the <see cref="Table"/> class. /// </summary> /// <param name="document">The spreadsheet document.</param> /// <param name="name">The name.</param> /// <param name="styleName">Name of the style.</param> public Table(IDocument document, string name, string styleName) { Document = document; Node = new XElement(Ns.Table + "table"); Node.SetAttributeValue(Ns.Table + "style-name", styleName); Node.SetAttributeValue(Ns.Table + "name", name); TableStyle = document.StyleFactory.Request <TableStyle>(styleName); Rows = new RowCollection(); ColumnCollection = new ColumnCollection(); Forms = new ODFFormCollection(); }
/// <summary> /// Create a new TextDocument object. /// </summary> public TextDocument() { this._fields = new FieldsCollection(); this.Content = new ContentCollection(); this.Styles = new StyleCollection(); this.m_styleFactory = new StyleFactory(this); this.CommonStyles = new StyleCollection(); this.FontList = new ArrayList(); this._graphics = new ArrayList(); this._formCollection = new ODFFormCollection(); this._formCollection.Clearing += FormsCollection_Clear; this._formCollection.Removed += FormsCollection_Removed; this.VariableDeclarations = new VariableDeclCollection(); }
public ODFForm(XmlNode node, IDocument document) { Document = document; this.Node = node; _controls = new ODFControlsCollection(); _controls.Inserted += ControlsCollection_Inserted; _controls.Removed += ControlsCollection_Removed; _controls.Clearing += ControlsCollection_Clearing; _properties = new FormPropertyCollection(); _properties.Inserted += PropertyCollection_Inserted; _properties.Removed += PropertyCollection_Removed; _formCollection = new ODFFormCollection(); _formCollection.Inserted += FormCollection_Inserted; _formCollection.Removed += FormCollection_Removed; }
public ODFForm(XElement node, IDocument document) { Document = document; Node = node; Controls = new ODFControlsCollection(); Controls.Inserted += ControlsCollection_Inserted; Controls.Removed += ControlsCollection_Removed; Controls.Clearing += ControlsCollection_Clearing; Properties = new FormPropertyCollection(); Properties.Inserted += PropertyCollection_Inserted; Properties.Removed += PropertyCollection_Removed; _formCollection = new ODFFormCollection(); _formCollection.Inserted += FormCollection_Inserted; _formCollection.Removed += FormCollection_Removed; }
/// <summary> /// Create a blank new document. /// </summary> public TextDocument New() { _xmldoc = XDocument.Parse(TextDocumentHelper.GetBlankDocument()); Styles = new StyleCollection(); DocumentConfigurations2 = new DocumentConfiguration2(); DocumentManifest = new DocumentManifest(); DocumentManifest.New(); DocumentMetadata = new DocumentMetadata(this); DocumentMetadata.New(); DocumentPictures = new DocumentPictureCollection(); DocumentSetting = new DocumentSetting(); DocumentSetting.New(); DocumentStyles = new DocumentStyles(); DocumentStyles.New(this); ReadCommonStyles(); Forms = new ODFFormCollection(); _formCollection.Clearing += FormsCollection_Clear; _formCollection.Removed += FormsCollection_Removed; Fields.Clear(); Content.Clear(); VariableDeclarations = new VariableDeclCollection(); DocumentThumbnails = new DocumentPictureCollection(); MasterPageFactory.RenameMasterStyles( DocumentStyles.Styles, XmlDoc); // Read the moved and renamed styles LocalStyleProcessor lsp = new LocalStyleProcessor(this, false); lsp.ReReadKnownAutomaticStyles(); new MasterPageFactory().FillFromXMLDocument(this); return(this); }
/// <summary> /// Create a new TextDocument object. /// </summary> public TextDocument() { _fields = new FieldsCollection(); Content = new ContentCollection(); Styles = new StyleCollection(); m_styleFactory = new StyleFactory(this); CommonStyles = new StyleCollection(); FontList = new List <string>(); _graphics = new List <Graphic>(); _formCollection = new ODFFormCollection(); _formCollection.Clearing += FormsCollection_Clear; _formCollection.Removed += FormsCollection_Removed; VariableDeclarations = new VariableDeclCollection(); _customFiles = new CustomFileCollection(); _customFiles.Clearing += CustomFiles_Clearing; _customFiles.Inserting += CustomFiles_Inserting; _customFiles.Removing += CustomFiles_Removing; }
/// <summary> /// Creates an ODFForm /// </summary> /// <param name="document">Parent document</param> /// <param name="name">Form name</param> public ODFForm(IDocument document, string name) { Document = document; CreateBasicNode(); this.ControlImplementation = "ooo:com.sun.star.form.component.Form"; this.ApplyFilter = XmlBoolean.True; this.CommandType = CommandType.Table; this.Name = name; _controls = new ODFControlsCollection(); _controls.Inserted += ControlsCollection_Inserted; _controls.Removed += ControlsCollection_Removed; _controls.Clearing += ControlsCollection_Clearing; _properties = new FormPropertyCollection(); _properties.Inserted += PropertyCollection_Inserted; _properties.Removed += PropertyCollection_Removed; _formCollection = new ODFFormCollection(); _formCollection.Inserted += FormCollection_Inserted; _formCollection.Removed += FormCollection_Removed; }
/// <summary> /// Create a new TextDocument object. /// </summary> public TextDocument() { this._fields = new FieldsCollection(); this.Content = new ContentCollection(); this.Styles = new StyleCollection(); this.m_styleFactory = new StyleFactory(this); this.CommonStyles = new StyleCollection(); this.FontList = new ArrayList(); this._graphics = new ArrayList(); this._formCollection = new ODFFormCollection(); this._formCollection.Clearing += FormsCollection_Clear; this._formCollection.Removed += FormsCollection_Removed; this.VariableDeclarations = new VariableDeclCollection(); }
public ODFForm(XmlNode node, IDocument document) { Document = document; this.Node = node; _controls = new ODFControlsCollection(); _controls.Inserted +=ControlsCollection_Inserted; _controls.Removed +=ControlsCollection_Removed; _controls.Clearing += ControlsCollection_Clearing; _properties = new FormPropertyCollection(); _properties.Inserted += PropertyCollection_Inserted; _properties.Removed += PropertyCollection_Removed; _formCollection = new ODFFormCollection(); _formCollection.Inserted += FormCollection_Inserted; _formCollection.Removed += FormCollection_Removed; }
/// <summary> /// Creates an ODFForm /// </summary> /// <param name="document">Parent document</param> /// <param name="name">Form name</param> public ODFForm(IDocument document, string name) { Document = document; CreateBasicNode(); this.ControlImplementation = "ooo:com.sun.star.form.component.Form"; this.ApplyFilter = XmlBoolean.True; this.CommandType = CommandType.Table; this.Name = name; _controls = new ODFControlsCollection(); _controls.Inserted += ControlsCollection_Inserted; _controls.Removed += ControlsCollection_Removed; _controls.Clearing += ControlsCollection_Clearing; _properties = new FormPropertyCollection(); _properties.Inserted += PropertyCollection_Inserted; _properties.Removed += PropertyCollection_Removed; _formCollection = new ODFFormCollection(); _formCollection.Inserted += FormCollection_Inserted; _formCollection.Removed += FormCollection_Removed; }