示例#1
0
        public XWPFSDT(CT_SdtBlock block, IBody part)
        {
            this.part    = part;
            this.content = new XWPFSDTContent(block.sdtContent, part, this);
            CT_SdtPr         pr      = block.sdtPr;
            List <CT_String> aliases = pr.GetObjectList <CT_String>(SdtPrElementType.alias);

            if (aliases != null && aliases.Count > 0)
            {
                title = aliases[0].val;
            }
            else
            {
                title = "";
            }
            CT_String[] array = pr.GetObjectList <CT_String>(SdtPrElementType.tag).ToArray();
            if (array != null && array.Length > 0)
            {
                tag = array[0].val;
            }
            else
            {
                tag = "";
            }
        }
示例#2
0
文件: XWPFSDT.cs 项目: mdjasim/npoi
        public XWPFSDT(CT_SdtBlock block, IBody part)
        {
            this.part = part;
            this.content = new XWPFSDTContent(block.sdtContent, part, this);
            CT_SdtPr pr = block.sdtPr;
            List<CT_String> aliases = pr.GetObjectList<CT_String>(SdtPrElementType.alias);
            if (aliases != null && aliases.Count > 0)
            {
                title = aliases[0].val;
            }
            else
            {
                title = "";
            }
            CT_String[] array = pr.GetObjectList<CT_String>(SdtPrElementType.tag).ToArray();
            if (array != null && array.Length > 0)
            {
                tag = array[0].val;
            }
            else
            {
                tag = "";
            }

        }