/** * Pop the RTFDTM's context mark. This discards any RTFs added after the last mark was set. * * <p>If there is no RTF DTM, there's nothing to pop so this becomes a no-op. If pushes were * issued before this was called, we count on the fact that popRewindMark is defined such that * overpopping just resets to empty. * * <p>Complicating factor: We need to handle the case of popping back to a previous RTF DTM, if * one of the weird produce-an-RTF-to-build-an-RTF cases arose. Basically: If pop says this DTM is * now empty, then return to the previous if one exists, in whatever state we left it in. UGLY, * but hopefully the situation which forces us to consider this will arise exceedingly rarely. */ public void popRTFContext() { int previous = m_last_pushed_rtfdtm.pop(); if (null == m_rtfdtm_stack) return; if (m_which_rtfdtm == previous) { if (previous >= 0) // guard against none-active { boolean isEmpty = ((SAX2RTFDTM) (m_rtfdtm_stack.elementAt(previous))).popRewindMark(); } } else while (m_which_rtfdtm != previous) { // Empty each DTM before popping, so it's ready for reuse // _DON'T_ pop the previous, since it's still open (which is why we // stacked up more of these) and did not receive a mark. boolean isEmpty = ((SAX2RTFDTM) (m_rtfdtm_stack.elementAt(m_which_rtfdtm))).popRewindMark(); --m_which_rtfdtm; } }
public final void popPredicatePos() { m_predicatePos.pop(); }