Apache OpenOffice (AOO) Bugzilla – Issue 119941
[From Symphony] Removing chart in odt file, it causes a crash.
Last modified: 2013-07-11 13:32:53 UTC
Created attachment 78223 [details] .odt sample file which has 3 charts created with data in table Build info: AOO3.4_1327774 Steps: 1. Open the .odt sample file (there is three charts created with data in table). 2. Focus on any chart, press Delete/Backspace to remove it, or press Ctrl+X to cut it. Issue: Application will crash.
Created attachment 78285 [details] Add patch Root Cause: When cut or delete the chart, SwUndoFlyBase::DelFly will call SaveSection to store the comtent to strorage. In this step, chart filter functions will be called. And chart filter will call chart core functions to create the chart again. In the new chart2 base, chart core function will call a new class ExplicitCategoryProvider to create data source. In this step, when SW data source provider create the data source, it will create a new SwFlyFrm. But later in SwUndoFlyBase::DelFly, it will clear anchor related attributes of SwFlyFrm. Then finally null pointer occur. Solution: In pCnt->RemoveEmbeddedObject in SaveSection process for table chart, only remove the object from the object container, without removing it's storage and graphic stream. The chart already removed from formater.
ALG: Please when creating a patch, try to have main as local directory. In this patch, project comphelper and project 'writ' (probably sw) are mixed, the patch cannot easily be applied.
Confirmed in AOO 3.4 Rev 1325589
Created attachment 78414 [details] new patch re-create the patch for this issue.
ALG: Works as expected, also checked the code. Annotation: For bools, it makes no sense to use sal_Bool as long as these will not be involved in transporting over the UNO API, just use standard C++ 'bool'. Committed as r1352571, thanks for the patch!
Verified on r1374181. It works.
set Target Milestone to AOO 3.5.0 for PM purpose.