Skip to content

Commit

Permalink
Merge a424ce5 into 7858990
Browse files Browse the repository at this point in the history
  • Loading branch information
sanomari authored Oct 17, 2021
2 parents 7858990 + a424ce5 commit 6404e24
Show file tree
Hide file tree
Showing 42 changed files with 314 additions and 303 deletions.
4 changes: 2 additions & 2 deletions sakura_core/CAutoReloadAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ bool CAutoReloadAgent::_ToDoChecking() const
if(hwndActive!=CEditWnd::getInstance()->GetHwnd())return false;
if(!GetListeningDoc()->m_cDocFile.GetFilePathClass().IsValidPath())return false;
if(GetListeningDoc()->m_cDocFile.IsFileTimeZero()) return false; /* 現在編集中のファイルのタイムスタンプ */
if(GetListeningDoc()->m_pcEditWnd->m_pPrintPreview ) return false; // 印刷プレビュー中 2013/5/8 Uchi
if(GetEditWnd().m_pPrintPreview ) return false; // 印刷プレビュー中 2013/5/8 Uchi
return true;
}

Expand Down Expand Up @@ -134,7 +134,7 @@ void CAutoReloadAgent::CheckFileTimeStamp()
WCHAR szText[40];
const CFileTime& ctime = pcDoc->m_cDocFile.GetFileTime();
auto_sprintf( szText, LS(STR_AUTORELOAD_NOFITY), ctime->wHour, ctime->wMinute, ctime->wSecond );
pcDoc->m_pcEditWnd->SendStatusMessage( szText );
GetEditWnd().SendStatusMessage( szText );
}
break;
case WU_AUTOLOAD: //以後未編集で再ロード
Expand Down
2 changes: 1 addition & 1 deletion sakura_core/CCodeChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ ECallbackResult CCodeChecker::OnCheckSave(SSaveInfo* pSaveInfo)
case IDCANCEL:
{
CLogicPoint pt(point.x < 0 ? CLogicInt(0) : point.x, point.y);
pcDoc->m_pcEditWnd->GetActiveView().GetCommander().Command_MOVECURSOR(pt, 0);
GetEditWnd().GetActiveView().GetCommander().Command_MOVECURSOR(pt, 0);
}
return CALLBACK_INTERRUPT; //中断
}
Expand Down
5 changes: 3 additions & 2 deletions sakura_core/CEditApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ void CEditApp::Create(HINSTANCE hInst, int nGroupId)
//マクロ
m_pcSMacroMgr = new CSMacroMgr();

//ドキュメントの作成
m_pcEditDoc->Create();

//ウィンドウの作成
m_pcEditWnd = CEditWnd::getInstance();

m_pcEditDoc->Create( m_pcEditWnd );
m_pcEditWnd->Create( m_pcEditDoc, &m_cIcons, nGroupId );

//MRU管理
Expand Down
10 changes: 5 additions & 5 deletions sakura_core/CGrepAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,13 +478,13 @@ DWORD CGrepAgent::DoGrep(
}

//2014.06.13 別ウィンドウで検索したとき用にGrepダイアログの検索キーを設定
pcViewDst->m_pcEditWnd->m_cDlgGrep.m_strText = pcmGrepKey->GetStringPtr();
pcViewDst->m_pcEditWnd->m_cDlgGrep.m_bSetText = true;
pcViewDst->m_pcEditWnd->m_cDlgGrepReplace.m_strText = pcmGrepKey->GetStringPtr();
GetEditWnd().m_cDlgGrep.m_strText = pcmGrepKey->GetStringPtr();
GetEditWnd().m_cDlgGrep.m_bSetText = true;
GetEditWnd().m_cDlgGrepReplace.m_strText = pcmGrepKey->GetStringPtr();
if( bGrepReplace ){
pcViewDst->m_pcEditWnd->m_cDlgGrepReplace.m_strText2 = pcmGrepReplace->GetStringPtr();
GetEditWnd().m_cDlgGrepReplace.m_strText2 = pcmGrepReplace->GetStringPtr();
}
pcViewDst->m_pcEditWnd->m_cDlgGrepReplace.m_bSetText = true;
GetEditWnd().m_cDlgGrepReplace.m_bSetText = true;
hwndCancel = cDlgCancel.DoModeless( G_AppInstance(), pcViewDst->m_hwndParent, IDD_GREPRUNNING );

