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 /sd/source/ui/docshell/docshel4.cxx | |
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 'sd/source/ui/docshell/docshel4.cxx')
-rw-r--r-- | sd/source/ui/docshell/docshel4.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx index fb979fbfafa9..975b9af9dd56 100644 --- a/sd/source/ui/docshell/docshel4.cxx +++ b/sd/source/ui/docshell/docshel4.cxx @@ -79,6 +79,7 @@ #include <sdcgmfilter.hxx> #include <sdgrffilter.hxx> #include <sdhtmlfilter.hxx> +#include <sdpdffilter.hxx> #include <framework/FrameworkHelper.hxx> #include <SdUnoDrawView.hxx> @@ -489,12 +490,18 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium ) ErrCode nError = ERRCODE_NONE; bRet = SdXMLFilter( rMedium, *this, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError ); } - else if( aFilterName == "CGM - Computer Graphics Metafile" ) + else if (aFilterName == "CGM - Computer Graphics Metafile") { mpDoc->CreateFirstPages(); mpDoc->StopWorkStartupDelay(); bRet = SdCGMFilter( rMedium, *this ).Import(); } + else if (aFilterName == "draw_pdf_import") + { + mpDoc->CreateFirstPages(); + mpDoc->StopWorkStartupDelay(); + bRet = SdPdfFilter(rMedium, *this).Import(); + } else { mpDoc->CreateFirstPages(); |