unodit icon indicating copy to clipboard operation
unodit copied to clipboard

malformed *_UI.py file

Open PiGo86 opened this issue 2 years ago • 0 comments

I have tried to use unodit to create an extension with a test dialog file.

After running the following instruction :

python unodit.py -m 'sidebar_convert' -d '../lo_ext' -a 'Test_Sidebar' -p 1

It appears that lo_ext/src/pythonpath/ui/Panel1_UI.py is malformed on line 87, the pass instruction lacking a double indentation:

    # -----------------------------------------------------------
    #               Action events
    # -----------------------------------------------------------

    def actionPerformed(self, oActionEvent):
pass

As a result, I get an error when trying to install the extension.

The test dialog file is the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogueTest" dlg:left="214" dlg:top="117" dlg:width="178" dlg:height="44" dlg:closeable="true" dlg:moveable="true">
 <dlg:styles>
  <dlg:style dlg:style-id="0" dlg:border="simple"/>
 </dlg:styles>
 <dlg:bulletinboard>
  <dlg:text dlg:id="Label1" dlg:tab-index="0" dlg:left="10" dlg:top="16" dlg:width="85" dlg:height="16" dlg:value="Montant total" dlg:valign="center"/>
  <dlg:currencyfield dlg:style-id="0" dlg:id="CurrencyField1" dlg:tab-index="1" dlg:left="101" dlg:top="16" dlg:width="63" dlg:height="16" dlg:readonly="true" dlg:value="0" dlg:value-min="0" dlg:value-max="0"/>
 </dlg:bulletinboard>
</dlg:window>

PiGo86 avatar Jan 01 '23 22:01 PiGo86