::SetDlgItemInt( hwndCancel, IDC_STATIC_HITCOUNT, 0, FALSE );
Expand Down
24 changes: 12 additions & 12 deletions sakura_core/CLoadAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,18 @@ ELoadResult CLoadAgent::OnLoad(const SLoadInfo& sLoadInfo)

// 文書種別確定
pcDoc->m_cDocType.SetDocumentType( sLoadInfo.nType, true );
pcDoc->m_pcEditWnd->m_pcViewFontMiniMap->UpdateFont(&pcDoc->m_pcEditWnd->GetLogfont());
InitCharWidthCache( pcDoc->m_pcEditWnd->m_pcViewFontMiniMap->GetLogfont(), CWM_FONT_MINIMAP );
SelectCharWidthCache( CWM_FONT_EDIT, pcDoc->m_pcEditWnd->GetLogfontCacheMode() );
InitCharWidthCache( pcDoc->m_pcEditWnd->GetLogfont() );
pcDoc->m_pcEditWnd->m_pcViewFont->UpdateFont(&pcDoc->m_pcEditWnd->GetLogfont());
GetEditWnd().m_pcViewFontMiniMap->UpdateFont(&GetEditWnd().GetLogfont());
InitCharWidthCache( GetEditWnd().m_pcViewFontMiniMap->GetLogfont(), CWM_FONT_MINIMAP );
SelectCharWidthCache( CWM_FONT_EDIT, GetEditWnd().GetLogfontCacheMode() );
InitCharWidthCache( GetEditWnd().GetLogfont() );
GetEditWnd().m_pcViewFont->UpdateFont(&GetEditWnd().GetLogfont());

