Commit c4af5981 authored by Albert Astals Cid's avatar Albert Astals Cid Committed by Albert Astals Cid

OutputDev: change functions taking GooString * to make it const

People that use poppler core, beware of the signature change!
parent 5fc6d9fc
......@@ -29,6 +29,7 @@
// Copyright (C) 2012 Patrick Pfeifer <p2000@mailinator.com>
// Copyright (C) 2012, 2015, 2016 Jason Crain <jason@aquaticape.us>
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -1379,7 +1380,7 @@ void CairoOutputDev::fillToStrokePathClip(GfxState *state) {
cairo_restore (cairo);
}
void CairoOutputDev::beginString(GfxState *state, GooString *s)
void CairoOutputDev::beginString(GfxState *state, const GooString *s)
{
int len = s->getLength();
......@@ -1588,7 +1589,7 @@ void CairoOutputDev::endTextObject(GfxState *state) {
}
}
void CairoOutputDev::beginActualText(GfxState *state, GooString *text)
void CairoOutputDev::beginActualText(GfxState *state, const GooString *text)
{
if (this->text)
actualText->begin(state, text);
......
......@@ -24,6 +24,7 @@
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
// Copyright (C) 2016 Jason Crain <jason@aquaticape.us>
// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -191,13 +192,13 @@ public:
void eoClip(GfxState *state) override;
//----- text drawing
void beginString(GfxState *state, GooString *s) override;
void beginString(GfxState *state, const GooString *s) override;
void endString(GfxState *state) override;
void drawChar(GfxState *state, double x, double y,
double dx, double dy,
double originX, double originY,
CharCode code, int nBytes, Unicode *u, int uLen) override;
void beginActualText(GfxState *state, GooString *text) override;
void beginActualText(GfxState *state, const GooString *text) override;
void endActualText(GfxState *state) override;
GBool beginType3Char(GfxState *state, double x, double y,
......
......@@ -24,6 +24,7 @@
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2012 William Bader <williambader@hotmail.com>
// Copyright (C) 2017 Oliver Sander <oliver.sander@tu-dresden.de>
// Copyright (C) 2018 Klarlvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -247,7 +248,7 @@ public:
//----- text drawing
virtual void beginStringOp(GfxState * /*state*/) {}
virtual void endStringOp(GfxState * /*state*/) {}
virtual void beginString(GfxState * /*state*/, GooString * /*s*/) {}
virtual void beginString(GfxState * /*state*/, const GooString * /*s*/) {}
virtual void endString(GfxState * /*state*/) {}
// Draw one glyph at a specified position
......@@ -263,7 +264,7 @@ public:
double /*dx*/, double /*dy*/,
double /*originX*/, double /*originY*/,
CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) {}
virtual void drawString(GfxState * /*state*/, GooString * /*s*/) {}
virtual void drawString(GfxState * /*state*/, const GooString * /*s*/) {}
virtual GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/,
double /*dx*/, double /*dy*/,
CharCode /*code*/, Unicode * /*u*/, int /*uLen*/);
......@@ -271,7 +272,7 @@ public:
virtual void beginTextObject(GfxState * /*state*/) {}
virtual void endTextObject(GfxState * /*state*/) {}
virtual void incCharCount(int /*nChars*/) {}
virtual void beginActualText(GfxState * /*state*/, GooString * /*text*/ ) {}
virtual void beginActualText(GfxState * /*state*/, const GooString * /*text*/ ) {}
virtual void endActualText(GfxState * /*state*/) {}
//----- image drawing
......
......@@ -5008,13 +5008,13 @@ void PSOutputDev::doPath(GfxPath *path) {
}
}
void PSOutputDev::drawString(GfxState *state, GooString *s) {
void PSOutputDev::drawString(GfxState *state, const GooString *s) {
GfxFont *font;
int wMode;
int *codeToGID;
GooString *s2;
double dx, dy, originX, originY;
char *p;
const char *p;
UnicodeMap *uMap;
CharCode code;
Unicode *u;
......
......@@ -253,7 +253,7 @@ public:
void clipToStrokePath(GfxState *state) override;
//----- text drawing
void drawString(GfxState *state, GooString *s) override;
void drawString(GfxState *state, const GooString *s) override;
void beginTextObject(GfxState *state) override;
void endTextObject(GfxState *state) override;
......
......@@ -36,6 +36,7 @@
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2013 Ed Catmur <ed@catmur.co.uk>
// Copyright (C) 2016 Khaled Hosny <khaledhosny@eglug.org>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -5518,7 +5519,7 @@ void ActualText::addChar(GfxState *state, double x, double y,
actualTextNBytes += nBytes;
}
void ActualText::begin(GfxState *state, GooString *text) {
void ActualText::begin(GfxState *state, const GooString *text) {
if (actualText)
delete actualText;
actualText = new GooString(text);
......@@ -5641,7 +5642,7 @@ void TextOutputDev::updateFont(GfxState *state) {
text->updateFont(state);
}
void TextOutputDev::beginString(GfxState *state, GooString *s) {
void TextOutputDev::beginString(GfxState *state, const GooString *s) {
}
void TextOutputDev::endString(GfxState *state) {
......@@ -5658,7 +5659,7 @@ void TextOutputDev::incCharCount(int nChars) {
text->incCharCount(nChars);
}
void TextOutputDev::beginActualText(GfxState *state, GooString *text)
void TextOutputDev::beginActualText(GfxState *state, const GooString *text)
{
actualText->begin(state, text);
}
......
......@@ -21,6 +21,7 @@
// Copyright (C) 2010 Brian Ewins <brian.ewins@gmail.com>
// Copyright (C) 2012, 2013, 2015, 2016 Jason Crain <jason@aquaticape.us>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -732,7 +733,7 @@ public:
void addChar(GfxState *state, double x, double y,
double dx, double dy,
CharCode c, int nBytes, Unicode *u, int uLen);
void begin(GfxState *state, GooString *text);
void begin(GfxState *state, const GooString *text);
void end(GfxState *state);
private:
......@@ -812,14 +813,14 @@ public:
void updateFont(GfxState *state) override;
//----- text drawing
void beginString(GfxState *state, GooString *s) override;
void beginString(GfxState *state, const GooString *s) override;
void endString(GfxState *state) override;
void drawChar(GfxState *state, double x, double y,
double dx, double dy,
double originX, double originY,
CharCode c, int nBytes, Unicode *u, int uLen) override;
void incCharCount(int nChars) override;
void beginActualText(GfxState *state, GooString *text) override;
void beginActualText(GfxState *state, const GooString *text) override;
void endActualText(GfxState *state) override;
//----- path painting
......
......@@ -40,6 +40,7 @@
// Copyright (C) 2014 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2016 Vincent Le Garrec <legarrec.vincent@gmail.com>
// Copyright (C) 2017 Caolán McNamara <caolanm@redhat.com>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -338,7 +339,7 @@ void HtmlPage::updateFont(GfxState *state) {
}
}
void HtmlPage::beginString(GfxState *state, GooString *s) {
void HtmlPage::beginString(GfxState *state, const GooString *s) {
curStr = new HtmlString(state, fontSize, fonts);
}
......@@ -1305,7 +1306,7 @@ void HtmlOutputDev::updateFont(GfxState *state) {
pages->updateFont(state);
}
void HtmlOutputDev::beginString(GfxState *state, GooString *s) {
void HtmlOutputDev::beginString(GfxState *state, const GooString *s) {
pages->beginString(state, s);
}
......
......@@ -24,6 +24,7 @@
// Copyright (C) 2012 Igor Slepchin <igor.redhat@gmail.com>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
// came with your tarball or type make ChangeLog if you are building from git
......@@ -136,7 +137,7 @@ public:
HtmlPage& operator=(const HtmlPage &) = delete;
// Begin a new string.
void beginString(GfxState *state, GooString *s);
void beginString(GfxState *state, const GooString *s);
// Add a character to the current string.
void addChar(GfxState *state, double x, double y,
......@@ -298,7 +299,7 @@ public:
void updateFont(GfxState *state) override;
//----- text drawing
void beginString(GfxState *state, GooString *s) override;
void beginString(GfxState *state, const GooString *s) override;
void endString(GfxState *state) override;
void drawChar(GfxState *state, double x, double y,
double dx, double dy,
......
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