Пример #1
0
        /**
         * This element specifies the height of the current table row within the
         * current table. This height shall be used to determine the resulting
         * height of the table row, which may be absolute or relative (depending on
         * its attribute values). If omitted, then the table row shall automatically
         * resize its height to the height required by its contents (the equivalent
         * of an hRule value of auto).
         *
         * @param height
         */
        public void SetHeight(int height)
        {
            CT_TrPr   properties = GetTrPr();
            CT_Height h          = properties.SizeOfTrHeightArray() == 0 ? properties.AddNewTrHeight() : properties.GetTrHeightArray(0);

            h.val = (ulong)height;
        }
Пример #2
0
        /**
         * This attribute controls whether to repeat a table's header row at the top
         * of a table split across pages.
         * @param repeat - if TRUE, repeat header row at the top of each page of table;
         *                 if FALSE, don't repeat header row.
         */
        public void SetRepeatHeader(bool repeat)
        {
            CT_TrPr  trpr  = GetTrPr();
            CT_OnOff onoff = trpr.AddNewTblHeader();

            onoff.val = (repeat ? ST_OnOff.on : ST_OnOff.off);
        }
Пример #3
0
        /**
         * This attribute controls whether to allow table rows to split across pages.
         * The logic for this attribute is a little unusual: a true value means
         * DON'T allow rows to split, false means allow rows to split.
         * @param split - if true, don't allow rows to be split. If false, allow
         *        rows to be split.
         */
        public void SetCantSplitRow(bool split)
        {
            CT_TrPr  trpr  = GetTrPr();
            CT_OnOff onoff = trpr.AddNewCantSplit();

            onoff.val = (split ? ST_OnOff.on : ST_OnOff.off);
        }
Пример #4
0
        public int GetHeight()
        {
            CT_TrPr trPr = this.GetTrPr();

            if (trPr.SizeOfTrHeightArray() != 0)
            {
                return((int)trPr.GetTrHeightArray(0).val);
            }
            return(0);
        }
Пример #5
0
        public bool IsRepeatHeader()
        {
            bool    flag = false;
            CT_TrPr trPr = this.GetTrPr();

            if (trPr.SizeOfTblHeaderArray() > 0)
            {
                flag = trPr.GetTblHeaderList()[0].val == ST_OnOff.on;
            }
            return(flag);
        }
Пример #6
0
        public bool IsCantSplitRow()
        {
            bool    flag = false;
            CT_TrPr trPr = this.GetTrPr();

            if (trPr.SizeOfCantSplitArray() > 0)
            {
                flag = trPr.GetCantSplitList()[0].val == ST_OnOff.on;
            }
            return(flag);
        }
Пример #7
0
        /**
         * Return true if a table's header row should be repeated at the top of a
         * table split across pages.
         * @return true if table's header row should be repeated at the top of each
         *         page of table, false otherwise.
         */
        public bool IsRepeatHeader()
        {
            bool    repeat = false;
            CT_TrPr trpr   = GetTrPr();

            if (trpr.SizeOfTblHeaderArray() > 0)
            {
                CT_OnOff rpt = trpr.GetTblHeaderList()[0];
                repeat = rpt.val == (ST_OnOff.on);
            }
            return(repeat);
        }
Пример #8
0
        /**
         * Return true if the "can't split row" value is true. The logic for this
         * attribute is a little unusual: a TRUE value means DON'T allow rows to
         * split, FALSE means allow rows to split.
         * @return true if rows can't be split, false otherwise.
         */
        public bool IsCantSplitRow()
        {
            bool    isCant = false;
            CT_TrPr trpr   = GetTrPr();

            if (trpr.SizeOfCantSplitArray() > 0)
            {
                CT_OnOff onoff = trpr.GetCantSplitList()[0];
                isCant = onoff.val == (ST_OnOff.on);
            }
            return(isCant);
        }
Пример #9
0
 public CT_Style()
 {
     this.tblStylePrField = new List<CT_TblStylePr>();
     this.tcPrField = new CT_TcPr();
     this.trPrField = new CT_TrPr();
     this.tblPrField = new CT_TblPrBase();
     this.rPrField = new CT_RPr();
     this.pPrField = new CT_PPr();
     this.rsidField = new CT_LongHexNumber();
     this.personalReplyField = new CT_OnOff();
     this.personalComposeField = new CT_OnOff();
     this.personalField = new CT_OnOff();
     this.lockedField = new CT_OnOff();
     this.qFormatField = new CT_OnOff();
     this.unhideWhenUsedField = new CT_OnOff();
     this.semiHiddenField = new CT_OnOff();
     this.uiPriorityField = new CT_DecimalNumber();
     this.hiddenField = new CT_OnOff();
     this.autoRedefineField = new CT_OnOff();
     this.linkField = new CT_String();
     this.nextField = new CT_String();
     this.basedOnField = new CT_String();
     this.aliasesField = new CT_String();
     this.nameField = new CT_String();
 }
Пример #10
0
        /**
         * This element specifies the height of the current table row within the
         * current table. This height shall be used to determine the resulting
         * height of the table row, which may be absolute or relative (depending on
         * its attribute values). If omitted, then the table row shall automatically
         * resize its height to the height required by its contents (the equivalent
         * of an hRule value of auto).
         *
         * @return height
         */
        public int GetHeight()
        {
            CT_TrPr properties = GetTrPr();

            return(properties.SizeOfTrHeightArray() == 0 ? 0 : (int)properties.GetTrHeightArray(0).val);
        }
Пример #11
0
        public void SetHeight(int height)
        {
            CT_TrPr trPr = this.GetTrPr();

            (trPr.SizeOfTrHeightArray() == 0 ? trPr.AddNewTrHeight() : trPr.GetTrHeightArray(0)).val = (ulong)height;
        }