|
From: Andre R. <and...@us...> - 2006-03-03 21:19:23
|
Update of /cvsroot/frontierkernel/Frontier/Common/source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23101/Common/source Modified Files: opxml.c opverbs.c Log Message: Fixed data loss when making a copy of or converting a hoisted outlines to OPML. Index: opverbs.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/opverbs.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** opverbs.c 14 Jan 2005 22:15:52 -0000 1.6 --- opverbs.c 3 Mar 2006 21:19:19 -0000 1.7 *************** *** 1099,1102 **** --- 1099,1108 ---- 5.1.5b9 dmb: preserve barcursor in copied outline + + 2006-03-03 aradke: if the source outline is hoisted, temporarily unhoist it + in order to copy all lines. this fixes data loss when making an in-memory + copy of an outline and it restores pre-5.0.2b12 behavior. until then, + obverbcopyvalue used pack/unpack to make a copy which preserves hoisted lines. + http://sourceforge.net/tracker/index.php?func=detail&aid=1259245&group_id=120666&atid=687798 */ *************** *** 1124,1131 **** --- 1130,1140 ---- register hdloutlinerecord hsource = (hdloutlinerecord) hdata; long lnumcursor; + boolean flpoppedhoists; oppushoutline (hsource); opwriteeditbuffer (); + + flpoppedhoists = oppopallhoists (); /*2006-03-03 aradke: temporarily unhoist before getting cursor position*/ opgetnodeline ((**hsource).hbarcursor, &lnumcursor); *************** *** 1159,1162 **** --- 1168,1180 ---- oppopoutline (); + + if (flpoppedhoists) { /*2006-03-03 aradke*/ + + oppushoutline (hsource); + + oprestorehoists (); + + oppopoutline (); + } } Index: opxml.c =================================================================== RCS file: /cvsroot/frontierkernel/Frontier/Common/source/opxml.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** opxml.c 27 Feb 2006 21:46:29 -0000 1.5 --- opxml.c 3 Mar 2006 21:19:19 -0000 1.6 *************** *** 953,961 **** 7.0b21 PBS: Build the <body> section. - - 7.0b30 PBS: don't save children of dynamic headlines. */ boolean fl = false; --- 953,963 ---- 7.0b21 PBS: Build the <body> section. 7.0b30 PBS: don't save children of dynamic headlines. + + 2006-02-27 aradke: de-hoist outline before collecting body text to capture all nodes, avoids data loss + http://sourceforge.net/tracker/index.php?func=detail&aid=1259245&group_id=120666&atid=687798 */ + boolean flpoppedhoists; boolean fl = false; *************** *** 967,973 **** --- 969,980 ---- oppushoutline (ho); + flpoppedhoists = oppopallhoists (); /*2006-02-27 aradke: needs outline pushed*/ + if (!opxmlvisitnondynamicnodes (&opxmlbodyvisit, htext)) /*visit every headline, top to bottom, calling opxmlbodyvisit on each*/ goto exit; + if (flpoppedhoists) /*2006-02-27 aradke*/ + oprestorehoists (); + oppopoutline (); |