Pass frm to open_mapped_doc

@nabinhait please merge