aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pdf-bookmarks.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 /examples/pdf-bookmarks.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 'examples/pdf-bookmarks.cc')
-rw-r--r--examples/pdf-bookmarks.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/pdf-bookmarks.cc b/examples/pdf-bookmarks.cc
index d40ded6a..9581a135 100644
--- a/examples/pdf-bookmarks.cc
+++ b/examples/pdf-bookmarks.cc
@@ -8,9 +8,9 @@
#include <cstring>
#include <iostream>
-// This program demonstrates extraction of bookmarks using the qpdf
-// outlines API. Note that all the information shown by this program
-// can also be obtained from a PDF file using qpdf's --json option.
+// This program demonstrates extraction of bookmarks using the qpdf outlines API. Note that all the
+// information shown by this program can also be obtained from a PDF file using qpdf's --json
+// option.
//
// Ignore calls to QTC::TC - they are for qpdf CI testing only.
@@ -118,11 +118,10 @@ show_bookmark_details(QPDFOutlineObjectHelper outline, std::vector<int> numbers)
void
extract_bookmarks(std::vector<QPDFOutlineObjectHelper> outlines, std::vector<int>& numbers)
{
- // For style == st_numbers, numbers.at(n) contains the numerical
- // label for the outline, so we count up from 1.
- // For style == st_lines, numbers.at(n) == 0 indicates the last
- // outline at level n, and we don't otherwise care what the value
- // is, so we count up to zero.
+ // For style == st_numbers, numbers.at(n) contains the numerical label for the outline, so we
+ // count up from 1.
+ // For style == st_lines, numbers.at(n) == 0 indicates the last outline at level n, and we don't
+ // otherwise care what the value is, so we count up to zero.
numbers.push_back((style == st_lines) ? -QIntC::to_int(outlines.size()) : 0);
for (auto& outline: outlines) {
++(numbers.back());