aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-01-29 03:53:55 +0100
committerJay Berkenbilt <ejb@ql.org>2019-01-29 03:53:55 +0100
commit2d0885bc119af035ab2df4d8c19000408223ae7f (patch)
tree2801e45bcfbd58f42472c4b2212f828032e38992 /libqpdf/QPDF.cc
parent2712869cf96916bceeac7def35b6d0a54bd10316 (diff)
downloadqpdf-2d0885bc119af035ab2df4d8c19000408223ae7f.tar.zst
Clarify documentation for copyForeignObject regarding pages
Make explicit that copyForeignObject can be used on page objects and will copy them properly but not update the pages tree.
Diffstat (limited to 'libqpdf/QPDF.cc')
-rw-r--r--libqpdf/QPDF.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 0dbce669..f49c0216 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -2141,14 +2141,18 @@ QPDF::replaceReserved(QPDFObjectHandle reserved,
}
QPDFObjectHandle
-QPDF::copyForeignObject(QPDFObjectHandle foreign)
+QPDF::copyForeignObject(QPDFObjectHandle foreign, bool)
{
- return copyForeignObject(foreign, false);
+ // This method will be removed next time the ABI is changed.
+ return copyForeignObject(foreign);
}
QPDFObjectHandle
-QPDF::copyForeignObject(QPDFObjectHandle foreign, bool allow_page)
+QPDF::copyForeignObject(QPDFObjectHandle foreign)
{
+ // Do not preclude use of copyForeignObject on page objects. It is
+ // a documented use case to copy pages this way if the intention
+ // is to not update the pages tree.
if (! foreign.isIndirect())
{
QTC::TC("qpdf", "QPDF copyForeign direct");