Add support for generating a single HTML report from multiple file comparisons#3450
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a unified workflow for generating a single HTML report from one or many open file comparison windows, including a new “File Compare Report” dialog, shared HTML report generation logic, and a refactor of clipboard helper utilities used for report creation/copy.
Changes:
- Added a new dialog/UI and list control to select multiple comparisons and report options (copy to clipboard, open after generating, include all image pages).
- Introduced
CFileCmpReportandReportContextto generate a single, consolidated HTML report across document types (text/table/image/webpage). - Refactored clipboard utilities (
ClipBoard.*→Clipboard.*) and updated multiple call sites to useClipboardUtils.
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| Src/WindowListCtrl.h | New list control abstraction for showing open windows with checkboxes. |
| Src/WindowListCtrl.cpp | Implements selection shortcuts and checkbox handling for window list UI. |
| Src/WebPageDiffFrm.h | Switches webpage report generation to ReportContext and adds document type. |
| Src/WebPageDiffFrm.cpp | Updates webpage report output to write fragments into unified report flow. |
| Src/Test.cpp | Updates clipboard header include (but requires call-site migration too). |
| Src/resource.h | Adds new dialog/control IDs and a new string ID. |
| Src/PatchTool.cpp | Migrates clipboard usage to ClipboardUtils. |
| Src/OptionsInit.cpp | Adds new report-related options defaults. |
| Src/OptionsDef.h | Adds new report-related option keys. |
| Src/MergeDoc.h | Updates report API to ReportContext and adds document type API. |
| Src/MergeDoc.cpp | Refactors file/table report output to be embeddable in a unified report. |
| Src/Merge.vcxproj.filters | Adds new files to VS filters and updates clipboard file names. |
| Src/Merge.vcxproj | Adds new report/dialog sources and swaps in renamed clipboard sources. |
| Src/Merge.rc | Adds “File Compare Report” dialog and adjusts report UI resources. |
| Src/MainFrm.h | Adds unified report entry point and multi-doc enumeration APIs. |
| Src/MainFrm.cpp | Implements report dialog flow and multi-document report generation. |
| Src/ImgMergeFrm.h | Switches image report generation to ReportContext and adds document type. |
| Src/ImgMergeFrm.cpp | Updates image report output to write fragments into unified report flow. |
| Src/IMergeDoc.h | Introduces ReportContext and DocumentType for unified report generation. |
| Src/HexMergeDoc.h | Updates IMergeDoc interface implementation for hex docs. |
| Src/FilepathEdit.cpp | Migrates clipboard usage to ClipboardUtils. |
| Src/FileCmpReportDlg.h | New “File Compare Report” dialog declaration and options model. |
| Src/FileCmpReportDlg.cpp | Implements dialog behavior, settings persistence, and selection collection. |
| Src/FileCmpReport.h | Declares unified HTML report generator and clipboard-copy entry points. |
| Src/FileCmpReport.cpp | Implements unified HTML report generation (header/footer + per-doc sections). |
| Src/DirView.cpp | Updates file-compare report generation path to use the unified report generator. |
| Src/DirDoc.h | Stores a temp file handle to keep clipboard-copied reports alive. |
| Src/DirDoc.cpp | Preserves report temp file after report generation completes. |
| Src/DirCmpReportDlg.cpp | Enables file control state handling for report file combo. |
| Src/DirCmpReport.h | Adds temp-file retention and removes bespoke CF_HTML generator method. |
| Src/DirCmpReport.cpp | Refactors clipboard copy to reuse new clipboard utilities and temp files. |
| Src/Common/ClipBoard.h | Removed legacy clipboard helper header (replaced by Clipboard.h). |
| Src/Common/ClipBoard.cpp | Removed legacy clipboard helper implementation (replaced by Clipboard.cpp). |
| Src/Common/Clipboard.h | New clipboard helper API under ClipboardUtils namespace. |
| Src/Common/Clipboard.cpp | New clipboard helper implementation (text/files + CF_HTML support). |
| Src/ClipboardHistory.cpp | Migrates clipboard text retrieval to ClipboardUtils::Get. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…rge function' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for generating a single File Compare Report from multiple open comparison windows.
Changes
Screenshots