From a1245cf2ad80cba0a71ffb184966ee77a7e166cc Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Thu, 15 Jan 2015 14:18:07 +0100 Subject: Further simplified document buildup by doing the addition to parents of StructureNodes in the constructor and refactored Anchor as standalone class instead of AnnotationEntity child. This made some changes in the test bench necessary as well. --- test/core/model/TestDocument.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'test/core/model/TestDocument.hpp') diff --git a/test/core/model/TestDocument.hpp b/test/core/model/TestDocument.hpp index eaec42c..2397fe6 100644 --- a/test/core/model/TestDocument.hpp +++ b/test/core/model/TestDocument.hpp @@ -60,11 +60,8 @@ static Rooted constructBookDocument(Manager &mgr, Logger &logger, } // And its primitive content Variant text{"Some introductory text"}; - Rooted foreword_primitive = - buildPrimitiveEntity(logger, foreword_text, text, "content"); - if (foreword_primitive.isNull()) { - return {nullptr}; - } + Rooted foreword_primitive{ + new DocumentPrimitive(mgr, foreword_text, text, "content")}; // Add a section. Rooted section = buildStructuredEntity(doc, logger, root, {"section"}); @@ -82,8 +79,8 @@ static Rooted constructBookDocument(Manager &mgr, Logger &logger, } // And its primitive content text = Variant{"Some actual text"}; - Rooted main_primitive = - buildPrimitiveEntity(logger, main_text, text, "content"); + Rooted main_primitive{ + new DocumentPrimitive(mgr, main_text, text, "content")}; if (main_primitive.isNull()) { return {nullptr}; } -- cgit v1.2.3