From 04f704f4530f623b8178258c9c2632c5842be35e Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Fri, 23 Jul 2004 22:05:17 +0000 Subject: - Add 'deep' semantics to getElement --- src/xmlcomposehelpers.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/xmlcomposehelpers.cpp') diff --git a/src/xmlcomposehelpers.cpp b/src/xmlcomposehelpers.cpp index 1f1d952..74eb9c1 100644 --- a/src/xmlcomposehelpers.cpp +++ b/src/xmlcomposehelpers.cpp @@ -83,16 +83,14 @@ LevelPtr Level::getPrevious() return m_previous; } -DOM::Element Level::getElement() +DOM::Element Level::getElement(bool deep) { if(m_element != NULL) return m_element; - else if(m_previous) + else if(deep && m_previous) return m_previous->getElement(); else - ASSERT(0 && "should always have an element"); - - return DOM::Element(); + return DOM::Element(); } void Level::setElement(DOM::Element element, bool deep) -- cgit v1.2.3