當前位置: 首頁>>代碼示例>>C#>>正文


C# XSSFFont.SetThemesTable方法代碼示例

本文整理匯總了C#中NPOI.XSSF.UserModel.XSSFFont.SetThemesTable方法的典型用法代碼示例。如果您正苦於以下問題:C# XSSFFont.SetThemesTable方法的具體用法?C# XSSFFont.SetThemesTable怎麽用?C# XSSFFont.SetThemesTable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在NPOI.XSSF.UserModel.XSSFFont的用法示例。


在下文中一共展示了XSSFFont.SetThemesTable方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetFontOfFormattingRun

        /**
         * Gets a copy of the font used in a particular formatting Run.
         *
         * @param index     the index of the formatting run
         * @return  A copy of the  font used or null if no formatting is applied to the specified text Run.
         */
        public IFont GetFontOfFormattingRun(int index)
        {
            if (st.sizeOfRArray() == 0 || index >= st.sizeOfRArray()) return null;

            CT_RElt r = st.GetRArray(index);
            if (r.rPr != null)
            {
                XSSFFont fnt = new XSSFFont(ToCTFont(r.rPr));
                fnt.SetThemesTable(GetThemesTable());
                return fnt;
            }
            return null;
        }
開發者ID:twxstar,項目名稱:npoi,代碼行數:19,代碼來源:XSSFRichTextString.cs

示例2: GetFontAtIndex

        /**
         * Return a copy of the font in use at a particular index.
         *
         * @param index         The index.
         * @return              A copy of the  font that's currently being applied at that
         *                      index or null if no font is being applied or the
         *                      index is out of range.
         */
        public short GetFontAtIndex(int index)
        {
            if (st.sizeOfRArray() == 0) return -1;

            int pos = 0;
            for (int i = 0; i < st.sizeOfRArray(); i++)
            {
                CT_RElt r = st.GetRArray(i);
                if (index >= pos && index < pos + r.t.Length)
                {
                    XSSFFont fnt = new XSSFFont(ToCTFont(r.rPr));
                    fnt.SetThemesTable(GetThemesTable());
                    return fnt.Index;
                }

                pos += r.t.Length;
            }
            return -1;

        }
開發者ID:twxstar,項目名稱:npoi,代碼行數:28,代碼來源:XSSFRichTextString.cs

示例3: GetFontOfFormattingRun

        /**
         * Gets a copy of the font used in a particular formatting Run.
         *
         * @param index     the index of the formatting run
         * @return  A copy of the  font used or null if no formatting is applied to the specified text Run.
         */
        public IFont GetFontOfFormattingRun(int index)
        {
            if (st.sizeOfRArray() == 0) return null;

            for (int i = 0; i < st.sizeOfRArray(); i++)
            {
                CT_RElt r = st.GetRArray(i);
                if (i == index)
                {
                    XSSFFont fnt = new XSSFFont(ToCTFont(r.rPr));
                    fnt.SetThemesTable(GetThemesTable());
                    return fnt;
                }
            }
            return null;
        }
開發者ID:89sos98,項目名稱:npoi,代碼行數:22,代碼來源:XSSFRichTextString.cs


注:本文中的NPOI.XSSF.UserModel.XSSFFont.SetThemesTable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。