summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTobias Hoffmann <thobi@worker>2012-06-22 17:50:02 +0200
committerJay Berkenbilt <ejb@ql.org>2012-07-04 22:24:03 +0200
commit7770a1b036433be7a47b65da7c34297353c7e77d (patch)
tree43a7a6371e8f70d3fa33d53af00a059f4343f289 /include
parent235188df85c54a530a3cbf382aff3e58ea69618e (diff)
downloadqpdf-7770a1b036433be7a47b65da7c34297353c7e77d.tar.zst
Added public method QPDF::pushInheritedAttributesToPage
Refactored optimizePagesTree to pushInheritedAttributesToPage and made public
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDF.hh11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index 93927a50..a6d88941 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -374,6 +374,11 @@ class QPDF
QPDF_DLL
void updateAllPagesCache();
+ // The PDF /Pages tree allows inherited values. Working with
+ // the pages of a pdf is much easier when the inheritance is
+ // resolved by explicitly setting the values in each /Page.
+ void pushInheritedAttributesToPage();
+
// Add new page at the beginning or the end of the current pdf
QPDF_DLL
void addPage(QPDFObjectHandle newpage, bool first);
@@ -903,11 +908,11 @@ class QPDF
// Methods to support optimization
- void optimizePagesTree(bool allow_changes);
- void optimizePagesTreeInternal(
+ void pushInheritedAttributesToPage(bool allow_changes);
+ void pushInheritedAttributesToPageInternal(
QPDFObjectHandle,
std::map<std::string, std::vector<QPDFObjectHandle> >&,
- int& pageno, bool allow_changes);
+ bool allow_changes);
void updateObjectMaps(ObjUser const& ou, QPDFObjectHandle oh);
void updateObjectMapsInternal(ObjUser const& ou, QPDFObjectHandle oh,
std::set<ObjGen>& visited, bool top);