https://issues.apache.org/ooo/show_bug.cgi?id=119956
--- Comment #2 from pengyunquan <[email protected]> --- Created attachment 78276 --> https://issues.apache.org/ooo/attachment.cgi?id=78276&action=edit Fix patch for Bug 119956 Root Cause : A rule in calc is that inserting a sheet should enable DrawUndo first, because inserting a new sheet will cause a new ScDrawPage being inserted into SdrModel, and this action should be managed by DrawUndo. But on creation of PivotTable, this rule is not obeyed. When creating PivotTable on new sheet, a new sheet is inserted without enablement of DrawUndo. As a result, when undo the creation of PivotTable, the new sheet is removed but the SdrModel is not by synchronized because it's the DrawUndo's responsibility to do the synchronization but DrawUndo is not recorded. When inserting sheets from file for the 2nd time, the undo list is cleared and some ScDrawPage should be destroyed, but as stated above the ScDrawPage is not correctly maintained when undo the creation of PivotTable, so incorrect ScDrawPage is destroyed and cause dead object access later. Solution : Enable DrawUndo before inserting a new sheet on creation of PivotTable -- You are receiving this mail because: You are the assignee for the bug.
