📄 paragraph.html
字号:
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#getText()">getText</A></B>()</CODE>
<BR>
获得段落的文本内容。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html" title="application.workbooks.workbook.documents.document.paragraphs 中的类">Paragraph</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#nextParagraph()">nextParagraph</A></B>()</CODE>
<BR>
得到当前段落的下一个段落。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html" title="application.workbooks.workbook.documents.document.paragraphs 中的类">Paragraph</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#previousParagraph()">previousParagraph</A></B>()</CODE>
<BR>
得到当前段落的上一个段落。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setBorderAttribute(application.workbooks.workbook.style.border.BorderAttribute)">setBorderAttribute</A></B>(<A HREF="../../../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类">BorderAttribute</A> borderAttribute)</CODE>
<BR>
对当前段落设置段落边框。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setColumn(application.workbooks.workbook.documents.document.Column)">setColumn</A></B>(<A HREF="../../../../../../application/workbooks/workbook/documents/document/Column.html" title="application.workbooks.workbook.documents.document 中的类">Column</A> column)</CODE>
<BR>
设置当前段落的分栏属性。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setDropCap(application.workbooks.workbook.documents.document.paragraphs.DropCap)">setDropCap</A></B>(<A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/DropCap.html" title="application.workbooks.workbook.documents.document.paragraphs 中的类">DropCap</A> dropCap)</CODE>
<BR>
给当前段落设置首字下沉属性。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setFontAttribute(application.workbooks.workbook.style.font.FontAttribute)">setFontAttribute</A></B>(<A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A> fontAttribute)</CODE>
<BR>
对当前段落的字符串进行格式化字体(默认情况下替换原先的属性)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setFontAttribute(application.workbooks.workbook.style.font.FontAttribute, boolean)">setFontAttribute</A></B>(<A HREF="../../../../../../application/workbooks/workbook/style/font/FontAttribute.html" title="application.workbooks.workbook.style.font 中的类">FontAttribute</A> fontAttribute,
boolean replace)</CODE>
<BR>
对当前段落的字符串进行格式化字体。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setOutlineLevel(int)">setOutlineLevel</A></B>(int level)</CODE>
<BR>
设置当前段落的大纲级别</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute)">setParagraphAttribute</A></B>(<A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A> paragraphAttribute)</CODE>
<BR>
对当前段落进行段落格式化(默认情况下替换原先的属性)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setParagraphAttribute(application.workbooks.workbook.style.paragraph.ParagraphAttribute, boolean)">setParagraphAttribute</A></B>(<A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A> paragraphAttribute,
boolean replace)</CODE>
<BR>
对当前段落进行段落格式化。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#setShadingAttribute(application.workbooks.workbook.style.border.ShadingAttribute)">setShadingAttribute</A></B>(<A HREF="../../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A> shadingAttribute)</CODE>
<BR>
对当前段落设置段落底纹。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/paragraphs/Paragraph.html#tcscConverter(boolean)">tcscConverter</A></B>(boolean sctc)</CODE>
<BR>
对当前段落进行简繁体转换。</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>从类 java.lang.Object 继承的方法</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>方法详细信息</B></FONT></TH>
</TR>
</TABLE>
<A NAME="autoFormat()"><!-- --></A><H3>
autoFormat</H3>
<PRE>
public void <B>autoFormat</B>()</PRE>
<DL>
<DD>对当前段落执行自动格式化(脚注尾注没有此功能)。 <p> 使用前可以先调用 application.workbooks.workbook.autotext.AutoFormat中的静态方法进行设置Flag <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); baseText.insertText(0,"replace fraction test 1/2 \ntest end"); Paragraphs paragraphs = baseText.getParagraphs(); Paragraph paragraph = paragraphs.getFirst(); AutoFormat.setReplaceFractionFlag(true); paragraph.autoFormat(); </pre>
<P>
<DD><DL>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域<DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/autotext/AutoFormat.html" title="application.workbooks.workbook.autotext 中的类"><CODE>AutoFormat</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="changeCase(int)"><!-- --></A><H3>
changeCase</H3>
<PRE>
public void <B>changeCase</B>(int type)</PRE>
<DL>
<DD>对当前段落的字符串更改大小写。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 更改大小写的类型。只能取以下值之一: <pre> ChangeCaseConstants.SENTENCECASE 表示句首字母大写 ChangeCaseConstants.LOWERCASE 表示小写 ChangeCaseConstants.UPPERCASE 表示大写 ChangeCaseConstants.TITLECASE 表示词首字母大写 ChangeCaseConstants.TOGGLECASE 对所选内容进行大小写转换,即大写字母转换为小写,小写字母转换为大写 </pre> <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.changeCase(ChangeCaseConstants.UPPERCASE); </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/ChangeCaseConstants.html" title="application.constants 中的接口"><CODE>ChangeCaseConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="clearFormats()"><!-- --></A><H3>
clearFormats</H3>
<PRE>
public void <B>clearFormats</B>()</PRE>
<DL>
<DD>清除当前段落的格式。 <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.clearFormats(); </pre>
<P>
<DD><DL>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当指定区域中存在保护区域</DL>
</DD>
</DL>
<HR>
<A NAME="formatStyle(application.workbooks.workbook.documents.document.styles.Style, boolean)"><!-- --></A><H3>
formatStyle</H3>
<PRE>
public void <B>formatStyle</B>(<A HREF="../../../../../../application/workbooks/workbook/documents/document/styles/Style.html" title="application.workbooks.workbook.documents.document.styles 中的类">Style</A> style,
boolean replace)</PRE>
<DL>
<DD>对当前段落格式化其样式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>style</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(); Styles styles = doc.getStyles(); Style style = styles.getStyle("标题 1"); paragraph.formatStyle(style,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/documents/document/styles/Style.html" title="application.workbooks.workbook.documents.document.styles 中的类"><CODE>Style</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getBorderAttribute()"><!-- --></A><H3>
getBorderAttribute</H3>
<PRE>
public <A HREF="../../../../../../application/workbooks/workbook/style/border/BorderAttribute.html" title="application.workbooks.workbook.style.border 中的类">BorderAttribute</A> <B>getBorderAttribute</B>()</PRE>
<DL>
<DD>得到当前段落边框属性。
<P>
<DD><DL>
<DT><B>返回:</B><DD>边框属性 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -