This is certainly better than the hard-coded version, but probably not the most general solution. I don't know whether the ODT specification allows page margins different from the style and whether this is implemented in fpvectorial - but if this were true then your code would ignore the individual page settings.
Anyway: You should post a report in bugtracker so that this issue will not be lost. Hopefully, Felipe, the maintainer of fpvectorial, sees it. Or I can have a look myself, but I don't have the time for it at the moment.