void OpenDoc() { _swDocMgr = _swClassFact.GetApplication(SLicenseKey); _nDocType = SwDocMgrDocType(); _swDocument10 = (SwDMDocument10)_swDocMgr.GetDocument(SDocFileName, _nDocType, false, out _nRetVal); _swDocument13 = (SwDMDocument13)_swDocument10; }
public override void closeDocument() { if (doc != null) { doc.CloseDoc(); doc = null; } }
public override bool openDocument(FileObj file) { try { SwDmDocumentOpenError oError; swType = docTypeForExtension(file.ext); if (swType != SwDmDocumentType.swDmDocumentUnknown) { doc = (SwDMDocument10)app.GetDocument(file.path, swType, false, out oError); if (doc != null && (int)oError == (int)SwDmDocumentOpenError.swDmDocumentOpenErrorNone) return true; } } catch {} doc = null; return false; }