Commit 4ec3e778 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos
Browse files

Set initial state of optional content groups based on BaseState field

There's a test case using BaseState attached to bug #30106
parent f49aa868
......@@ -71,15 +71,19 @@ OCGs::OCGs(Object *ocgObject, XRef *xref) :
ok = gFalse;
#if 0
// this is untested - we need an example showing BaseState
Object baseState;
defaultOcgConfig.dictLookup("BaseState", &baseState);
if (baseState.isString()) {
// read the value, and set each OptionalContentGroup entry appropriately
if (baseState.isName("OFF")) {
for (int i = 0; i < optionalContentGroups->getLength(); ++i) {
OptionalContentGroup *group;
group = (OptionalContentGroup *)optionalContentGroups->get(i);
Object on;
defaultOcgConfig.dictLookup("ON", &on);
if (on.isArray()) {
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