summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-13 17:05:19 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-14 12:05:13 +0100
commit5fdeb30cc78817ce85cb568053145752ff7ec215 (patch)
tree7d4f84c18f8a943e4bfa45f29ac9d87219be90e3 /svx
parent08f0a54644c52a2c3da3b900ecf916639129e914 (diff)
vcl pdf import: use pdfium instead of draw_pdf_import
Replace creating a full Draw component with direct pdfium library calls. This also means that the result is now a bitmap, not a metafile for now. Also decouple HAVE_FEATURE_PDFIMPORT and HAVE_FEATURE_PDFIUM, the first is the "import PDF into Draw" feature, the second is the "insert PDF as image" feature. Reviewed-on: https://gerrit.libreoffice.org/34217 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 6657d52417295265367cf3ffe5832b60e3c38011) Conflicts: config_host/config_features.h.in vcl/Library_vcl.mk vcl/source/gdi/impgraph.cxx Change-Id: I72c25642ec84cc831df362e02b1520c6e6d9adcf
Diffstat (limited to 'svx')
-rw-r--r--svx/qa/unit/xoutdev.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/svx/qa/unit/xoutdev.cxx b/svx/qa/unit/xoutdev.cxx
index ff2e8bcf507a..7be8c4749992 100644
--- a/svx/qa/unit/xoutdev.cxx
+++ b/svx/qa/unit/xoutdev.cxx
@@ -32,7 +32,7 @@ public:
void XOutdevTest::testPdfGraphicExport()
{
-#if HAVE_FEATURE_PDFIMPORT
+#if HAVE_FEATURE_PDFIUM
// Import the graphic.
Graphic aGraphic;
test::Directories aDirectories;
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 4ca13f6cedb6..002ac8f77db2 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -444,8 +444,8 @@ const GraphicObject* SdrGrafObj::GetReplacementGraphicObject() const
const_cast< SdrGrafObj* >(this)->mpReplacementGraphic = new GraphicObject(rSvgDataPtr->getReplacement());
}
else if (pGraphic->GetGraphic().getPdfData().hasElements())
- // Replacement graphic for metafile + PDF is just the metafile.
- const_cast<SdrGrafObj*>(this)->mpReplacementGraphic = new GraphicObject(pGraphic->GetGraphic().GetGDIMetaFile());
+ // Replacement graphic for bitmap + PDF is just the bitmap.
+ const_cast<SdrGrafObj*>(this)->mpReplacementGraphic = new GraphicObject(pGraphic->GetGraphic().GetBitmapEx());
}
return mpReplacementGraphic;