Hi, all:
I found out a bug in the Impress. When I open a especial document, the
Impress will dead. I need some help.
Discription------------------------------------------------------------
[Approach]
1.New a Impress document, and do some operation;
2.Click "File-Save", save the document according to the default file
type.
3.Do not close the document, and click "Insert-Object-OLE Object", open
the dialog of "Insert OLE Object", select "Create from file" and select the
check box of "Link to file", click the "Search" button, pop the open dialog,
select the file that saved just now, and click the "Open" button, click the
"OK" button in "Insert OLE Object" dialog finally.
4.Save the Impress document, and close the program.
5.when you open the file that modified just now, you will find that the
program dead.
[Result]
the program deaded.
[Expectation]
the program open the document like the Writer. I do the same approach
in the Writer, the Writer can open the document that created in the Writer
successfully.
Seach--------------------------------------------------------------------
I have been traced the program for the bug. And I found :
when I Open the document, the program's call order will be:
1.DoLoad() :
2.LoadOwnFormat() : like "bOk = xStorage.is() && LoadOwnFormat( *pMed
);" in DoLoad().
3.Load() : like "return Load( rMedium );" in LoadOwnFormat().
4.SdXMLFilter.Import() : like "bRet = SdXMLFilter( rMedium, *this,
sal_True, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() )
).Import( nError );" in Load().
5.ReadThroughComponent() : like "
if( !nRet && (meFilterMode != SDXMLMODE_Organizer) )
nRet = ReadThroughComponent(
xStorage, xModelComp, "content.xml", "Content.xml", xServiceFactory,
pServices->mpContent,
aFilterArgs, aName, sal_True );
" in SdXMLFilter.Import().
6.parseStream() : like "xParser->parseStream( aParserInput );" in
ReadThroughComponent().
7.I can't read the source of the function parseStream() now. When I
continue the program, will call DoLoad() again.
---------------------------------------------------------------------
Some of the function's summary is:
DoLoad() : sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
in the file of <sfx2/source/doc/objstor.cxx>
LoadOwnFormat() : sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium&
rMedium )
in the file of <sfx2/source/doc/objstor.cxx>
Load() : BOOL DrawDocShell::Load( SfxMedium& rMedium )
in the file of <sd/source/ui/docshell/docshel4.cxx>
SdXMLFilter.Import() : sal_Bool SdXMLFilter::Import( ErrCode& nError
)
in the file of <sd/source/filter/xml/sdxmlwrp.cxx>
songzhanjun
2007-07-27