Apache OpenOffice (AOO) Bugzilla – Issue 74660
orientation of category axes swaps between 2D and 3D for bar charts
Last modified: 2013-02-24 21:20:35 UTC
A 2D bar chart displays the y axis from top to bottom (like the data in the spreadsheet.) When this chart is changed to 3D Look the y axis is swapped from bottom to top. This is a surprise for the user. a) the orientation should stay the same between 2D and 3D. b) the axes orientation should be configured c) Chart1 charts should migrate properly // needs to be spec'ed as well.
target 2.x
accepted, but I would rate the current behaviour as defect.
changing target
changed target due to limited resources
reset to new
@iha: The patch is finished, I didn't change the template code, but disable some codes at DiagramHelper.cxx, as the scale orientation of 2d bar chart is changed to "AxisOrientation_REVERSE" at function "DiagramHelper::setVertical", I think it's unnecessary. Please let me know your suggestions. Thank you!
Created attachment 55767 [details] patch_080814
Created attachment 55768 [details] patch_080814
@weiz: Removing the code in DiagramHelper::setVertical is correct but not sufficient. There is a problem with old files now which are created with OpenOffice versions that did not have the feature of reverse axis direction - for example with OpenOffice 2.2 or older. I'll attach an example file.
Created attachment 55942 [details] example doc showing the import problem
Problem with the patch: Load the attached doc with a version containing the attached patch and press F9 -> Within the upper right chart the direction of the vertical axis switches.
@iha: the final attachment is the patch for solve the error from the old versions. Please let me know your suggestions, Thanks!
Created attachment 56078 [details] patch_080814
@weiz, thanks for the patch. In principle that is the right way to fix the import of old files. But there were still two problems: 1) Categories are not shown anymore at the axes. That is because you created a new ScaleData and set it at the axes instead of using the existing ScaleData, thus the axis type switched from category to value. I corrected that before I checked in the changes. 2) Files created with OpenOffice.org 2.3 were loaded wrong, as the feature to reverse axes was introduced in version OpenOffice.org 2.4. I added an additional method isDocumentGeneratedWithOpenOfficeOlderThan2_4() to SchXMLTools to detect the files correctly that need a conversion. Checked all in to CWS calcchartrtl01.
Created attachment 56091 [details] example created with OOo 2.3
Created attachment 56092 [details] example created with OOo 2.4
I migrated the fixes to CWS rtlchart02.
@Thomas, please verify in CWS rtlchart02. The vertical axes in bar charts now points from bottom to top per default when a new chart is created. The direction does not switch anymore when switching between 2D and 3D. Please also ensure that the direction of the axes does not change when loading the attached example documents.
seen ok in cws rtlchart02 -> verified
Issue 74660 has been fixed in master version OOo-dev 3.1 .0 (OOO310m7 Build:9393) for Windows XP and can be closed.
Checked and closed by HitekSchool Group 1 as a part of Issue Hunting Party regression check.