summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx26
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx8
2 files changed, 25 insertions, 9 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 28b9fc9f3bcc..32288d569728 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -138,20 +138,32 @@ public:
void testTdf121615();
void testTocLink();
+ // the following tests do *not* work when
+ // LIBO_ALLOW_PDF_TO_PDF_EMBEDDING is FALSE, so need
+ // to deactivate those. These are indeed the ones that
+ // check for reference/form and similar stuff
+ //BAD CPPUNIT_TEST(testTdf106059);
+ //BAD CPPUNIT_TEST(testTdf106693);
+ //BAD CPPUNIT_TEST(testForcePoint71);
+ //BAD CPPUNIT_TEST(testTdf106972);
+ //BAD CPPUNIT_TEST(testTdf106972Pdf17);
+ //BAD CPPUNIT_TEST(testTdf107018);
+ //BAD CPPUNIT_TEST(testTdf107089);
+
CPPUNIT_TEST_SUITE(PdfExportTest);
- CPPUNIT_TEST(testTdf106059);
+ // CPPUNIT_TEST(testTdf106059);
CPPUNIT_TEST(testTdf105461);
CPPUNIT_TEST(testTdf107868);
CPPUNIT_TEST(testTdf105093);
CPPUNIT_TEST(testTdf106206);
- CPPUNIT_TEST(testTdf106693);
- CPPUNIT_TEST(testForcePoint71);
- CPPUNIT_TEST(testTdf106972);
- CPPUNIT_TEST(testTdf106972Pdf17);
+ // CPPUNIT_TEST(testTdf106693);
+ // CPPUNIT_TEST(testForcePoint71);
+ // CPPUNIT_TEST(testTdf106972);
+ // CPPUNIT_TEST(testTdf106972Pdf17);
CPPUNIT_TEST(testSofthyphenPos);
CPPUNIT_TEST(testTdf107013);
- CPPUNIT_TEST(testTdf107018);
- CPPUNIT_TEST(testTdf107089);
+ // CPPUNIT_TEST(testTdf107018);
+ // CPPUNIT_TEST(testTdf107089);
CPPUNIT_TEST(testTdf99680);
CPPUNIT_TEST(testTdf99680_2);
CPPUNIT_TEST(testTdf108963);
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 1a5f772af2e5..eadd646cb5d1 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9338,7 +9338,9 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
// no pdf data.
rEmit.m_nBitmapObject = nBitmapObject;
- if (!rGraphic.hasPdfData())
+ static bool bAllowPdfToPdf(nullptr != getenv("LIBO_ALLOW_PDF_TO_PDF_EMBEDDING"));
+ const bool bHasPdfDFata(bAllowPdfToPdf && rGraphic.hasPdfData());
+ if (!bHasPdfDFata)
return;
if (m_aContext.UseReferenceXObject)
@@ -9406,7 +9408,9 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
{
m_aJPGs.emplace( m_aJPGs.begin() );
JPGEmit& rEmit = m_aJPGs.front();
- if (!rGraphic.hasPdfData() || m_aContext.UseReferenceXObject)
+ static bool bAllowPdfToPdf(nullptr != getenv("LIBO_ALLOW_PDF_TO_PDF_EMBEDDING"));
+ const bool bHasPdfDFata(bAllowPdfToPdf && rGraphic.hasPdfData());
+ if (!bHasPdfDFata || m_aContext.UseReferenceXObject)
rEmit.m_nObject = createObject();
rEmit.m_aID = aID;
rEmit.m_pStream = std::move( pStream );