Commit bd6a0c58 authored by Albert Astals Cid's avatar Albert Astals Cid

PSOutputDev: psTitle -> title as a function parameter

fixes shadow warning
parent 55ac94ac
......@@ -1521,7 +1521,7 @@ PSOutputDev::~PSOutputDev() {
void PSOutputDev::writeHeader(const std::vector<int> &pages,
const PDFRectangle *mediaBox, const PDFRectangle *cropBox,
int pageRotate, char *psTitle) {
int pageRotate, const char *title) {
PSOutPaperSize *size;
double x1, y1, x2, y2;
......@@ -1545,8 +1545,8 @@ void PSOutputDev::writeHeader(const std::vector<int> &pages,
writePSTextLine(obj1.getString());
}
}
if(psTitle) {
char *sanitizedTitle = strdup(psTitle);
if(title) {
char *sanitizedTitle = strdup(title);
for (unsigned int i = 0; i < strlen(sanitizedTitle); ++i) {
if (sanitizedTitle[i] == '\n' || sanitizedTitle[i] == '\r') {
sanitizedTitle[i] = ' ';
......
......@@ -15,7 +15,7 @@
//
// Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
// Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
// Copyright (C) 2006-2008, 2012, 2013, 2015, 2017, 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2006-2008, 2012, 2013, 2015, 2017-2019 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2007 Brad Hards <bradh@kde.org>
// Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
......@@ -168,7 +168,7 @@ public:
// Write the document-level header.
void writeHeader(const std::vector<int> &pages,
const PDFRectangle *mediaBox, const PDFRectangle *cropBox,
int pageRotate, char *pstitle);
int pageRotate, const char *title);
// Write the Xpdf procset.
void writeXpdfProcset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment