summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu3
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs8
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx5
3 files changed, 14 insertions, 2 deletions
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();