poppler/Annot.cc | 5 +++-- poppler/Annot.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 8859bffbc14342f2a630212110a24f105dc819f9 Author: Albert Astals Cid <[email protected]> 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 <[email protected]> // Copyright (C) 2020 Thorsten Behrens <[email protected]> // Copyright (C) 2020 Nelson Benítez León <[email protected]> +// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. // // 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, <[email protected]>. Work sponsored by Technische Universität Dresden // Copyright (C) 2020 Katarina Behrens <[email protected]> // Copyright (C) 2020 Thorsten Behrens <[email protected]> +// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. // // 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); _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
