Issue 78358 - A blank document appears when trying to open an existing document
Summary: A blank document appears when trying to open an existing document
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m211
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: hdu@apache.org
QA Contact: issues@porting
URL: http://www.mactech.com/articles/macte...
Keywords: aqua, needhelp
: 79446 79678 79940 80939 (view as issue list)
Depends on: 78147 79226
Blocks: 79322
  Show dependency tree
 
Reported: 2007-06-13 05:00 UTC by mheily
Modified: 2008-03-20 11:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
kAEOpenDocuments testcase (AppleScript) (1.45 KB, text/plain)
2007-06-18 00:55 UTC, mheily
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mheily 2007-06-13 05:00:20 UTC
When a user double-clicks on an existing OpenOffice.org document in the Finder, the program is 
launched and a new blank document opens. The desired behavior is to open the requested document.

My hypothesis is that the Aqua port of OOo does not appear to handle the 'open documents' event that is 
delivered when the user double clicks on a document in the Finder.  

For more information about Apple Events Programming, please reference:

http://developer.apple.com/documentation/AppleScript/Conceptual/AppleEvents/responding_aepg/
chapter_6_section_4.html#//apple_ref/doc/uid/TP40001449-CH206-CEGFFJBB
Comment 1 eric.bachard 2007-06-15 23:39:16 UTC
Confirmed. But this is not a P1 ( P1 is build breaker)
Comment 2 mheily 2007-06-18 00:55:50 UTC
Created attachment 46020 [details]
kAEOpenDocuments testcase (AppleScript)
Comment 3 mheily 2007-06-18 01:05:09 UTC
My test case confirms that OOo does not handle the kAEOpenDocuments event.  Here is the plain text 
version of the test case:

   tell application "OpenOffice.org 2.3"
	   open the file "~/Desktop/Test.odt"
	   activate
   end tell


Please see the following URI for an example of how to register a handler for this event:

http://www.mactech.com/articles/mactech/Vol.19/19.06/Studio54/index.html

Regrettably, I only have an 800Mhz G4 iMac that is unsuitable for compiling OpenOffice from source.  
This should be a fairly easy fix for someone else to do.

Thanks,

Mark
Comment 4 hdu@apache.org 2007-07-03 15:00:49 UTC
@mheily: thank you for the excellent description and the links

I'm implementing the handling of the important AppleEvents now.
Comment 5 hdu@apache.org 2007-07-03 15:01:30 UTC
.
Comment 6 hdu@apache.org 2007-07-05 15:59:22 UTC
VCL now handles these kCoreEventClass events:
- kAEOpenDocuments
- kAEPrintDocuments
- kAEQuitApplication

This fix will become active as soon as the blocking issue 79226 is fixed.
Comment 7 eric.bachard 2007-07-12 12:56:22 UTC
*** Issue 79446 has been marked as a duplicate of this issue. ***
Comment 8 hdu@apache.org 2007-07-13 08:20:00 UTC
With issue 79226 and issue 79228 being fixed OpenDoc and PrintDoc events work. Since installing the 
apple event handlers before the first event loop is listened to this also works now even when the 
application was not active at the time the documents were clicked.
Comment 9 hdu@apache.org 2007-07-13 08:23:23 UTC
Forgot to mention that the fix is in CWS aquavcl02.
Comment 10 eric.bachard 2007-07-24 07:38:44 UTC
*** Issue 79940 has been marked as a duplicate of this issue. ***
Comment 11 hdu@apache.org 2007-08-22 10:18:12 UTC
Fix got into CWS aquavcl02 and SRC680_m225 => closing
Comment 12 eric.bachard 2007-08-22 15:13:24 UTC
*** Issue 80939 has been marked as a duplicate of this issue. ***
Comment 13 moxfox 2008-03-20 11:01:01 UTC
*** Issue 79678 has been marked as a duplicate of this issue. ***