diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-03-06 22:06:35 -0500 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2019-03-07 11:43:25 +0100 |
commit | 0d8c670797f6becc584cf2eca4f414df7a3d0d85 (patch) | |
tree | a197ba053e698bc398b16509b2bddc726770c276 /sfx2 | |
parent | cac705fe8ef6deaf808f04e6112dd21666e501a7 (diff) |
build: support disabling poppler
This adds --enable-poppler configure option.
Poppler can be enabled/disabled by setting this
parameter to yes or no.
Change-Id: I42ba2d27de7b5014d28523394310616d20073b71
Reviewed-on: https://gerrit.libreoffice.org/68602
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/68842
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 44364d26092c..3df35e09f1aa 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -721,11 +721,21 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) { // Experimental PDF importing using PDFium. This is currently enabled for LOK only and // we handle it not via XmlFilterAdaptor but a new SdPdfFiler. - const bool bPdfiumImport = (comphelper::LibreOfficeKit::isActive() || getenv("LO_IMPORT_USE_PDFIUM")) && pMedium->GetFilter() && - (pMedium->GetFilter()->GetFilterName() == "draw_pdf_import"); +#if !HAVE_FEATURE_POPPLER + constexpr bool bUsePdfium = true; +#else + const bool bUsePdfium + = comphelper::LibreOfficeKit::isActive() || getenv("LO_IMPORT_USE_PDFIUM"); +#endif + const bool bPdfiumImport + = bUsePdfium && pMedium->GetFilter() + && (pMedium->GetFilter()->GetFilterName() == "draw_pdf_import"); + pImpl->nLoadedFlags = SfxLoadedFlags::NONE; pImpl->bModelInitialized = false; - if ( pMedium->GetFilter() && ( pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER ) && !bPdfiumImport ) + if (pMedium->GetFilter() + && (pMedium->GetFilter()->GetFilterFlags() & SfxFilterFlags::STARONEFILTER) + && !bPdfiumImport) { uno::Reference < beans::XPropertySet > xSet( GetModel(), uno::UNO_QUERY ); const OUString sLockUpdates("LockUpdates"); |