Skip to content

Connect to dialog

sasa edited this page Apr 14, 2017 · 7 revisions

Connect to dialog file .xdl in python code

Usage

  • Prepare

    • create dialog Default.xdl in dialog project DialogLib in My Macros (Tools - Macros - Organize Dialogs - Dialogs - My Dialogs)
    • create project directory in LIBREOFFICE_PATH/4/user/Scripts/python/
    • copy config.ini in project directory and edit section to customize behavior (optional)
  • Write code

    • run unodit with parameter connect

        python3 ./unodit.py -m 'connect'
                            -d 'LIBREOFFICE_PATH/4/user/Scripts/python/TestLib'
                            -f 'LIBREOFFICE_PATH/4/user/basic/DialogLib/Default.xdl'
                            -a 'Test_connect'
      
    • write your code in generated file Test_connect.py

Available options for parameter -m: 'connect'.

Directory structure

TestLib/
        src/
            Test_connect.py 
Clone this wiki locally