OSDN Git Service

Add Expand Different Subfolders menu item (#1964)
[winmerge-jp/winmerge-jp.git] / Src / OpenDoc.cpp
1 // OpenDoc.cpp : implementation file
2 //
3
4 #include "stdafx.h"
5 #include "OpenDoc.h"
6 #include "OpenView.h"
7 #include "OptionsDef.h"
8 #include "OptionsMgr.h"
9 #include "MergeApp.h"
10
11 // COpenDoc
12
13 IMPLEMENT_DYNCREATE(COpenDoc, CDocument)
14
15 COpenDoc::COpenDoc()
16         : m_bRecurse(false)
17         , m_dwFlags()
18         , m_nWindowType(-1)
19         , m_cTableDelimiter(',')
20         , m_cTableQuote('\"')
21         , m_bTableAllowNewLinesInQuotes(false)
22 {
23         PackingInfo infoUnpacker;
24         PrediffingInfo infoPrediffer;
25         m_strUnpackerPipeline = GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED) ? infoUnpacker.GetPluginPipeline() : _T("");
26         m_strPredifferPipeline = GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED) ? infoPrediffer.GetPluginPipeline() : _T("");
27 }
28
29 BOOL COpenDoc::OnNewDocument()
30 {
31         if (!CDocument::OnNewDocument())
32                 return FALSE;
33         return TRUE;
34 }
35
36 COpenDoc::~COpenDoc()
37 {
38 }
39
40 void COpenDoc::RefreshOptions()
41 {
42         m_bRecurse = GetOptionsMgr()->GetBool(OPT_CMP_INCLUDE_SUBDIRS);
43         UpdateAllViews(nullptr);
44 }
45
46 /**
47  * @brief Update any resources necessary after a GUI language change
48  */
49 void COpenDoc::UpdateResources()
50 {
51         SetTitle(_("Select Files or Folders").c_str());
52         POSITION pos = GetFirstViewPosition();
53         COpenView *pView = static_cast<COpenView *>(GetNextView(pos));
54         pView->UpdateResources();
55 }
56
57 BEGIN_MESSAGE_MAP(COpenDoc, CDocument)
58 END_MESSAGE_MAP()