MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / OnFileExportText

Method OnFileExportText

Source/MainFrm.cpp:1979–1996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1977}
1978
1979void CMainFrame::OnFileExportText()
1980{
1981#ifdef DISABLE_SAVE // // //
1982 SetMessageText(IDS_DISABLE_SAVE);
1983 return;
1984#endif
1985
1986 CFamiTrackerDoc &Doc = GetDoc();
1987
1988 auto initPath = FTEnv.GetSettings()->GetPath(PATH_NSF); // // //
1989 if (auto path = GetSavePath(Doc.GetFileTitle(), initPath.c_str(), IDS_FILTER_TXT, L"*.txt")) {
1990 CTextExport Exporter;
1991 CStringA sResult = Exporter.ExportFile(*path, Doc);
1992 if (!sResult.IsEmpty())
1993 AfxMessageBox(conv::to_wide(sResult).data(), MB_OK | MB_ICONERROR);
1994 Doc.UpdateAllViews(NULL, UPDATE_PROPERTIES);
1995 }
1996}
1997
1998void CMainFrame::OnFileExportRows() // // //
1999{

Callers

nothing calls this directly

Calls 8

GetSavePathFunction · 0.85
to_wideFunction · 0.85
GetPathMethod · 0.80
GetFileTitleMethod · 0.80
ExportFileMethod · 0.80
IsEmptyMethod · 0.80
GetSettingsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected