本文整理汇总了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;
}