本文整理匯總了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;
}
示例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;
}
示例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;
}