[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 21 14:51:32 UTC 2020
vcl/source/filter/ipdf/pdfread.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 86b0eacce8f7a0bb08cc418c917d04726fd84cbc
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Aug 26 10:40:31 2019 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Sat Mar 21 15:50:58 2020 +0100
vcl: fix --disable-pdfium build
Which is not covered by Jenkins, but used implicitly by the Android
build e.g.
Change-Id: Id1ffab54a619fc94bcc3d8bea9eba6301d3d7381
(cherry picked from commit 28bf81694aaeacd260a3b7d8ba2f6be172eb08c3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90842
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index bd406deac93e..80557c1091e2 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -153,6 +153,7 @@ namespace vcl
size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBitmaps,
const size_t nFirstPage, int nPages, const double fResolutionDPI)
{
+#if HAVE_FEATURE_PDFIUM
FPDF_LIBRARY_CONFIG aConfig;
aConfig.version = 2;
aConfig.m_pUserFontPaths = nullptr;
@@ -211,6 +212,15 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBi
FPDF_DestroyLibrary();
return rBitmaps.size();
+#else
+ (void)pBuffer;
+ (void)nSize;
+ (void)rBitmaps;
+ (void)nFirstPage;
+ (void)nPages;
+ (void)fResolutionDPI;
+ return 0;
+#endif // HAVE_FEATURE_PDFIUM
}
bool ImportPDF(SvStream& rStream, Bitmap& rBitmap, size_t nPageIndex,
@@ -275,6 +285,7 @@ size_t ImportPDF(const OUString& rURL, std::vector<Bitmap>& rBitmaps,
size_t ImportPDFUnloaded(const OUString& rURL, std::vector<std::pair<Graphic, Size>>& rGraphics,
const double fResolutionDPI)
{
+#if HAVE_FEATURE_PDFIUM
std::unique_ptr<SvStream> xStream(
::utl::UcbStreamHelper::CreateStream(rURL, StreamMode::READ | StreamMode::SHARE_DENYNONE));
@@ -342,6 +353,12 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vector<std::pair<Graphic, Si
FPDF_DestroyLibrary();
return rGraphics.size();
+#else
+ (void)rURL;
+ (void)rGraphics;
+ (void)fResolutionDPI;
+ return 0;
+#endif // HAVE_FEATURE_PDFIUM
}
}
More information about the Libreoffice-commits
mailing list