diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-03-13 23:55:26 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-06-07 10:45:18 +0200 |
commit | 7939efc7136987fad348baca2cd686a00aee73cd (patch) | |
tree | c142fd2770bb97d83fa91b971e370cf3b4acc73c /vcl/inc | |
parent | 9b11fdd36ec80f9d1ae0a05455745361e0ce9ced (diff) |
sd: import PDFs as images using Pdfium new SdPdfFilter
LOK now opens PDFs as images using Pdfium,
which has a superior accuracy and support
to poppler, the default pdf reader.
Change-Id: Ifbbecf7f048f001836fb98886705cba47e6bed4e
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/impgraph.hxx | 9 | ||||
-rw-r--r-- | vcl/inc/pdfread.hxx | 43 |
2 files changed, 9 insertions, 43 deletions
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 052bed0924a5..36a888c01efc 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -88,10 +88,19 @@ private: bool mbSwapOut; bool mbDummyContext; VectorGraphicDataPtr maVectorGraphicData; + + /// The PDF stream from which this Graphic is rendered, + /// as converted (version downgraded) from the original, + /// which should be in GfxLink. std::shared_ptr<css::uno::Sequence<sal_Int8>> mpPdfData; std::unique_ptr<GraphicID> mpGraphicID; GraphicExternalLink maGraphicExternalLink; + /// Used with GfxLink and/or PdfData when they store original media + /// which might be multi-page (PDF, f.e.) and we need to re-render + /// this Graphic (a page) from the source in GfxLink or PdfData. + sal_Int32 mnPageNumber; + std::chrono::high_resolution_clock::time_point maLastUsed; bool mbPrepared; diff --git a/vcl/inc/pdfread.hxx b/vcl/inc/pdfread.hxx deleted file mode 100644 index 2e16e4474c17..000000000000 --- a/vcl/inc/pdfread.hxx +++ /dev/null @@ -1,43 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX -#define INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX - -#include <tools/stream.hxx> - -namespace com -{ -namespace sun -{ -namespace star -{ -namespace uno -{ -template <typename> class Sequence; -} -} -} -} -class Bitmap; -class Graphic; - -namespace vcl -{ -/// Imports a PDF stream into rGraphic as a GDIMetaFile. -VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Bitmap& rBitmap, - css::uno::Sequence<sal_Int8>& rPdfData, - sal_uInt64 nPos = STREAM_SEEK_TO_BEGIN, - sal_uInt64 nSize = STREAM_SEEK_TO_END); -VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic); -} - -#endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |