diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-19 11:39:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-20 09:00:48 +0100 |
commit | cd2c076f6478c6f06f9834f599f6c65354039d60 (patch) | |
tree | 2b650de555f82dabb7ed00adb35dbd0ec23262e7 | |
parent | e725836ec19858be83bf6f7f251dd52dbcdf31d6 (diff) |
EPUB export UI: show remaining metadata from the doc model
Title is not special in any way, showing author/language/date has the
same benefits.
Change-Id: Ie05071b88d7fa53ad0e39927904ea5e122a66c9a
Reviewed-on: https://gerrit.libreoffice.org/48183
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | writerperfect/Library_wpftwriter.mk | 2 | ||||
-rw-r--r-- | writerperfect/source/writer/EPUBExportDialog.cxx | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk index 34e85770d699..2ac6bd141cf2 100644 --- a/writerperfect/Library_wpftwriter.mk +++ b/writerperfect/Library_wpftwriter.mk @@ -32,8 +32,10 @@ $(eval $(call gb_Library_use_libraries,wpftwriter,\ comphelper \ cppu \ cppuhelper \ + i18nlangtag \ vcl \ sal \ + sax \ sfx \ sot \ svt \ diff --git a/writerperfect/source/writer/EPUBExportDialog.cxx b/writerperfect/source/writer/EPUBExportDialog.cxx index 09ab58499a26..59e5cb4bf469 100644 --- a/writerperfect/source/writer/EPUBExportDialog.cxx +++ b/writerperfect/source/writer/EPUBExportDialog.cxx @@ -16,6 +16,7 @@ #include <com/sun/star/document/XDocumentPropertiesSupplier.hpp> #include <comphelper/sequenceashashmap.hxx> #include <sfx2/opengrf.hxx> +#include <sax/tools/converter.hxx> #include "EPUBExportFilter.hxx" @@ -136,8 +137,24 @@ EPUBExportDialog::EPUBExportDialog(vcl::Window *pParent, comphelper::SequenceAsH m_pTitle->SetText(xDP->getTitle()); get(m_pInitialCreator, "author"); + if (xDP.is()) + m_pInitialCreator->SetText(xDP->getAuthor()); + get(m_pLanguage, "language"); + if (xDP.is()) + { + OUString aLanguage(LanguageTag::convertToBcp47(xDP->getLanguage(), false)); + m_pLanguage->SetText(aLanguage); + } + get(m_pDate, "date"); + if (xDP.is()) + { + OUStringBuffer aBuffer; + util::DateTime aDate(xDP->getModificationDate()); + sax::Converter::convertDateTime(aBuffer, aDate, nullptr, true); + m_pDate->SetText(aBuffer.makeStringAndClear()); + } get(m_pOKButton, "ok"); m_pOKButton->SetClickHdl(LINK(this, EPUBExportDialog, OKClickHdl)); |