Creator type
Not sure this is what we should have, but I finally get the "file creator " appear (using File Info application to verify it works as expected).See the screenshot below:

APPL -> means an application to create the file
OOO3 -> means the file is of OpenOffice.org 3 type (yes, I know, I changed for 3 after discussing the point with Oliver Braun (aka obr ), who provided me precious advices, like the extremely usefull issue 60840 I was not able to find alone :-)
What was missing is a couple of parameters (who gave ???? when undefined ), the Finder needs, to be able to open OpenOffice.org files, even when the extensions are missing. Yet another Mac OS X feature :)
The fix is based on the patch P. Luby donated some times ago, and who was not integrated (I sincerily believed it was). But this patch is now obsolete, and I had to adapt, and add a second modification to make it work. After some thought, other members like extFinderInfo need some investigations.
After tracing a bit, I finally found the missing information: in the patch (see issue 55862 ), I had to create the second entry in the structure.
I hope someone will confirm the result is ok, and if I can find some time, I'll commit the change in some cws. Maybe we can expect other positive side effects since it works ?
Below, the trace, where all other parameters I've discovered during the debugging. the important is, in the aCatInfo structure, you have to set filetype and fileCreator, and things are ok :)
Update: it is important to explain nothing is so easy, and the estimated time of work to make that little feature work is approximatively 5 hours.
To be continued ...
The (partial) trace :
Breakpoint 1, oslSetFileTypeFromPsz (pszStr=0xbfffdf6c "/Users/ericb/Library/Application Support/OpenOffice.org/3/user/registry/cache/org.openoffice.Office.Paths.dat") at /Users/ericb/Desktop/DEV300_m31/sal/osl/unx/file.cxx:2266
2266 if ( FSPathMakeRef( (const UInt8 *)pszStr, &aFSRef, 0 ) == noErr && FSGetCatalogInfo( &aFSRef, kFSCatInfoFinderInfo, &aCatInfo, NULL, NULL, NULL) == noErr )
(gdb) p aCatInfo
$1 = {
nodeFlags = 57305,
volume = -16385,
parentDirID = 0,
nodeID = 0,
sharingFlags = 237 '?',
userPrivileges = 245 '?',
reserved1 = 0 '\0',
reserved2 = 0 '\0',
createDate = {
highSeconds = 34290,
lowSeconds = 2247236563,
fraction = 7123
},
[...cut...]
Important information is below :
permissions = {466847000, 2415923616, 158532224, 1024},
finderInfo = "h\031\024\022$??? ?????!",
extFinderInfo = "??????!\000???\033???\033",
dataLogicalSize = 9574975677652728,
dataPhysicalSize = 9479542736618108,
rsrcLogicalSize = 13835339100762201912,
rsrcPhysicalSize = 386186189282738764,
valence = 0,
textEncodingHint = 467473592
}
Current language: auto; currently c++
Libellés : High-Tech, Mac OS X, OpenOffice, OSX
<< Accueil