litchi 0.0.1

High-performance parser for Microsoft Office, OpenDocument, and Apple iWork file formats with unified API
Documentation
// Limit element handler

use crate::formula::omml::elements::ElementContext;

/// Handler for limit elements
pub struct LimitHandler;

impl LimitHandler {
    pub fn handle_end<'arena>(
        context: &mut ElementContext<'arena>,
        parent_context: Option<&mut ElementContext<'arena>>,
        _arena: &'arena bumpalo::Bump,
    ) {
        if let Some(parent) = parent_context {
            // Limits are handled by the specific handlers above
            crate::formula::omml::utils::extend_vec_efficient(&mut parent.children, context.children.clone());
        }
    }
}