Skip to content

Commit 2e2558b

Browse files
committed
Export: drop the Escape option, fix dialog↔function INI decoupling
1 parent 2e2b3e4 commit 2e2558b

11 files changed

Lines changed: 266 additions & 543 deletions

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ At its core, a rule engine allows any replacement to be enhanced with conditiona
3939
- [1. Search and Replace](#1-search-and-replace)
4040
- [2. List View and Layout](#2-list-view-and-layout)
4141
- [3. CSV Options](#3-csv-options)
42-
- [4. Export](#4-export)
42+
- [4. Copy Report](#4-copy-report)
4343
- [5. Appearance](#5-appearance)
4444
- [INI-Only Settings](#ini-only-settings)
4545
- [Multilingual UI Support](#multilingual-ui-support)
@@ -393,8 +393,8 @@ Settings specific to the CSV column manipulation and alignment features.
393393
- **CSV: Header lines to exclude** — Number of header rows protected from sort, duplicate detection, and find/replace. Set to `0` to disable.
394394
- **Mark duplicate rows with bookmarks** — Places Notepad++ bookmarks on duplicate lines for navigation (F2 / Shift+F2). Clears existing bookmarks when active.
395395

396-
### 4. Export
397-
Configure how list data is exported to the clipboard via **Export Data** from the context menu.
396+
### 4. Copy Report
397+
Copies a report of the whole list to the clipboard via **Copy Report** from the context menu. The report always covers the entire list (selection is ignored) and is meant for spreadsheets; to copy entries back into MultiReplace use **Copy** instead.
398398

399399
- **Template** — Defines the output format using placeholders. Available placeholders:
400400
- `%FIND%` — Find pattern
@@ -404,11 +404,12 @@ Configure how list data is exported to the clipboard via **Export Data** from th
404404
- `%RCOUNT%` — Replace count
405405
- `%MODIFIED%` — Last modified timestamp
406406
- `%ROW%` — Row number
407-
- `%SEL%`Selected state (1/0)
407+
- `%SEL%`Enabled state (1/0)
408408
- `%REGEX%`, `%CASE%`, `%WORD%`, `%EXT%`, `%VAR%` — Option flags (1/0)
409409
- Use `\t` for tab delimiter (e.g., `%FIND%\t%REPLACE%\t%COMMENT%` for TSV format).
410-
- **Escape special characters** — When checked, converts newlines, tabs, and backslashes in field values to their escape sequences (`\n`, `\t`, `\\`). Useful for single-line formats.
411-
- **Include header row** — When checked, adds a header line with column names before the data rows.
410+
- **Include header row** — Adds a header line with column names before the data rows. Enabled by default.
411+
412+
Fields are always quoted in Excel-compatible CSV style (embedded `"` doubled, real newlines kept inside the quoted field), so the report pastes straight into a spreadsheet. This is a one-way report for spreadsheets; to copy entries back into MultiReplace use the context-menu **Copy** instead.
412413

413414
### 5. Appearance
414415
Customize the look and feel of the plugin window.

languages.ini

Lines changed: 153 additions & 238 deletions
Large diffs are not rendered by default.

src/ConfigManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ bool ConfigManager::save(const std::wstring& file) const
115115
L"General",
116116
L"SearchAndReplace", L"Interface", L"ReplaceInFiles", L"Engines", L"Lua",
117117
L"Scope", L"Csv", L"List", L"ListView", L"ResultDock",
118-
L"Export", L"Appearance", L"Tandem",
118+
L"Report", L"Appearance", L"Tandem",
119119
L"Window", L"Tabs", L"History",
120120
};
121121

src/MultiReplaceConfigDialog.cpp

Lines changed: 53 additions & 65 deletions
Large diffs are not rendered by default.

src/MultiReplaceConfigDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class MultiReplaceConfigDialog : public StaticDialog
108108
HWND _hListViewLayoutPanel = nullptr;
109109
HWND _hAppearancePanel = nullptr;
110110
HWND _hCsvFlowTabsPanel = nullptr;
111-
HWND _hExportPanel = nullptr;
111+
HWND _hReportPanel = nullptr;
112112

113113
HWND _hTooltip = nullptr;
114114
COLORREF _helpColor = RGB(0, 0, 255); // Default light mode blue

src/MultiReplacePanel.cpp

Lines changed: 33 additions & 201 deletions
Large diffs are not rendered by default.

src/MultiReplacePanel.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ class MultiReplace : public StaticDialog, public MultiReplaceEngine::ILuaEngineH
641641
struct Settings
642642
{
643643
bool tooltipsEnabled;
644-
bool exportToBashEnabled;
645644
bool muteSounds;
646645
bool doubleClickEditsEnabled;
647646
bool highlightMatchEnabled;
@@ -1026,7 +1025,6 @@ class MultiReplace : public StaticDialog, public MultiReplaceEngine::ILuaEngineH
10261025
inline static bool muteSounds = false; // Status for Bell if String hasn't been found
10271026
inline static bool doubleClickEditsEnabled = true; // Double click to Edit List entries
10281027
inline static bool highlightMatchEnabled = true; // HighlightMatch during Find in List
1029-
inline static bool exportToBashEnabled = false; // shows/hides the "Export to Bash" button
10301028
inline static bool isHoverTextEnabled = true; // Important to set on false as TIMER will be triggered at startup.
10311029
inline static int editFieldSize = 5; // Size of the edit field for find/replace input
10321030
inline static bool stayAfterReplaceEnabled = false; // Status for keeping panel open after replace
@@ -1159,7 +1157,7 @@ class MultiReplace : public StaticDialog, public MultiReplaceEngine::ILuaEngineH
11591157
bool moveItemsInReplaceList(std::vector<size_t>& indices, Direction direction);
11601158
void sortItemsInReplaceList(const std::vector<size_t>& originalOrder, const std::vector<size_t>& newOrder, const std::map<int, SortDirection>& previousColumnSortOrder, int columnID, SortDirection direction);
11611159
void scrollToIndices(size_t firstIndex, size_t lastIndex);
1162-
void exportDataToClipboard();
1160+
void copyReportToClipboard();
11631161

11641162
#pragma endregion
11651163

@@ -1462,7 +1460,6 @@ class MultiReplace : public StaticDialog, public MultiReplaceEngine::ILuaEngineH
14621460
void loadListFromCsvSilent(const std::wstring& filePath, std::vector<ReplaceItemData>& list, TabState* tabForSettings = nullptr, LoadSource source = LoadSource::Internal);
14631461
void autoShowCommentsColumn();
14641462
void checkForFileChangesAtStartup();
1465-
void exportToBashScript(const std::wstring& fileName);
14661463
void saveAllTabs();
14671464

14681465
#pragma endregion

src/MultiReplacePanel_BatchUI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void MultiReplace::setBatchUIState(HWND hDlg, bool inProgress) {
2626
IDC_FIND_NEXT_BUTTON, IDC_FIND_PREV_BUTTON, IDC_MARK_MATCHES_BUTTON,
2727
IDC_COPY_MARKED_TEXT_BUTTON, IDC_LOAD_FROM_CSV_BUTTON, IDC_LOAD_LIST_BUTTON,
2828
IDC_NEW_LIST_BUTTON, IDC_SAVE_TO_CSV_BUTTON, IDC_SAVE_BUTTON, IDC_SAVE_AS_BUTTON,
29-
IDC_EXPORT_BASH_BUTTON, IDC_BROWSE_DIR_BUTTON, IDC_UP_BUTTON, IDC_DOWN_BUTTON,
29+
IDC_BROWSE_DIR_BUTTON, IDC_UP_BUTTON, IDC_DOWN_BUTTON,
3030
IDC_USE_LIST_BUTTON, IDC_SWAP_BUTTON, IDC_COLUMN_SORT_DESC_BUTTON,
3131
IDC_COLUMN_SORT_ASC_BUTTON, IDC_COLUMN_DROP_BUTTON, IDC_COLUMN_COPY_BUTTON,
3232
IDC_COLUMN_HIGHLIGHT_BUTTON, IDC_FIND_EDIT, IDC_REPLACE_EDIT, IDC_FILTER_EDIT,

src/StaticDialog/resource.h

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
#define IDC_SAVE_TO_CSV_BUTTON 5023
7575
#define IDC_SAVE_BUTTON 5024
7676
#define IDC_SAVE_AS_BUTTON 5025
77-
#define IDC_EXPORT_BASH_BUTTON 5026
7877

7978
#define IDC_UP_BUTTON 5027
8079
#define IDC_DOWN_BUTTON 5028
@@ -215,7 +214,7 @@
215214
#define IDM_DELETE_LINES 5708
216215
#define IDM_ADD_NEW_LINE 5709
217216
#define IDM_COPY_DATA_TO_FIELDS 5710
218-
#define IDM_EXPORT_DATA 5711
217+
#define IDM_COPY_REPORT 5711
219218
#define IDM_SEARCH_IN_LIST 5712
220219
#define IDM_ENABLE_LINES 5713
221220
#define IDM_DISABLE_LINES 5714
@@ -364,14 +363,11 @@
364363
// -------------------------------------------------------------------
365364
// Export Data Panel (7950-7959)
366365
// -------------------------------------------------------------------
367-
#define IDC_CFG_GRP_EXPORT_DATA 7950
368-
#define IDC_CFG_EXPORT_FORMAT_LABEL 7951
369-
#define IDC_CFG_EXPORT_FORMAT_COMBO 7952
370-
#define IDC_CFG_EXPORT_TEMPLATE_LABEL 7953
371-
#define IDC_CFG_EXPORT_TEMPLATE_EDIT 7954
372-
#define IDC_CFG_EXPORT_ESCAPE_CHECK 7955
373-
#define IDC_CFG_EXPORT_HEADER_CHECK 7956
374-
#define IDC_CFG_EXPORT_TEMPLATE_HELP 7957
366+
#define IDC_CFG_GRP_REPORT 7950
367+
#define IDC_CFG_REPORT_TEMPLATE_LABEL 7953
368+
#define IDC_CFG_REPORT_TEMPLATE_EDIT 7954
369+
#define IDC_CFG_REPORT_HEADER_CHECK 7956
370+
#define IDC_CFG_REPORT_TEMPLATE_HELP 7957
375371

376372
// -------------------------------------------------------------------
377373
// Appearance Panel - Interface Group (7960-7969)

src/StringUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ namespace StringUtils {
7676
std::string escapeSpecialChars(const std::string& input, bool extended);
7777

7878
// Translate escape sequences (\n, \r, \t, \xHH, \oOOO, \dDDD, \bBBBBBBBB, \uHHHH) to their values.
79-
// \n and \r become __NEWLINE__ and __CARRIAGERETURN__ placeholders for bash export.
79+
// \n and \r become __NEWLINE__ and __CARRIAGERETURN__ placeholders.
8080
std::string translateEscapes(const std::string& input);
8181

8282
// Replace '\n' / '\r' according to the active mode (Normal / Extended / Regex)

0 commit comments

Comments
 (0)