From c030d31c3fcd0ffc32520fbab946da07c534ea30 Mon Sep 17 00:00:00 2001 From: m-holger Date: Sun, 5 Oct 2025 12:06:29 +0100 Subject: [PATCH] Move `Writer` to `QPDF::Doc` and update references --- include/qpdf/QPDF.hh | 1 - libqpdf/QPDFWriter.cc | 6 +++--- libqpdf/qpdf/QPDF_private.hh | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index a8eb32c..a462756 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -790,7 +790,6 @@ class QPDF // End of the public API. The following classes and methods are for qpdf internal use only. class Doc; - class Writer; class StreamCopier; class JobSetter; diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc index b7062f8..831d679 100644 --- a/libqpdf/QPDFWriter.cc +++ b/libqpdf/QPDFWriter.cc @@ -260,7 +260,7 @@ Pl_stack::Popper::pop() } // Writer class is restricted to QPDFWriter so that only it can call certain methods. -class QPDF::Writer +class QPDF::Doc::Writer { friend class QPDFWriter; Writer(QPDF& pdf) : @@ -328,7 +328,7 @@ class QPDF::Writer QPDF& pdf; }; -class QPDFWriter::Members: QPDF::Writer +class QPDFWriter::Members: QPDF::Doc::Writer { friend class QPDFWriter; @@ -343,7 +343,7 @@ class QPDFWriter::Members: QPDF::Writer enum trailer_e { t_normal, t_lin_first, t_lin_second }; Members(QPDFWriter& w, QPDF& pdf) : - QPDF::Writer(pdf), + QPDF::Doc::Writer(pdf), w(w), root_og( pdf.getRoot().getObjGen().isIndirect() ? pdf.getRoot().getObjGen() : QPDFObjGen(-1, 0)), diff --git a/libqpdf/qpdf/QPDF_private.hh b/libqpdf/qpdf/QPDF_private.hh index e3f695a..927e7a6 100644 --- a/libqpdf/qpdf/QPDF_private.hh +++ b/libqpdf/qpdf/QPDF_private.hh @@ -347,6 +347,7 @@ class QPDF::Doc class ParseGuard; class Resolver; class Streams; + class Writer; Doc() = delete; Doc(Doc const&) = delete; -- libgit2 0.21.4