diff options
author | Stef Walter <stef@memberwebs.com> | 2004-07-11 21:33:06 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-07-11 21:33:06 +0000 |
commit | 6469807b6ca403cb585616fe3b9c0607ba391529 (patch) | |
tree | 7e55e57e28e39c0f2f43d0523cded967053f3f2d /src/xmlcomposehelpers.cpp | |
parent | 6e217760d3d737a4d291f21764a227b3abea8060 (diff) |
Some level fixes
Diffstat (limited to 'src/xmlcomposehelpers.cpp')
-rw-r--r-- | src/xmlcomposehelpers.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/xmlcomposehelpers.cpp b/src/xmlcomposehelpers.cpp index a1bc73f..6612df9 100644 --- a/src/xmlcomposehelpers.cpp +++ b/src/xmlcomposehelpers.cpp @@ -58,7 +58,10 @@ Level::Level(const Level& level) : Level::~Level() { - + if(m_analyser) + m_analyser->done(); + if(m_destination) + m_destination->done(); } LevelPtr Level::pushLevel() @@ -106,15 +109,21 @@ void Level::setAnalyser(AnalyserPtr analyser, bool deep) { if(deep && m_previous && !m_analyser) m_previous->setAnalyser(analyser, deep); + else + { + if(m_analyser != NULL) + m_analyser->done(); + m_analyser = analyser; + } } -DestinationPtr Level::getDestination() +DestinationPtr Level::getDestination(bool deep) { if(m_destination) return m_destination; - else if(m_previous) + else if(deep && m_previous) return m_previous->getDestination(); else return NULL; @@ -125,7 +134,12 @@ void Level::setDestination(DestinationPtr destination, bool deep) if(deep && m_previous && !m_destination) m_previous->setDestination(destination, deep); else + { + if(m_destination != NULL) + m_destination->done(); + m_destination = destination; + } } RtfFormatting& Level::getFormatting() |