From e3488c13f1bcbcd39f8b9b267a3897fcc0d838aa Mon Sep 17 00:00:00 2001 From: xj qian <qianxj15@sina.com> Date: 星期三, 21 八月 2024 14:56:53 +0800 Subject: [PATCH] update sign --- jrj/project/printview/Template.Print.ViewEx.cpp | 35 +++++++++++++++++------------------ 1 files changed, 17 insertions(+), 18 deletions(-) diff --git a/jrj/project/printview/Template.Print.ViewEx.cpp b/jrj/project/printview/Template.Print.ViewEx.cpp index 57fac78..f622ea1 100644 --- a/jrj/project/printview/Template.Print.ViewEx.cpp +++ b/jrj/project/printview/Template.Print.ViewEx.cpp @@ -76,12 +76,10 @@ #endif - xstring GetSaveFileName(xstring initFileName, xstring filter, xstring ext) + xstring GetMySaveFileName(xstring initFileName, xstring filter, xstring ext) { - wchar_t szFileName[255]; - wchar_t szPath[255]; - szFileName[0] = 0; - szPath[0] = 0; + wchar_t szFileName[255] = { 0 }; + wchar_t szPath[255] = { 0 }; if(initFileName !=L"") { @@ -95,10 +93,11 @@ } int nFilterIndex = 1; - OPENFILENAMEW ofn; - - ofn.lStructSize = 88;//sizeof(ofn); - ofn.hwndOwner = 0; + OPENFILENAMEW ofn = { 0 }; + //::ZeroMemory(&ofn,sizeof(OPENFILENAMEW)) + //ofn.lStructSize = 88;//sizeof(ofn); + ofn.lStructSize = sizeof(ofn); + ofn.hwndOwner = GetHWND(); ofn.hInstance = 0; ofn.lpstrFilter = filter; //"JPEG 文件(*.jpg)\0*.jpg;*.jpeg;*.png;*.gif;*.bmp\0全部文件(*.*)\0*.*\0"; @@ -138,7 +137,7 @@ if(m_EntityName==L"SaleOrder") pre=L"PI"; if(m_EntityName==L"GDN3")pre=L"INV"; } - xstring file1 = GetSaveFileName(pre+m_EntityNo+L".xlsx", + xstring file1 = GetMySaveFileName(pre+m_EntityNo+L".xlsx", L"Excel1文件(*.xlsx)\0*.xlsx;*.xls\0Excel97文件(*.xls)\0*.xls\0PDF文件(*.pdf)\0*.pdf\0", L"xlsx"); if(file1 ==L"") return 1; @@ -420,7 +419,6 @@ xstring DownLoadPaperPic(xstring guid) { - xstring path = xutil::GetModuleTmpPath(); xstring ext = L"jpg"; xstring filename = guid + L"." + ext; @@ -465,7 +463,7 @@ dataUrl = L"/sale/data/"+sEntityName+ L"/"+ dataUrl; if(!m_dataset) { - xml x0 = new xml; + xml x0 ; if (xurl::get(dataUrl,arg.GetString(),x0) != 1) { alert(L"数据集出错了!"); @@ -591,10 +589,11 @@ int updateHtml() { + return 1; IHTMLDocument3* doc = (IHTMLDocument3 * )ole_print.GetHtmlDocument(); - IHTMLElementCollection* rows; + IHTMLElementCollection* rows = NULL; + IHTMLElementCollection* rows2 = NULL; doc->getElementsByTagName((BSTR)L"tr",&rows); - IHTMLElementCollection* rows2; doc->getElementsByTagName((BSTR)L"td",&rows2); long len; rows->get_length(&len); @@ -734,7 +733,7 @@ SendCtrlCmd(cell,L"xmFormatShowGrid"); showgrid = true; }*/ - xml x1 = new xml; + xml x1 ; xstring content1 = x.xml(); content1 = content1.replace(L"[空]",L" ",0); @@ -932,7 +931,7 @@ content = content.replace(L" ",L"[空]",0); content = content.replace(L"&",L"",0); - xml x0 = new xml; + xml x0 ; x0.loadXML(L"<Bill/>"); x0.documentElement().settext(content); content = x0.xml(); @@ -952,7 +951,7 @@ x.loadXML(ls_xml); xaserverarg arg; - arg.setNativePointer(xaserverarg::CreateInstance()); + arg.AddArg(L"content", x.xml()); if(xurl::get(L"/sale/data/DocumentList3/bill/update", arg.GetString(),x)!=1) @@ -1092,7 +1091,7 @@ ole_print.ExecWB(27,0); return 1; alert(L"xxx"); - xml x1 = new xml; + xml x1 ; xaserver::ExecXQuery(GetServerUrl(), L"[xsl.getdevobj.xq]",L"<args/>",x1); } -- Gitblit v1.9.3