ooo-build r14470 - in branches/ooo-build-3-0: . patches/dev300



Author: tml
Date: Mon Nov 10 11:54:41 2008
New Revision: 14470
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14470&view=rev

Log:
2008-11-08  Tor Lillqvist  <tml novell com>

	bnc#418407 - Sending a document as email from OpenOffice with GW
	freezes both

	* patches/dev300/win32-gw-send-mail.diff
	(shell/source/win32/simplemail/senddoc.cxx): Show a very simple
	error message, a fixed string in English, using MessageBox(), if
	one of the MAPI calls fails.

	(shell/source/win32/simplemail/smplmailclient.cxx): Don't wait for
	the senddoc process. Also then remove the osl_getProcessInfo()
	calls. Any failures in the MAPI calls have then to be reported by
	the senddoc process itself, see above.

	This change probably now then means that if somebody is using OOo
	Basic to automate sending of mail, it is no longer possible to
	know whether the sending succeeded or not. But is this something
	we care about? And anyway, at least with GW such automation can't
	be non-interactive anyway, I think.



Modified:
   branches/ooo-build-3-0/ChangeLog
   branches/ooo-build-3-0/patches/dev300/win32-gw-send-mail.diff

Modified: branches/ooo-build-3-0/patches/dev300/win32-gw-send-mail.diff
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/win32-gw-send-mail.diff	(original)
+++ branches/ooo-build-3-0/patches/dev300/win32-gw-send-mail.diff	Mon Nov 10 11:54:41 2008
@@ -29,3 +29,37 @@
          mfd.nPosition = sal::static_int_cast<ULONG>(-1);
          pMapiAttachmentList->push_back(mfd);        
      }            
+@@ -306,6 +306,9 @@
+     {
+         OSL_ENSURE(false, ex.what());
+     }        
++    if (ulRet != SUCCESS_SUCCESS)
++        // FIXME: Localisation of this message..
++        MessageBox( NULL, "Sending mail failed. Please save this document instead and attach it from within your e-mail client.", "OpenOffice.org senddoc.exe", MB_OK|MB_ICONERROR|MB_TOPMOST );
+     return ulRet;
+ }
+ 
+--- shell/source/win32/simplemail/smplmailclient.cxx
++++ shell/source/win32/simplemail/smplmailclient.cxx
+@@ -147,7 +147,7 @@
+             senddocUrl.pData,
+             (rtl_uString**)&rCommandArgs[0], 
+             rCommandArgs.size(),
+-            osl_Process_WAIT | osl_Process_DETACHED,
++            osl_Process_DETACHED,
+             NULL,
+             NULL,
+             NULL,
+@@ -157,11 +157,8 @@
+         if (err != osl_Process_E_None)
+             return false;
+                 
+-        oslProcessInfo procInfo;
+-        procInfo.Size = sizeof(oslProcessInfo);    
+-        osl_getProcessInfo(proc, osl_Process_EXITCODE, &procInfo);
+         osl_freeProcessHandle(proc);   
+-        return (procInfo.Code == SUCCESS_SUCCESS);            
++        return true;
+     }
+ } // namespace private 
+ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]