From a6b54d999992d72b2d9ea33efec0b7d642ea9f2d Mon Sep 17 00:00:00 2001
From: LiFan <2308045698@qq.com>
Date: 星期四, 18 七月 2024 12:21:12 +0800
Subject: [PATCH] update

---
 jrj/project/printview/Template.Print.ViewEx.cpp |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/jrj/project/printview/Template.Print.ViewEx.cpp b/jrj/project/printview/Template.Print.ViewEx.cpp
index 57fac78..2c1e1ab 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;
@@ -465,7 +464,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 +590,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 +734,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 +932,7 @@
 		content = content.replace(L"&nbsp",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 +952,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 +1092,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