Python macro files become invalid when they contain classes?

It seems that when I add classes to my python macros, and then try to run the macro from Tools → Macros → Run Macro, although the application sees the python file, it does not find any functions. The same file is also tested with classes removed. Then all defined functions are visible to the dialog mentioned above.

Moreover, it also seems impossible to provide definitions in another file, which is then imported. A RuntimeExceptionError is raised with the following description: “<class ‘ImportError’>: No module named ‘masonry’
C:\Program Files (x86)\LibreOffice 4\program\uno.py:265 in function _uno_import() [return _g_delegatee( name, *optargs, **kwargs )”. masonry.py is the file where classes are defined. I tried to perform both absolute and relative imports without success.

I’m testing on Libreoffice 4.2.1.1 on Windows 8.1 64bit.

I have the same problem. Did you manage to solve it?