This commit adds support for LibreOffice when exporting a pad to doc, pdf, .. This commit also cleans up some export logic when exporting to txt