version 1.22, 2008/03/13 09:13:20
|
version 1.23, 2008/04/04 14:09:22
|
Line 491 void DumpTemplateElement(Element el, Doc
|
Line 491 void DumpTemplateElement(Element el, Doc
|
|
|
/*---------------------------------------------------------------------- |
/*---------------------------------------------------------------------- |
* Save an opened document to a specified path in order to open. |
* Save an opened document to a specified path in order to open. |
* \param doc Original doc to save |
* param doc Original doc to save |
* \param newdoc Document where reopen it |
* param newdoc Document where reopen it |
* \param newpath URI where save the doc |
* param newpath URI where save the doc |
* \param temppath Path of temporary create file |
|
----------------------------------------------------------------------*/ |
----------------------------------------------------------------------*/ |
ThotBool SaveDocumentToNewDoc(Document doc, Document newdoc, char* newpath, char** temppath) |
ThotBool SaveDocumentToNewDoc(Document doc, Document newdoc, char* newpath) |
{ |
{ |
ElementType elType; |
ElementType elType; |
Element root; |
Element root; |
Line 504 ThotBool SaveDocumentToNewDoc(Document d
|
Line 503 ThotBool SaveDocumentToNewDoc(Document d
|
ThotBool res = FALSE; |
ThotBool res = FALSE; |
|
|
localFile = GetLocalPath (newdoc, newpath); |
localFile = GetLocalPath (newdoc, newpath); |
|
|
// update all links |
// update all links |
SetRelativeURLs (doc, newpath, "", FALSE, FALSE, FALSE); |
SetRelativeURLs (doc, newpath, "", FALSE, FALSE, FALSE); |
// prepare the new document view |
// prepare the new document view |
Line 532 ThotBool SaveDocumentToNewDoc(Document d
|
Line 530 ThotBool SaveDocumentToNewDoc(Document d
|
else |
else |
/* docType = docXml; */ |
/* docType = docXml; */ |
res = TtaExportDocumentWithNewLineNumbers (doc, localFile, NULL, FALSE); |
res = TtaExportDocumentWithNewLineNumbers (doc, localFile, NULL, FALSE); |
|
|
if(temppath) |
|
*temppath = localFile; |
|
else |
|
TtaFreeMemory(localFile); |
|
return res; |
return res; |
} |
} |