* @brief Generate report from dir compare results. */
| 3148 | * @brief Generate report from dir compare results. |
| 3149 | */ |
| 3150 | void CDirView::OnToolsGenerateReport() |
| 3151 | { |
| 3152 | CDirDoc *pDoc = GetDocument(); |
| 3153 | DirCmpReportDlg dlg; |
| 3154 | dlg.LoadSettings(); |
| 3155 | dlg.m_sReportFile = pDoc->GetReportFile(); |
| 3156 | if (dlg.m_sReportFile.empty() && dlg.DoModal() != IDOK) |
| 3157 | return; |
| 3158 | |
| 3159 | pDoc->SetGeneratingReport(true); |
| 3160 | const CDiffContext& ctxt = GetDiffContext(); |
| 3161 | |
| 3162 | PathContext paths = ctxt.GetNormalizedPaths(); |
| 3163 | |
| 3164 | // If inside archive, convert paths |
| 3165 | if (pDoc->IsArchiveFolders()) |
| 3166 | { |
| 3167 | for (int i = 0; i < paths.GetSize(); i++) |
| 3168 | pDoc->ApplyDisplayRoot(i, paths[i]); |
| 3169 | } |
| 3170 | |
| 3171 | DirCmpReport *pReport = new DirCmpReport(GetCurrentColRegKeys()); |
| 3172 | pReport->SetRootPaths(paths); |
| 3173 | pReport->SetColumns(m_pColItems->GetDispColCount()); |
| 3174 | pReport->SetFileCmpReport(new FileCmpReport(this)); |
| 3175 | pReport->SetList(new IListCtrlImpl(m_pList->m_hWnd, m_listViewItems)); |
| 3176 | pReport->SetReportType(dlg.m_nReportType); |
| 3177 | pReport->SetReportFile(dlg.m_sReportFile); |
| 3178 | pReport->SetCopyToClipboard(dlg.m_bCopyToClipboard); |
| 3179 | pReport->SetIncludeFileCmpReport(dlg.m_bIncludeFileCmpReport); |
| 3180 | pDoc->SetReport(pReport); |
| 3181 | pDoc->Rescan(); |
| 3182 | } |
| 3183 | |
| 3184 | /** |
| 3185 | * @brief Generate patch from files selected. |
nothing calls this directly
no test coverage detected