summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/wrapper/wrapper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport/wrapper/wrapper.cxx')
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx40
1 files changed, 13 insertions, 27 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 7d3d68901e37..d34573d65ee6 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
@@ -1001,20 +1008,12 @@ public:
}
};
-bool xpdf_ImportFromFile_Poppler(const OUString& aSysUPath,
- const ContentSinkSharedPtr& rSink,
- const uno::Reference<task::XInteractionHandler>& xIHdl,
- const bool bIsEncrypted,
- const OUString& aPwd,
- 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 )
+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);
@@ -1039,19 +1038,6 @@ bool xpdf_ImportFromFile( const OUString& rURL,
return false;
}
- return xpdf_ImportFromFile_Poppler(aSysUPath, rSink, xIHdl, bIsEncrypted, aPwd, xContext, rFilterOptions);
-}
-
-/// Parse PDf file using libpoppler, which is quite limited
-/// to be phased out in favor of pdfium.
-bool xpdf_ImportFromFile_Poppler(const OUString& aSysUPath,
- const ContentSinkSharedPtr& rSink,
- const uno::Reference<task::XInteractionHandler>& /*xIHdl*/,
- const bool bIsEncrypted,
- const OUString& aPwd,
- const uno::Reference<uno::XComponentContext>& xContext,
- const OUString& rFilterOptions)
-{
// Determine xpdfimport executable URL:
OUString converterURL("$BRAND_BASE_DIR/" LIBO_BIN_FOLDER "/xpdfimport");
rtl::Bootstrap::expandMacros(converterURL); //TODO: detect failure