diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-03-25 16:30:52 +0100 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2023-03-29 12:48:21 +0200 |
commit | 38cf7c16283ec2d476514a54e2b1a7016b0b770a (patch) | |
tree | a741c4c0e5ee636fb8947751ebc50791be7e1aa5 /libqpdf/qpdf/QPDF_Array.hh | |
parent | de29fd56c487dcf08f2af66f47576f147b20be82 (diff) | |
download | qpdf-38cf7c16283ec2d476514a54e2b1a7016b0b770a.tar.zst |
Add separate sparse mode to QPDF_Array
Add temporary clone of SparseOHArray to implement non-sparse mode.
Diffstat (limited to 'libqpdf/qpdf/QPDF_Array.hh')
-rw-r--r-- | libqpdf/qpdf/QPDF_Array.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libqpdf/qpdf/QPDF_Array.hh b/libqpdf/qpdf/QPDF_Array.hh index 88397ba7..1c4227ba 100644 --- a/libqpdf/qpdf/QPDF_Array.hh +++ b/libqpdf/qpdf/QPDF_Array.hh @@ -3,6 +3,7 @@ #include <qpdf/QPDFValue.hh> +#include <qpdf/OHArray.hh> #include <qpdf/SparseOHArray.hh> #include <list> #include <vector> @@ -16,6 +17,7 @@ class QPDF_Array: public QPDFValue static std::shared_ptr<QPDFObject> create(std::vector<std::shared_ptr<QPDFObject>>&& items); static std::shared_ptr<QPDFObject> create(SparseOHArray const& items); + static std::shared_ptr<QPDFObject> create(OHArray const& items); virtual std::shared_ptr<QPDFObject> copy(bool shallow = false); virtual std::string unparse(); virtual JSON getJSON(int json_version); @@ -36,7 +38,10 @@ class QPDF_Array: public QPDFValue QPDF_Array(std::vector<QPDFObjectHandle> const& items); QPDF_Array(std::vector<std::shared_ptr<QPDFObject>>&& items); QPDF_Array(SparseOHArray const& items); - SparseOHArray elements; + QPDF_Array(OHArray const& items); + bool sparse{false}; + SparseOHArray sp_elements; + OHArray elements; }; #endif // QPDF_ARRAY_HH |