// 起動と同時に読む場合は予めアウトライン解析画面を配置しておく
// (ファイル読み込み開始とともにビューが表示されるので、あとで配置すると画面のちらつきが大きいの)
if( !pcDoc->m_pcEditWnd->m_cDlgFuncList.m_bEditWndReady ){
pcDoc->m_pcEditWnd->m_cDlgFuncList.Refresh();
HWND hEditWnd = pcDoc->m_pcEditWnd->GetHwnd();
if( !::IsIconic( hEditWnd ) && pcDoc->m_pcEditWnd->m_cDlgFuncList.GetHwnd() ){
if( !GetEditWnd().m_cDlgFuncList.m_bEditWndReady ){
GetEditWnd().m_cDlgFuncList.Refresh();
HWND hEditWnd = GetEditWnd().GetHwnd();
if( !::IsIconic( hEditWnd ) && GetEditWnd().m_cDlgFuncList.GetHwnd() ){
RECT rc;
::GetClientRect( hEditWnd, &rc );
::SendMessageAny( hEditWnd, WM_SIZE, ::IsZoomed( hEditWnd )? SIZE_MAXIMIZED: SIZE_RESTORED, MAKELONG( rc.right - rc.left, rc.bottom - rc.top ) );
Expand Down Expand Up @@ -258,8 +258,8 @@ ELoadResult CLoadAgent::OnLoad(const SLoadInfo& sLoadInfo)
nMaxLineKetas = CKetaXInt(MAXLINEKETAS);

CProgressSubject* pOld = CEditApp::getInstance()->m_pcVisualProgress->CProgressListener::Listen(&pcDoc->m_cLayoutMgr);
pcDoc->m_cLayoutMgr.SetLayoutInfo( true, true, ref, ref.m_nTabSpace, ref.m_nTsvMode, nMaxLineKetas, CLayoutXInt(-1), &pcDoc->m_pcEditWnd->GetLogfont() );
pcDoc->m_pcEditWnd->ClearViewCaretPosInfo();
pcDoc->m_cLayoutMgr.SetLayoutInfo( true, true, ref, ref.m_nTabSpace, ref.m_nTsvMode, nMaxLineKetas, CLayoutXInt(-1), &GetEditWnd().GetLogfont() );
GetEditWnd().ClearViewCaretPosInfo();
if (pcDoc->m_cLayoutMgr.m_tsvInfo.m_nTsvMode != TSV_MODE_NONE) {
pcDoc->m_cLayoutMgr.m_tsvInfo.CalcTabLength(pcDoc->m_cLayoutMgr.m_pcDocLineMgr);
}
Expand All @@ -274,7 +274,7 @@ void CLoadAgent::OnAfterLoad(const SLoadInfo& sLoadInfo)
CEditDoc* pcDoc = GetListeningDoc();

/* 親ウィンドウのタイトルを更新 */
pcDoc->m_pcEditWnd->UpdateCaption();
GetEditWnd().UpdateCaption();

// -- -- ※ InitAllViewでやってたこと -- -- // // 2009.08.28 nasukoji CEditView::OnAfterLoad()からここに移動
pcDoc->m_nCommandExecNum=0;
Expand Down
3 changes: 0 additions & 3 deletions sakura_core/_main/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ LPCWSTR GetAppName( void )
return pcProcess->GetAppName();
}

//2007.10.02 kobake CEditWndのインスタンスへのポインタをここに保存しておく
CEditWnd* g_pcEditWnd = NULL;

/*! 選択領域描画用パラメータ */
const COLORREF SELECTEDAREA_RGB = RGB( 255, 255, 255 );
const int SELECTEDAREA_ROP2 = R2_XORPEN;
Expand Down
4 changes: 0 additions & 4 deletions sakura_core/_main/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,5 @@ struct SSearchOption{
bool operator != (const SSearchOption& rhs) const noexcept;
};

//2007.10.02 kobake CEditWndのインスタンスへのポインタをここに保存しておく
class CEditWnd;
extern CEditWnd* g_pcEditWnd;

HINSTANCE G_AppInstance();
#endif /* SAKURA_GLOBAL_BD124BE7_A850_41F3_9F5D_8A4F0E45A4C9_H_ */
2 changes: 1 addition & 1 deletion sakura_core/cmd/CViewCommander_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ inline CEditDoc* CViewCommander::GetDocument()
}
inline CEditWnd* CViewCommander::GetEditWindow()
{
return m_pCommanderView->m_pcEditWnd;
return &GetEditWnd();
}
inline HWND CViewCommander::GetMainWindow()
{
Expand Down
3 changes: 1 addition & 2 deletions sakura_core/dlg/CDlgJump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ BOOL CDlgJump::OnBnClicked( int wID )
}
//To Here Feb. 20, 2001
{ //@@@ 2002.2.2 YAZAKI 指定行へジャンプを、ダイアログを表示するコマンドと、実際にジャンプするコマンドに分離。
CEditDoc* pCEditDoc = (CEditDoc*)m_lParam;
pCEditDoc->m_pcEditWnd->GetActiveView().GetCommander().HandleCommand(F_JUMP, true, 0, 0, 0, 0); // ジャンプコマンド発行
GetEditWnd().GetActiveView().GetCommander().HandleCommand(F_JUMP, true, 0, 0, 0, 0); // ジャンプコマンド発行
}
return TRUE;
case IDCANCEL:
Expand Down
8 changes: 4 additions & 4 deletions sakura_core/doc/CDocEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,21 @@ CDocEditor::CDocEditor(CEditDoc* pcDoc)
void CDocEditor::SetModified( bool flag, bool redraw)
{
if( redraw ){
m_pcDocRef->m_pcEditWnd->m_cDlgFuncList.NotifyDocModification();
GetEditWnd().m_cDlgFuncList.NotifyDocModification();
}

if( m_bIsDocModified == flag ) // 変更がなければ何もしない
return;

m_bIsDocModified = flag;
if( redraw )
m_pcDocRef->m_pcEditWnd->UpdateCaption();
GetEditWnd().UpdateCaption();
}

void CDocEditor::OnBeforeLoad(SLoadInfo* sLoadInfo)
{
//ビューのテキスト選択解除
GetListeningDoc()->m_pcEditWnd->Views_DisableSelectArea(true);
GetEditWnd().Views_DisableSelectArea(true);
}

void CDocEditor::OnAfterLoad(const SLoadInfo& sLoadInfo)
Expand Down Expand Up @@ -129,7 +129,7 @@ void CDocEditor::SetImeMode( int mode )
{
DWORD conv, sent;
HIMC hIme;
HWND hwnd = m_pcDocRef->m_pcEditWnd->GetActiveView().GetHwnd();
HWND hwnd = GetEditWnd().GetActiveView().GetHwnd();

hIme = ImmGetContext( hwnd ); //######大丈夫? // 2013.06.04 EditWndからViewに変更

Expand Down
46 changes: 23 additions & 23 deletions sakura_core/doc/CDocFileOperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ bool CDocFileOperation::FileLoad(
m_pcDocRef->RunAutoMacro( GetDllShareData().m_Common.m_sMacro.m_nMacroOnOpened );

//プラグイン:DocumentOpenイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &GetEditWnd().GetActiveView() );
}
return bRet;
}
Expand All @@ -167,21 +167,21 @@ void CDocFileOperation::ReloadCurrentFile(
)
{
//プラグイン:DocumentCloseイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &GetEditWnd().GetActiveView() );

if( !fexist(m_pcDocRef->m_cDocFile.GetFilePath()) ){
/* ファイルが存在しない */
// Jul. 26, 2003 ryoji BOMを標準設定に // IsBomDefOn使用 2013/5/17 Uchi
m_pcDocRef->m_cDocFile.SetCodeSet( nCharCode, CCodeTypeName( nCharCode ).IsBomDefOn() );
// カーソル位置表示を更新する // 2008.07.22 ryoji
m_pcDocRef->m_pcEditWnd->GetActiveView().GetCaret().ShowCaretPosInfo();
GetEditWnd().GetActiveView().GetCaret().ShowCaretPosInfo();
return;
}

//カーソル位置保存
CLayoutInt nViewTopLine = m_pcDocRef->m_pcEditWnd->GetActiveView().GetTextArea().GetViewTopLine(); /* 表示域の一番上の行(0開始) */
CLayoutInt nViewLeftCol = m_pcDocRef->m_pcEditWnd->GetActiveView().GetTextArea().GetViewLeftCol(); /* 表示域の一番左の桁(0開始) */
CLayoutPoint ptCaretPosXY = m_pcDocRef->m_pcEditWnd->GetActiveView().GetCaret().GetCaretLayoutPos();
CLayoutInt nViewTopLine = GetEditWnd().GetActiveView().GetTextArea().GetViewTopLine(); /* 表示域の一番上の行(0開始) */
CLayoutInt nViewLeftCol = GetEditWnd().GetActiveView().GetTextArea().GetViewLeftCol(); /* 表示域の一番左の桁(0開始) */
CLayoutPoint ptCaretPosXY = GetEditWnd().GetActiveView().GetCaret().GetCaretLayoutPos();

//ロード
SLoadInfo sLoadInfo;
Expand All @@ -195,18 +195,18 @@ void CDocFileOperation::ReloadCurrentFile(
// カーソル位置復元 (※ここではオプションのカーソル位置復元(=改行単位)が指定されていない場合でも復元する)
// 2007.08.23 ryoji 表示領域復元
if( ptCaretPosXY.GetY2() < m_pcDocRef->m_cLayoutMgr.GetLineCount() ){
m_pcDocRef->m_pcEditWnd->GetActiveView().GetTextArea().SetViewTopLine(nViewTopLine);
m_pcDocRef->m_pcEditWnd->GetActiveView().GetTextArea().SetViewLeftCol(nViewLeftCol);
GetEditWnd().GetActiveView().GetTextArea().SetViewTopLine(nViewTopLine);
GetEditWnd().GetActiveView().GetTextArea().SetViewLeftCol(nViewLeftCol);
}
m_pcDocRef->m_pcEditWnd->GetActiveView().GetCaret().MoveCursorProperly( ptCaretPosXY, true ); // 2007.08.23 ryoji MoveCursor()->MoveCursorProperly()
m_pcDocRef->m_pcEditWnd->GetActiveView().GetCaret().m_nCaretPosX_Prev = m_pcDocRef->m_pcEditWnd->GetActiveView().GetCaret().GetCaretLayoutPos().GetX2();
GetEditWnd().GetActiveView().GetCaret().MoveCursorProperly( ptCaretPosXY, true ); // 2007.08.23 ryoji MoveCursor()->MoveCursorProperly()
GetEditWnd().GetActiveView().GetCaret().m_nCaretPosX_Prev = GetEditWnd().GetActiveView().GetCaret().GetCaretLayoutPos().GetX2();

// 2006.09.01 ryoji オープン後自動実行マクロを実行する
if( bRet ){
m_pcDocRef->RunAutoMacro( GetDllShareData().m_Common.m_sMacro.m_nMacroOnOpened );

//プラグイン:DocumentOpenイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &GetEditWnd().GetActiveView() );
}
}

Expand Down Expand Up @@ -273,7 +273,7 @@ bool CDocFileOperation::SaveFileDialog(
SYSTEMTIME localTime = {};
::GetLocalTime( &localTime );
auto dateTimeString = GetDateTimeFormat( L"_%Y%m%d_%H%M%S", localTime );
const EditNode* node = CAppNodeManager::getInstance()->GetEditNode( m_pcDocRef->m_pcEditWnd->GetHwnd() );
const EditNode* node = CAppNodeManager::getInstance()->GetEditNode( GetEditWnd().GetHwnd() );
const int nId = (node != NULL && 0 < node->m_nId) ? node->m_nId : 0;
auto_sprintf_s( pSaveInfo->cFilePath, pSaveInfo->cFilePath.GetBufferCount(), L"%s%.0d%s", LS(STR_NO_TITLE2), nId, dateTimeString.c_str() );
}
Expand Down Expand Up @@ -339,11 +339,11 @@ bool CDocFileOperation::DoSaveFlow(SSaveInfo* pSaveInfo)
m_pcDocRef->RunAutoMacro( GetDllShareData().m_Common.m_sMacro.m_nMacroOnSave, pSaveInfo->cFilePath );

//プラグイン:DocumentBeforeSaveイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_BEFORE_SAVE, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_BEFORE_SAVE, &GetEditWnd().GetActiveView() );

if(!pSaveInfo->bOverwriteMode){ //上書きでなければ前文書のクローズイベントを呼ぶ
//プラグイン:DocumentCloseイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &GetEditWnd().GetActiveView() );
}

//セーブ処理
Expand All @@ -352,7 +352,7 @@ bool CDocFileOperation::DoSaveFlow(SSaveInfo* pSaveInfo)
m_pcDocRef->NotifyAfterSave(*pSaveInfo); //後処理

//プラグイン:DocumentAfterSaveイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_AFTER_SAVE, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_AFTER_SAVE, &GetEditWnd().GetActiveView() );

//結果
eSaveResult = SAVED_OK; //###仮
Expand Down Expand Up @@ -435,7 +435,7 @@ bool CDocFileOperation::FileSaveAs( const WCHAR* filename,ECodeType eCodeType, E
m_pcDocRef->RunAutoMacro( GetDllShareData().m_Common.m_sMacro.m_nMacroOnOpened );

//プラグイン:DocumentOpenイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &GetEditWnd().GetActiveView() );

return true;
}
Expand All @@ -461,7 +461,7 @@ bool CDocFileOperation::FileClose()
}

//プラグイン:DocumentCloseイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &GetEditWnd().GetActiveView() );

/* 既存データのクリア */
m_pcDocRef->InitDoc();
Expand All @@ -472,10 +472,10 @@ bool CDocFileOperation::FileClose()
m_pcDocRef->SetCurDirNotitle();

// 無題番号取得
CAppNodeManager::getInstance()->GetNoNameNumber( m_pcDocRef->m_pcEditWnd->GetHwnd() );
CAppNodeManager::getInstance()->GetNoNameNumber( GetEditWnd().GetHwnd() );

/* 親ウィンドウのタイトルを更新 */
m_pcDocRef->m_pcEditWnd->UpdateCaption();
GetEditWnd().UpdateCaption();

// 2006.09.01 ryoji オープン後自動実行マクロを実行する
m_pcDocRef->RunAutoMacro( GetDllShareData().m_Common.m_sMacro.m_nMacroOnOpened );
Expand All @@ -498,7 +498,7 @@ void CDocFileOperation::FileCloseOpen( const SLoadInfo& _sLoadInfo )
}

//プラグイン:DocumentCloseイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_CLOSE, &GetEditWnd().GetActiveView() );

//ファイル名指定が無い場合はダイアログで入力させる
SLoadInfo sLoadInfo = _sLoadInfo;
Expand Down Expand Up @@ -534,16 +534,16 @@ void CDocFileOperation::FileCloseOpen( const SLoadInfo& _sLoadInfo )

if( !m_pcDocRef->m_cDocFile.GetFilePathClass().IsValidPath() ){
m_pcDocRef->SetCurDirNotitle();
CAppNodeManager::getInstance()->GetNoNameNumber( m_pcDocRef->m_pcEditWnd->GetHwnd() );
CAppNodeManager::getInstance()->GetNoNameNumber( GetEditWnd().GetHwnd() );
}

/* 親ウィンドウのタイトルを更新 */
m_pcDocRef->m_pcEditWnd->UpdateCaption();
GetEditWnd().UpdateCaption();

// オープン後自動実行マクロを実行する
// ※ロードしてなくても(無題)には変更済み
m_pcDocRef->RunAutoMacro( GetDllShareData().m_Common.m_sMacro.m_nMacroOnOpened );

//プラグイン:DocumentOpenイベント実行
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &m_pcDocRef->m_pcEditWnd->GetActiveView() );
CJackManager::getInstance()->InvokePlugins( PP_DOCUMENT_OPEN, &GetEditWnd().GetActiveView() );
}
8 changes: 4 additions & 4 deletions sakura_core/doc/CDocType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ void CDocType::SetDocumentIcon()

