49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
From 60007314a17cfd9ef4d81689868ca1b4e91d5c89 Mon Sep 17 00:00:00 2001
|
|
From: Jean Ghali <jghali@libertysurf.fr>
|
|
Date: Mon, 5 Jun 2023 21:37:40 +0000
|
|
Subject: [PATCH 04/13] Code cleanup now possible thanks to podofo >= 0.9.0
|
|
requirement
|
|
|
|
git-svn-id: svn://scribus.net/trunk/Scribus@25509 11d20701-8431-0410-a711-e3c959e3b870
|
|
(cherry picked from commit a43ad2030f6a6a7ccc1d7fc6cdcd7a652e1263c3)
|
|
---
|
|
scribus/pdflib_core.cpp | 8 --------
|
|
1 file changed, 8 deletions(-)
|
|
|
|
--- a/scribus/pdflib_core.cpp
|
|
+++ b/scribus/pdflib_core.cpp
|
|
@@ -9861,16 +9861,12 @@ bool PDFLibCore::PDF_EmbeddedPDF(PageIte
|
|
char * mbuffer = nullptr;
|
|
long mlen = 0;
|
|
|
|
-#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(0, 7, 99))
|
|
// seems more complicated at first, but in fact it makes the code more stable wrt podofo changes
|
|
PoDoFo::PdfMemoryOutputStream oStream(1);
|
|
stream->GetCopy(&oStream);
|
|
oStream.Close();
|
|
mlen = oStream.GetLength();
|
|
mbuffer = oStream.TakeBuffer();
|
|
-#else
|
|
- stream->GetCopy(&mbuffer, &mlen);
|
|
-#endif
|
|
if (mbuffer[mlen-1] == '\n')
|
|
--mlen;
|
|
PutDoc("\n/Length " + Pdf::toPdf(static_cast<qlonglong>(mlen)));
|
|
@@ -10158,16 +10154,12 @@ void PDFLibCore::copyPoDoFoObject(const
|
|
char * mbuffer = nullptr;
|
|
long mlen = 0;
|
|
|
|
-#if (PODOFO_VERSION >= PODOFO_MAKE_VERSION(0, 7, 99))
|
|
// seems more complicated at first, but in fact it makes the code more stable wrt podofo changes
|
|
PoDoFo::PdfMemoryOutputStream oStream(1);
|
|
stream->GetCopy(&oStream);
|
|
oStream.Close();
|
|
mlen = oStream.GetLength();
|
|
mbuffer = oStream.TakeBuffer();
|
|
-#else
|
|
- stream->GetCopy(&mbuffer, &mlen);
|
|
-#endif
|
|
if (mbuffer[mlen-1] == '\n')
|
|
--mlen;
|
|
PutDoc("\nstream\n");
|