Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Paste 3D scene back to Draw from Writer: crash | ||||||
---|---|---|---|---|---|---|---|
Product: | Draw | Reporter: | Risto Jääskeläinen <rjaaskel> | ||||
Component: | editing | Assignee: | wolframgarten | ||||
Status: | CLOSED FIXED | QA Contact: | issues@graphics <issues> | ||||
Severity: | Trivial | ||||||
Priority: | P2 | CC: | issues | ||||
Version: | OOo 3.2 | ||||||
Target Milestone: | OOo 3.2.1 | ||||||
Hardware: | PC | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
Risto Jääskeläinen
2010-02-22 11:10:54 UTC
Reproducible under XP and Linux with OOO320_m12 and m71, too. No crash reporter comes up. Reassigned. this is a crash in XColorItem::GetColorValue with a pTable == 0 and IsIndex() == true. cl->aw: You are the item/pool expert for drawinglayer and 3d objects, please have a look AW: Taking a look... AW: Looks like the ItemSet of the 3D scene has an invalid parent; the item is searched there and an also invalid item is found. Another hint is that the invalid parent (style) has another pool then the ItemSet itself. Maybe that when pasting from SW the style (parent) needs to be set explicitely to default since SW has no draw styles. Checking what happens at paste time... AW: Problem is a general one with properties for group-like objects (Groups and 3D Scenes). Their StyleSheet handling implementations work by looking for StyleSheets at the child objects for get, and by setting at all childs for set. This works well, but handling more complicated things like migrating the ItemPool (exactly this happens at copy/paste several times) and others may set a StyleSheet at the group-like object which is wrong. To avoid this it would be possible to have derivations from sdr::properties::BaseProperties for Group and 3DScene which do special things when a StyleSheet exists (from derivation level AttributeProperties). This would be hard and complicated (e.g. 3DScene attributes also need a local ItemSet for scene-specific attributes; the copy constructor needs to know in derivation level AttributeProperties to not 'copy' the style, etc). Simpler is to use on level AttributeProperties the knowledge if it's a group-like object by using SdrObject::IsGroupObject() to ask. There are also some places where currently GetStyleSheet() is used, but mpStyleSheet should be used since GetStyleSheet() may return a null pointer. Changing, testing.... AW: Due to old code interconnections every change leads to problems, need to check something else... AW: As often, this was the wrong trace for the specific problem. The real problem was that at paste from clipboard, the copied object had a style using the old model (which was deleted after paste, of course). A minimal invasive fix thus is to make sure this does not happen. Tried this, works well. Adding patch... Created attachment 68401 [details]
Suggested fix
AW: Added task to CWS impress187, commited, building. Setting to fixed. sj->wg: this issue is ready to be verified in cws[impress187] Verified in CWS. Works under Windows XP Openoffice 3.2.1 rc1 See issue 111636 for a regression issue. |