internal void FromSelection(Selection s) { this.SetAllNull(); if (s.Pane != null) { this.Pane = s.Pane.Value; } if (s.ActiveCell != null) { this.ActiveCell = s.ActiveCell.Value; } if (s.ActiveCellId != null) { this.ActiveCellId = s.ActiveCellId.Value; } if (s.SequenceOfReferences != null) { this.SequenceOfReferences = SLTool.TranslateSeqRefToCellPointRange(s.SequenceOfReferences); } }
internal void FromDataValidation(DataValidation dv) { this.SetAllNull(); if (dv.Formula1 != null) { this.Formula1 = dv.Formula1.Text; } if (dv.Formula2 != null) { this.Formula2 = dv.Formula2.Text; } if (dv.Type != null) { this.Type = dv.Type.Value; } if (dv.ErrorStyle != null) { this.ErrorStyle = dv.ErrorStyle.Value; } if (dv.ImeMode != null) { this.ImeMode = dv.ImeMode.Value; } if (dv.Operator != null) { this.Operator = dv.Operator.Value; } if (dv.AllowBlank != null) { this.AllowBlank = dv.AllowBlank.Value; } if (dv.ShowDropDown != null) { this.ShowDropDown = dv.ShowDropDown.Value; } if (dv.ShowInputMessage != null) { this.ShowInputMessage = dv.ShowInputMessage.Value; } if (dv.ShowErrorMessage != null) { this.ShowErrorMessage = dv.ShowErrorMessage.Value; } if (dv.ErrorTitle != null) { this.ErrorTitle = dv.ErrorTitle.Value; } if (dv.Error != null) { this.Error = dv.Error.Value; } if (dv.PromptTitle != null) { this.PromptTitle = dv.PromptTitle.Value; } if (dv.Prompt != null) { this.Prompt = dv.Prompt.Value; } // it has to be not-null because it's a required thing, but you never know... if (dv.SequenceOfReferences != null) { this.SequenceOfReferences = SLTool.TranslateSeqRefToCellPointRange(dv.SequenceOfReferences); } }