refactor(docmanager): replace deprecated new_doc, getTdoc (fixes #2785)