[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - vcl/source
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 10 09:24:46 UTC 2019
vcl/source/gdi/pdfwriter_impl.cxx | 6 +++---
vcl/source/gdi/pdfwriter_impl.hxx | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 053de02e5c3dab5395618c869765bc02dd14d50e
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Apr 2 23:07:59 2019 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Wed Apr 10 11:24:17 2019 +0200
Embedded PDF: It is a shared_ptr, no need to copy.
Change-Id: Iedb31bbe0e81dc9568e84858d8d26eac03c47ffb
Reviewed-on: https://gerrit.libreoffice.org/70208
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 0b5b74e21d3c..818412d734dc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4948,12 +4948,12 @@ bool PDFWriterImpl::emitEmbeddedFiles()
aLine.append(rEmbeddedFile.m_nObject);
aLine.append(" 0 obj\n");
aLine.append("<< /Type /EmbeddedFile /Length ");
- aLine.append(static_cast<sal_Int64>(rEmbeddedFile.m_aData.size()));
+ aLine.append(static_cast<sal_Int64>(rEmbeddedFile.m_pData->size()));
aLine.append(" >>\nstream\n");
CHECK_RETURN(writeBuffer(aLine.getStr(), aLine.getLength()));
aLine.setLength(0);
- CHECK_RETURN(writeBuffer(rEmbeddedFile.m_aData.data(), rEmbeddedFile.m_aData.size()));
+ CHECK_RETURN(writeBuffer(rEmbeddedFile.m_pData->data(), rEmbeddedFile.m_pData->size()));
aLine.append("\nendstream\nendobj\n\n");
CHECK_RETURN(writeBuffer(aLine.getStr(), aLine.getLength()));
@@ -9708,7 +9708,7 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject
// Store the original PDF data as an embedded file.
m_aEmbeddedFiles.emplace_back();
m_aEmbeddedFiles.back().m_nObject = createObject();
- m_aEmbeddedFiles.back().m_aData = *rGraphic.getPdfData();
+ m_aEmbeddedFiles.back().m_pData = rGraphic.getPdfData();
rEmit.m_nEmbeddedObject = m_aEmbeddedFiles.back().m_nObject;
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index e28896000963..6a84156b6401 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -452,7 +452,7 @@ public:
/// ID of the file.
sal_Int32 m_nObject;
/// Contents of the file.
- std::vector<sal_Int8> m_aData;
+ std::shared_ptr<std::vector<sal_Int8>> m_pData;
PDFEmbeddedFile()
: m_nObject(0)
More information about the Libreoffice-commits
mailing list