diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-12-19 21:09:24 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-12-29 15:12:49 +0100 |
commit | 06cbfe71c77cfd61b747b7f80dee37e59cff0118 (patch) | |
tree | 093cb13b1abdc802d355edc31a9da3514c0986b9 /vcl/source/gdi/pdfwriter_impl.cxx | |
parent | b9e86836d79039a28661dfb6195df0a4dc1e7572 (diff) |
pdf: support for PDF/UA in PDFWriter, write flag to the metadata
This adds support for PDF/UA to the PDFWriter in form of a bool
flag and writes into the XmpMetadata that the document is supposed
to be PDF/UA compliant (even if it may not be).
Change-Id: If187152d3860397fc629e272c5b3888fca34e790
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85909
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/gdi/pdfwriter_impl.cxx')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 891d5db93a7b..e55efc180bb3 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1307,6 +1307,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal m_nAccessPermissions(0), m_bIsPDF_A1( false ), m_bIsPDF_A2( false ), + m_bIsPDF_UA( false ), m_rOuterFace( i_rOuterFace ) { m_aStructure.emplace_back( ); @@ -5225,7 +5226,7 @@ static void escapeStringXML( const OUString& rStr, OUString &rValue) // emits the document metadata sal_Int32 PDFWriterImpl::emitDocumentMetadata() { - if( !m_bIsPDF_A1 && !m_bIsPDF_A2 ) + if (!m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_UA) return 0; //get the object number for all the destinations @@ -5240,6 +5241,8 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata() else if (m_bIsPDF_A2) aMetadata.mnPDF_A = 2; + aMetadata.mbPDF_UA = m_bIsPDF_UA; + if (!m_aContext.DocumentInfo.Title.isEmpty()) { OUString aTempString; |