Once you have a library for reading ODF, reasoning about its structure, manipulating it and rendering it in various formats, that's just libreoffice without the GUI. When starting fresh it might be a decent idea to make it a library, but I don't think it's worth transitioning to if you started with a more traditional design