chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
This commit is contained in:
1 parent
2b0c2055ff
commit
164968b62e
6171 files changed
+191244
-191243
No files matched your search
@@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "TWordFormulasTemplet.h"
|
||||
|
||||
#include "AFXDISP.H"
|
||||
@@ -17,7 +17,7 @@ TWordFormulasTemplet::TWordFormulasTemplet()
|
||||
|
||||
TWordFormulasTemplet::~TWordFormulasTemplet()
|
||||
{
|
||||
//释放内存申请资源
|
||||
//释放内存申请资源
|
||||
m_wdInlineShapes.ReleaseDispatch();
|
||||
m_wdDoc.ReleaseDispatch();
|
||||
m_wdDocs.ReleaseDispatch();
|
||||
@@ -34,14 +34,14 @@ BOOL TWordFormulasTemplet::OpenWordFormulasTempletFile(LPCTSTR pszFileName)
|
||||
{
|
||||
if(!m_wdApp.CreateDispatch(_T("Word.Application")))
|
||||
{
|
||||
AfxMessageBox(_T("不能执行Microsoft Word 8.0!"));
|
||||
AfxMessageBox(_T("不能执行Microsoft Word 8.0!"));
|
||||
return bSuc;
|
||||
}
|
||||
|
||||
m_wdApp.SetVisible(FALSE);
|
||||
m_wdDocs = m_wdApp.GetDocuments();
|
||||
|
||||
// 打开文件
|
||||
// 打开文件
|
||||
COleVariant covTrue((short)TRUE),covFalse((short)FALSE);
|
||||
COleVariant covOptional((long)DISP_E_PARAMNOTFOUND,VT_ERROR);
|
||||
|
||||
@@ -64,7 +64,7 @@ BOOL TWordFormulasTemplet::OpenWordFormulasTempletFile(LPCTSTR pszFileName)
|
||||
else
|
||||
{
|
||||
CString sTip;
|
||||
sTip.Format(_T("\n没有找到%s文件,请确定该文件是否存在!"), pszFileName);
|
||||
sTip.Format(_T("\n没有找到%s文件,请确定该文件是否存在!"), pszFileName);
|
||||
acutPrintf(sTip);
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void TWordFormulasTemplet::CloseFile()
|
||||
|
||||
m_wdApp.Quit(vFalse, vTrue, vFalse);
|
||||
|
||||
//释放内存申请资源
|
||||
//释放内存申请资源
|
||||
m_wdInlineShapes.ReleaseDispatch();
|
||||
m_wdDoc.ReleaseDispatch();
|
||||
m_wdDocs.ReleaseDispatch();
|
||||
@@ -108,7 +108,7 @@ void TWordFormulasTemplet::InsertFormula(int nIndex, Selection& wdSelection)
|
||||
wdSel = m_wdApp.GetSelection();
|
||||
if (wdSel.m_lpDispatch != NULL)
|
||||
{
|
||||
EmptyClipboard(); // 清空剪切板
|
||||
EmptyClipboard(); // 清空剪切板
|
||||
|
||||
inlShap.Select();
|
||||
wdSel.Copy();
|
||||
|
||||
Reference in new issue
Block a user