MCPcopy Create free account
hub / github.com/WinMerge/winmerge / ShowWebDiffDoc

Method ShowWebDiffDoc

Src/MainFrm.cpp:1116–1149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1114}
1115
1116bool 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
1151bool CMainFrame::ShowTextMergeDoc(IDirDoc* pDirDoc, int nBuffers, const String text[],
1152 const String strDesc[], const String& strFileExt, const OpenTextFileParams* pOpenParams /*= nullptr*/)

Callers

nothing calls this directly

Calls 11

GetROFromFlagsFunction · 0.85
GetActivePaneFromFlagsFunction · 0.85
SetSharedMenuMethod · 0.80
AddMergeDocMethod · 0.80
SetUnpackerMethod · 0.45
SetDirDocMethod · 0.45
OpenDocsMethod · 0.45
dataMethod · 0.45
MoveOnLoadMethod · 0.45
emptyMethod · 0.45
GenerateReportMethod · 0.45

Tested by

no test coverage detected