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

📄 abstracttext.html

📁 永中OFFICE二次开发帮助文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对指定起始位置指定长度的字符串进行段落格式化(默认替换原先的属性)。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#setParagraphAttribute(long, long, application.workbooks.workbook.style.paragraph.ParagraphAttribute, boolean)">setParagraphAttribute</A></B>(long&nbsp;offset,
                      long&nbsp;length,
                      <A HREF="../../../../../../application/workbooks/workbook/style/paragraph/ParagraphAttribute.html" title="application.workbooks.workbook.style.paragraph 中的类">ParagraphAttribute</A>&nbsp;paragraphAttribute,
                      boolean&nbsp;replace)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对指定起始位置指定长度的字符串进行段落格式化。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#setPhoneticAttribute(long, long, application.workbooks.workbook.style.phonetic.PhoneticAttribute)">setPhoneticAttribute</A></B>(long&nbsp;offset,
                     long&nbsp;length,
                     <A HREF="../../../../../../application/workbooks/workbook/style/phonetic/PhoneticAttribute.html" title="application.workbooks.workbook.style.phonetic 中的类">PhoneticAttribute</A>&nbsp;phonetic)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置指定区域的拼音属性。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#setShadingAttribute(long, long, application.workbooks.workbook.style.border.ShadingAttribute)">setShadingAttribute</A></B>(long&nbsp;offset,
                    long&nbsp;length,
                    <A HREF="../../../../../../application/workbooks/workbook/style/border/ShadingAttribute.html" title="application.workbooks.workbook.style.border 中的类">ShadingAttribute</A>&nbsp;shadingAttribute)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对指定位置指定长度的字符串设置文字底纹。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#setTwoLinesInOne(long, long, int)">setTwoLinesInOne</A></B>(long&nbsp;offset,
                 long&nbsp;length,
                 int&nbsp;bracket)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;设置指定范围内容的格式,使两行文本合并为一行,并指定括住文本的字符。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#tcscConverter(boolean)">tcscConverter</A></B>(boolean&nbsp;sctc)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对当前章节的整个区域进行简繁体转换。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#tcscConverter(long, long, boolean)">tcscConverter</A></B>(long&nbsp;offset,
              long&nbsp;length,
              boolean&nbsp;sctc)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;对指定位置指定长度的字符串进行简繁体转换。</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../application/workbooks/workbook/documents/document/section/AbstractText.html#updateField(long, long)">updateField</A></B>(long&nbsp;offset,
            long&nbsp;length)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;更新在指定区域内的所有域</TD>
</TR>
</TABLE>
&nbsp;<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>
&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="changeCase(long, long, int)"><!-- --></A><H3>
changeCase</H3>
<PRE>
public void <B>changeCase</B>(long&nbsp;offset,
                       long&nbsp;length,
                       int&nbsp;type)</PRE>
<DL>
<DD>对指定起始位置指定长度的字符串更改大小写。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 更改文档大小写的起始位置(起始位置为0)<DD><CODE>length</CODE> - 更改文档大小写的长度<DD><CODE>type</CODE> - 更改大小写的类型。只能取以下值之一: <pre> ChangeCaseConstants.SENTENCECASE    表示句首字母大写 ChangeCaseConstants.LOWERCASE       表示小写 ChangeCaseConstants.UPPERCASE       表示大写 ChangeCaseConstants.TITLECASE       表示词首字母大写 ChangeCaseConstants.TOGGLECASE      对所选内容进行大小写转换,即大写字母转换为小写,小写字母转换为大写 ChangeCaseConstants.DBCCASE         表示半角 ChangeCaseConstants.SBCCASE         表示全角 </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!"); baseText.changeCase(2,6,ChangeCaseConstants.UPPERCASE); </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> - 当指定的大小写类型不存在
<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(long, long)"><!-- --></A><H3>
clearFormats</H3>
<PRE>
public void <B>clearFormats</B>(long&nbsp;offset,
                         long&nbsp;length)</PRE>
<DL>
<DD>清除指定位置指定长度的属性(包括字体、段落等属性)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 要清除格式的字符串所在位置(起始位置为0)<DD><CODE>length</CODE> - 需要清除的字符串的长度 <p> <b>例子:</b> <pre> Document doc = Application.getWorkbooks().getActiveWorkbook().getDocuments().getActiveDocument(); Section section = doc.getSection(0); BaseText baseText = section.getBaseText(); FontAttribute fontAttr = new FontAttribute(); fontAttr.setBold(true); baseText.insertText(0,"this is a test!\nthis is a test!\nthis is a test!",fontAttr); ParagraphAttribute paraAttr = new ParagraphAttribute(); paraAttr.setAlignment(ParagraphConstants.ALIGNMENT_CENTER); baseText.setParagraphAttribute(0, baseText.getTextLength()-1, paraAttr,false); baseText.clearFormats(3,10); </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> - 当指定区域中存在保护区域</DL>
</DD>
</DL>
<HR>

<A NAME="copy(long, long)"><!-- --></A><H3>
copy</H3>
<PRE>
public void <B>copy</B>(long&nbsp;offset,
                 long&nbsp;length)</PRE>
<DL>
<DD>在指定位置复制指定长度的文本(包括图像,域,多媒体等对象)。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 拷贝时指定的起始位置(起始位置为0)<DD><CODE>length</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 test!\nthis is a test!\nthis is a test!"); baseText.copy(2,4); baseText.paste(0); </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> - 当指定区域中存在保护区域</DL>
</DD>
</DL>
<HR>

<A NAME="copyFormat(long, long)"><!-- --></A><H3>
copyFormat</H3>
<PRE>
public void <B>copyFormat</B>(long&nbsp;offset,
                       long&nbsp;length)</PRE>
<DL>
<DD>拷贝格式。
<P>
<DD><DL>
<DT><B>参数:</B><DD><CODE>offset</CODE> - 设置要拷贝格式的字符串的起始位置(起始位置为0)<DD><CODE>length</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 test!\nthis is a test!\nthis is a test!"); FontAttribute fontAttr = new FontAttribute(); fontAttr.setForeground(java.awt.Color.red); baseText.setFontAttribute(2,6,fontAttr); baseText.copyFormat(2,6); baseText.pasteFormat(10,5); </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> - 当指定区域中存在保护区域</DL>
</DD>

⌨️ 快捷键说明

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