diff options
author | Even Rouault <even.rouault@spatialys.com> | 2025-02-06 15:03:27 +0100 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2025-02-06 15:03:34 +0100 |
commit | 01a1f7da81f0eb54a3266c5e69ad97e80fa13bbf (patch) | |
tree | 3ac26045479bf55132d3df62e73c714fce265f06 | |
parent | 4d9e40e643622abc30e75a9efae9492a8727d5d5 (diff) |
The GDAL PDF driver
(https://github.com/OSGeo/gdal/tree/master/frmts/pdf) needs low level
access to PDF objects. In particular it needs to access the Object
Page::pageObj private member. To workaround that, GDAL uses nasty
'#define private public' hacks, which beyond being ugly, occasionaly
cause practical build issues such as https://github.com/OSGeo/gdal/issues/11477
Having a clean getter makes things much easier.
If this change is adopted, the following cleanup will be possible:
https://github.com/rouault/gdal/commit/3594ee6e0ad6f4f806299e3b4c67cb7eb3a1853d
-rw-r--r-- | poppler/Page.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/poppler/Page.h b/poppler/Page.h index b2ff8e09..794c0b15 100644 --- a/poppler/Page.h +++ b/poppler/Page.h @@ -175,6 +175,9 @@ public: PDFDoc *getDoc() { return doc; } Ref getRef() { return pageRef; } + // Keep in API. This is used by GDAL + const Object &getPageObj() const { return pageObj; } + // Get resource dictionary. Dict *getResourceDict(); Object *getResourceDictObject(); |