📄 paragraphattribute.html
字号:
<P>
<DD><DL>
<DT><B>返回:</B><DD>是否与下段同页,如果同页返回1,否则返回0,如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落是否与下段同页:"+paragraphAttr.getKeepWithNext()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setKeepWithNext(boolean)"><CODE>setKeepWithNext(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getLatinTextToWrapInWord()"><!-- --></A><H3>
getLatinTextToWrapInWord</H3>
<PRE>
public int <B>getLatinTextToWrapInWord</B>()</PRE>
<DL>
<DD>是否允许中文版式中的西文在单词中间换行,该方法只能在中文版本中使用。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果允许中文版式中的西文在单词中间换行,返回1,否则,返回0.如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("是否允许中文版式中的西文在单词中间换行:"+paragraphAttr.getLatinTextToWrapInWord()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setLatinTextToWrapInWord(boolean)"><CODE>setLatinTextToWrapInWord(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getLeftIndent()"><!-- --></A><H3>
getLeftIndent</H3>
<PRE>
public float <B>getLeftIndent</B>()</PRE>
<DL>
<DD>获取段落左缩进距离(默认单位为磅)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>段落左缩进距离,取值范围在-1584到1584之间。如果返回值为9999999表示当前段落属性为三态 说明:get方法默认返回为磅值,如果要用其他的度量单位(英寸、厘米、毫米、十二点活字),可以用 application.util.Utilities.pointToOther(double, int)方法将返回的磅值转换为其他度量单位。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的左缩进距离为:"+paragraphAttr.getLeftIndent()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getLeftIndentOfChar()"><!-- --></A><H3>
getLeftIndentOfChar</H3>
<PRE>
public float <B>getLeftIndentOfChar</B>()</PRE>
<DL>
<DD>获取段落左缩进距离(度量单位为字符)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>段落左缩进距离,取值范围在-316.8到316.8字符之间。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的左缩进字符数:"+paragraphAttr.getLeftIndentOfChar()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getLineSpacingAt()"><!-- --></A><H3>
getLineSpacingAt</H3>
<PRE>
public float <B>getLineSpacingAt</B>()</PRE>
<DL>
<DD>获取段落的行间距(度量单位依据行间距类型可以取字行或磅值)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>段落的行间距。如果行距类型为单倍、1.5倍、双倍行距,则返回不确定的值9999999。 如果行距类型为多倍行距,则参数为行数,范围在0.06到132字行之间。 如果行距类型为最小值、固定值,则参数为磅值,范围在0到1584之间。 如果返回值为9999999表示当前段落属性为三态或者行距类型为三态。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的行间距为:"+paragraphAttr.getLineSpacingAt()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getLineSpacingType()"><!-- --></A><H3>
getLineSpacingType</H3>
<PRE>
public int <B>getLineSpacingType</B>()</PRE>
<DL>
<DD>获得行距类型。
<P>
<DD><DL>
<DT><B>返回:</B><DD>行距类型,其常量和相应的值如下: <pre> ParagraphConstants.LINESPACING_SINGLE = 0 单倍行距 ParagraphConstants.LINESPACING_1PT5 = 1 1.5倍行距 ParagraphConstants.LINESPACING_DOUBLE = 2 双倍行距 ParagraphConstants.LINESPACING_ATLEAST = 3 最小值 ParagraphConstants.LINESPACING_EXACTLY = 4 固定值 ParagraphConstants.LINESPACING_MULTIPLE = 5 多倍行距 GlobalConstants.UNDEFINED_VALUE = 9999999 表示当前段落属性为三态 </pre> <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的行距类型为:"+paragraphAttr.getLineSpacingType()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/constants/ParagraphConstants.html" title="application.constants 中的接口"><CODE>ParagraphConstants</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getNoLinesNumber()"><!-- --></A><H3>
getNoLinesNumber</H3>
<PRE>
public int <B>getNoLinesNumber</B>()</PRE>
<DL>
<DD>返回是否取消行号。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果取消行号,返回1,否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落是否取消行号:"+paragraphAttr.getNoLinesNumber()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setNoLinesNumber(boolean)"><CODE>setNoLinesNumber(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getOutlineLevel()"><!-- --></A><H3>
getOutlineLevel</H3>
<PRE>
public int <B>getOutlineLevel</B>()</PRE>
<DL>
<DD>返回段落的大纲级别。
<P>
<DD><DL>
<DT><B>返回:</B><DD>段落的大纲级别,为0-9的一整数。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的大纲级别属性为:"+paragraphAttr.getOutlineLevel()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getPageBreakBefore()"><!-- --></A><H3>
getPageBreakBefore</H3>
<PRE>
public int <B>getPageBreakBefore</B>()</PRE>
<DL>
<DD>判断是否段前分页。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果段前分页,返回1;否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落是否段前分页:"+paragraphAttr.getPageBreakBefore()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setPageBreakBefore(boolean)"><CODE>setPageBreakBefore(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getPunctuationOutOfBounds()"><!-- --></A><H3>
getPunctuationOutOfBounds</H3>
<PRE>
public int <B>getPunctuationOutOfBounds</B>()</PRE>
<DL>
<DD>是否允许中文版式中标点溢出边界,该方法只能在中文版本中使用。
<P>
<DD><DL>
<DT><B>返回:</B><DD>如果允许中文版式中标点溢出边界,返回1,否则,返回0。如果返回值为9999999表示当前段落属性为三态 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("是否允许中文版式中标点溢出边界:"+paragraphAttr.getPunctuationOutOfBounds()); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html#setPunctuationOutOfBounds(boolean)"><CODE>setPunctuationOutOfBounds(boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getRightIndent()"><!-- --></A><H3>
getRightIndent</H3>
<PRE>
public float <B>getRightIndent</B>()</PRE>
<DL>
<DD>获取段落右缩进距离(默认单位为磅)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>段落右缩进距离,取值范围在-1584到1584之间。如果返回值为9999999表示当前段落属性为三态 说明:get方法默认返回为磅值,如果要用其他的度量单位(英寸、厘米、毫米、十二点活字),可以用 application.util.Utilities.pointToOther(double, int)方法将返回的磅值转换为其他度量单位。 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); ParagraphAttribute paragraphAttr = baseText.getParagraphAttribute(2); System.out.println("指定段落的右缩进距离为:"+paragraphAttr.getRightIndent()); </pre></DL>
</DD>
</DL>
<HR>
<A NAME="getRightIndentOfChar()"><!-- --></A><H3>
getRightIndentOfChar</H3>
<PRE>
public float <B>getRightIndentOfChar</B>()</PRE>
<DL>
<DD>获取段落右缩进距离(度量单位为字符)。
<P>
<DD><DL>
<DT><B>返回:</B><DD>段落右缩进距离,取值范围在-316.8到316.8字符之间。如果返回值为9999999表示当前段
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -