summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-03-13 23:55:26 -0400
committerJan Holesovsky <kendy@collabora.com>2018-06-01 08:59:10 +0200
commit52a0b46bfdc32e5c37b3d7343a42c6388f3d569d (patch)
treee4939d36f57dfe06aad329350630b5e960ebb5ea /sdext
parent32817f930580b6b378dd470ccbdf967c06540db2 (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. (cherry picked from commit 0e8f4f45b44935c7c8002d606b97a48e60e37b23) Change-Id: Ifbbecf7f048f001836fb98886705cba47e6bed4e
Diffstat (limited to 'sdext')
-rw-r--r--sdext/CppunitTest_sdext_pdfimport.mk2
-rw-r--r--sdext/Executable_pdf2xml.mk2
-rw-r--r--sdext/Executable_pdfunzip.mk2
-rw-r--r--sdext/Library_pdfimport.mk2
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx19
5 files changed, 21 insertions, 6 deletions
diff --git a/sdext/CppunitTest_sdext_pdfimport.mk b/sdext/CppunitTest_sdext_pdfimport.mk
index 83f3131fe40e..87a917f8d81d 100644
--- a/sdext/CppunitTest_sdext_pdfimport.mk
+++ b/sdext/CppunitTest_sdext_pdfimport.mk
@@ -30,6 +30,8 @@ $(eval $(call gb_CppunitTest_use_libraries,sdext_pdfimport,\
sal \
test \
unotest \
+ tl \
+ xo \
))
$(eval $(call gb_CppunitTest_use_library_objects,sdext_pdfimport,pdfimport))
diff --git a/sdext/Executable_pdf2xml.mk b/sdext/Executable_pdf2xml.mk
index 373f40da36fd..b2439164a1ed 100644
--- a/sdext/Executable_pdf2xml.mk
+++ b/sdext/Executable_pdf2xml.mk
@@ -30,6 +30,8 @@ $(eval $(call gb_Executable_use_libraries,pdf2xml,\
unotest \
cppuhelper \
sal \
+ tl \
+ xo \
))
$(eval $(call gb_Executable_use_library_objects,pdf2xml,pdfimport))
diff --git a/sdext/Executable_pdfunzip.mk b/sdext/Executable_pdfunzip.mk
index 74b1a964b0f1..1fcca8a863d7 100644
--- a/sdext/Executable_pdfunzip.mk
+++ b/sdext/Executable_pdfunzip.mk
@@ -28,6 +28,8 @@ $(eval $(call gb_Executable_use_libraries,pdfunzip,\
cppuhelper \
sal \
vcl \
+ tl \
+ xo \
))
$(eval $(call gb_Executable_use_library_objects,pdfunzip,pdfimport))
diff --git a/sdext/Library_pdfimport.mk b/sdext/Library_pdfimport.mk
index d181ae15682a..d8d935708f70 100644
--- a/sdext/Library_pdfimport.mk
+++ b/sdext/Library_pdfimport.mk
@@ -27,6 +27,8 @@ $(eval $(call gb_Library_use_libraries,pdfimport,\
cppu \
cppuhelper \
sal \
+ tl \
+ xo \
))
$(eval $(call gb_Library_use_externals,pdfimport,\
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index f303ab09084b..08fd2e654146 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -35,6 +35,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/byteseq.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/propertysequence.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <com/sun/star/io/XInputStream.hpp>
@@ -71,6 +72,12 @@
#include <rtl/character.hxx>
+#include <vcl/bitmapaccess.hxx>
+#include <vcl/bitmap.hxx>
+#include <vcl/graph.hxx>
+#include <vcl/pdfread.hxx>
+#include <vcl/pngwrite.hxx>
+
using namespace com::sun::star;
namespace pdfi
@@ -1008,12 +1015,12 @@ public:
}
};
-bool xpdf_ImportFromFile( const OUString& rURL,
- const ContentSinkSharedPtr& rSink,
- const uno::Reference< task::XInteractionHandler >& xIHdl,
- const OUString& rPwd,
- const uno::Reference< uno::XComponentContext >& xContext,
- const OUString& rFilterOptions )
+bool xpdf_ImportFromFile(const OUString& rURL,
+ const ContentSinkSharedPtr& rSink,
+ const uno::Reference<task::XInteractionHandler>& xIHdl,
+ const OUString& rPwd,
+ const uno::Reference<uno::XComponentContext>& xContext,
+ const OUString& rFilterOptions)
{
OSL_ASSERT(rSink);