// Thread to do the hard work: save the file to the disk. virtual void onJob() override { try { fop_operate(m_fop, this); } catch (const std::exception& e) { fop_error(m_fop, "Error saving file:\n%s", e.what()); } fop_done(m_fop); }
// Thread to do the hard work: load the file from the disk. virtual void onJob() override { try { fop_operate(m_fop, this); } catch (const std::exception& e) { fop_error(m_fop, "Error loading file:\n%s", e.what()); } if (fop_is_stop(m_fop) && m_fop->document) { delete m_fop->document; m_fop->document = NULL; } fop_done(m_fop); }