Write Style BulletList Class
Applying Bullet List Styles can be accomplished using the ooodev.format.writer.style.BulletList
class.
BulletList.default
is used to set the default Bullet List style.
Example Code
import uno
from ooodev.format.writer.style import BulletList
from ooodev.office.write import Write
from ooodev.gui import GUI
from ooodev.loader.lo import Lo
def main() -> int:
with Lo.Loader(Lo.ConnectPipe()):
doc = Write.create_doc()
GUI.set_visible(doc=doc)
Lo.delay(300)
GUI.zoom(GUI.ZoomEnum.ENTIRE_PAGE)
cursor = Write.get_cursor(doc)
sl = BulletList().list_01
sl.apply(cursor)
for i in range(1, 4):
Write.append_para(cursor=cursor, text=f"Point {i}")
BulletList.default.apply(cursor)
Write.append_para(cursor=cursor, text="Moving On...")
sl = sl.list_02
sl.apply(cursor)
for i in range(1, 4):
Write.append_para(cursor=cursor, text=f"Point {i}")
BulletList.default.apply(cursor)
Write.append_para(cursor=cursor, text="Moving On...")
sl = sl.list_03
sl.apply(cursor)
for i in range(1, 4):
Write.append_para(cursor=cursor, text=f"Point {i}")
BulletList.default.apply(cursor)
Write.append_para(cursor=cursor, text="Moving On...")
sl = sl.num_123
sl.apply(cursor)
for i in range(1, 4):
Write.append_para(cursor=cursor, text=f"Number Point {i}")
BulletList.default.apply(cursor)
Write.append_para(cursor=cursor, text="Moving On...")
sl = sl.num_IVX
sl.apply(cursor)
for i in range(1, 4):
Write.append_para(cursor=cursor, text=f"Number Point {i}")
BulletList.default.apply(cursor)
Lo.delay(1_000)
Lo.close_doc(doc)
return 0
if __name__ == "__main__":
SystemExit(main())