#include "parsers/crystallineparser.h"
#include "SyntaxColors.h"
#include "MergeApp.h"
-#include "OptionsMgr.h"
-#include "OptionsDef.h"
#include "SubstitutionList.h"
-#include "stringdiffs.h"
-
-using namespace strdiff;
using Poco::Debugger;
using Poco::format;
{
ASSERT(pCtxt != nullptr);
- bool ignoredSubstitutionsAreEnabled = GetOptionsMgr()->GetBool(OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED);
- if (!ignoredSubstitutionsAreEnabled || theApp.m_pIgnoredSubstitutionsList->GetCount() == 0)
+ bool ignoredSubstitutionsEnabled = GetOptionsMgr()->GetBool(OPT_IGNORED_SUBSTITUTIONS_ENABLED);
+ if (!ignoredSubstitutionsEnabled || theApp.m_pIgnoredSubstitutionsList->GetCount() == 0)
{
pCtxt->m_pSubstitutionList.reset();
return;
void AddRegExp(const std::string& regularExpression);
void RemoveAllFilters();
bool HasRegExps() const;
- size_t GetCount() const { return m_list.size(); }
bool Match(const std::string& string, int codepage = ucr::CP_UTF_8);
const char * GetLastMatchExpression() const;
- const filter_item& operator[](int index) const;
private:
std::vector <filter_item_ptr> m_list;
{
return m_lastMatchExpression->c_str();
}
-
-inline const filter_item& FilterList::operator[](int index) const
-{
- const filter_item_ptr &item = m_list[index];
- return *item;
-}
-
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(IgnoredSubstitutionsFiltersDlg)
- DDX_Check(pDX, IDC_IGNORED_SUSBSTITUTIONS_ARE_ENABLED, m_bEnabled);
+ DDX_Check(pDX, IDC_IGNORED_SUSBSTITUTIONS_ENABLED, m_bEnabled);
DDX_Control(pDX, IDC_IGNORED_SUBSTITUTIONS_FILTER, m_listFilters);
//}}AFX_DATA_MAP
}
lineFilters->CloneFrom(theApp.m_pLineFilters.get());
lineFiltersDlg.SetList(lineFilters.get());
- const bool ignoredSubstitutionsAreEnabledOrig = GetOptionsMgr()->GetBool(OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED);
+ const bool ignoredSubstitutionsEnabledOrig = GetOptionsMgr()->GetBool(OPT_IGNORED_SUBSTITUTIONS_ENABLED);
- ignoredSubstitutionsDlg.m_bEnabled = ignoredSubstitutionsAreEnabledOrig;
+ ignoredSubstitutionsDlg.m_bEnabled = ignoredSubstitutionsEnabledOrig;
ignoredSubstitutions->CloneFrom(theApp.m_pIgnoredSubstitutionsList.get());
ignoredSubstitutionsDlg.SetList(ignoredSubstitutions.get());
bool linefiltersEnabled = lineFiltersDlg.m_bIgnoreRegExp;
GetOptionsMgr()->SaveOption(OPT_LINEFILTER_ENABLED, linefiltersEnabled);
- bool ignoredSubstitutionsAreEnabled = ignoredSubstitutionsDlg.m_bEnabled;
- GetOptionsMgr()->SaveOption(OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED, ignoredSubstitutionsAreEnabled);
+ bool ignoredSubstitutionsEnabled = ignoredSubstitutionsDlg.m_bEnabled;
+ GetOptionsMgr()->SaveOption(OPT_IGNORED_SUBSTITUTIONS_ENABLED, ignoredSubstitutionsEnabled);
// Check if compare documents need rescanning
bool bFileCompareRescan = false;
if
(
linefiltersEnabled != lineFiltersEnabledOrig
- || ignoredSubstitutionsAreEnabled != ignoredSubstitutionsAreEnabledOrig
+ || ignoredSubstitutionsEnabled != ignoredSubstitutionsEnabledOrig
|| !lineFilters->Compare(theApp.m_pLineFilters.get())
|| !ignoredSubstitutions->Compare(theApp.m_pIgnoredSubstitutionsList.get())
)
theApp.m_pIgnoredSubstitutionsList->CloneFrom(ignoredSubstitutions.get());
theApp.m_pIgnoredSubstitutionsList->SaveFilters();
-
if (bFileCompareRescan)
{
for (auto pMergeDoc : GetAllMergeDocs())
FONT 8, "MS Shell Dlg", 0, 0, 0x1\r
BEGIN\r
LTEXT "The changes that appear on the panels as the listed pairs below will be ignored or marked as insignificant. Patches are unaffected.",IDC_STATIC,8,6,516,19\r
- CONTROL "Enable",IDC_IGNORED_SUSBSTITUTIONS_ARE_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,28,351,9\r
+ CONTROL "Enable",IDC_IGNORED_SUSBSTITUTIONS_ENABLED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,28,351,9\r
CONTROL "",IDC_IGNORED_SUBSTITUTIONS_FILTER,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,6,40,516,111\r
PUSHBUTTON "Add",IDC_LFILTER_ADDBTN,7,156,50,14\r
PUSHBUTTON "Remove",IDC_LFILTER_REMOVEBTN,63,156,50,14\r
<UserProperties RESOURCE_FILE="Merge.rc" />\r
</VisualStudio>\r
</ProjectExtensions>\r
-</Project>\r
+</Project>
\ No newline at end of file
<UserProperties RESOURCE_FILE="Merge.rc" />\r
</VisualStudio>\r
</ProjectExtensions>\r
-</Project>\r
+</Project>
\ No newline at end of file
m_diffWrapper.SetFilterList(_T(""));
}
- if (GetOptionsMgr()->GetBool(OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED) && theApp.m_pIgnoredSubstitutionsList)
+ if (GetOptionsMgr()->GetBool(OPT_IGNORED_SUBSTITUTIONS_ENABLED) && theApp.m_pIgnoredSubstitutionsList)
{
m_diffWrapper.SetIgnoredSubstitutionsList(theApp.m_pIgnoredSubstitutionsList->MakeSubstitutionList());
}
#include "stringdiffs.h"
#include "UnicodeString.h"
#include "IgnoredSubstitutionsList.h"
-#include "OptionsMgr.h"
-#include "OptionsDef.h"
#include "Merge.h"
#ifdef _DEBUG
//Rescan();
}
return;
- //for (int nGroup = 0; nGroup < m_nGroups; nGroup++)
- // for (int nBuffer = 0; nBuffer < m_nBuffers; nBuffer++)
- // HighlightDiffRect(m_pView[nGroup][nBuffer], rc[nBuffer]);
}
static inline bool IsDiffPerLine(bool bTableEditing, const DIFFRANGE& cd)
ON_UPDATE_COMMAND_UI(ID_SELECTLINEDIFF, OnUpdateSelectLineDiff)
ON_COMMAND(ID_SELECTPREVLINEDIFF, OnSelectLineDiff<true>)
ON_UPDATE_COMMAND_UI(ID_SELECTPREVLINEDIFF, OnUpdateSelectLineDiff)
- ON_COMMAND(ID_ADD_TO_IGNORED_SUBSTITUTIONS, OnAddToIgnoredSubstitutions<false>)
+ ON_COMMAND(ID_ADD_TO_IGNORED_SUBSTITUTIONS, OnAddToIgnoredSubstitutions)
ON_UPDATE_COMMAND_UI(ID_ADD_TO_IGNORED_SUBSTITUTIONS, OnUpdateAddToIgnoredSubstitutions)
ON_WM_CONTEXTMENU()
ON_UPDATE_COMMAND_UI(ID_EDIT_REPLACE, OnUpdateEditReplace)
pCmdUI->Enable(!GetDocument()->IsEditedAfterRescan());
}
-template<bool reversed>
void CMergeEditView::OnAddToIgnoredSubstitutions()
{
// Pass this to the document, to compare this file to other
- GetDocument()->AddToIgnoredSubstitutions(this, reversed);
+ GetDocument()->AddToIgnoredSubstitutions(this, false);
}
void CMergeEditView::OnUpdateAddToIgnoredSubstitutions(CCmdUI* pCmdUI)
pCmdUI->Enable(GetDocument()->m_nBuffers == 2 && !GetDocument()->IsEditedAfterRescan());
}
-
/**
* @brief Enable/disable Replace-menuitem
*/
template<bool reversed>
afx_msg void OnSelectLineDiff();
afx_msg void OnUpdateSelectLineDiff(CCmdUI* pCmdUI);
- template<bool reversed>
afx_msg void OnAddToIgnoredSubstitutions();
afx_msg void OnUpdateAddToIgnoredSubstitutions(CCmdUI* pCmdUI);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
extern const String OPT_FILEFILTER_SHARED OP("Settings/Filters/Shared");
/// Ignored Susbstitutions
-extern const String OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED OP("Settings/IgnoredSubstitutionsAreEnabled");
+extern const String OPT_IGNORED_SUBSTITUTIONS_ENABLED OP("Settings/IgnoredSubstitutionsEnabled");
// Archive support
extern const String OPT_ARCHIVE_ENABLE OP("Merge7z/Enable");
pOptions->InitOption(OPT_CUSTOM_TEMP_PATH, _T(""));
pOptions->InitOption(OPT_LINEFILTER_ENABLED, false);
- pOptions->InitOption(OPT_IGNORED_SUBSTITUTIONS_ARE_ENABLED, false);
+ pOptions->InitOption(OPT_IGNORED_SUBSTITUTIONS_ENABLED, false);
pOptions->InitOption(OPT_FILEFILTER_CURRENT, _T("*.*"));
// CMainFrame initializes this when it is empty.
#define IDC_ALL_WHITE 1027\r
#define IDC_WHITE_CHANGE 1028\r
#define IDC_WHITESPACE 1029\r
-#define IDC_IGNORED_SUSBSTITUTIONS_ARE_ENABLED 1030\r
+#define IDC_IGNORED_SUSBSTITUTIONS_ENABLED 1030\r
#define IDC_EOL_SENSITIVE 1032\r
#define IDC_CP_SENSITIVE 1033\r
#define IDC_DIFFERENCE_COLOR 1035\r
#define IDS_IGNSUB_STR4 34177\r
#define IDS_IGNSUB_STR5 34178\r
#define ID_FILE_COMPARE_PROPERTIES 34181\r
-#define ID_FIRSTFILE 34182\r
-#define ID_PREVFILE 34183\r
-#define ID_NEXTFILE 34184\r
-#define ID_LASTFILE 34185\r
+#define ID_FIRSTFILE 34182\r
+#define ID_PREVFILE 34183\r
+#define ID_NEXTFILE 34184\r
+#define ID_LASTFILE 34185\r
+#define IDS_OCRRESULT_TEXTONLY 34186\r
+#define IDS_OCRRESULT_POS_LINE 34187\r
+#define IDS_OCRRESULT_POS_WORD 34188\r
\r
// Next default values for new objects\r
// \r
#ifndef APSTUDIO_READONLY_SYMBOLS\r
#define _APS_3D_CONTROLS 1\r
#define _APS_NEXT_RESOURCE_VALUE 253\r
-#define _APS_NEXT_COMMAND_VALUE 34186\r
+#define _APS_NEXT_COMMAND_VALUE 34189\r
#define _APS_NEXT_CONTROL_VALUE 8837\r
#define _APS_NEXT_SYMED_VALUE 118\r
#endif\r