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 — This ListStyle, for chaining.

授權

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

  • 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 — This ListStyle, for chaining.

授權

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

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