📄 paragraph.html
字号:
<DD>对当前段落的字符串进行格式化字体(默认情况下替换原先的属性)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>fontAttribute</CODE> - 字体属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test1!\nthis is a test2!\nthis is a test3!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); FontAttribute fontAttr = new FontAttribute(); fontAttr.setFontSize(18.0); fontAttr.setBold(true); paragraph.setFontAttribute(fontAttr); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当字体属性值为空
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类"><CODE>FontAttribute</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setFontAttribute(application.workbooks.workbook.style.font.FontAttribute, boolean)"><!-- --></A><H3>
setFontAttribute</H3>
<PRE>
public void <B>setFontAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A> fontAttribute,
boolean replace)</PRE>
<DL>
<DD>对当前段落的字符串进行格式化字体。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>fontAttribute</CODE> - 字体属性<DD><CODE>replace</CODE> - 布尔型值,如果为true,表示替换原先的属性;否则,表示保留原先属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test1!\nthis is a test2!\nthis is a test3!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); FontAttribute fontAttr = new FontAttribute(); fontAttr.setFontSize(18.0); fontAttr.setBold(true); paragraph.setFontAttribute(fontAttr); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当字体属性值为空
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类"><CODE>FontAttribute</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setOutlineLevel(int)"><!-- --></A><H3>
setOutlineLevel</H3>
<PRE>
public void <B>setOutlineLevel</B>(int level)</PRE>
<DL>
<DD>设置当前段落的大纲级别
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>level</CODE> - 段落的大纲级别 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test1!\nthis is a test2!\nthis is a test3!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); paragraph.setOutlineLevel(OutlineLevelConstants.OUT_LINE_LEVEL3); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 文档被保护或指定的位置被保护
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当段落的大纲级别常量不存在<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/constants/OutlineLevelConstants.html" title="application.constants 中的接口"><CODE>OutlineLevelConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute)"><!-- --></A><H3>
setParagraphAttribute</H3>
<PRE>
public void <B>setParagraphAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A> paragraphAttribute)</PRE>
<DL>
<DD>对当前段落进行段落格式化(默认情况下替换原先的属性)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphAttribute</CODE> - 格式化字符的段落属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test1!\nthis is a test2!\nthis is a test3!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); ParagraphAttribute paragraphAttr = new ParagraphAttribute(); paragraphAttr.setAlignment(ParagraphConstants.ALIGNMENT_CENTER); paragraph.setParagraphAttribute(paragraphAttr); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当段落属性值为空
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类"><CODE>ParagraphAttribute</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute, boolean)"><!-- --></A><H3>
setParagraphAttribute</H3>
<PRE>
public void <B>setParagraphAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A> paragraphAttribute,
boolean replace)</PRE>
<DL>
<DD>对当前段落进行段落格式化。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphAttribute</CODE> - 格式化字符的段落属性<DD><CODE>replace</CODE> - 布尔型值,表示是否替换原先的属性。true表示替换原先的属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test1!\nthis is a test2!\nthis is a test3!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); ParagraphAttribute paragraphAttr = new ParagraphAttribute(); paragraphAttr.setAlignment(ParagraphConstants.ALIGNMENT_CENTER); paragraph.setParagraphAttribute(paragraphAttr,false); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当段落属性值为空
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类"><CODE>ParagraphAttribute</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="setShadingAttribute(application.workbooks.workbook.style.border.ShadingAttribute)"><!-- --></A><H3>
setShadingAttribute</H3>
<PRE>
public void <B>setShadingAttribute</B>(<A HREF="../../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A> shadingAttribute)</PRE>
<DL>
<DD>对当前段落设置段落底纹。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>shadingAttribute</CODE> - 要设置的底纹属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"this is a test1!\nthis is a test2!\nthis is a test3!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); ShadingAttribute shadingAttr = baseText.getShadingAttribute(0); shadingAttr.setTextureIndex(8); paragraph.setShadingAttribute(shadingAttr); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当底纹属性值为空
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类"><CODE>ShadingAttribute</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="tcscConverter(boolean)"><!-- --></A><H3>
tcscConverter</H3>
<PRE>
public void <B>tcscConverter</B>(boolean sctc)</PRE>
<DL>
<DD>对当前段落进行简繁体转换。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>sctc</CODE> - 布尔型值,如果为true,则表示简体转换到繁体;否则,表示繁体转换到简体 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"中华人民共和国!\n中华人民共和国!\n中华人民共和国!\n"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); paragraph.tcscConverter(true); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="跳过导航链接"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>概述</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>类</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/DropCap.html" title="application.workbooks.workbook.documents.document.paragraphs 中的类"><B>上一个类</B></A>
下一个类</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?application/workbooks/workbook/documents/document/paragraphs/Paragraph.html" target="_top"><B>框架</B></A>
<A HREF="Paragraph.html" target="_top"><B>无框架</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>所有类</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>所有类</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
摘要: 嵌套 | 字段 | 构造方法 | <A HREF="#method_summary">方法</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
详细信息: 字段 | 构造方法 | <A HREF="#method_detail">方法</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
版权所有 2001-2006 无锡永中科技有限公司
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -