| 1114 | } |
| 1115 | |
| 1116 | bool CMainFrame::ShowWebDiffDoc(IDirDoc * pDirDoc, int nFiles, const FileLocation fileloc[], |
| 1117 | const fileopenflags_t dwFlags[], const String strDesc[], const String& sReportFile /*= _T("")*/, |
| 1118 | const PackingInfo* infoUnpacker /*= nullptr*/, const PrediffingInfo* infoPrediffer /*= nullptr*/, |
| 1119 | const OpenWebPageParams* pOpenParams /*= nullptr*/) |
| 1120 | { |
| 1121 | CWebPageDiffFrame *pWebPageMergeFrame = new CWebPageDiffFrame(); |
| 1122 | if (!CWebPageDiffFrame::menu.m_hMenu) |
| 1123 | CWebPageDiffFrame::menu.m_hMenu = NewWebPageDiffViewMenu(); |
| 1124 | pWebPageMergeFrame->SetSharedMenu(CWebPageDiffFrame::menu.m_hMenu); |
| 1125 | pWebPageMergeFrame->SetUnpacker(infoUnpacker); |
| 1126 | if (pDirDoc) |
| 1127 | { |
| 1128 | pWebPageMergeFrame->SetDirDoc(pDirDoc); |
| 1129 | pDirDoc->AddMergeDoc(pWebPageMergeFrame); |
| 1130 | } |
| 1131 | |
| 1132 | bool completed = false, result = false; |
| 1133 | if (!pWebPageMergeFrame->OpenDocs(nFiles, fileloc, GetROFromFlags(nFiles, dwFlags).data(), strDesc, this, |
| 1134 | [&completed]() { completed = true; })) |
| 1135 | return false; |
| 1136 | |
| 1137 | WaitAndDoMessageLoop(completed, 0); |
| 1138 | |
| 1139 | pWebPageMergeFrame->MoveOnLoad(GetActivePaneFromFlags(nFiles, dwFlags)); |
| 1140 | |
| 1141 | if (!sReportFile.empty()) |
| 1142 | { |
| 1143 | completed = false; |
| 1144 | if (pWebPageMergeFrame->GenerateReport(sReportFile, [&result, &completed](bool res) { result = res; completed = true; })) |
| 1145 | WaitAndDoMessageLoop(completed, 0); |
| 1146 | } |
| 1147 | |
| 1148 | return true; |
| 1149 | } |
| 1150 | |
| 1151 | bool CMainFrame::ShowTextMergeDoc(IDirDoc* pDirDoc, int nBuffers, const String text[], |
| 1152 | const String strDesc[], const String& strFileExt, const OpenTextFileParams* pOpenParams /*= nullptr*/) |
nothing calls this directly
no test coverage detected