Commit fbea2241 authored by Albert Astals Cid's avatar Albert Astals Cid

Revert "Tagged-PDF: Accessors in Catalog for the MarkInfo dictionary"

This reverts commit 402ee8b4.

No clue how this ended up in the stable branch
parent 6d2771b8
...@@ -97,7 +97,6 @@ Catalog::Catalog(PDFDoc *docA) { ...@@ -97,7 +97,6 @@ Catalog::Catalog(PDFDoc *docA) {
attrsList = NULL; attrsList = NULL;
kidsIdxList = NULL; kidsIdxList = NULL;
lastCachedPage = 0; lastCachedPage = 0;
markInfo = markInfoNull;
xref->getCatalog(&catDict); xref->getCatalog(&catDict);
if (!catDict.isDict()) { if (!catDict.isDict()) {
...@@ -858,50 +857,6 @@ Object *Catalog::getStructTreeRoot() ...@@ -858,50 +857,6 @@ Object *Catalog::getStructTreeRoot()
return &structTreeRoot; return &structTreeRoot;
} }
Guint Catalog::getMarkInfo()
{
if (markInfo == markInfoNull) {
markInfo = 0;
Object catDict;
catalogLocker();
xref->getCatalog(&catDict);
if (catDict.isDict()) {
Object markInfoDict;
catDict.dictLookup("MarkInfo", &markInfoDict);
if (markInfoDict.isDict()) {
Object value;
if (markInfoDict.dictLookup("Marked", &value)->isBool() && value.getBool())
markInfo |= markInfoMarked;
else if (!value.isNull())
error(errSyntaxError, -1, "Marked object is wrong type ({0:s})", value.getTypeName());
value.free();
if (markInfoDict.dictLookup("Suspects", &value)->isBool() && value.getBool())
markInfo |= markInfoSuspects;
else if (!value.isNull())
error(errSyntaxError, -1, "Suspects object is wrong type ({0:s})", value.getTypeName());
value.free();
if (markInfoDict.dictLookup("UserProperties", &value)->isBool() && value.getBool())
markInfo |= markInfoUserProperties;
else if (!value.isNull())
error(errSyntaxError, -1, "UserProperties object is wrong type ({0:s})", value.getTypeName());
value.free();
} else if (!markInfoDict.isNull()) {
error(errSyntaxError, -1, "MarkInfo object is wrong type ({0:s})", markInfoDict.getTypeName());
}
markInfoDict.free();
} else {
error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName());
}
catDict.free();
}
return markInfo;
}
Object *Catalog::getOutline() Object *Catalog::getOutline()
{ {
catalogLocker(); catalogLocker();
......
...@@ -125,15 +125,6 @@ public: ...@@ -125,15 +125,6 @@ public:
// Return the structure tree root object. // Return the structure tree root object.
Object *getStructTreeRoot(); Object *getStructTreeRoot();
// Return values from the MarkInfo dictionary as flags in a bitfield.
enum MarkInfoFlags {
markInfoNull = 1 << 0,
markInfoMarked = 1 << 1,
markInfoUserProperties = 1 << 2,
markInfoSuspects = 1 << 3,
};
Guint getMarkInfo();
// Find a page, given its object ID. Returns page number, or 0 if // Find a page, given its object ID. Returns page number, or 0 if
// not found. // not found.
int findPage(int num, int gen); int findPage(int num, int gen);
...@@ -228,7 +219,6 @@ private: ...@@ -228,7 +219,6 @@ private:
GooString *baseURI; // base URI for URI-type links GooString *baseURI; // base URI for URI-type links
Object metadata; // metadata stream Object metadata; // metadata stream
Object structTreeRoot; // structure tree root dictionary Object structTreeRoot; // structure tree root dictionary
Guint markInfo; // Flags from MarkInfo dictionary
Object outline; // outline dictionary Object outline; // outline dictionary
Object acroForm; // AcroForm dictionary Object acroForm; // AcroForm dictionary
Object viewerPreferences; // ViewerPreference dictionary Object viewerPreferences; // ViewerPreference dictionary
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment