[poppler] poppler/Annot.cc poppler/Annot.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Apr 13 15:29:20 UTC 2021
poppler/Annot.cc | 5 +++--
poppler/Annot.h | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 8859bffbc14342f2a630212110a24f105dc819f9
Author: Albert Astals Cid <albert.astals.cid at kdab.com>
Date: Tue Apr 13 17:23:30 2021 +0200
Annot: Make things more const correct
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 59115cc2..5287b4dc 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -48,6 +48,7 @@
// Copyright (C) 2020 Katarina Behrens <Katarina.Behrens at cib.de>
// Copyright (C) 2020 Thorsten Behrens <Thorsten.Behrens at CIB.de>
// Copyright (C) 2020 Nelson Benítez León <nbenitezl at gmail.com>
+// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>.
//
// 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
@@ -761,7 +762,7 @@ Object AnnotColor::writeToObject(XRef *xref) const
DefaultAppearance::DefaultAppearance(Object &&fontNameA, double fontPtSizeA, std::unique_ptr<AnnotColor> fontColorA) : fontName(std::move(fontNameA)), fontPtSize(fontPtSizeA), fontColor(std::move(fontColorA)) { }
-DefaultAppearance::DefaultAppearance(GooString *da)
+DefaultAppearance::DefaultAppearance(const GooString *da)
{
fontPtSize = -1;
@@ -4902,7 +4903,7 @@ bool AnnotAppearanceBuilder::drawFormFieldText(const FormFieldText *fieldText, c
bool AnnotAppearanceBuilder::drawSignatureFieldText(const FormFieldSignature *field, const Form *form, const GfxResources *resources, const GooString *_da, const AnnotBorder *border, const AnnotAppearanceCharacs *appearCharacs,
const PDFRectangle *rect, XRef *xref, Dict *resourcesDict)
{
- DefaultAppearance da(const_cast<GooString *>(_da));
+ DefaultAppearance da(_da);
const GooString &contents = field->getCustomAppearanceContent();
if (contents.toStr().empty())
return false;
diff --git a/poppler/Annot.h b/poppler/Annot.h
index 8c0fabe6..5eb16472 100644
--- a/poppler/Annot.h
+++ b/poppler/Annot.h
@@ -37,6 +37,7 @@
// Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by Technische Universität Dresden
// Copyright (C) 2020 Katarina Behrens <Katarina.Behrens at cib.de>
// Copyright (C) 2020 Thorsten Behrens <Thorsten.Behrens at CIB.de>
+// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>.
//
// 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
@@ -374,7 +375,7 @@ class POPPLER_PRIVATE_EXPORT DefaultAppearance
{
public:
DefaultAppearance(Object &&fontNameA, double fontPtSizeA, std::unique_ptr<AnnotColor> fontColorA);
- DefaultAppearance(GooString *da);
+ DefaultAppearance(const GooString *da);
void setFontName(Object &&fontNameA);
const Object &getFontName() const { return fontName; }
void setFontPtSize(double fontPtSizeA);
More information about the poppler
mailing list