poppler/Form.cc | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-)
New commits: commit bbfc56b3c9a1e613e6db008a56c9c3333ae1427a Author: Albert Astals Cid <[email protected]> Date: Thu Mar 2 00:45:44 2017 +0100 Make FormWidget* setters ignore isReadOnly isReadOnly is for the user but poppler needs to be able to set the value for example for fields whose value is autocalculated diff --git a/poppler/Form.cc b/poppler/Form.cc index 8f8d14c..b73f52d 100644 --- a/poppler/Form.cc +++ b/poppler/Form.cc @@ -5,7 +5,7 @@ // This file is licensed under the GPLv2 or later // // Copyright 2006-2008 Julien Rebetez <[email protected]> -// Copyright 2007-2012, 2015, 2016 Albert Astals Cid <[email protected]> +// Copyright 2007-2012, 2015-2017 Albert Astals Cid <[email protected]> // Copyright 2007-2008, 2011 Carlos Garcia Campos <[email protected]> // Copyright 2007, 2013, 2016 Adrian Johnson <[email protected]> // Copyright 2007 Iñigo MartÃnez <[email protected]> @@ -317,11 +317,6 @@ int FormWidgetText::getMaxLen () const void FormWidgetText::setContent(GooString* new_content) { - if (isReadOnly()) { - error(errInternal, -1, "FormWidgetText::setContentCopy called on a read only field\n"); - return; - } - parent()->setContentCopy(new_content); } @@ -351,30 +346,18 @@ bool FormWidgetChoice::_checkRange (int i) void FormWidgetChoice::select (int i) { - if (isReadOnly()) { - error(errInternal, -1, "FormWidgetChoice::select called on a read only field\n"); - return; - } if (!_checkRange(i)) return; parent()->select(i); } void FormWidgetChoice::toggle (int i) { - if (isReadOnly()) { - error(errInternal, -1, "FormWidgetChoice::toggle called on a read only field\n"); - return; - } if (!_checkRange(i)) return; parent()->toggle(i); } void FormWidgetChoice::deselectAll () { - if (isReadOnly()) { - error(errInternal, -1, "FormWidgetChoice::deselectAll called on a read only field\n"); - return; - } parent()->deselectAll(); } @@ -401,10 +384,6 @@ bool FormWidgetChoice::isSelected (int i) void FormWidgetChoice::setEditChoice (GooString* new_content) { - if (isReadOnly()) { - error(errInternal, -1, "FormWidgetText::setEditChoice called on a read only field\n"); - return; - } if (!hasEdit()) { error(errInternal, -1, "FormFieldChoice::setEditChoice : trying to edit an non-editable choice\n"); return;
_______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
