aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pdf-bookmarks.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-05-27 19:19:52 +0200
committerm-holger <m-holger@kubitscheck.org>2023-06-02 17:00:40 +0200
commit3c5700c255f4603b5df9c6d183d13dd71a083cc3 (patch)
tree0f01c62c54b56d009b341922fa3441907a2e560b /examples/pdf-bookmarks.cc
parent6e6a73d28f5f61f038209a61a3e85995dc71aa32 (diff)
downloadqpdf-3c5700c255f4603b5df9c6d183d13dd71a083cc3.tar.zst
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());