Skip to content

Commit

Permalink
Simple GooString -> std::string change
Browse files Browse the repository at this point in the history
  • Loading branch information
tsdgeos committed Oct 22, 2023
1 parent 9e17459 commit 4e86f71
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion poppler/Annot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4183,7 +4183,7 @@ std::unique_ptr<LinkAction> AnnotWidget::getFormAdditionalAction(FormAdditionalA
return nullptr;
}

bool AnnotWidget::setFormAdditionalAction(FormAdditionalActionsType formAdditionalActionType, const GooString &js)
bool AnnotWidget::setFormAdditionalAction(FormAdditionalActionsType formAdditionalActionType, const std::string &js)
{
Object additionalActionsObject = additionalActions.fetch(doc->getXRef());

Expand Down
4 changes: 2 additions & 2 deletions poppler/Annot.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
// Copyright (C) 2009-2011, 2013, 2016-2022 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009-2011, 2013, 2016-2023 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
// Copyright (C) 2012, 2015 Tobias Koenig <tokoe@kdab.com>
// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
Expand Down Expand Up @@ -1472,7 +1472,7 @@ class POPPLER_PRIVATE_EXPORT AnnotWidget : public Annot
std::unique_ptr<LinkAction> getFormAdditionalAction(FormAdditionalActionsType type);
Dict *getParent() { return parent; }

bool setFormAdditionalAction(FormAdditionalActionsType type, const GooString &js);
bool setFormAdditionalAction(FormAdditionalActionsType type, const std::string &js);

void setField(FormField *f) { field = f; };

Expand Down
2 changes: 1 addition & 1 deletion poppler/Form.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ std::unique_ptr<LinkAction> FormWidget::getAdditionalAction(Annot::FormAdditiona
return widget ? widget->getFormAdditionalAction(t) : nullptr;
}

bool FormWidget::setAdditionalAction(Annot::FormAdditionalActionsType t, const GooString &js)
bool FormWidget::setAdditionalAction(Annot::FormAdditionalActionsType t, const std::string &js)
{
if (!widget) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion poppler/Form.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class POPPLER_PRIVATE_EXPORT FormWidget

LinkAction *getActivationAction(); // The caller should not delete the result
std::unique_ptr<LinkAction> getAdditionalAction(Annot::FormAdditionalActionsType type);
bool setAdditionalAction(Annot::FormAdditionalActionsType t, const GooString &js);
bool setAdditionalAction(Annot::FormAdditionalActionsType t, const std::string &js);

// return the unique ID corresponding to pageNum/fieldNum
static int encodeID(unsigned pageNum, unsigned fieldNum);
Expand Down
6 changes: 3 additions & 3 deletions poppler/Link.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
// Copyright (C) 2007, 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2008-2010, 2012-2014, 2016-2022 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2008-2010, 2012-2014, 2016-2023 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
// Copyright (C) 2009 Ilya Gorenbein <igorenbein@finjan.com>
// Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com>
Expand Down Expand Up @@ -745,11 +745,11 @@ LinkJavaScript::LinkJavaScript(Object *jsObj)

LinkJavaScript::~LinkJavaScript() = default;

Object LinkJavaScript::createObject(XRef *xref, const GooString &js)
Object LinkJavaScript::createObject(XRef *xref, const std::string &js)
{
Dict *linkDict = new Dict(xref);
linkDict->add("S", Object(objName, "JavaScript"));
linkDict->add("JS", Object(js.copy()));
linkDict->add("JS", Object(new GooString(js)));

return Object(linkDict);
}
Expand Down
4 changes: 2 additions & 2 deletions poppler/Link.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
// Copyright (C) 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
// Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com>
// Copyright (C) 2018-2022 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2018-2023 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
// Copyright (C) 2018 Intevation GmbH <intevation@intevation.de>
// Copyright (C) 2019, 2020 Oliver Sander <oliver.sander@tu-dresden.de>
Expand Down Expand Up @@ -412,7 +412,7 @@ class LinkJavaScript : public LinkAction
LinkActionKind getKind() const override { return actionJavaScript; }
const std::string &getScript() const { return js; }

static Object createObject(XRef *xref, const GooString &js);
static Object createObject(XRef *xref, const std::string &js);

private:
std::string js;
Expand Down

0 comments on commit 4e86f71

Please sign in to comment.