HICON hIconBig, hIconSmall;
if( this->GetDocumentAttribute().m_bUseDocumentIcon )
m_pcDocRef->m_pcEditWnd->GetRelatedIcon( m_pcDocRef->m_cDocFile.GetFilePath(), &hIconBig, &hIconSmall );
GetEditWnd().GetRelatedIcon( m_pcDocRef->m_cDocFile.GetFilePath(), &hIconBig, &hIconSmall );
else
m_pcDocRef->m_pcEditWnd->GetDefaultIcon( &hIconBig, &hIconSmall );
GetEditWnd().GetDefaultIcon( &hIconBig, &hIconSmall );

m_pcDocRef->m_pcEditWnd->SetWindowIcon( hIconBig, ICON_BIG );
m_pcDocRef->m_pcEditWnd->SetWindowIcon( hIconSmall, ICON_SMALL );
GetEditWnd().SetWindowIcon( hIconBig, ICON_BIG );
GetEditWnd().SetWindowIcon( hIconSmall, ICON_SMALL );
}
2 changes: 1 addition & 1 deletion sakura_core/doc/CDocVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void CDocVisitor::SetAllEol(CEol cEol)

if( bReplace ){
m_pcDocRef->m_cLayoutMgr._DoLayout(false);
m_pcDocRef->m_pcEditWnd->ClearViewCaretPosInfo();
GetEditWnd().ClearViewCaretPosInfo();
if( m_pcDocRef->m_nTextWrapMethodCur == WRAP_NO_TEXT_WRAP ){
m_pcDocRef->m_cLayoutMgr.CalculateTextWidth();
}else{
Expand Down
Loading

0 comments on commit 6404e24

Please sign in to comment.