summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-04-02 20:34:11 -0400
committerAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-06-04 12:36:28 -0400
commit5be75c91086683233e41a5c6562125946b061cf3 (patch)
tree6691732a5753dbd2b89c38484d0993c162618917 /svx
parent83e2c70b62226cc50b773beb375241fc0f672365 (diff)
vcl: svx: preserve the imported PDF page number in Graphic
(cherry picked from commit dbbf8641e9e66c106cf74637ea9e94b56fd588c0) Change-Id: I1bb3fa7d44d5f92df2bb8c4ed4b85ccd984c2617
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdograf.cxx15
-rw-r--r--svx/source/xml/xmlgrhlp.cxx2
2 files changed, 16 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 3dd1356c547e..bb233e476732 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1067,6 +1067,21 @@ GDIMetaFile SdrGrafObj::GetMetaFile(GraphicType &rGraphicType) const
return GDIMetaFile();
}
+bool SdrGrafObj::isEmbeddedPdfData() const
+{
+ return GetGraphic().hasPdfData();
+}
+
+std::shared_ptr<uno::Sequence<sal_Int8>> SdrGrafObj::getEmbeddedPdfData() const
+{
+ return GetGraphic().getPdfData();
+}
+
+sal_Int32 SdrGrafObj::getEmbeddedPageNumber() const
+{
+ return GetGraphic().getPageNumber();
+}
+
SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
{
SdrObject* pRetval = nullptr;
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index e69bfcbe7e0d..312572ccd24f 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -771,7 +771,7 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
// See if we have this PDF already, and avoid duplicate storage.
auto aIt = maExportPdf.find(rPdfData.get());
if (aIt != maExportPdf.end())
- return true;
+ return aIt->second.first;
// The graphic has PDF data attached to it, use that.
// vcl::ImportPDF() possibly downgraded the PDF data from a