From acd0acf16931ce92bc908e4960c5a1e43d53b550 Mon Sep 17 00:00:00 2001 From: m-holger Date: Mon, 29 May 2023 19:26:18 +0100 Subject: Fix doc typos --- include/qpdf/ClosedFileInputSource.hh | 6 +++--- include/qpdf/JSON.hh | 4 ++-- include/qpdf/PDFVersion.hh | 3 --- include/qpdf/Pl_Concatenate.hh | 2 +- include/qpdf/QPDFAnnotationObjectHelper.hh | 4 ++-- include/qpdf/QPDFDocumentHelper.hh | 12 ++++++------ include/qpdf/QPDFEFStreamObjectHelper.hh | 2 +- include/qpdf/QPDFLogger.hh | 16 ++++++++-------- include/qpdf/QPDFNameTreeObjectHelper.hh | 4 ++-- include/qpdf/QPDFNumberTreeObjectHelper.hh | 4 ++-- include/qpdf/QPDFObjectHelper.hh | 2 +- include/qpdf/QPDFOutlineDocumentHelper.hh | 2 +- include/qpdf/QPDFOutlineObjectHelper.hh | 6 +++--- include/qpdf/QPDFPageDocumentHelper.hh | 4 ++-- include/qpdf/QPDFWriter.hh | 12 ++++++------ include/qpdf/QUtil.hh | 2 +- include/qpdf/qpdfjob-c.h | 5 +++-- 17 files changed, 44 insertions(+), 46 deletions(-) (limited to 'include') diff --git a/include/qpdf/ClosedFileInputSource.hh b/include/qpdf/ClosedFileInputSource.hh index 9f7e4fce..41c46242 100644 --- a/include/qpdf/ClosedFileInputSource.hh +++ b/include/qpdf/ClosedFileInputSource.hh @@ -20,9 +20,9 @@ #define QPDF_CLOSEDFILEINPUTSOURCE_HH // This is an input source that reads from files, like FileInputSource, except that it opens and -// close the file surrounding every operation. This decreases efficiency, but it allows many more of -// these to exist at once than the maximum number of open file descriptors. This is used for merging -// large numbers of files. +// closes the file surrounding every operation. This decreases efficiency, but it allows many more +// of these to exist at once than the maximum number of open file descriptors. This is used for +// merging large numbers of files. #include #include // unused -- remove in qpdf 12 (see #785) diff --git a/include/qpdf/JSON.hh b/include/qpdf/JSON.hh index ce37ef50..d05a82fb 100644 --- a/include/qpdf/JSON.hh +++ b/include/qpdf/JSON.hh @@ -69,7 +69,7 @@ class JSON // to pass that `first` through to all the methods that are called to add top-level items to the // container as well as to close the container. This lets the JSON object use it to keep track // of when it's writing a first object and when it's not. If incrementally writing multiple - // levels of depth, a new `first` should used for each new container that is opened. + // levels of depth, a new `first` should be used for each new container that is opened. // // "depth" -- Indicate the level of depth. This is used for consistent indentation. When writing // incrementally, whenever you call a method to add an item to a container, the value of `depth` @@ -208,7 +208,7 @@ class JSON QPDF_DLL bool checkSchema(JSON schema, std::list& errors); - // An pointer to a Reactor class can be passed to parse, which will enable the caller to react + // A pointer to a Reactor class can be passed to parse, which will enable the caller to react // to incremental events in the construction of the JSON object. This makes it possible to // implement SAX-like handling of very large JSON objects. class QPDF_DLL_CLASS Reactor diff --git a/include/qpdf/PDFVersion.hh b/include/qpdf/PDFVersion.hh index 1b2c45de..ed072c7a 100644 --- a/include/qpdf/PDFVersion.hh +++ b/include/qpdf/PDFVersion.hh @@ -16,9 +16,6 @@ // License. At your option, you may continue to consider qpdf to be licensed under those terms. // Please see the manual for additional information. -// This class implements a simple writer for saving QPDF objects to new PDF files. See comments -// through the header file for additional details. - #ifndef PDFVERSION_HH #define PDFVERSION_HH diff --git a/include/qpdf/Pl_Concatenate.hh b/include/qpdf/Pl_Concatenate.hh index 444a7482..24977de1 100644 --- a/include/qpdf/Pl_Concatenate.hh +++ b/include/qpdf/Pl_Concatenate.hh @@ -19,7 +19,7 @@ #ifndef PL_CONCATENATE_HH #define PL_CONCATENATE_HH -// This pipeline will drop all regular finished calls rather than passing them onto next. To finish +// This pipeline will drop all regular finish calls rather than passing them onto next. To finish // downstream streams, call manualFinish. This makes it possible to pipe multiple streams (e.g. // with QPDFObjectHandle::pipeStreamData) to a downstream like Pl_Flate that can't handle multiple // calls to finish(). diff --git a/include/qpdf/QPDFAnnotationObjectHelper.hh b/include/qpdf/QPDFAnnotationObjectHelper.hh index 9da0fd39..b93f895f 100644 --- a/include/qpdf/QPDFAnnotationObjectHelper.hh +++ b/include/qpdf/QPDFAnnotationObjectHelper.hh @@ -40,7 +40,7 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper // besides widget annotations, but they are implemented with form fields so that they can // properly handle form fields when needed. - // Return the subtype of the annotation as a string (e.g. "/Widget"). Returns the empty string + // Return the subtype of the annotation as a string (e.g. "/Widget"). Returns an empty string // if the subtype (which is required by the spec) is missing. QPDF_DLL std::string getSubtype(); @@ -51,7 +51,7 @@ class QPDFAnnotationObjectHelper: public QPDFObjectHelper QPDF_DLL QPDFObjectHandle getAppearanceDictionary(); - // Return the appearance state as given in "/AS", or the empty string if none is given. + // Return the appearance state as given in "/AS", or an empty string if none is given. QPDF_DLL std::string getAppearanceState(); diff --git a/include/qpdf/QPDFDocumentHelper.hh b/include/qpdf/QPDFDocumentHelper.hh index bb614843..1cd0a2e0 100644 --- a/include/qpdf/QPDFDocumentHelper.hh +++ b/include/qpdf/QPDFDocumentHelper.hh @@ -23,12 +23,12 @@ #include // This is a base class for QPDF Document Helper classes. Document helpers are classes that provide -// a convenient, higher-level API for accessing document-level structures with a PDF file. Document -// helpers are always initialized with a reference to a QPDF object, and the object can always be -// retrieved. The intention is that you may freely intermix use of document helpers with the -// underlying QPDF object unless there is a specific comment in a specific helper method that says -// otherwise. The pattern of using helper objects was introduced to allow creation of higher level -// helper functions without polluting the public interface of QPDF. +// a convenient, higher-level API for accessing document-level structures within a PDF file. +// Document helpers are always initialized with a reference to a QPDF object, and the object can +// always be retrieved. The intention is that you may freely intermix use of document helpers with +// the underlying QPDF object unless there is a specific comment in a specific helper method that +// says otherwise. The pattern of using helper objects was introduced to allow creation of higher +// level helper functions without polluting the public interface of QPDF. class QPDF_DLL_CLASS QPDFDocumentHelper { diff --git a/include/qpdf/QPDFEFStreamObjectHelper.hh b/include/qpdf/QPDFEFStreamObjectHelper.hh index ab26b2c1..cdb5c278 100644 --- a/include/qpdf/QPDFEFStreamObjectHelper.hh +++ b/include/qpdf/QPDFEFStreamObjectHelper.hh @@ -55,7 +55,7 @@ class QPDFEFStreamObjectHelper: public QPDFObjectHelper // Return the checksum as stored in the object as a binary string. This does not check // consistency with the data. If not present, return an empty string. The PDF spec specifies // this as an MD5 checksum and notes that it is not to be used for security purposes since MD5 - // is known not to be secure. + // is known to be insecure. QPDF_DLL std::string getChecksum(); diff --git a/include/qpdf/QPDFLogger.hh b/include/qpdf/QPDFLogger.hh index 0b77d57a..0b5b6186 100644 --- a/include/qpdf/QPDFLogger.hh +++ b/include/qpdf/QPDFLogger.hh @@ -31,14 +31,14 @@ class QPDFLogger static std::shared_ptr create(); // Return the default logger. In general, you should use the default logger. You can also create - // your own loggers and use them QPDF and QPDFJob objects, but there are few reasons to do so. - // One reason may if you are using multiple QPDF or QPDFJob objects in different threads and - // want to capture output and errors to different streams. (Note that a single QPDF or QPDFJob - // can't be safely used from multiple threads, but it is safe to use separate QPDF and QPDFJob - // objects on separate threads.) Another possible reason would be if you are writing an - // application that uses the qpdf library directly and qpdf is also used by a downstream library - // or if you are using qpdf from a library and don't want to interfere with potential uses of - // qpdf by other libraries or applications. + // your own loggers and use them with QPDF and QPDFJob objects, but there are few reasons to do + // so. One reason may be that you are using multiple QPDF or QPDFJob objects in different + // threads and want to capture output and errors to different streams. (Note that a single QPDF + // or QPDFJob can't be safely used from multiple threads, but it is safe to use separate QPDF + // and QPDFJob objects on separate threads.) Another possible reason would be if you are writing + // an application that uses the qpdf library directly and qpdf is also used by a downstream + // library or if you are using qpdf from a library and don't want to interfere with potential + // uses of qpdf by other libraries or applications. QPDF_DLL static std::shared_ptr defaultLogger(); diff --git a/include/qpdf/QPDFNameTreeObjectHelper.hh b/include/qpdf/QPDFNameTreeObjectHelper.hh index 9e59e1fb..90cb6856 100644 --- a/include/qpdf/QPDFNameTreeObjectHelper.hh +++ b/include/qpdf/QPDFNameTreeObjectHelper.hh @@ -52,7 +52,7 @@ class QPDF_DLL_CLASS QPDFNameTreeObjectHelper: public QPDFObjectHelper QPDF_DLL virtual ~QPDFNameTreeObjectHelper(); - // Return whether the number tree has an explicit entry for this number. + // Return whether the name tree has an explicit entry for this name. QPDF_DLL bool hasName(std::string const& utf8); @@ -151,7 +151,7 @@ class QPDF_DLL_CLASS QPDFNameTreeObjectHelper: public QPDFObjectHelper iterator insert(std::string const& key, QPDFObjectHandle value); // Remove an item. Return true if the item was found and removed; otherwise return false. If - // value is not null, initialize it to the value that was removed. + // value is not nullptr, initialize it to the value that was removed. QPDF_DLL bool remove(std::string const& key, QPDFObjectHandle* value = nullptr); diff --git a/include/qpdf/QPDFNumberTreeObjectHelper.hh b/include/qpdf/QPDFNumberTreeObjectHelper.hh index f2a66026..12603af0 100644 --- a/include/qpdf/QPDFNumberTreeObjectHelper.hh +++ b/include/qpdf/QPDFNumberTreeObjectHelper.hh @@ -145,7 +145,7 @@ class QPDF_DLL_CLASS QPDFNumberTreeObjectHelper: public QPDFObjectHelper value_type ivalue; }; - // The iterator looks like map iterator, so i.first is a string and i.second is a + // The iterator looks like map iterator, so i.first is a numtree_number and i.second is a // QPDFObjectHandle. Incrementing end() brings you to the first item. Decrementing end() brings // you to the last item. QPDF_DLL @@ -166,7 +166,7 @@ class QPDF_DLL_CLASS QPDFNumberTreeObjectHelper: public QPDFObjectHelper iterator insert(numtree_number key, QPDFObjectHandle value); // Remove an item. Return true if the item was found and removed; otherwise return false. If - // value is not null, initialize it to the value that was removed. + // value is not nullptr, initialize it to the value that was removed. QPDF_DLL bool remove(numtree_number key, QPDFObjectHandle* value = nullptr); diff --git a/include/qpdf/QPDFObjectHelper.hh b/include/qpdf/QPDFObjectHelper.hh index 30853a74..953ee1f1 100644 --- a/include/qpdf/QPDFObjectHelper.hh +++ b/include/qpdf/QPDFObjectHelper.hh @@ -26,7 +26,7 @@ // This is a base class for QPDF Object Helper classes. Object helpers are classes that provide a // convenient, higher-level API for working with specific types of QPDF objects. Object helpers are // always initialized with a QPDFObjectHandle, and the underlying object handle can always be -// retrieved. The intention is that you may freely intermix use of document helpers with the +// retrieved. The intention is that you may freely intermix use of object helpers with the // underlying QPDF objects unless there is a specific comment in a specific helper method that says // otherwise. The pattern of using helper objects was introduced to allow creation of higher level // helper functions without polluting the public interface of QPDFObjectHandle. diff --git a/include/qpdf/QPDFOutlineDocumentHelper.hh b/include/qpdf/QPDFOutlineDocumentHelper.hh index 23e4902c..eb5f8f9a 100644 --- a/include/qpdf/QPDFOutlineDocumentHelper.hh +++ b/include/qpdf/QPDFOutlineDocumentHelper.hh @@ -55,7 +55,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper QPDF_DLL QPDFObjectHandle resolveNamedDest(QPDFObjectHandle name); - // Return a list outlines that are known to target the specified page + // Return a list outlines that are known to target the specified page. QPDF_DLL std::vector getOutlinesForPage(QPDFObjGen const&); diff --git a/include/qpdf/QPDFOutlineObjectHelper.hh b/include/qpdf/QPDFOutlineObjectHelper.hh index 8a0b10c9..289941fa 100644 --- a/include/qpdf/QPDFOutlineObjectHelper.hh +++ b/include/qpdf/QPDFOutlineObjectHelper.hh @@ -37,7 +37,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper virtual ~QPDFOutlineObjectHelper() { // This must be cleared explicitly to avoid circular references that prevent cleanup of - // pointer holders. + // shared pointers. m->parent = nullptr; } @@ -66,11 +66,11 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper // Returns the value of /Count as present in the object, or 0 if not present. If count is // positive, the outline is open. If negative, it is closed. Either way, the absolute value is - // the number descendant items that would be visible if this were open. + // the number of descendant items that would be visible if this were open. QPDF_DLL int getCount(); - // Returns the title as a UTF-8 string. Returns the empty string if there is no title. + // Returns the title as a UTF-8 string. Returns an empty string if there is no title. QPDF_DLL std::string getTitle(); diff --git a/include/qpdf/QPDFPageDocumentHelper.hh b/include/qpdf/QPDFPageDocumentHelper.hh index 351a04f0..a6005a45 100644 --- a/include/qpdf/QPDFPageDocumentHelper.hh +++ b/include/qpdf/QPDFPageDocumentHelper.hh @@ -56,7 +56,7 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper QPDF_DLL void removeUnreferencedResources(); - // Add new page at the beginning or the end of the current pdf. The newpage parameter may be + // Add a new page at the beginning or the end of the current pdf. The newpage parameter may be // either a direct object, an indirect object from this QPDF, or an indirect object from another // QPDF. If it is a direct object, it will be made indirect. If it is an indirect object from // another QPDF, this method will call pushInheritedAttributesToPage on the other file and then @@ -76,7 +76,7 @@ class QPDFPageDocumentHelper: public QPDFDocumentHelper // This method does not have any specific awareness of annotations or form fields, so if you // just add a page without thinking about it, you might end up with two pages that share form // fields or annotations. While the page may look fine, it will probably not function properly - // with regard to interactive features. To work around this, you should called + // with regard to interactive features. To work around this, you should call // QPDFAcroFormDocumentHelper::fixCopiedAnnotations. A future version of qpdf will likely // provide a higher-level interface for copying pages around that will handle document-level // constructs in a less error-prone fashion. diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 63fba056..34720119 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -103,11 +103,11 @@ class QPDFWriter // Setting Output. Output may be set only one time. If you don't use the filename version of // the QPDFWriter constructor, you must call exactly one of these methods. - // Passing null as filename means write to stdout. QPDFWriter will create a zero-length output - // file upon construction. If write fails, the empty or partially written file will not be - // deleted. This is by design: sometimes the partial file may be useful for tracking down + // Passing nullptr as filename means write to stdout. QPDFWriter will create a zero-length + // output file upon construction. If write fails, the empty or partially written file will not + // be deleted. This is by design: sometimes the partial file may be useful for tracking down // problems. If your application doesn't want the partially written file to be left behind, you - // should delete it the eventual call to write fails. + // should delete it if the eventual call to write fails. QPDF_DLL void setOutputFilename(char const* filename); @@ -184,8 +184,8 @@ class QPDFWriter // // qpdf_dl_generalized: This is the default. QPDFWriter will apply LZWDecode, ASCII85Decode, // ASCIIHexDecode, and FlateDecode filters on the input. When combined with - // setCompressStreams(true), which the default, the effect of this is that streams filtered with - // these older and less efficient filters will be recompressed with the Flate filter. By + // setCompressStreams(true), which is the default, the effect of this is that streams filtered + // with these older and less efficient filters will be recompressed with the Flate filter. By // default, as a special case, if a stream is already compressed with FlateDecode and // setCompressStreams is enabled, the original compressed data will be preserved. This behavior // can be overridden by calling setRecompressFlate(true). diff --git a/include/qpdf/QUtil.hh b/include/qpdf/QUtil.hh index 47ecf6bf..ab2727a6 100644 --- a/include/qpdf/QUtil.hh +++ b/include/qpdf/QUtil.hh @@ -224,7 +224,7 @@ namespace QUtil QPDF_DLL time_t get_current_time(); - // Portable structure representing a point in time with second granularity and time zone offset + // Portable structure representing a point in time with second granularity and time zone offset. struct QPDFTime { QPDFTime() = default; diff --git a/include/qpdf/qpdfjob-c.h b/include/qpdf/qpdfjob-c.h index 3db41d3e..5450d3d0 100644 --- a/include/qpdf/qpdfjob-c.h +++ b/include/qpdf/qpdfjob-c.h @@ -109,7 +109,7 @@ extern "C" { #endif /* QPDF_NO_WCHAR_T */ /* This function wraps QPDFJob::initializeFromJson. The return value is the same as qpdfjob_run. - * If this returns an error, it is invalid to call any other functions this job handle. + * If this returns an error, it is invalid to call any other functions using this job handle. */ QPDF_DLL int qpdfjob_initialize_from_json(qpdfjob_handle j, char const* json); @@ -135,7 +135,8 @@ extern "C" { /* This function wraps QPDFJob::writeQPDF. It returns the error code that qpdf would return with * the equivalent command-line invocation. Exit code values are defined in Constants.h in the * qpdf_exit_code_e type. NOTE it is the callers responsibility to clean up the resources - * associated qpdf_data object by calling qpdf_cleanup after the call to qpdfjob_write_qpdf. + * associated with the qpdf_data object by calling qpdf_cleanup after the call to + * qpdfjob_write_qpdf. */ QPDF_DLL int qpdfjob_write_qpdf(qpdfjob_handle j, qpdf_data qpdf); -- cgit v1.2.3-54-g00ecf