diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-14 10:45:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-14 09:45:54 +0000 |
commit | 67127e9a1340076d0c8f818b41cc6c44ddd575da (patch) | |
tree | 09e7f81a95e5923af2ba1b3e332666e79fd744fa /vcl/source/gdi/pdfobjectcopier.cxx | |
parent | 4a96f25ac3ef9f2ed940d6e56eca87bba387d451 (diff) |
use more string_view in vcl::PDFObjectContainer
which makes the call sites much less verbose
Change-Id: I94eef7569e419f134ce574ecd9fb2ce8f50184b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148839
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/pdfobjectcopier.cxx')
-rw-r--r-- | vcl/source/gdi/pdfobjectcopier.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/gdi/pdfobjectcopier.cxx b/vcl/source/gdi/pdfobjectcopier.cxx index 2f32cdc27ce1..4c9228235cd3 100644 --- a/vcl/source/gdi/pdfobjectcopier.cxx +++ b/vcl/source/gdi/pdfobjectcopier.cxx @@ -147,7 +147,7 @@ sal_Int32 PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer, // We have the whole object, now write it to the output. if (!m_rContainer.updateObject(nObject)) return -1; - if (!m_rContainer.writeBuffer(aLine.getStr(), aLine.getLength())) + if (!m_rContainer.writeBuffer(aLine)) return -1; aLine.setLength(0); @@ -156,19 +156,19 @@ sal_Int32 PDFObjectCopier::copyExternalResource(SvMemoryStream& rDocBuffer, SvMemoryStream& rStream = pStream->GetMemory(); m_rContainer.checkAndEnableStreamEncryption(nObject); aLine.append(static_cast<const char*>(rStream.GetData()), rStream.GetSize()); - if (!m_rContainer.writeBuffer(aLine.getStr(), aLine.getLength())) + if (!m_rContainer.writeBuffer(aLine)) return -1; aLine.setLength(0); m_rContainer.disableStreamEncryption(); aLine.append("\nendstream\n"); - if (!m_rContainer.writeBuffer(aLine.getStr(), aLine.getLength())) + if (!m_rContainer.writeBuffer(aLine)) return -1; aLine.setLength(0); } aLine.append("endobj\n\n"); - if (!m_rContainer.writeBuffer(aLine.getStr(), aLine.getLength())) + if (!m_rContainer.writeBuffer(aLine)) return -1; return nObject; |