[Libreoffice-commits] core.git: Branch 'feature/cib_contract57d' - officecfg/registry vcl/source
Armin Le Grand (Allotropia) (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 7 11:43:38 UTC 2021
officecfg/registry/data/org/openoffice/Office/Common.xcu | 3 +++
officecfg/registry/schema/org/openoffice/Office/Common.xcs | 8 ++++++++
vcl/source/gdi/pdfwriter_impl.cxx | 5 +++--
3 files changed, 14 insertions(+), 2 deletions(-)
New commits:
commit 8c1a2c275b31cbdb3fbec10080851f43c87f7068
Author: Armin Le Grand (Allotropia) <armin.le.grand.extern at allotropia.de>
AuthorDate: Wed Jul 7 11:27:55 2021 +0200
Commit: Armin Le Grand (Allotropia) <armin.le.grand.extern at allotropia.de>
CommitDate: Wed Jul 7 11:27:55 2021 +0200
Disable PDF-to-PDF embedding on PDF export (hack), part II
Adapted 899a52b236b81a94367ec8bafdff891a67d818aa to use
officecfg::Office::Common::VCL::AllowPdfToPdfEmbedding
instead of LIBO_ALLOW_PDF_TO_PDF_EMBEDDING
Change-Id: I42e3d9a474400ec488352c081620a9b31cde3562
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 5f99ddc036bd..ab7986d388b5 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -60,6 +60,9 @@
<value install:module="unx">false</value>
<value install:module="wnt">true</value>
</prop>
+ <prop oor:name="AllowPdfToPdfEmbedding" oor:type="xs:boolean">
+ <value>false</value>
+ </prop>
</node>
<node oor:name="I18N">
<node oor:name="CTL">
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index cc7fd9f2d85d..b0c738194f25 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -857,6 +857,14 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="AllowPdfToPdfEmbedding" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Specifies if at PDF export it is allowed to embed other PDFs which are
+ part of the Document in their original form or use another form of graphic
+ representation, e.g. pixel graphic.</desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="ForceOpenGL" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Specifies if OpenGL rendering should be used in VCL backends
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index eadd646cb5d1..9173a94ab0dd 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -80,6 +80,7 @@
#include <textlineinfo.hxx>
#include <bitmapwriteaccess.hxx>
#include <impglyphitem.hxx>
+#include <officecfg/Office/Common.hxx>
#include "pdfwriter_impl.hxx"
@@ -9338,7 +9339,7 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
// no pdf data.
rEmit.m_nBitmapObject = nBitmapObject;
- static bool bAllowPdfToPdf(nullptr != getenv("LIBO_ALLOW_PDF_TO_PDF_EMBEDDING"));
+ static bool bAllowPdfToPdf(officecfg::Office::Common::VCL::AllowPdfToPdfEmbedding::get());
const bool bHasPdfDFata(bAllowPdfToPdf && rGraphic.hasPdfData());
if (!bHasPdfDFata)
return;
@@ -9408,7 +9409,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
{
m_aJPGs.emplace( m_aJPGs.begin() );
JPGEmit& rEmit = m_aJPGs.front();
- static bool bAllowPdfToPdf(nullptr != getenv("LIBO_ALLOW_PDF_TO_PDF_EMBEDDING"));
+ static bool bAllowPdfToPdf(officecfg::Office::Common::VCL::AllowPdfToPdfEmbedding::get());
const bool bHasPdfDFata(bAllowPdfToPdf && rGraphic.hasPdfData());
if (!bHasPdfDFata || m_aContext.UseReferenceXObject)
rEmit.m_nObject = createObject();
More information about the Libreoffice-commits
mailing list