149 // ============================================================================= |
149 // ============================================================================= |
150 // ----------------------------------------------------------------------------- |
150 // ----------------------------------------------------------------------------- |
151 void writeObjects (List<LDObject*>& objects, File& f) { |
151 void writeObjects (List<LDObject*>& objects, File& f) { |
152 for (LDObject* obj : objects) { |
152 for (LDObject* obj : objects) { |
153 if (obj->getType() == LDObject::Subfile) { |
153 if (obj->getType() == LDObject::Subfile) { |
154 List<LDObject*> objs = static_cast<LDSubfileObject*> (obj)->inlineContents (true, false); |
154 LDSubfileObject* ref = static_cast<LDSubfileObject*> (obj); |
|
155 List<LDObject*> objs = ref->inlineContents (LDSubfileObject::DeepInline); |
155 |
156 |
156 writeObjects (objs, f); |
157 writeObjects (objs, f); |
157 |
158 |
158 for (LDObject* obj : objs) |
159 for (LDObject* obj : objs) |
159 delete obj; |
160 delete obj; |