⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 basetext.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当offset + length 大于文档长度。
<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="createNewSummary(int, int)"><!-- --></A><H3>
createNewSummary</H3>
<PRE>
public void <B>createNewSummary</B>(int&nbsp;type,
                             int&nbsp;scale)</PRE>
<DL>
<DD>把自动摘要放到一个新的文档中去。
<P>
<DD><DL>
<DT><B>覆盖:</B><DD>类 <CODE><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html" title="application.workbooks.workbook.documents.document.section 中的类">AbstractText</A></CODE> 中的 <CODE><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#createNewSummary(int, int)">createNewSummary</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>参数:</B><DD><CODE>type</CODE> - 生成摘要的类型 <p> SummaryConstants.CREATE_BY_PERCENT 按百分比生成 SummaryConstants.CREATE_BY_SENTENCE 按句子的数目生成 </P><DD><CODE>scale</CODE> - 此值的含义由生成摘要的类型决定,可以有以下两种含义之一: <pre> 如果摘要类型为SummaryConstants.CREATE_BY_PERCENT,此值表示摘要长度占文档总长的百分比(范围为0%~100%) 如果摘要类型为SummaryConstants.CREATE_BY_SENTENCE,此值表示生成自动摘要的句子数(范围为0~原文档的句子总数) </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 test!\nthis is a test!\nthis is a test!\nthis is a test!\nthis is a test!"); baseText.createNewSummary(SummaryConstants.CREATE_BY_PERCENT,20); </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> - 当以百分比生成摘要,摘要内容占原文的比例超出规定范围
<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/section/BaseText.html#insertSummaryHead(int, int)"><CODE>insertSummaryHead(int, int)</CODE></A>, 
<A HREF="../../../../../../application/constants/SummaryConstants.html" title="application.constants 中的接口"><CODE>SummaryConstants</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getEndNoteOptions(long)"><!-- --></A><H3>
getEndNoteOptions</H3>
<PRE>
public <A HREF="../../../../../../application/workbooks/workbook/documents/document/EndNoteOptions.html" title="application.workbooks.workbook.documents.document 中的类">EndNoteOptions</A> <B>getEndNoteOptions</B>(long&nbsp;offset)</PRE>
<DL>
<DD>得到正文指定位置处的尾注属性管理器。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 指定位置
<DT><B>返回:</B><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 test!\n this is a test!\n this is a test!"); EndNoteOptions endNoteOptions = baseText.getEndNoteOptions(10); endNoteOptions.setPosition(NoteConstants.BELLOW_WORD); baseText.addEndNote(10, 2); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/documents/document/EndNoteOptions.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>EndNoteOptions</CODE></A>, 
<A HREF="../../../../../../application/workbooks/workbook/documents/document/section/EndNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>EndNote</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getEndOffset()"><!-- --></A><H3>
getEndOffset</H3>
<PRE>
public int <B>getEndOffset</B>()</PRE>
<DL>
<DD>返回正文在整个文档中的结束位置。
<P>
<DD><DL>

<DT><B>返回:</B><DD>结束位置 <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); System.out.println("End offset is " + baseText.getEndOffset()); </pre></DL>
</DD>
</DL>
<HR>

<A NAME="getFootNoteOptions(long)"><!-- --></A><H3>
getFootNoteOptions</H3>
<PRE>
public <A HREF="../../../../../../application/workbooks/workbook/documents/document/FootNoteOptions.html" title="application.workbooks.workbook.documents.document 中的类">FootNoteOptions</A> <B>getFootNoteOptions</B>(long&nbsp;offset)</PRE>
<DL>
<DD>得到正文指定位置处的脚注属性管理器。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 指定位置
<DT><B>返回:</B><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 test!\n this is a test!\n this is a test!"); FootNoteOptions footNoteOptions = baseText.getFootNoteOptions(10); footNoteOptions.setPosition(NoteConstants.BELLOW_WORD); baseText.addFootNote(10, 2); </pre><DT><B>另请参见:</B><DD><A HREF="../../../../../../application/workbooks/workbook/documents/document/FootNoteOptions.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>FootNoteOptions</CODE></A>, 
<A HREF="../../../../../../application/workbooks/workbook/documents/document/section/FootNote.html" title="application.workbooks.workbook.documents.document.section 中的类"><CODE>FootNote</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getIndex(long, long)"><!-- --></A><H3>
getIndex</H3>
<PRE>
public <A HREF="../../../../../../application/workbooks/workbook/documents/document/Index.html" title="application.workbooks.workbook.documents.document 中的类">Index</A> <B>getIndex</B>(long&nbsp;offset,
                      long&nbsp;length)</PRE>
<DL>
<DD>得到索引。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 这个光标位置是表示索引插在文档的位置<DD><CODE>length</CODE> - 表示索引在文档的区域长度
<DT><B>返回:</B><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 test!\n this is a test!\n this is a test!"); IndexEntry entry= baseText.getIndexEntry(2,4); entry.setMainEntry("索引项1"); baseText.markIndexEntry(entry); Index index = baseText.getIndex(10,4); index.setRight(true); baseText.insertIndex(0,index); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当offset小于0或大于文档长度。
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当offset + length 大于文档长度。
<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/Index.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>Index</CODE></A>, 
<A HREF="../../../../../../application/workbooks/workbook/documents/document/IndexEntry.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>IndexEntry</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getIndexEntry(long, long)"><!-- --></A><H3>
getIndexEntry</H3>
<PRE>
public <A HREF="../../../../../../application/workbooks/workbook/documents/document/IndexEntry.html" title="application.workbooks.workbook.documents.document 中的类">IndexEntry</A> <B>getIndexEntry</B>(long&nbsp;offset,
                                long&nbsp;length)</PRE>
<DL>
<DD>得到标记索引项。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 这个光标位置是表示标记索引项在文档的起始位置<DD><CODE>length</CODE> - 表示标记索引项在文档的区域长度
<DT><B>返回:</B><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 test!\n this is a test!\n this is a test!"); IndexEntry entry1 = baseText.getIndexEntry(2,4); entry1.setMainEntry("索引项1"); baseText.markIndexEntry(entry1); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当offset小于0或大于文档长度。
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当offset + length 大于文档长度。
<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/IndexEntry.html" title="application.workbooks.workbook.documents.document 中的类"><CODE>IndexEntry</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getLength()"><!-- --></A><H3>
getLength</H3>
<PRE>
public long <B>getLength</B>()</PRE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -