aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFPageLabelDocumentHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <jberkenbilt@users.noreply.github.com>2023-06-17 15:26:16 +0200
committerGitHub <noreply@github.com>2023-06-17 15:26:16 +0200
commit44dce4e2988ec09e36dfb6d1fc527a143e6f597f (patch)
tree3cdb1999faeb5103eb87c36fb1673d8cbb5ab082 /libqpdf/QPDFPageLabelDocumentHelper.cc
parentfc30e75122f6bef20ac8d676ac7cb8822feecf3e (diff)
parentacd0acf16931ce92bc908e4960c5a1e43d53b550 (diff)
downloadqpdf-44dce4e2988ec09e36dfb6d1fc527a143e6f597f.tar.zst
Merge pull request #978 from m-holger/reflow
Code tidy - reflow comments and strings
Diffstat (limited to 'libqpdf/QPDFPageLabelDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFPageLabelDocumentHelper.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/libqpdf/QPDFPageLabelDocumentHelper.cc b/libqpdf/QPDFPageLabelDocumentHelper.cc
index 4a9b456f..d94c41fd 100644
--- a/libqpdf/QPDFPageLabelDocumentHelper.cc
+++ b/libqpdf/QPDFPageLabelDocumentHelper.cc
@@ -57,19 +57,17 @@ QPDFPageLabelDocumentHelper::getLabelsForPageRange(
long long new_start_idx,
std::vector<QPDFObjectHandle>& new_labels)
{
- // Start off with a suitable label for the first page. For every
- // remaining page, if that page has an explicit entry, copy it.
- // Otherwise, let the subsequent page just sequence from the prior
- // entry. If there is no entry for the first page, fabricate one
- // that would match how the page would look in a new file in which
- // it also didn't have an explicit label.
+ // Start off with a suitable label for the first page. For every remaining page, if that page
+ // has an explicit entry, copy it. Otherwise, let the subsequent page just sequence from the
+ // prior entry. If there is no entry for the first page, fabricate one that would match how the
+ // page would look in a new file in which it also didn't have an explicit label.
QPDFObjectHandle label = getLabelForPage(start_idx);
if (label.isNull()) {
label = QPDFObjectHandle::newDictionary();
label.replaceKey("/St", QPDFObjectHandle::newInteger(1 + new_start_idx));
}
- // See if the new label is redundant based on the previous entry
- // in the vector. If so, don't add it.
+ // See if the new label is redundant based on the previous entry in the vector. If so, don't add
+ // it.
size_t size = new_labels.size();
bool skip_first = false;
if (size >= 2) {