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 09:10:27 +0100 |
commit | 5b8e16a8ce7738a659fcf8bbe92d6b590dcd3027 (patch) | |
tree | 56ae40b00543f85a5cfe38ccfdc8eb1c59859237 /sfx2 | |
parent | 6f696fd39cabfe212b60152ff11126817d77b89d (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>
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 ad0ffb937416..79b85e480508 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -750,11 +750,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"); |