mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-23 07:08:30 +00:00
Merge pull request #926 from m-holger/omap
Remove redundant parameter depth from QPDF::updateObjectMaps
This commit is contained in:
commit
84e29026f5
@ -1633,8 +1633,7 @@ class QPDF
|
|||||||
QPDFObjectHandle oh,
|
QPDFObjectHandle oh,
|
||||||
std::function<int(QPDFObjectHandle&)> skip_stream_parameters,
|
std::function<int(QPDFObjectHandle&)> skip_stream_parameters,
|
||||||
std::set<QPDFObjGen>& visited,
|
std::set<QPDFObjGen>& visited,
|
||||||
bool top,
|
bool top);
|
||||||
int depth);
|
|
||||||
void filterCompressedObjects(std::map<int, int> const& object_stream_data);
|
void filterCompressedObjects(std::map<int, int> const& object_stream_data);
|
||||||
|
|
||||||
// JSON import
|
// JSON import
|
||||||
|
@ -285,7 +285,7 @@ QPDF::updateObjectMaps(
|
|||||||
std::function<int(QPDFObjectHandle&)> skip_stream_parameters)
|
std::function<int(QPDFObjectHandle&)> skip_stream_parameters)
|
||||||
{
|
{
|
||||||
std::set<QPDFObjGen> visited;
|
std::set<QPDFObjGen> visited;
|
||||||
updateObjectMapsInternal(ou, oh, skip_stream_parameters, visited, true, 0);
|
updateObjectMapsInternal(ou, oh, skip_stream_parameters, visited, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -294,8 +294,7 @@ QPDF::updateObjectMapsInternal(
|
|||||||
QPDFObjectHandle oh,
|
QPDFObjectHandle oh,
|
||||||
std::function<int(QPDFObjectHandle&)> skip_stream_parameters,
|
std::function<int(QPDFObjectHandle&)> skip_stream_parameters,
|
||||||
std::set<QPDFObjGen>& visited,
|
std::set<QPDFObjGen>& visited,
|
||||||
bool top,
|
bool top)
|
||||||
int depth)
|
|
||||||
{
|
{
|
||||||
// Traverse the object tree from this point taking care to avoid
|
// Traverse the object tree from this point taking care to avoid
|
||||||
// crossing page boundaries.
|
// crossing page boundaries.
|
||||||
@ -324,12 +323,7 @@ QPDF::updateObjectMapsInternal(
|
|||||||
int n = oh.getArrayNItems();
|
int n = oh.getArrayNItems();
|
||||||
for (int i = 0; i < n; ++i) {
|
for (int i = 0; i < n; ++i) {
|
||||||
updateObjectMapsInternal(
|
updateObjectMapsInternal(
|
||||||
ou,
|
ou, oh.getArrayItem(i), skip_stream_parameters, visited, false);
|
||||||
oh.getArrayItem(i),
|
|
||||||
skip_stream_parameters,
|
|
||||||
visited,
|
|
||||||
false,
|
|
||||||
1 + depth);
|
|
||||||
}
|
}
|
||||||
} else if (oh.isDictionary() || oh.isStream()) {
|
} else if (oh.isDictionary() || oh.isStream()) {
|
||||||
QPDFObjectHandle dict = oh;
|
QPDFObjectHandle dict = oh;
|
||||||
@ -351,8 +345,7 @@ QPDF::updateObjectMapsInternal(
|
|||||||
dict.getKey(key),
|
dict.getKey(key),
|
||||||
skip_stream_parameters,
|
skip_stream_parameters,
|
||||||
visited,
|
visited,
|
||||||
false,
|
false);
|
||||||
1 + depth);
|
|
||||||
} else if (is_page_node && (key == "/Parent")) {
|
} else if (is_page_node && (key == "/Parent")) {
|
||||||
// Don't traverse back up the page tree
|
// Don't traverse back up the page tree
|
||||||
} else if (
|
} else if (
|
||||||
@ -367,8 +360,7 @@ QPDF::updateObjectMapsInternal(
|
|||||||
dict.getKey(key),
|
dict.getKey(key),
|
||||||
skip_stream_parameters,
|
skip_stream_parameters,
|
||||||
visited,
|
visited,
|
||||||
false,
|
false);
|
||||||
1 + depth);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user