diff options
author | Jay Berkenbilt <ejb@ql.org> | 2010-08-03 00:17:01 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2010-08-03 00:17:01 +0200 |
commit | 9a06fc541ce00361f12f6231b2f7556615cbccb7 (patch) | |
tree | 858037640e94c3081e829e21c980b556de744ea5 /libqpdf/QPDF_Dictionary.cc | |
parent | ab5a01c64ec3c8cb4f13b6846ca4ecdc7b888e14 (diff) | |
download | qpdf-9a06fc541ce00361f12f6231b2f7556615cbccb7.tar.zst |
ready to implement replacement stream data
git-svn-id: svn+q:///qpdf/trunk@987 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/QPDF_Dictionary.cc')
-rw-r--r-- | libqpdf/QPDF_Dictionary.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc index ccaab4a8..838a37e6 100644 --- a/libqpdf/QPDF_Dictionary.cc +++ b/libqpdf/QPDF_Dictionary.cc @@ -92,3 +92,17 @@ QPDF_Dictionary::removeKey(std::string const& key) // no-op if key does not exist this->items.erase(key); } + +void +QPDF_Dictionary::replaceOrRemoveKey(std::string const& key, + QPDFObjectHandle value) +{ + if (value.isNull()) + { + removeKey(key); + } + else + { + replaceKey(key, value); + } +} |