summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-10 09:00:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-11 17:13:05 +0200
commit10e81b3dd5e0712eb8298ee7b6ebf844440fc2d8 (patch)
tree89bc2a41a3138db9930256fa54dae9b028b4aa4e /svx
parent727c5ed30f68abc28bb04531b25a1df30810760f (diff)
some --disable-pdfium fixes
Change-Id: I33867397cd5783adb90e9dc2c62b037ced131e26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138081 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/unit/core.cxx2
-rw-r--r--svx/source/svdraw/svdpdf.cxx2
2 files changed, 3 insertions, 1 deletions
diff --git a/svx/qa/unit/core.cxx b/svx/qa/unit/core.cxx
index 27e5783e20db..3966010012e6 100644
--- a/svx/qa/unit/core.cxx
+++ b/svx/qa/unit/core.cxx
@@ -70,6 +70,8 @@ CPPUNIT_TEST_FIXTURE(Test, testChartExportToPdf)
// Then make sure we get a valid, non-empty PDF:
auto pPdfium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPdfium)
+ return;
SvMemoryStream aMemory;
aMemory.WriteStream(*aTempFile.GetStream(StreamMode::READ));
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 13a75fddbb3a..fb608bd2c5cf 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -115,7 +115,7 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools:
auto const& rVectorGraphicData = rGraphic.getVectorGraphicData();
auto* pData = rVectorGraphicData->getBinaryDataContainer().getData();
sal_Int32 nSize = rVectorGraphicData->getBinaryDataContainer().getSize();
- mpPdfDocument = mpPDFium->openDocument(pData, nSize, OString());
+ mpPdfDocument = mpPDFium ? mpPDFium->openDocument(pData, nSize, OString()) : nullptr;
if (!mpPdfDocument)
return;