Apache OpenOffice (AOO) Bugzilla – Issue 6780
Dialog popup when loading malformed sxd files.
Last modified: 2013-02-24 21:07:50 UTC
When I'm loading a malformed sxd document from the java ODK api, I get a popup dialog saying. -------------8<-------------------------------------------------------------- Error loading document file:////tmp/OOConverterTestFiles/TestDocumentBad.sxd: Read-Error. Format error discovered in the sub-document content.xml at position 2,217(row,col). OOFel.txt (END) ------------>8--------------------------------------------------------------- The document is malformed by me, I have deleted some random parts in it. My testfile is available at: http://www-und.ida.liu.se/~clamu955/TestDocumentBad.sxd
implementation issue
Code that is called while a document is loaded or saved should never show any dialogs. Only an interaction handler is allowed to do so. Unfortunately the SfxLoadEnvironment_Impl shows ErrorMessages if an error code is set at the SfxObjectShell. So we should do the following: Create a new "general" exception/interaction that just transports an error code. If the error code is a "warning": check medium for interaction handler and use it, if there is none, ignore the error code, set error code to ERRCODE_NONE. If the error code is an "error": check medium for interaction handler and use it, if there is none, throw an exception, set error code to ERRCODE_ABORT. Little problem: throwing the exception is only possible inside the Frameloader, not in LoadEnvironment_Impl!
.
I`ve created a new interaction for such generic core errors/warnings und integrated it into the framework/sfx modules. Now such errors/ warnings can be suppressed via api.
Created attachment 4374 [details] can be used for testing
I've forgot ... the attached test script needs one damaged XML file. It can be created very easy. Save any content as office 6.0 xml format - rename the file to *.zip - unpack it - change the content.xml part by removing one xml end tag - pack the zip again and rename it back.
Please check it on \\mav-11198\CWS\as3. THX
Issue has been verified in cws as3 -> OK !
As mentioned on the qa dev list on March 5th I will close all resolved <wontfix/duplicate/worksforme/invalid> issues. Please see this posting for details.