[Igarden-commit] Garden/source/Document ClientDocument.cp, 1.37.2.4, 1.37.2.5 ClientDocument.h, 1.1
Status: Beta
Brought to you by:
jlbedell
|
From: Jeffrey B. <jlb...@us...> - 2006-12-12 01:15:43
|
Update of /cvsroot/igarden/Garden/source/Document In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4466 Modified Files: Tag: Release_branch_v1 ClientDocument.cp ClientDocument.h Log Message: Set correct mod date for documents as well as sourceMaterials Index: ClientDocument.cp =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/ClientDocument.cp,v retrieving revision 1.37.2.4 retrieving revision 1.37.2.5 diff -C2 -d -r1.37.2.4 -r1.37.2.5 *** ClientDocument.cp 12 Dec 2006 00:59:31 -0000 1.37.2.4 --- ClientDocument.cp 12 Dec 2006 01:15:40 -0000 1.37.2.5 *************** *** 385,389 **** --- 385,405 ---- const char * subFilePtr; bool more; + xmlReadContext_t context; + + #if OPT_MACOS + // On the main branch, move this into the fileSpecifier method + FSSpec macSpec = filename.GetFileName(); + FSRef ref; + FSCatalogInfo info; + DateTimeRec dtr; + FSpMakeFSRef(&macSpec, &ref); + FSGetCatalogInfo(&ref, kFSCatInfoContentMod, &info, NULL, NULL, NULL); + SecondsToDate (info.contentModDate.lowSeconds, &dtr); + context.modDate.SetYMD(dtr.year, dtr.month, dtr.day); + #else + #error TO_BE_PORTED + #endif + errLine = 0; _spec = filename; *************** *** 428,432 **** } inZipFile.LocateSubFile("content.xml"); ! ec = XMLDocumentOpen(&inZipFile, errLine); inZipFile.CloseSubFile(); --- 444,448 ---- } inZipFile.LocateSubFile("content.xml"); ! ec = XMLDocumentOpen(&inZipFile, errLine, context); inZipFile.CloseSubFile(); *************** *** 448,452 **** { inFile.SetFilePos(21); ! ec = XMLDocumentOpen(&inFile, errLine); } else --- 464,468 ---- { inFile.SetFilePos(21); ! ec = XMLDocumentOpen(&inFile, errLine, context); } else *************** *** 512,516 **** /// XMLDocumentOpen // ! ErrorCode ClientDocument::XMLDocumentOpen(XGFile *filePtr, long &errLine) { RGDOMParser parser(NULL, false); --- 528,532 ---- /// XMLDocumentOpen // ! ErrorCode ClientDocument::XMLDocumentOpen(XGFile *filePtr, long &errLine, xmlReadContext_t &context) { RGDOMParser parser(NULL, false); *************** *** 520,524 **** ErrorCode ec = 0; const char *val; - xmlReadContext_t context; parseTree = parser.RunDOMParser(filePtr); --- 536,539 ---- Index: ClientDocument.h =================================================================== RCS file: /cvsroot/igarden/Garden/source/Document/ClientDocument.h,v retrieving revision 1.18.2.1 retrieving revision 1.18.2.2 diff -C2 -d -r1.18.2.1 -r1.18.2.2 *** ClientDocument.h 3 Dec 2006 02:09:55 -0000 1.18.2.1 --- ClientDocument.h 12 Dec 2006 01:15:41 -0000 1.18.2.2 *************** *** 31,34 **** --- 31,35 ---- #include "YAAFStrategy.h" #include "ColumnSets.h" + #include "Persist.h" #include <XGDocument.h> class SiteData; *************** *** 105,109 **** // methods ErrorCode DBDocumentOpen(XGFileSpecifier& filename, OSType creator); ! ErrorCode XMLDocumentOpen(XGFile *filePtr, long &errLine); #if OPT_MACOS bool SynchronizeFile(XGWindow *win); --- 106,110 ---- // methods ErrorCode DBDocumentOpen(XGFileSpecifier& filename, OSType creator); ! ErrorCode XMLDocumentOpen(XGFile *filePtr, long &errLine, xmlReadContext_t &context); #if OPT_MACOS bool SynchronizeFile(XGWindow *win); |