Apache OpenOffice (AOO) Bugzilla – Issue 93663
3D chart series cannot be selected via mouse anymore
Last modified: 2013-02-24 21:20:29 UTC
Create a 3D chart for example a column chart. Ensure you are in the chart edit mode. Click on one of the 3D bars. -> The clicked bar series should be selected but instead only the chart wall is selected.
AW: This is definitely from aw033. In the integrated version, for 3D there is some kind of mixed stuff. The graphics are done using primitives completely, but the HitTest and other stuff at the model is still done using the old 3D geometry. I already started removing the old geometry (what means: all it's usages) before aw033 integration and i am adding those changes now. AW: Works well for all 3Dgraphics in the Apps, but leads to changed visualisations in Chart2. Reason is the mechanisms in 3D. There are principally 2 mechanisms in 3D working in the background: (1) The ViewTranaformation is always calculated so that all conent of a Scene is projected into the 2D geometry of the scene (SnapRect). (2) When model changes occurr at something that geometrically changes the scene's 3D content, it is necessary to adapt the 2D geometry of the scene to reflect the change in an intuitive way to the user. One example for (2): Two extruded ellipses in a scene, one is moved while scene is entered and that one selected. The ellipse is moved outside the current 2D bounds of the scene. Without (2), the canged content would be rendered in the current 2D bounds ofthe scene, making the objects getting smaller and somewhat 'snap' back to prior positions. (2) is also neded for objcet insertion, removal, line width and other 3D geometry changes and so on. Problem with (2) is that the old version is hard coded into the model, e.g. changing the line width of a 3D object which is member of a 2D scene will do mechanism (2) using it's various update mechanisms. This is often not wanted when using the API or e.g. at load time (the SnapRect needs to be set again at end of scene loading). Since the old stuff does not use model-view-controller seperation, there is no way to decise at model level if the change results in a unser interaction where (2) would be needed or someting else where (2) should be avoided. To go in the right direction, i completely removed (2) from the model's updating mechanisms and created a helper (E3DModifySceneSnapRectUpdater) for (2). It gets a SdrObject and - if all circumstancs are fulfilled - saves the SdrScene and it's current 3D transformation stack (ViewInformation3D). In the destructor, it uses the old view transformation and the changed 3D geometry to calculate a new projection BoundRect which is the new SnapRect for te scene and sets it. I changed all interactive parts to use this encapsulation when modifying 3D objects (also Undo/Redo) to get some closer to MVC-separation (though i had to make some compromises...). Ths works well, ahd (2) is no more used in reload and chart construction. Chart still looks differet than before, need to get IHA and discuss with her...
AW: I am using the helper for (2) (E3DModifySceneSnapRectUpdater) now in VDiagram::adjustAspectRatio3d where the 3D aspect ratio is applied. until then, the scene is equal in width and height. This gives pretty good results, but still slightly different. This may be caused by VDiagram::adjustAspectRatio3d being called four times, maybe? I prepared a cart2 and goodies for DEV300 m29 with debug and took a look at the involved sizes. Indeed, getSize() at the scene is slightly different in VDiagram::adjustPosAndSize_3d, but i think more correct than before. In the earlier versions mechanism (2) was triggered hundreds of times in integer sizes, but now only once. I think the differences are not that bad currently, but we will see. I will now secure the other 3D usages of mechanism (2). Removing temporary internal changes fo testing this and going through all possible cases...
AW: Secured all usages of (2) AFAIK. To completely remove the old 3d geometry, i need to change it's last user, the 3d dialog's control for lamps and objects (used mostly as preview). This needs to be changed to DrawingLayer usage. Looking at that...
AW: 3D lamp and preview dialog reworked, works now completely on DrawingLayer usage. All usages adapted (chart, too). Removed all 3d stuff from goodies, adapted all other apps to that. Removed no longer needed OpenGL stuff from VCL, adapted all old references (includes, etc...)
AW: Resynching to m31 to check with incompatible rebuild from vcl and goodies for the changes...
AW: Resync done, all removals worked well. Checking chart HitTest and selection...
AW: Checked, works, done.
AW->WG: Please verify. Create a chart, set type to 3D and see that when hovering the mouse over the chart 3d objects that the correct yellow infos are shown. Clicks on a chart data series will now again select it.
Verified in CWS.
Tested in m38. Closed.
*** Issue 68036 has been marked as a duplicate of this issue. ***