Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | On loading some older .sdw and .smf files some properties corrupt | ||
---|---|---|---|
Product: | Writer | Reporter: | caolanm |
Component: | code | Assignee: | Mathias_Bauer |
Status: | CLOSED FIXED | QA Contact: | issues@www <issues> |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues |
Version: | 627 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- | ||
Issue Depends on: | |||
Issue Blocks: | 906 |
Description
caolanm
2001-05-18 09:58:29 UTC
I think, the import of DocInfo happend in the SFX. Place a breakpoint in sfx2/source/doc/docinf.cxx in BOOL SfxDocumentInfo::Load( SvStream& rStream ) at the expression rStream >> nReloadSecs; in the context of the below snippit if( aHeader.nVersion > 5 ) { rStream >> bReloadEnabled; rStream.ReadByteString( aReloadURL ); rStream >> nReloadSecs; rStream.ReadByteString( aDefaultTarget ); } Load the sample .smf file LawOfErrorPropogation.smf nReloadSec gets filled with 0x77777777 and then aDefaultTarget gets filled with whatever junk is inside the summary stream at the current point. On exporting to xml (save as Math 6.0) in xmloff/source/meta/xmlmetae.xml sax is called to export this string, sax will then throw an exception on seeing an incorrect character, which throws all the way back to the .sxm export and so export fails. In File->Properties->Internet you can see the incorrect imported values. In many of the. smf examples the SfxDocumentInfo stream is only as long as it needs to be to store its properties. In the LawOfErrorPropogation.smf its much longer and filled with 0x77, which causes all the trouble, so it doesn't look like a test for version 5 in the header is good enough on its own to use as a basis of importing the internet properties. If impossible to fix in sfx import, it might be feasable to get xmloff to wrap the export of the broken properties in a try catch block and silently ignore ones that fail as a hackaround. The problem is that the old documents are trashed. We can't offer a "real" bugfix, but we added some heuristic investigations that should help in most cases. If a URL is longer than 1024 bytes and if doesn't have a valid protocol we know, we treat the whole internet settings as "garbage" and wipe them out. This will be fixed in all builds >=638. closed |