Exemple #1
0
        internal void FromLocation(Location loc)
        {
            this.SetAllNull();

            if (loc.Reference != null)
            {
                this.Reference = SLTool.TranslateReferenceToCellPointRange(loc.Reference.Value);
            }
            if (loc.FirstHeaderRow != null)
            {
                this.FirstHeaderRow = loc.FirstHeaderRow.Value;
            }
            if (loc.FirstDataRow != null)
            {
                this.FirstDataRow = loc.FirstDataRow.Value;
            }
            if (loc.FirstDataColumn != null)
            {
                this.FirstDataColumn = loc.FirstDataColumn.Value;
            }
            if (loc.RowPageCount != null)
            {
                this.RowPageCount = loc.RowPageCount.Value;
            }
            if (loc.ColumnsPerPage != null)
            {
                this.ColumnsPerPage = loc.ColumnsPerPage.Value;
            }
        }
        internal void FromHyperlink(Hyperlink hl)
        {
            this.SetAllNull();

            this.IsNew = false;

            if (hl.Reference != null)
            {
                this.Reference = SLTool.TranslateReferenceToCellPointRange(hl.Reference.Value);
            }

            if (hl.Id != null)
            {
                // At least I think if there's a relationship ID, it's an external link.
                this.IsExternal = true;
                this.Id         = hl.Id.Value;
            }

            if (hl.Location != null)
            {
                this.Location = hl.Location.Value;
            }
            if (hl.Tooltip != null)
            {
                this.ToolTip = hl.Tooltip.Value;
            }
            if (hl.Display != null)
            {
                this.Display = hl.Display.Value;
            }
        }