Class ListStyle

清單樣式

一系列文字的清單樣式。

方法

方法傳回類型簡短說明
applyListPreset(listPreset)ListStyle將指定的 ListPreset 套用至與文字重疊的所有段落。
getGlyph()String|null傳回文字的算繪字元。
getList()List|null傳回文字所在的 List,如果文字不在清單中、部分文字在清單中,或文字位於多個清單中,則傳回 null
getNestingLevel()Integer|null傳回文字的巢狀層級 (以 0 為底)。
isInList()Boolean|null如果文字只位於一個清單中,則傳回 true;如果文字不在任何清單中,則傳回 false;如果只有部分文字位於清單中,或文字位於多個清單中,則傳回 null
removeFromList()ListStyle從任何清單中移除與文字重疊的段落。

內容詳盡的說明文件

applyListPreset(listPreset)

將指定的 ListPreset 套用至所有與文字重疊的段落。

系統會計算每個段落前面的開頭定位點,判斷各段落的巢狀層級。為避免字元與對應段落之間出現過多空白,這個方法會移除這些前置定位點。

如果更新段落前方的段落位於 List 中,且具有相符的清單預設樣式,而更新的段落尚未位於其他清單中,更新的段落就會新增至前方的清單。

參數

名稱類型說明
listPresetListPreset

回攻員

ListStyle

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getGlyph()

傳回文字的算繪字元。如果文字跨越多個段落,或文字不在清單中,則傳回 null

回攻員

String|null

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getList()

傳回文字所在的 List,如果文字不在清單中、部分文字在清單中,或文字位於多個清單中,則傳回 null。呼叫 isInList(),判斷文字是否位於清單中。

回攻員

List|null

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getNestingLevel()

傳回文字的從 0 開始的巢狀層級。如果文字不在清單中或有混合值,則傳回 null

回攻員

Integer|null

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

isInList()

如果文字只位於一個清單中,則傳回 true;如果文字不在任何清單中,則傳回 false;如果只有部分文字位於清單中,或文字位於多個清單中,則傳回 null

回攻員

Boolean|null

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

removeFromList()

從任何清單中移除與文字重疊的段落。

系統會在對應段落的開頭新增縮排,以視覺化方式保留每個段落的巢狀結構層級。

回攻員

ListStyle

授權

使用這個方法的指令碼需要一或多個下列範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations