Apache OpenOffice (AOO) Bugzilla – Issue 43809
3d Charts have specular light source
Last modified: 2013-02-24 21:22:13 UTC
The constructor of the ChartScene sets the items Svx3DLightOnOff2Item( TRUE ) and Svx3DLightOnOff1Item( FALSE ), i.e. the first light source is switched off, and the second one on. You have changed the SetItem calls to SetMergedItem calls (see rev. 1.6.16.1 of sch/source/core/chtscene.cxx). As I could observe these methods seem not to set any items at the scene's item set (both GetMergedItem() and GetObjectItemSet() return item sets with no items in them). I suspect this method change is the reason for this.
AW: There are two problems. First, the chart scene constructor should indeed not use SetMergedItem (wich indicates that the attribute is applied evtl. to sub-objects, in this case contained 3D objects), but SetObjectItem which is protected in SdrObject and allow direct manipulation of the local ItemSet if the user is sure it will not affect sub-hierarchies (which is the case with scene-exclusive items here). Also, inside ChartScene::ChartScene please use SetModel before Initialize, else a temporary item set on the global fallback ItemPool is used and migrated when SetModel takes place. There is also indeed a missing line in E3dSceneProperties::SetMergedItem and E3dSceneProperties::ClearMergedItem (both in svx). But fixing all this does not solve the wrong lamp display in the 3D chart dialog: In sch/source/view/viewshe1.cxx in 'case SID_3D_STATE' where the dialog is initialized, the wrong ItemSet is fetched. pChView->Get3DAttributes() gives back the pool default items since the scene is not the selected object of the view. This must have changed somehow in sch.
AW: Created #i43821# to fix the bug in E3dSceneProperties::SetMergedItem and E3dSceneProperties::ClearMergedItem, will be in CWS aw028. AW->BM: Following things to do in sch: (1) In ChartScene::Initialize, use SetObjectItem(...) instead of SetMergedItem(...) (this is better for performance, or wait for my fix). (2) In ChartScene::ChartScene, call SetModel(...) first, then Initialize() (optional, but also performance). (3) When in sch/source/view/viewshe1.cxx in 'case SID_3D_STATE' the chart scene is not selected in the view, select it before using pChView->Get3DAttributes() (or get the ItemSet directly from the scene (if You have it there handy)). This only if You also think it makes not much sense to let the user change the pool default attributes in sch.
Did the changes. When no object is selected SID_3D_STATE and SID_3D_ASSIGN use the main ChartScene as object.
please verify. re-open issue and reassign to kla@openoffice.org
reassign to kla@openoffice.org
reset resolution to FIXED
ok in sch08
ok in master -> closed