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

📄 outlineview.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<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>
&nbsp;
<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="collapse(long, long)"><!-- --></A><H3>
collapse</H3>
<PRE>
public void <B>collapse</B>(long&nbsp;startOffset,
                     long&nbsp;length)</PRE>
<DL>
<DD>在大纲视图中折叠某一标题下的子标题和文本。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>startOffset</CODE> - 光标的起始位置<DD><CODE>length</CODE> - 需要折叠的长度 <p> <b>例子: </b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.collapse(doc.getOffset(),(doc.getLength() - doc.getOffset()));  </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数startOffset超出范围时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数length超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="collapseParagraphs(int, int)"><!-- --></A><H3>
collapseParagraphs</H3>
<PRE>
public void <B>collapseParagraphs</B>(int&nbsp;paragraphStartIndex,
                               int&nbsp;paragraphEndIndex)</PRE>
<DL>
<DD>在大纲视图中折叠某一标题下的子标题和文本。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphStartIndex</CODE> - 段落的开始索引<DD><CODE>paragraphEndIndex</CODE> - 段落的结束索引 <p> <b>例子: </b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.collapseParagraphs(0,1);  </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphStartIndex越界时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphEndIndex越界时</DL>
</DD>
</DL>
<HR>

<A NAME="demote(long, long)"><!-- --></A><H3>
demote</H3>
<PRE>
public void <B>demote</B>(long&nbsp;startOffset,
                   long&nbsp;length)</PRE>
<DL>
<DD>把指定的字符串降级。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>startOffset</CODE> - 光标的起始位置<DD><CODE>length</CODE> - 需要降级的字符串长度 <p> <b>例子: </b> <pre>  Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.demote(doc.getOffset(),(doc.getLength() - doc.getOffset()));  </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数startOffset超出范围时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数length超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="demoteParagraph(int)"><!-- --></A><H3>
demoteParagraph</H3>
<PRE>
public void <B>demoteParagraph</B>(int&nbsp;paragraphIndex)</PRE>
<DL>
<DD>将指定的段落降级。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphIndex</CODE> - 段落索引 <p> <b>例子: </b> <pre>  Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.demoteParagraph(1); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphIndex超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="demoteParagraph(int, int)"><!-- --></A><H3>
demoteParagraph</H3>
<PRE>
public void <B>demoteParagraph</B>(int&nbsp;paragraphStartIndex,
                            int&nbsp;paragraphEndIndex)</PRE>
<DL>
<DD>将指定的段落范围降级。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphStartIndex</CODE> - 段落的开始索引<DD><CODE>paragraphEndIndex</CODE> - 段落的结束索引 <p> <b>例子: </b> <pre>  Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.demoteParagraph(0,1); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphStartIndex超出范围时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphEndIndex超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="demoteToBobyText(long, long)"><!-- --></A><H3>
demoteToBobyText</H3>
<PRE>
public void <B>demoteToBobyText</B>(long&nbsp;startOffset,
                             long&nbsp;length)</PRE>
<DL>
<DD>将指定的字符串所在段落降级至正文。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>startOffset</CODE> - 光标的起始位置<DD><CODE>length</CODE> - 需要降级的字符串长度 <p> <b>例子: </b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.demoteToBobyText(doc.getOffset(),(doc.getLength() - doc.getOffset()));  </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数startOffset超出范围时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数length超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="demoteToBobyTextPara(int)"><!-- --></A><H3>
demoteToBobyTextPara</H3>
<PRE>
public void <B>demoteToBobyTextPara</B>(int&nbsp;paragraphIndex)</PRE>
<DL>
<DD>将指定的段落降级至正文。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphIndex</CODE> - 段落索引 <p> <b>例子: </b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.demoteToBobyTextPara(1); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphIndex超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="demoteToBobyTextPara(int, int)"><!-- --></A><H3>
demoteToBobyTextPara</H3>
<PRE>
public void <B>demoteToBobyTextPara</B>(int&nbsp;paragraphStartIndex,
                                 int&nbsp;paragraphEndIndex)</PRE>
<DL>
<DD>将指定的段落范围降级至正文。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>paragraphStartIndex</CODE> - 段落的开始索引<DD><CODE>paragraphEndIndex</CODE> - 段落的结束索引  <p> <b>例子: </b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView(); outlineView.promoteParagraph(0); outlineView.demoteParagraph(1); outlineView.demoteToBobyTextPara(0,1); </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphStartIndex超出范围时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数paragraphEndIndex超出范围时</DL>
</DD>
</DL>
<HR>

<A NAME="expand(long, long)"><!-- --></A><H3>
expand</H3>
<PRE>
public void <B>expand</B>(long&nbsp;startOffset,
                   long&nbsp;length)</PRE>
<DL>
<DD>在大纲视图中展开指定字符串所在段落的标题下被折叠的子标题和文本。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>startOffset</CODE> - 光标的起始位置<DD><CODE>length</CODE> - 需要展开的字符串长度 <p> <b>例子: </b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments()      .getActiveDocument(); BaseText baseText = doc.getSection(0).getBaseText(); baseText.insertText(0,"this is a test!\n this is a test!"); DocumentView view = doc.getDocumentView(); OutlineView outlineView = view.getOutlineView();  outlineView.expand(doc.getOffset(),(doc.getLength() - doc.getOffset()));  </pre>
<DT><B>抛出:</B>
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数startOffset越界时
<DD><CODE><A HREF="../../../../../../application/exceptions/MacroRunException.html" title="application.exceptions 中的类">MacroRunException</A></CODE> - 当参数length越界时</DL>
</DD>
</DL>
<HR>

<A NAME="expandParagraphs(int, int)"><!-- --></A><H3>
expandParagraphs</H3>
<PRE>
public void <B>expandParagraphs</B>(int&nbsp;paragraphStartIndex,
                             int&nbsp;paragraphEndIndex)</PRE>
<DL>
<DD>在大纲视图中展开指定段落范围内标题下被折叠的子标题和文本。
<P>
<DD><DL>

⌨️ 快捷键说明

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